{"id":16068056,"url":"https://github.com/ged/hoe-highline","last_synced_at":"2025-04-05T10:14:11.894Z","repository":{"id":65988002,"uuid":"1472726","full_name":"ged/hoe-highline","owner":"ged","description":"A Hoe plugin for building interactive Rake tasks. (Github mirror)","archived":false,"fork":false,"pushed_at":"2014-04-05T21:23:28.000Z","size":140,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T20:56:59.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bitbucket.org/ged/hoe-highline","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ged.png","metadata":{"files":{"readme":"README.rdoc","changelog":"History.rdoc","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-03-12T21:13:30.000Z","updated_at":"2018-06-12T23:09:02.000Z","dependencies_parsed_at":"2023-02-19T20:40:24.343Z","dependency_job_id":null,"html_url":"https://github.com/ged/hoe-highline","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fhoe-highline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fhoe-highline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fhoe-highline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ged%2Fhoe-highline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ged","download_url":"https://codeload.github.com/ged/hoe-highline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318746,"owners_count":20919483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T06:08:17.878Z","updated_at":"2025-04-05T10:14:11.864Z","avatar_url":"https://github.com/ged.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= hoe-highline\n\n* https://bitbucket.org/ged/hoe-highline\n* https://github.com/ged/hoe-highline\n\n== Description\n\nA Hoe plugin for building interactive Rake tasks.\n\nHoe-highline, as you might have guessed from the name, adds prompting and\ndisplaying functions from the HighLine[http://highline.rubyforge.org/] gem to your Rake\nenvironment, allowing you to ask questions, prompt for passwords, build menus,\nand other fun stuff.\n\n\n== Installation\n\n    gem install hoe-highline\n\n\n== Usage\n\nIn your Rakefile:\n\n\tHoe.plugin :highline\n\n\tHoe.spec 'mygem' do\n\n\t\t# Configure the highline terminal to your liking\n\t\thighline.wrap_at = :auto  # Auto-wrap output\n\n\tend\n\n\t# Generate an email, show it, confirm they want to send it, then prompt\n\t# for a SMTP connection information before sending\n\ttask :send_email do\n\t\tmessage = generate_email( :full )\n\t\tsay \"About to send this:\"\n\t\tsay( mail )\n\n\t\tif agree( \"Okay to send it? \" )\n\t\t\trequire 'socket'\n\t\t\trequire 'net/smtp'\n\t\t\trequire 'etc'\n\n\t\t\tusername = ask( \"Email username: \" ) do |q|\n\t\t\t\tq.default = Etc.getlogin  # default to the current user\n\t\t\tend\n\t\t\tpassword = ask( \"Email password: \" ) do |q|\n\t\t\t\tq.echo = '*'  # Hide the password\n\t\t\tend\n\n\t\t\tsay \"Creating SMTP connection to #{SMTP_HOST}:#{SMTP_PORT}\"\n\t\t\tsmtp = Net::SMTP.new( SMTP_HOST, SMTP_PORT )\n\t\t\tsmtp.set_debug_output( $stderr )\n\t\t\tsmtp.esmtp = true\n\t\t\tsmtp.enable_starttls\n\n\t\t\thelo = Socket.gethostname\n\t\t\tsmtp.start( helo, username, password, :plain ) do |smtp|\n\t\t\t\tsmtp.send_message( message, email_from, *email_to )\n\t\t\tend\n\t\telse\n\t\t\tabort \"Okay, aborting.\"\n\t\tend\n\tend\n\nThere is also a 'demo' task in this library's Rakefile that has a few ideas for things you might want to do. Running it looks like this:\n\n\thoe-highline Demo\n\n\tYou can prompt for a yes-or-no answer with agree()\n\tKnow what I mean (nudge, nudge, wink, wink)? [yn] y\n\tWhat's it like?\n\n\tYou can ask for input with ask()\n\tWhat could be better than that? Nothing!\n\tActually, that was a rhetorical question, but you answered: \"Nothing!\"\n\n\tYou can also ask() for things like passwords with a little configuration\n\tSuper sekrit password: **********\n\tOkay, using your 10-character password for something nefarious...\n\n\tYou can also use choose() for building a menu.\n\tWhat editor do you prefer?\n\t1. Emacs\n\t2. vi\n\t3. Textmate\n\t4. pico\n\t5. RubyMine\n\t6. FreeRIDE\n\t?  3\n\tGood to know (you picked \"Textmate\").\n\n\tOr build a complex menu using a block.\n\tAnnounce a new release:\n\t1. ruby-talk\n\t2. Blog\n\t3. Twitter\n\t4. Exit\n\t?  2\n\tPosting to blog.you.com!\n\t1. ruby-talk\n\t2. Twitter\n\t3. Exit\n\t?  1\n\tSending mail!\n\t1. Twitter\n\t2. Exit\n\t?  2\n\n\tThere is also a list() function for display stuff in a compact list\n\tFor example, here's a list of the available tasks:\n\t.hg/branch                    ChangeLog\n\tcheck_extra_deps              check_manifest\n\tclobber                       clobber_docs\n\tcommit-msg.txt                config_hoe\n\tdefault                       demo\n\tdeps:list                     doc\n\tgem                           generate_key\n\thg:ci                         hg:commit\n\thg:prep_release               hg:pull\n\thg:push_without_confirmation  hg:update\n\tnewb                          package\n\tpkg/hoe-highline-0.0.1.gem    pkg/hoe-highline-0.0.1.tgz\n\tpre                           prerelease\n\trcov                          rcov_overlay\n\trelease_sanity                release_to\n\tridocs\n\n== Contributing\n\nYou can check out the current development source with Mercurial via its\n{Bitbucket project}[https://bitbucket.org/ged/hoe-highline]. Or if you prefer Git, via\n{its Github mirror}[https://github.com/ged/ruby-openldap].\n\nAfter checking out the source, run:\n\n    $ rake newb\n\nThis task will install any missing dependencies, run the tests/specs,\nand generate the API documentation.\n\n\n== License\n\nCopyright (c) 2011-2014, Michael Granger\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,\n  this list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of the author/s, nor the names of the project's\n  contributors may be used to endorse or promote products derived from this\n  software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fhoe-highline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fged%2Fhoe-highline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fged%2Fhoe-highline/lists"}