jeweler2 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/.document +8 -0
  2. data/ChangeLog.markdown +177 -0
  3. data/Gemfile +18 -0
  4. data/Gemfile.lock +47 -0
  5. data/LICENSE.txt +20 -0
  6. data/README.markdown +217 -0
  7. data/Rakefile +80 -0
  8. data/bin/jeweler +5 -0
  9. data/features/generator/cucumber.feature +103 -0
  10. data/features/generator/directory_layout.feature +86 -0
  11. data/features/generator/dotdocument.feature +13 -0
  12. data/features/generator/env_options.feature +9 -0
  13. data/features/generator/gemfile.feature +71 -0
  14. data/features/generator/git.feature +102 -0
  15. data/features/generator/license.feature +20 -0
  16. data/features/generator/rakefile.feature +158 -0
  17. data/features/generator/readme.feature +12 -0
  18. data/features/generator/test.feature +54 -0
  19. data/features/generator/test_helper.feature +149 -0
  20. data/features/placeholder.feature +5 -0
  21. data/features/step_definitions/debug_steps.rb +6 -0
  22. data/features/step_definitions/filesystem_steps.rb +70 -0
  23. data/features/step_definitions/generator_steps.rb +380 -0
  24. data/features/step_definitions/task_steps.rb +6 -0
  25. data/features/support/env.rb +42 -0
  26. data/features/tasks/build_gem.feature +9 -0
  27. data/features/tasks/version.feature +31 -0
  28. data/features/tasks/version_bumping.feature +49 -0
  29. data/jeweler.gemspec +245 -0
  30. data/jeweler2.gemspec +233 -0
  31. data/lib/jeweler/commands/build_gem.rb +36 -0
  32. data/lib/jeweler/commands/check_dependencies.rb +66 -0
  33. data/lib/jeweler/commands/install_gem.rb +31 -0
  34. data/lib/jeweler/commands/release_gemspec.rb +82 -0
  35. data/lib/jeweler/commands/release_to_git.rb +59 -0
  36. data/lib/jeweler/commands/release_to_rubygems.rb +28 -0
  37. data/lib/jeweler/commands/validate_gemspec.rb +30 -0
  38. data/lib/jeweler/commands/version/base.rb +55 -0
  39. data/lib/jeweler/commands/version/bump_major.rb +13 -0
  40. data/lib/jeweler/commands/version/bump_minor.rb +12 -0
  41. data/lib/jeweler/commands/version/bump_patch.rb +14 -0
  42. data/lib/jeweler/commands/version/write.rb +12 -0
  43. data/lib/jeweler/commands/write_gemspec.rb +39 -0
  44. data/lib/jeweler/commands.rb +20 -0
  45. data/lib/jeweler/errors.rb +8 -0
  46. data/lib/jeweler/gemcutter_tasks.rb +8 -0
  47. data/lib/jeweler/gemspec_helper.rb +87 -0
  48. data/lib/jeweler/generator/application.rb +61 -0
  49. data/lib/jeweler/generator/bacon_mixin.rb +43 -0
  50. data/lib/jeweler/generator/github_mixin.rb +29 -0
  51. data/lib/jeweler/generator/micronaut_mixin.rb +41 -0
  52. data/lib/jeweler/generator/minitest_mixin.rb +42 -0
  53. data/lib/jeweler/generator/options.rb +163 -0
  54. data/lib/jeweler/generator/rdoc_mixin.rb +9 -0
  55. data/lib/jeweler/generator/riot_mixin.rb +42 -0
  56. data/lib/jeweler/generator/rspec_mixin.rb +42 -0
  57. data/lib/jeweler/generator/shindo_mixin.rb +44 -0
  58. data/lib/jeweler/generator/shoulda_mixin.rb +42 -0
  59. data/lib/jeweler/generator/testspec_mixin.rb +42 -0
  60. data/lib/jeweler/generator/testunit_mixin.rb +39 -0
  61. data/lib/jeweler/generator/yard_mixin.rb +14 -0
  62. data/lib/jeweler/generator.rb +295 -0
  63. data/lib/jeweler/rubyforge_tasks.rb +95 -0
  64. data/lib/jeweler/rubygems_dot_org_tasks.rb +38 -0
  65. data/lib/jeweler/rubygems_tasks.rb +38 -0
  66. data/lib/jeweler/specification.rb +110 -0
  67. data/lib/jeweler/tasks.rb +224 -0
  68. data/lib/jeweler/templates/.document +5 -0
  69. data/lib/jeweler/templates/.gitignore +48 -0
  70. data/lib/jeweler/templates/Gemfile +12 -0
  71. data/lib/jeweler/templates/LICENSE.txt +20 -0
  72. data/lib/jeweler/templates/README.rdoc +19 -0
  73. data/lib/jeweler/templates/Rakefile +9 -0
  74. data/lib/jeweler/templates/bacon/flunking.rb +7 -0
  75. data/lib/jeweler/templates/bacon/helper.rb +9 -0
  76. data/lib/jeweler/templates/bundler_setup.erb +10 -0
  77. data/lib/jeweler/templates/features/default.feature +9 -0
  78. data/lib/jeweler/templates/features/support/env.rb +10 -0
  79. data/lib/jeweler/templates/jeweler_tasks.erb +31 -0
  80. data/lib/jeweler/templates/micronaut/flunking.rb +7 -0
  81. data/lib/jeweler/templates/micronaut/helper.rb +18 -0
  82. data/lib/jeweler/templates/minitest/flunking.rb +7 -0
  83. data/lib/jeweler/templates/minitest/helper.rb +12 -0
  84. data/lib/jeweler/templates/other_tasks.erb +86 -0
  85. data/lib/jeweler/templates/riot/flunking.rb +11 -0
  86. data/lib/jeweler/templates/riot/helper.rb +4 -0
  87. data/lib/jeweler/templates/rspec/.rspec +1 -0
  88. data/lib/jeweler/templates/rspec/flunking.rb +7 -0
  89. data/lib/jeweler/templates/rspec/helper.rb +12 -0
  90. data/lib/jeweler/templates/shindo/flunking.rb +8 -0
  91. data/lib/jeweler/templates/shindo/helper.rb +6 -0
  92. data/lib/jeweler/templates/shoulda/flunking.rb +7 -0
  93. data/lib/jeweler/templates/shoulda/helper.rb +11 -0
  94. data/lib/jeweler/templates/testspec/flunking.rb +7 -0
  95. data/lib/jeweler/templates/testspec/helper.rb +7 -0
  96. data/lib/jeweler/templates/testunit/flunking.rb +7 -0
  97. data/lib/jeweler/templates/testunit/helper.rb +10 -0
  98. data/lib/jeweler/version.rb +10 -0
  99. data/lib/jeweler/version_helper.rb +141 -0
  100. data/lib/jeweler.rb +177 -0
  101. data/test/fixtures/bar/VERSION.yml +4 -0
  102. data/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
  103. data/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
  104. data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
  105. data/test/fixtures/existing-project-with-version-constant/.document +5 -0
  106. data/test/fixtures/existing-project-with-version-constant/.gitignore +5 -0
  107. data/test/fixtures/existing-project-with-version-constant/LICENSE.txt +20 -0
  108. data/test/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
  109. data/test/fixtures/existing-project-with-version-constant/Rakefile +85 -0
  110. data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +29 -0
  111. data/test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
  112. data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
  113. data/test/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -0
  114. data/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
  115. data/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
  116. data/test/fixtures/existing-project-with-version-plaintext/LICENSE.txt +20 -0
  117. data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
  118. data/test/fixtures/existing-project-with-version-plaintext/Rakefile +84 -0
  119. data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
  120. data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
  121. data/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
  122. data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
  123. data/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
  124. data/test/fixtures/existing-project-with-version-yaml/.document +5 -0
  125. data/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
  126. data/test/fixtures/existing-project-with-version-yaml/LICENSE.txt +20 -0
  127. data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
  128. data/test/fixtures/existing-project-with-version-yaml/Rakefile +84 -0
  129. data/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
  130. data/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
  131. data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
  132. data/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
  133. data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
  134. data/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
  135. data/test/geminstaller.yml +12 -0
  136. data/test/jeweler/commands/test_build_gem.rb +103 -0
  137. data/test/jeweler/commands/test_install_gem.rb +35 -0
  138. data/test/jeweler/commands/test_release_to_gemcutter.rb +39 -0
  139. data/test/jeweler/commands/test_release_to_git.rb +198 -0
  140. data/test/jeweler/commands/test_release_to_github.rb +390 -0
  141. data/test/jeweler/commands/test_validate_gemspec.rb +27 -0
  142. data/test/jeweler/commands/test_write_gemspec.rb +101 -0
  143. data/test/jeweler/commands/version/test_base.rb +32 -0
  144. data/test/jeweler/commands/version/test_bump_major.rb +22 -0
  145. data/test/jeweler/commands/version/test_bump_minor.rb +19 -0
  146. data/test/jeweler/commands/version/test_bump_patch.rb +20 -0
  147. data/test/jeweler/commands/version/test_write.rb +22 -0
  148. data/test/jeweler/generator/test_application.rb +120 -0
  149. data/test/jeweler/generator/test_options.rb +225 -0
  150. data/test/jeweler/test_gemspec_helper.rb +44 -0
  151. data/test/jeweler/test_generator.rb +141 -0
  152. data/test/jeweler/test_generator_initialization.rb +164 -0
  153. data/test/jeweler/test_generator_mixins.rb +23 -0
  154. data/test/jeweler/test_specification.rb +237 -0
  155. data/test/jeweler/test_tasks.rb +50 -0
  156. data/test/jeweler/test_version_helper.rb +214 -0
  157. data/test/shoulda_macros/jeweler_macros.rb +35 -0
  158. data/test/test_helper.rb +178 -0
  159. data/test/test_jeweler.rb +175 -0
  160. metadata +343 -0
@@ -0,0 +1,86 @@
1
+ Feature: generated directory layout
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a directory layout
5
+
6
+ Scenario: shared
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
10
+
11
+ Then a directory named 'the-perfect-gem' is created
12
+ And a directory named 'the-perfect-gem/lib' is created
13
+
14
+ And a file named 'the-perfect-gem/README.rdoc' is created
15
+ And a file named 'the-perfect-gem/.document' is created
16
+ And a file named 'the-perfect-gem/lib/the-perfect-gem.rb' is created
17
+
18
+ Scenario: bacon
19
+ Given a working directory
20
+ And I have configured git sanely
21
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
22
+
23
+ Then a directory named 'the-perfect-gem/spec' is created
24
+
25
+ And a file named 'the-perfect-gem/spec/spec_helper.rb' is created
26
+ And a file named 'the-perfect-gem/spec/the-perfect-gem_spec.rb' is created
27
+
28
+ Scenario: minitest
29
+ Given a working directory
30
+ And I have configured git sanely
31
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
32
+
33
+ Then a directory named 'the-perfect-gem/test' is created
34
+
35
+ And a file named 'the-perfect-gem/test/helper.rb' is created
36
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
37
+
38
+ Scenario: rspec
39
+ Given a working directory
40
+ And I have configured git sanely
41
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
42
+
43
+ Then a directory named 'the-perfect-gem/spec' is created
44
+
45
+ And a file named 'the-perfect-gem/spec/spec_helper.rb' is created
46
+ And a file named 'the-perfect-gem/spec/the-perfect-gem_spec.rb' is created
47
+
48
+ Scenario: shoulda
49
+ Given a working directory
50
+ And I have configured git sanely
51
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
52
+
53
+ Then a directory named 'the-perfect-gem/test' is created
54
+
55
+ And a file named 'the-perfect-gem/test/helper.rb' is created
56
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
57
+
58
+ Scenario: testunit
59
+ Given a working directory
60
+ And I have configured git sanely
61
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
62
+
63
+ Then a directory named 'the-perfect-gem/test' is created
64
+
65
+ And a file named 'the-perfect-gem/test/helper.rb' is created
66
+ And a file named 'the-perfect-gem/test/test_the-perfect-gem.rb' is created
67
+
68
+ Scenario: micronaut
69
+ Given a working directory
70
+ And I have configured git sanely
71
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
72
+
73
+ Then a directory named 'the-perfect-gem/examples' is created
74
+
75
+ And a file named 'the-perfect-gem/examples/example_helper.rb' is created
76
+ And a file named 'the-perfect-gem/examples/the-perfect-gem_example.rb' is created
77
+
78
+ Scenario: shindo
79
+ Given a working directory
80
+ And I have configured git sanely
81
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
82
+
83
+ Then a directory named 'the-perfect-gem/tests' is created
84
+
85
+ And a file named 'the-perfect-gem/tests/tests_helper.rb' is created
86
+ And a file named 'the-perfect-gem/tests/the-perfect-gem_tests.rb' is created
@@ -0,0 +1,13 @@
1
+ Feature: generated .document
2
+ In order to easily generate RDoc
3
+ A user should be able to
4
+ generate reasonable .document file
5
+
6
+ Scenario: .document
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
10
+ Then '.document' contains 'lib/**/*.rb'
11
+ And '.document' contains 'bin/*'
12
+ And '.document' contains 'features/**/*.feature'
13
+ And '.document' contains 'LICENSE.txt'
@@ -0,0 +1,9 @@
1
+ Feature: Getting options from environment variable
2
+ In order to avoid having to type --rspec over and over
3
+ A user will need to set up a JEWELER_OPTS environment variable
4
+
5
+ Scenario: Environment variable set
6
+ Given a working directory
7
+ And I set JEWELER_OPTS env variable to "--rspec"
8
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
9
+ Then 'spec/the-perfect-gem_spec.rb' should describe 'ThePerfectGem'
@@ -0,0 +1,71 @@
1
+ Feature: generated Gemfiel
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a Gemfile
5
+
6
+ Background:
7
+ Given a working directory
8
+ And I have configured git sanely
9
+
10
+ Scenario: disabled
11
+ Given I do not want bundler
12
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
13
+ Then a file named 'the-perfect-gemGemfile' is not created
14
+
15
+ Scenario: enabled
16
+ Given I want bundler
17
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
18
+ Then a file named 'the-perfect-gem/Gemfile' is created
19
+
20
+ Scenario: default
21
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
22
+ Then a file named 'the-perfect-gem/Gemfile' is created
23
+ And 'Gemfile' uses the gemcutter source
24
+ And 'Gemfile' has a development dependency on 'bundler'
25
+ And 'Gemfile' has a development dependency on the current version of jeweler
26
+ And 'Gemfile' has a development dependency on 'rcov'
27
+
28
+ Scenario: bacon
29
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
30
+ Then 'Gemfile' has a development dependency on 'bacon'
31
+
32
+ Scenario: minitest
33
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
34
+ Then 'Gemfile' has a development dependency on 'minitest'
35
+
36
+ Scenario: rspec
37
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
38
+
39
+ Then 'Gemfile' has a development dependency on 'rspec'
40
+
41
+ Scenario: shoulda
42
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
43
+ Then 'Gemfile' has a development dependency on 'shoulda'
44
+
45
+ Scenario: micronaut
46
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
47
+ Then 'Gemfile' has a development dependency on 'micronaut'
48
+
49
+ Scenario: cucumber
50
+ Given I want cucumber stories
51
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
52
+ Then 'Gemfile' has a development dependency on 'cucumber'
53
+
54
+ Scenario: reek
55
+ Given I want reek
56
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
57
+ Then 'Gemfile' has a development dependency on 'reek'
58
+
59
+ Scenario: roodi
60
+ Given I want roodi
61
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
62
+ Then 'Gemfile' has a development dependency on 'roodi'
63
+
64
+ Scenario: yard
65
+ Given I want to use yard instead of rdoc
66
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
67
+ Then 'Gemfile' has a development dependency on 'yard'
68
+
69
+ Scenario: shindo
70
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
71
+ Then 'Gemfile' has a development dependency on 'shindo'
@@ -0,0 +1,102 @@
1
+ Feature: git support
2
+ In order to start a new gem for GitHub
3
+ A user should be able to
4
+ generate a project that is setup for git
5
+
6
+ Scenario: git remote configuration
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
10
+
11
+ Then git repository has 'origin' remote
12
+ And git repository 'origin' remote should be 'git@github.com:technicalpickles/the-perfect-gem.git'
13
+
14
+ Scenario: .gitignore
15
+ Given a working directory
16
+ And I have configured git sanely
17
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
18
+
19
+ Then a sane '.gitignore' is created
20
+
21
+ Scenario: baseline repository
22
+ Given a working directory
23
+ And I have configured git sanely
24
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
25
+
26
+ Then a commit with the message 'Initial commit to the-perfect-gem.' is made
27
+ And 'README.rdoc' was checked in
28
+ And 'Rakefile' was checked in
29
+ And 'LICENSE.txt' was checked in
30
+ And 'lib/the-perfect-gem.rb' was checked in
31
+ And '.gitignore' was checked in
32
+
33
+ And no files are untracked
34
+ And no files are changed
35
+ And no files are added
36
+ And no files are deleted
37
+
38
+ Scenario: bacon
39
+ Given a working directory
40
+ And I have configured git sanely
41
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
42
+
43
+ Then 'spec/spec_helper.rb' was checked in
44
+ And 'spec/the-perfect-gem_spec.rb' was checked in
45
+
46
+ Scenario: minitest
47
+ Given a working directory
48
+ And I have configured git sanely
49
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
50
+
51
+ Then 'test/helper.rb' was checked in
52
+ And 'test/test_the-perfect-gem.rb' was checked in
53
+
54
+ Scenario: rspec
55
+ Given a working directory
56
+ And I have configured git sanely
57
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
58
+
59
+ Then 'spec/spec_helper.rb' was checked in
60
+ And 'spec/the-perfect-gem_spec.rb' was checked in
61
+
62
+ Scenario: shoulda
63
+ Given a working directory
64
+ And I have configured git sanely
65
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
66
+
67
+ Then 'test/helper.rb' was checked in
68
+ And 'test/test_the-perfect-gem.rb' was checked in
69
+
70
+ Scenario: testunit
71
+ Given a working directory
72
+ And I have configured git sanely
73
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
74
+
75
+ Then 'test/helper.rb' was checked in
76
+ And 'test/test_the-perfect-gem.rb' was checked in
77
+
78
+ Scenario: micronaut
79
+ Given a working directory
80
+ And I have configured git sanely
81
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
82
+
83
+ Then 'examples/example_helper.rb' was checked in
84
+ And 'examples/the-perfect-gem_example.rb' was checked in
85
+
86
+ Scenario: cucumber
87
+ Given a working directory
88
+ And I have configured git sanely
89
+ And I want cucumber stories
90
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
91
+
92
+ Then 'features/the-perfect-gem.feature' was checked in
93
+ And 'features/support/env.rb' was checked in
94
+ And 'features/step_definitions/the-perfect-gem_steps.rb' was checked in
95
+
96
+ Scenario: shindo
97
+ Given a working directory
98
+ And I have configured git sanely
99
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
100
+
101
+ Then 'tests/tests_helper.rb' was checked in
102
+ And 'tests/the-perfect-gem_tests.rb' was checked in
@@ -0,0 +1,20 @@
1
+ Feature: generated license
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a default license
5
+
6
+ Background:
7
+ Given a working directory
8
+
9
+ Scenario: crediting user
10
+ Given I have configured git sanely
11
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
12
+
13
+ Then LICENSE.txt credits 'foo'
14
+
15
+ Scenario: copyright in the current year
16
+ Given it is the year 2005
17
+ And I have configured git sanely
18
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
19
+
20
+ Then LICENSE.txt has a copyright in the year 2005
@@ -0,0 +1,158 @@
1
+ Feature: generated Rakefile
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a Rakefile
5
+
6
+ Background:
7
+ Given a working directory
8
+ And I have configured git sanely
9
+
10
+ Scenario: shared
11
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
12
+
13
+ Then 'Rakefile' requires 'bundler'
14
+ And 'Rakefile' sets up bundler using the default and development groups
15
+ And 'Rakefile' requires 'rubygems'
16
+ And 'Rakefile' requires 'rake'
17
+ And 'Rakefile' requires 'rake/rdoctask'
18
+ And Rakefile has 'the-perfect-gem' for the Jeweler::Tasks name
19
+ And Rakefile has 'bar@example.com' for the Jeweler::Tasks email
20
+ And Rakefile has 'zomg, so good' for the Jeweler::Tasks summary
21
+ And Rakefile has 'Descriptive' for the Jeweler::Tasks description
22
+ And Rakefile has 'http://github.com/technicalpickles/the-perfect-gem' for the Jeweler::Tasks homepage
23
+ And Rakefile has 'MIT' for the Jeweler::Tasks license
24
+ And Rakefile instantiates a Jeweler::RubygemsDotOrgTasks
25
+ And Rakefile has a magic comment for UTF-8
26
+
27
+ Scenario: bacon
28
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
29
+ Then 'Rakefile' requires 'rcov/rcovtask'
30
+ And Rakefile has 'spec/**/*_spec.rb' for the Rake::TestTask pattern
31
+ And Rakefile has 'spec/**/*_spec.rb' for the Rcov::RcovTask pattern
32
+ And Rakefile has 'spec' in the Rcov::RcovTask libs
33
+ And Rakefile has "spec" as the default task
34
+
35
+ Scenario: minitest
36
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
37
+
38
+ Then 'Rakefile' requires 'rcov/rcovtask'
39
+ And Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
40
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
41
+ And Rakefile has 'test' in the Rcov::RcovTask libs
42
+ And Rakefile has "test" as the default task
43
+
44
+ @rspec
45
+ Scenario: rspec
46
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
47
+
48
+ Then 'Rakefile' requires 'rspec/core'
49
+ And 'Rakefile' requires 'rspec/core/rake_task'
50
+ And Rakefile has 'spec/**/*_spec.rb' for the RSpec::Core::RakeTask pattern
51
+ And Rakefile has "spec" as the default task
52
+
53
+ Scenario: shoulda
54
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
55
+
56
+ Then 'Rakefile' requires 'rcov/rcovtask'
57
+ And Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
58
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
59
+ And Rakefile has 'test' in the Rcov::RcovTask libs
60
+ And Rakefile has "test" as the default task
61
+
62
+ Scenario: micronaut
63
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
64
+
65
+ Then 'Rakefile' requires 'micronaut/rake_task'
66
+ And Rakefile has 'examples/**/*_example.rb' for the Micronaut::RakeTask pattern
67
+ And Rakefile has "examples" as the default task
68
+
69
+ Scenario: testunit
70
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
71
+
72
+ Then 'Rakefile' requires 'rcov/rcovtask'
73
+ Then Rakefile has 'test/**/test_*.rb' for the Rake::TestTask pattern
74
+ And Rakefile has 'test/**/test_*.rb' for the Rcov::RcovTask pattern
75
+ And Rakefile has 'test' in the Rcov::RcovTask libs
76
+ And Rakefile has '--exclude "gems/*"' in the Rcov::RcovTask rcov_opts
77
+ And Rakefile has "test" as the default task
78
+
79
+ Scenario: no cucumber
80
+ Given I do not want cucumber stories
81
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
82
+ Then Rakefile does not require 'cucumber/rake/task'
83
+ And Rakefile does not instantiate a Cucumber::Rake::Task
84
+
85
+ Scenario: cucumber
86
+ Given I want cucumber stories
87
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
88
+ Then Rakefile requires 'cucumber/rake/task'
89
+ And Rakefile instantiates a Cucumber::Rake::Task
90
+
91
+ Scenario: no reek
92
+ Given I do not want reek
93
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
94
+ Then Rakefile does not require 'reek/rake/task'
95
+ And Rakefile does not instantiate a Reek::Rake::Task
96
+
97
+ Scenario: reek
98
+ Given I want reek
99
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
100
+ Then Rakefile requires 'reek/rake/task'
101
+ And Rakefile instantiates a Reek::Rake::Task
102
+
103
+ Scenario: no roodi
104
+ Given I do not want roodi
105
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
106
+ Then Rakefile does not require 'roodi'
107
+ And Rakefile does not require 'roodi_task'
108
+ And Rakefile does not instantiate a RoodiTask
109
+
110
+ Scenario: roodi
111
+ Given I want roodi
112
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
113
+ Then Rakefile requires 'roodi'
114
+ And Rakefile requires 'roodi_task'
115
+ And Rakefile instantiates a RoodiTask
116
+
117
+ Scenario: no rubyforge
118
+ Given I do not want rubyforge setup
119
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
120
+ Then Rakefile does not instantiate a Jeweler::RubyforgeTasks
121
+
122
+ Scenario: yard
123
+ Given I want to use yard instead of rdoc
124
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
125
+
126
+ Then 'Rakefile' does not require 'rake/rdoctask'
127
+ And 'Rakefile' requires 'yard'
128
+ And Rakefile instantiates a YARD::Rake::YardocTask
129
+
130
+ Scenario: rdoc
131
+ Given I want to use rdoc instead of yard
132
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
133
+
134
+ Then 'Rakefile' does not require 'yard'
135
+ And 'Rakefile' requires 'rake/rdoctask'
136
+ And Rakefile does not instantiate a YARD::Rake::YardocTask
137
+ And Rakefile instantiates a Rake::RDocTask.new
138
+
139
+ Scenario: shindo
140
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
141
+ And 'Rakefile' requires 'shindo/rake'
142
+ And Rakefile instantiates a Shindo::Rake.new
143
+ And Rakefile has "tests" as the default task
144
+
145
+
146
+ Scenario: bundler
147
+ Given I want bundler
148
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
149
+ Then 'Rakefile' requires 'bundler'
150
+ And 'Rakefile' sets up bundler using the default and development groups
151
+ And Rakefile does not add 'jeweler' as a development dependency to Jeweler::Tasks
152
+
153
+ Scenario: no bundler
154
+ Given I do not want bundler
155
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
156
+ Then 'Rakefile' does not require 'bundler'
157
+ And 'Rakefile' does not setup bundler
158
+ And Rakefile adds 'jeweler' as a development dependency to Jeweler::Tasks
@@ -0,0 +1,12 @@
1
+ Feature: generated license
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a default license
5
+
6
+ Scenario: copyright
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
10
+
11
+ Then 'README.rdoc' contains '= the-perfect-gem'
12
+ And 'README.rdoc' mentions copyright belonging to me in the current year
@@ -0,0 +1,54 @@
1
+ Feature: generated test or spec
2
+ In order to start a new gem
3
+ A user should be able to
4
+ generate a test or spec
5
+
6
+ Scenario: bacon
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
10
+ Then 'spec/the-perfect-gem_spec.rb' should describe 'ThePerfectGem'
11
+
12
+ Scenario: minitest
13
+ Given a working directory
14
+ And I have configured git sanely
15
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
16
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'MiniTest::Unit::TestCase'
17
+
18
+ Scenario: rspec
19
+ Given a working directory
20
+ And I have configured git sanely
21
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
22
+ Then 'spec/the-perfect-gem_spec.rb' should describe 'ThePerfectGem'
23
+
24
+ Scenario: shoulda
25
+ Given a working directory
26
+ And I have configured git sanely
27
+ And I intend to test with shoulda
28
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
29
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'Test::Unit::TestCase'
30
+
31
+ Scenario: testunit
32
+ Given a working directory
33
+ And I have configured git sanely
34
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
35
+ Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'Test::Unit::TestCase'
36
+
37
+ Scenario: micronaut
38
+ Given a working directory
39
+ And I have configured git sanely
40
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
41
+ Then 'examples/the-perfect-gem_example.rb' should describe 'ThePerfectGem'
42
+
43
+ Scenario: riot
44
+ Given a working directory
45
+ And I have configured git sanely
46
+ When I generate a riot project named 'the-perfect-gem' that is 'zomg, so good'
47
+ Then 'test/the-perfect-gem_test.rb' should contextualize 'the-perfect-gem'
48
+ And 'test/the-perfect-gem_test.rb' requires 'teststrap'
49
+
50
+ Scenario: shindo
51
+ Given a working directory
52
+ And I have configured git sanely
53
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
54
+ Then 'tests/the-perfect-gem_tests.rb' should have tests for 'ThePerfectGem'