methadone 1.9.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -2
- data/bin/methadone +13 -2
- data/features/bootstrap.feature +13 -17
- data/features/rspec_support.feature +3 -9
- data/features/step_definitions/bootstrap_steps.rb +6 -0
- data/lib/methadone/version.rb +1 -1
- data/methadone.gemspec +1 -1
- data/templates/rspec/spec/something_spec.rb.erb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c7559354813dab091f2c25f43560370969f2163
|
4
|
+
data.tar.gz: c8132add31dd35726456c3d8a7f106ee3a24094b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c84eb26cc989c627f34da9dacdaf2e30766da33c530fb965dc17cc9530ad320b2cf79fb65dc45c3fac8ecde37c2af452684ab47c8892707b453853d27e876535
|
7
|
+
data.tar.gz: 79a67df9a6531b7a00a3b84a1560bcd46ea8869b5c69799a457f42e12d88397d3c2423a0ea3f1570651d8359963a38ed05540f8c916ffc1c5c91a00b78f6d4ed
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.2
|
data/.travis.yml
CHANGED
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
|
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', '~>
|
99
|
+
" #{gem_variable}.add_development_dependency('rspec', '~> 3')",
|
89
100
|
], :before => /^end\s*$/
|
90
101
|
end
|
91
102
|
|
data/features/bootstrap.feature
CHANGED
@@ -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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
And the output should match /rake install
|
62
|
-
And the output should match /rake build
|
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
|
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
|
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'
|
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
|
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
|
data/lib/methadone/version.rb
CHANGED
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
|
29
|
+
s.add_development_dependency("rspec", "~> 3")
|
30
30
|
s.add_development_dependency("i18n", "= 0.6.1")
|
31
31
|
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.
|
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-
|
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
|
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
|
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.
|
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
|