methadone 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea5a066a8f38016a6a0a185bae7a5f57e4d686cf
4
- data.tar.gz: 690d8cfdc514e92027804e18cb5836e46e820b3c
3
+ metadata.gz: 6c7559354813dab091f2c25f43560370969f2163
4
+ data.tar.gz: c8132add31dd35726456c3d8a7f106ee3a24094b
5
5
  SHA512:
6
- metadata.gz: c75f27bba82d19ea8990d0293d4a2cc40c9e39e1447b97f4f4d3a3329c6ef2df897e2179b2ac94937f2ecf07f19daa874ac09601efe9c0044ee2f1b388e589f8
7
- data.tar.gz: f85d5d1f8c0ae99125a4a1175ef65ae1931be39e66ee4b1f5e06e1b38e9b3c9543c061b7573e7d70c0c096ce0ac635b78b6aa8ad1cca189b5e26a9c4a1d5ae4b
6
+ metadata.gz: c84eb26cc989c627f34da9dacdaf2e30766da33c530fb965dc17cc9530ad320b2cf79fb65dc45c3fac8ecde37c2af452684ab47c8892707b453853d27e876535
7
+ data.tar.gz: 79a67df9a6531b7a00a3b84a1560bcd46ea8869b5c69799a457f42e12d88397d3c2423a0ea3f1570651d8359963a38ed05540f8c916ffc1c5c91a00b78f6d4ed
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.2
data/.travis.yml CHANGED
@@ -3,10 +3,9 @@ notifications:
3
3
  on_success: always
4
4
  script: 'bundle exec rake'
5
5
  rvm:
6
- - 1.9.2
7
6
  - 1.9.3
8
7
  - 2.0.0
9
8
  - 2.1.0
10
9
  - 2.2.0
11
- - jruby-18mode
10
+ - 2.2.2
12
11
  - jruby-19mode
data/bin/methadone CHANGED
@@ -66,7 +66,11 @@ main do |app_name|
66
66
 
67
67
  #Ensure the gemspec file mentions the correct license
68
68
  gemspec_content = File.read(gemspec)
69
- gemspec_content.gsub!(/(^\s*#{gem_variable}\.license\s*=\s*).*/,"\\1#{license.to_s.inspect}")
69
+ if gemspec_content =~ /(^\s*#{gem_variable}\.license\s*=\s*).*/
70
+ gemspec_content.gsub!(/(^\s*#{gem_variable}\.license\s*=\s*).*/,"\\1#{license.to_s.inspect}")
71
+ else
72
+ gemspec_content.gsub!(/(^\s*#{gem_variable}\.name\s*=\s*.*)/,"\\1\n #{gem_variable}.license=#{license.to_s.inspect}")
73
+ end
70
74
  File.open(gemspec,'w') {|f| f.write gemspec_content }
71
75
 
72
76
 
@@ -82,10 +86,17 @@ main do |app_name|
82
86
  " #{gem_variable}.add_development_dependency('rake')",
83
87
  " #{gem_variable}.add_dependency('methadone', '~> #{Methadone::VERSION}')",
84
88
  ], :before => /^end\s*$/
89
+ ruby_major,ruby_minor,ruby_patch = RUBY_VERSION.split(/\./).map(&:to_i)
90
+
91
+ if ruby_major >= 2 && ruby_minor >= 2
92
+ add_to_file gemspec, [
93
+ " #{gem_variable}.add_development_dependency('test-unit')",
94
+ ], :before => /^end\s*$/
95
+ end
85
96
 
86
97
  if rspec
87
98
  add_to_file gemspec, [
88
- " #{gem_variable}.add_development_dependency('rspec', '~> 2.99')",
99
+ " #{gem_variable}.add_development_dependency('rspec', '~> 3')",
89
100
  ], :before => /^end\s*$/
90
101
  end
91
102
 
@@ -7,6 +7,7 @@ Feature: Bootstrap a new command-line app
7
7
  Given the directory "tmp/newgem" does not exist
8
8
  And the directory "tmp/new-gem" does not exist
9
9
 
10
+ @wip
10
11
  Scenario: Bootstrap a new app from scratch
11
12
  When I successfully run `methadone tmp/newgem`
12
13
  Then the following directories should exist:
@@ -38,6 +39,7 @@ Feature: Bootstrap a new command-line app
38
39
  And the file "tmp/newgem/newgem.gemspec" should match /add_development_dependency\('rdoc'/
39
40
  And the file "tmp/newgem/newgem.gemspec" should match /add_development_dependency\('rake'/
40
41
  And the file "tmp/newgem/newgem.gemspec" should match /add_dependency\('methadone'/
42
+ And the file "tmp/newgem/newgem.gemspec" should include "test-unit" if needed
41
43
  And the file "tmp/newgem/newgem.gemspec" should use the same block variable throughout
42
44
  Given I cd to "tmp/newgem"
43
45
  And my app's name is "newgem"
@@ -51,15 +53,15 @@ Feature: Bootstrap a new command-line app
51
53
  And the banner should document that this app takes no arguments
52
54
  When I successfully run `rake -T -I../../lib`
53
55
  Then the output should match /rake clean/
54
- Then the output should match /rake clobber/
55
- Then the output should match /rake clobber_rdoc/
56
- Then the output should match /rake features/
57
- Then the output should match /rake rdoc/
58
- Then the output should match /rake release/
59
- Then the output should match /rake rerdoc/
60
- Then the output should match /rake test/
61
- And the output should match /rake install # Build and install newgem-0.0.1.gem into system gems/
62
- And the output should match /rake build # Build newgem-0.0.1.gem into the pkg directory/
56
+ And the output should match /rake clobber/
57
+ And the output should match /rake clobber_rdoc/
58
+ And the output should match /rake features/
59
+ And the output should match /rake rdoc/
60
+ And the output should match /rake release/
61
+ And the output should match /rake rerdoc/
62
+ And the output should match /rake test/
63
+ And the output should match /rake install/
64
+ And the output should match /rake build/
63
65
  When I run `rake -I../../../../lib`
64
66
  Then the exit status should be 0
65
67
  And the output should match /1 tests, 1 assertions, 0 failures, 0 errors/
@@ -100,10 +102,7 @@ Feature: Bootstrap a new command-line app
100
102
  And I cd to "tmp/new-gem"
101
103
  And my app's name is "new-gem"
102
104
  When I successfully run `bin/new-gem --version` with "lib" in the library path
103
- Then the output should contain:
104
- """
105
- new-gem version 0.0.1
106
- """
105
+ Then the output should match /new-gem version 0/
107
106
 
108
107
  Scenario: Version flag can be used to only show the app version with a custom format
109
108
  Given I successfully run `methadone tmp/new-gem`
@@ -111,10 +110,7 @@ Feature: Bootstrap a new command-line app
111
110
  And I cd to "tmp/new-gem"
112
111
  And my app's name is "new-gem"
113
112
  When I successfully run `bin/new-gem --version` with "lib" in the library path
114
- Then the output should contain:
115
- """
116
- new-gem V0.0.1
117
- """
113
+ Then the output should match /new-gem V0/
118
114
 
119
115
  Scenario: Won't squash an existing dir
120
116
  When I successfully run `methadone tmp/newgem`
@@ -14,17 +14,11 @@ Feature: Bootstrap a new command-line app using RSpec instead of Test::Unit
14
14
  |tmp/newgem/test |
15
15
  And the following files should exist:
16
16
  |tmp/newgem/spec/something_spec.rb |
17
- And the file "tmp/newgem/newgem.gemspec" should match /add_development_dependency\('rspec', '~> 2.99'/
17
+ And the file "tmp/newgem/newgem.gemspec" should match /add_development_dependency\('rspec'/
18
18
  When I cd to "tmp/newgem"
19
19
  And I successfully run `rake -T -I../../lib`
20
- Then the output should contain:
21
- """
22
- rake spec # Run RSpec code examples
23
- """
24
- And the output should not contain:
25
- """
26
- rake test # Run tests
27
- """
20
+ Then the output should match /rake spec/
21
+ And the output should not match /rake test/
28
22
  When I run `rake spec -I../../lib`
29
23
  Then the exit status should be 0
30
24
  And the output should contain:
@@ -39,3 +39,9 @@ Given /^"(.*?)" has configured version to show only the version (.*)and not help
39
39
  end
40
40
  end
41
41
  end
42
+
43
+ Then /^the file "(.*?)" should include "(.*?)" if needed$/ do |file, gemname|
44
+ if RUBY_VERSION =~ /^2\./ && RUBY_VERSION !~ /^2.0/ && RUBY_VERSION !~ /^2.1/
45
+ step %{the file "#{file}" should match /add_development_dependency\\('#{gemname}/}
46
+ end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Methadone #:nodoc:
2
- VERSION = "1.9.0" #:nodoc:
2
+ VERSION = "1.9.1" #:nodoc:
3
3
  end
data/methadone.gemspec CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency("clean_test")
27
27
  s.add_development_dependency("mocha", "0.13.2")
28
28
  s.add_development_dependency("sdoc")
29
- s.add_development_dependency("rspec", "~> 3.0.0")
29
+ s.add_development_dependency("rspec", "~> 3")
30
30
  s.add_development_dependency("i18n", "= 0.6.1")
31
31
  end
@@ -1,5 +1,5 @@
1
1
  describe "TestSomething" do
2
2
  it "should be true" do
3
- true.should == true
3
+ expect(true).to eq(true)
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: methadone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - davetron5000
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-21 00:00:00.000000000 Z
11
+ date: 2015-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 3.0.0
145
+ version: '3'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 3.0.0
152
+ version: '3'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: i18n
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  requirements: []
263
263
  rubyforge_project: methadone
264
- rubygems_version: 2.4.5
264
+ rubygems_version: 2.4.7
265
265
  signing_key:
266
266
  specification_version: 4
267
267
  summary: Kick the bash habit and start your command-line apps off right