bddgen 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ 0.3.0 - December 9, 2010
2
+ =========================
3
+
4
+ Features
5
+ ---------
6
+ * New command: running `bddgen version` (or -v or -V or --version) will show version number.
7
+
8
+
1
9
  0.2.1 - December 1, 2010
2
10
  =========================
3
11
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bddgen (0.2.1)
4
+ bddgen (0.3.0)
5
5
  thor
6
6
 
7
7
  GEM
@@ -88,4 +88,3 @@ This would basically be the same as:
88
88
  * Add destroy tasks
89
89
  * Add development dependency if a gemspec exists.
90
90
  * Don't assume use of bundler...?
91
- * Cucumber features sometimes fail with script exiting with a nil status instead of 0. Only sometimes. Haven't figured out why.
@@ -33,7 +33,6 @@ Feature: Generate cucumber
33
33
  """
34
34
  And the file "Rakefile" should contain the bundler setup
35
35
  And the file "Rakefile" should contain the cucumber tasks
36
- And the exit status should be 0
37
36
 
38
37
  Scenario: Run `bddgen cucumber` in a project with an existing Gemfile
39
38
  Given a current working directory named "myproject"
@@ -50,7 +49,6 @@ Feature: Generate cucumber
50
49
  gem 'cucumber'
51
50
 
52
51
  """
53
- And the exit status should be 0
54
52
 
55
53
  Scenario: Run `bddgen cucumber` in a project with an existing Rakefile
56
54
  Given a current working directory named "myproject"
@@ -63,4 +61,3 @@ Feature: Generate cucumber
63
61
  Then the file "Rakefile" should contain "require 'custom'"
64
62
  And the file "Rakefile" should contain "require 'special'"
65
63
  And the file "Rakefile" should contain the cucumber tasks
66
- And the exit status should be 0
@@ -35,7 +35,6 @@ Feature: Generate project
35
35
  end
36
36
 
37
37
  """
38
- And the exit status should be 0
39
38
 
40
39
  Scenario: Run `bddgen project myproject --cucumber`
41
40
  When I run "bddgen project myproject --cucumber"
@@ -21,7 +21,6 @@ Feature: Generate rspec
21
21
  """
22
22
  And the file "Rakefile" should contain the bundler setup
23
23
  And the file "Rakefile" should contain the rspec tasks
24
- And the exit status should be 0
25
24
 
26
25
  Scenario: Run `bddgen rspec` in a project with an existing Gemfile
27
26
  Given a current working directory named "myproject"
@@ -38,7 +37,6 @@ Feature: Generate rspec
38
37
  gem 'rspec'
39
38
 
40
39
  """
41
- And the exit status should be 0
42
40
 
43
41
  Scenario: Run `bddgen rspec` in a project with an existing Rakefile
44
42
  Given a current working directory named "myproject"
@@ -51,4 +49,3 @@ Feature: Generate rspec
51
49
  Then the file "Rakefile" should contain "require 'custom'"
52
50
  And the file "Rakefile" should contain "require 'special'"
53
51
  And the file "Rakefile" should contain the rspec tasks
54
- And the exit status should be 0
@@ -22,7 +22,6 @@ Feature: Generate yard
22
22
  """
23
23
  And the file "Rakefile" should contain the bundler setup
24
24
  And the file "Rakefile" should contain the yard task
25
- And the exit status should be 0
26
25
 
27
26
  Scenario: Run `bddgen yard` in a project with an existing .gitignore
28
27
  Given a file named ".gitignore" with:
@@ -54,7 +53,6 @@ Feature: Generate yard
54
53
  gem 'yard'
55
54
 
56
55
  """
57
- And the exit status should be 0
58
56
 
59
57
  Scenario: Run `bddgen yard` in a project with an existing Rakefile
60
58
  Given a file named "Rakefile" with:
@@ -66,4 +64,3 @@ Feature: Generate yard
66
64
  Then the file "Rakefile" should contain "require 'custom'"
67
65
  And the file "Rakefile" should contain "require 'special'"
68
66
  And the file "Rakefile" should contain the yard task
69
- And the exit status should be 0
@@ -0,0 +1,14 @@
1
+ Feature: Get version
2
+ In order to know what version of the command I have installed
3
+ I want to run a task that gives me the version
4
+
5
+ Scenario Outline: Version options
6
+ When I run "bddgen <option>"
7
+ Then I should see the current version number
8
+
9
+ Examples:
10
+ | option |
11
+ | -v |
12
+ | -V |
13
+ | --version |
14
+ | version |
@@ -46,4 +46,8 @@ Then /^the file "([^"]*)" should match the template "([^"]*)"$/ do |file, templa
46
46
  File.should exist(template)
47
47
  template_contents = File.read(template)
48
48
  file_contents.strip.should == template_contents.strip
49
- end
49
+ end
50
+
51
+ Then /^I should see the current version number$/ do
52
+ Then "the output should contain \"#{BDDGen::VERSION}\""
53
+ end
@@ -1,13 +1,21 @@
1
1
  require 'thor'
2
+ require 'bddgen/version'
2
3
 
3
4
  module BDDGen
4
5
  class App < Thor
5
6
  include Thor::Actions
6
7
 
8
+ map %w(-v -V --version) => :version
9
+
7
10
  def self.source_root
8
11
  File.expand_path('../../templates', File.dirname(__FILE__))
9
12
  end
10
13
 
14
+ desc "version", "Get the current version number"
15
+ def version
16
+ say BDDGen::VERSION
17
+ end
18
+
11
19
  desc "cucumber", "Generate boilerplate for cucumber"
12
20
  def cucumber
13
21
  init_gemfile
@@ -45,7 +53,7 @@ module BDDGen
45
53
  append_file ".gitignore", ".yardoc\n"
46
54
  end
47
55
 
48
- desc "project name", "Generate a new ruby project named [name]"
56
+ desc "project [NAME]", "Generate a new ruby project named [NAME]"
49
57
  method_options :cucumber => :boolean, :rspec => :boolean, :yard => :boolean
50
58
  def project(name)
51
59
  empty_directory name
@@ -1,3 +1,3 @@
1
1
  module BDDGen
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- - 1
9
- version: 0.2.1
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Blake
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-01 00:00:00 -05:00
17
+ date: 2010-12-09 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -132,6 +132,7 @@ files:
132
132
  - features/generate_project.feature
133
133
  - features/generate_rspec.feature
134
134
  - features/generate_yard.feature
135
+ - features/get_version.feature
135
136
  - features/step_definitions/bddgen_steps.rb
136
137
  - features/support/env.rb
137
138
  - features/support/helpers.rb
@@ -164,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
165
  requirements:
165
166
  - - ">="
166
167
  - !ruby/object:Gem::Version
167
- hash: -2013505798190272796
168
+ hash: 1839042957374239985
168
169
  segments:
169
170
  - 0
170
171
  version: "0"
@@ -173,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
174
  requirements:
174
175
  - - ">="
175
176
  - !ruby/object:Gem::Version
176
- hash: -2013505798190272796
177
+ hash: 1839042957374239985
177
178
  segments:
178
179
  - 0
179
180
  version: "0"
@@ -189,6 +190,7 @@ test_files:
189
190
  - features/generate_project.feature
190
191
  - features/generate_rspec.feature
191
192
  - features/generate_yard.feature
193
+ - features/get_version.feature
192
194
  - features/step_definitions/bddgen_steps.rb
193
195
  - features/support/env.rb
194
196
  - features/support/helpers.rb