From c0dbbf6400fa64d3e789f12e4d171513a8460323 Mon Sep 17 00:00:00 2001 From: Matt Brictson Date: Fri, 27 Feb 2015 20:24:52 -0800 Subject: [PATCH] Upgrade to Bundler 1.8 gem template --- LICENSE.txt | 35 +++++++++++++++++------------------ README.md | 5 +++++ airbrussh.gemspec | 8 ++++---- bin/console | 14 ++++++++++++++ bin/setup | 7 +++++++ test/test_airbrussh.rb | 2 +- 6 files changed, 48 insertions(+), 23 deletions(-) create mode 100755 bin/console create mode 100755 bin/setup diff --git a/LICENSE.txt b/LICENSE.txt index 54b6742..7c5fe2c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,22 +1,21 @@ -Copyright (c) 2015 Matt Brictson +The MIT License (MIT) -MIT License +Copyright (c) 2015 Matt Brictson -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md index 8d2fb33..d8ae94f 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,11 @@ Airbrussh needs work! The first priority is to add tests. Once good test coverag If you have ideas for other improvements, please contribute! +## Development + +After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment. + +To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing diff --git a/airbrussh.gemspec b/airbrussh.gemspec index 6376aff..c050617 100644 --- a/airbrussh.gemspec +++ b/airbrussh.gemspec @@ -16,14 +16,14 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/mattbrictson/airbrussh" spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0") - spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } - spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] spec.add_dependency "sshkit", ">= 1.6.1" - spec.add_development_dependency "bundler", "~> 1.7" + spec.add_development_dependency "bundler", "~> 1.8" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "minitest" spec.add_development_dependency "minitest-reporters" diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..cbeb0b6 --- /dev/null +++ b/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "airbrussh" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..b65ed50 --- /dev/null +++ b/bin/setup @@ -0,0 +1,7 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +bundle install + +# Do any other automated setup that you need to do here diff --git a/test/test_airbrussh.rb b/test/test_airbrussh.rb index ece1664..dd7f025 100644 --- a/test/test_airbrussh.rb +++ b/test/test_airbrussh.rb @@ -1,6 +1,6 @@ require "minitest_helper" -class TestAirbrussh < MiniTest::Unit::TestCase +class TestAirbrussh < Minitest::Test def test_that_it_has_a_version_number refute_nil ::Airbrussh::VERSION end