juwelier 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +2 -0
  3. data/.document +8 -0
  4. data/.semver +5 -0
  5. data/.travis.yml +7 -0
  6. data/.yardopts +2 -0
  7. data/ChangeLog.markdown +230 -0
  8. data/Gemfile +40 -0
  9. data/LICENSE.txt +20 -0
  10. data/README.markdown +252 -0
  11. data/Rakefile +78 -0
  12. data/bin/juwelier +9 -0
  13. data/features/generator/cucumber.feature +103 -0
  14. data/features/generator/directory_layout.feature +86 -0
  15. data/features/generator/dotdocument.feature +13 -0
  16. data/features/generator/env_options.feature +9 -0
  17. data/features/generator/gemfile.feature +81 -0
  18. data/features/generator/git.feature +102 -0
  19. data/features/generator/license.feature +20 -0
  20. data/features/generator/rakefile.feature +158 -0
  21. data/features/generator/readme.feature +12 -0
  22. data/features/generator/test.feature +54 -0
  23. data/features/generator/test_helper.feature +149 -0
  24. data/features/placeholder.feature +5 -0
  25. data/features/step_definitions/debug_steps.rb +6 -0
  26. data/features/step_definitions/filesystem_steps.rb +70 -0
  27. data/features/step_definitions/generator_steps.rb +387 -0
  28. data/features/step_definitions/task_steps.rb +6 -0
  29. data/features/support/env.rb +41 -0
  30. data/features/tasks/build_gem.feature +9 -0
  31. data/features/tasks/version.feature +31 -0
  32. data/features/tasks/version_bumping.feature +49 -0
  33. data/juwelier.gemspec +241 -0
  34. data/lib/juwelier.rb +178 -0
  35. data/lib/juwelier/commands.rb +20 -0
  36. data/lib/juwelier/commands/build_gem.rb +40 -0
  37. data/lib/juwelier/commands/check_dependencies.rb +66 -0
  38. data/lib/juwelier/commands/install_gem.rb +31 -0
  39. data/lib/juwelier/commands/release_gemspec.rb +87 -0
  40. data/lib/juwelier/commands/release_to_git.rb +64 -0
  41. data/lib/juwelier/commands/release_to_rubygems.rb +28 -0
  42. data/lib/juwelier/commands/validate_gemspec.rb +30 -0
  43. data/lib/juwelier/commands/version/base.rb +55 -0
  44. data/lib/juwelier/commands/version/bump_major.rb +13 -0
  45. data/lib/juwelier/commands/version/bump_minor.rb +12 -0
  46. data/lib/juwelier/commands/version/bump_patch.rb +14 -0
  47. data/lib/juwelier/commands/version/write.rb +12 -0
  48. data/lib/juwelier/commands/write_gemspec.rb +39 -0
  49. data/lib/juwelier/errors.rb +8 -0
  50. data/lib/juwelier/gemcutter_tasks.rb +8 -0
  51. data/lib/juwelier/gemspec_helper.rb +87 -0
  52. data/lib/juwelier/generator.rb +304 -0
  53. data/lib/juwelier/generator/application.rb +63 -0
  54. data/lib/juwelier/generator/bacon_mixin.rb +43 -0
  55. data/lib/juwelier/generator/github_mixin.rb +22 -0
  56. data/lib/juwelier/generator/micronaut_mixin.rb +41 -0
  57. data/lib/juwelier/generator/minitest_mixin.rb +42 -0
  58. data/lib/juwelier/generator/options.rb +172 -0
  59. data/lib/juwelier/generator/rdoc_mixin.rb +13 -0
  60. data/lib/juwelier/generator/riot_mixin.rb +42 -0
  61. data/lib/juwelier/generator/rspec_mixin.rb +42 -0
  62. data/lib/juwelier/generator/shindo_mixin.rb +44 -0
  63. data/lib/juwelier/generator/shoulda_mixin.rb +42 -0
  64. data/lib/juwelier/generator/testspec_mixin.rb +42 -0
  65. data/lib/juwelier/generator/testunit_mixin.rb +39 -0
  66. data/lib/juwelier/generator/yard_mixin.rb +15 -0
  67. data/lib/juwelier/rubyforge_tasks.rb +95 -0
  68. data/lib/juwelier/rubygems_dot_org_tasks.rb +38 -0
  69. data/lib/juwelier/rubygems_tasks.rb +38 -0
  70. data/lib/juwelier/specification.rb +110 -0
  71. data/lib/juwelier/tasks.rb +239 -0
  72. data/lib/juwelier/templates/.document +5 -0
  73. data/lib/juwelier/templates/.gitignore +49 -0
  74. data/lib/juwelier/templates/Gemfile +12 -0
  75. data/lib/juwelier/templates/LICENSE.txt +20 -0
  76. data/lib/juwelier/templates/README.rdoc +19 -0
  77. data/lib/juwelier/templates/Rakefile +9 -0
  78. data/lib/juwelier/templates/bacon/flunking.rb +7 -0
  79. data/lib/juwelier/templates/bacon/helper.rb +10 -0
  80. data/lib/juwelier/templates/bundler_setup.erb +10 -0
  81. data/lib/juwelier/templates/features/default.feature +9 -0
  82. data/lib/juwelier/templates/features/support/env.rb +11 -0
  83. data/lib/juwelier/templates/juwelier_tasks.erb +31 -0
  84. data/lib/juwelier/templates/micronaut/flunking.rb +7 -0
  85. data/lib/juwelier/templates/micronaut/helper.rb +19 -0
  86. data/lib/juwelier/templates/minitest/flunking.rb +7 -0
  87. data/lib/juwelier/templates/minitest/helper.rb +13 -0
  88. data/lib/juwelier/templates/other_tasks.erb +70 -0
  89. data/lib/juwelier/templates/riot/flunking.rb +11 -0
  90. data/lib/juwelier/templates/riot/helper.rb +5 -0
  91. data/lib/juwelier/templates/rspec/.rspec +1 -0
  92. data/lib/juwelier/templates/rspec/flunking.rb +7 -0
  93. data/lib/juwelier/templates/rspec/helper.rb +14 -0
  94. data/lib/juwelier/templates/shindo/flunking.rb +8 -0
  95. data/lib/juwelier/templates/shindo/helper.rb +7 -0
  96. data/lib/juwelier/templates/shoulda/flunking.rb +7 -0
  97. data/lib/juwelier/templates/shoulda/helper.rb +12 -0
  98. data/lib/juwelier/templates/simplecov.erb +16 -0
  99. data/lib/juwelier/templates/testspec/flunking.rb +7 -0
  100. data/lib/juwelier/templates/testspec/helper.rb +7 -0
  101. data/lib/juwelier/templates/testunit/flunking.rb +7 -0
  102. data/lib/juwelier/templates/testunit/helper.rb +11 -0
  103. data/lib/juwelier/version.rb +10 -0
  104. data/lib/juwelier/version_helper.rb +141 -0
  105. data/test/fixtures/bar/VERSION.yml +4 -0
  106. data/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
  107. data/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
  108. data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
  109. data/test/fixtures/existing-project-with-version-constant/.document +5 -0
  110. data/test/fixtures/existing-project-with-version-constant/.gitignore +5 -0
  111. data/test/fixtures/existing-project-with-version-constant/LICENSE.txt +20 -0
  112. data/test/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
  113. data/test/fixtures/existing-project-with-version-constant/Rakefile +85 -0
  114. data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +29 -0
  115. data/test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
  116. data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
  117. data/test/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -0
  118. data/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
  119. data/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
  120. data/test/fixtures/existing-project-with-version-plaintext/LICENSE.txt +20 -0
  121. data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
  122. data/test/fixtures/existing-project-with-version-plaintext/Rakefile +84 -0
  123. data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
  124. data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
  125. data/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
  126. data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
  127. data/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
  128. data/test/fixtures/existing-project-with-version-yaml/.document +5 -0
  129. data/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
  130. data/test/fixtures/existing-project-with-version-yaml/LICENSE.txt +20 -0
  131. data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
  132. data/test/fixtures/existing-project-with-version-yaml/Rakefile +84 -0
  133. data/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
  134. data/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
  135. data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
  136. data/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
  137. data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
  138. data/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
  139. data/test/geminstaller.yml +12 -0
  140. data/test/juwelier/commands/test_build_gem.rb +112 -0
  141. data/test/juwelier/commands/test_install_gem.rb +35 -0
  142. data/test/juwelier/commands/test_release_to_gemcutter.rb +39 -0
  143. data/test/juwelier/commands/test_release_to_git.rb +271 -0
  144. data/test/juwelier/commands/test_release_to_github.rb +477 -0
  145. data/test/juwelier/commands/test_validate_gemspec.rb +27 -0
  146. data/test/juwelier/commands/test_write_gemspec.rb +103 -0
  147. data/test/juwelier/commands/version/test_base.rb +53 -0
  148. data/test/juwelier/commands/version/test_bump_major.rb +22 -0
  149. data/test/juwelier/commands/version/test_bump_minor.rb +19 -0
  150. data/test/juwelier/commands/version/test_bump_patch.rb +20 -0
  151. data/test/juwelier/commands/version/test_write.rb +22 -0
  152. data/test/juwelier/generator/test_application.rb +142 -0
  153. data/test/juwelier/generator/test_options.rb +227 -0
  154. data/test/juwelier/test_gemspec_helper.rb +44 -0
  155. data/test/juwelier/test_generator.rb +140 -0
  156. data/test/juwelier/test_generator_initialization.rb +150 -0
  157. data/test/juwelier/test_generator_mixins.rb +23 -0
  158. data/test/juwelier/test_specification.rb +245 -0
  159. data/test/juwelier/test_tasks.rb +50 -0
  160. data/test/juwelier/test_version_helper.rb +214 -0
  161. data/test/shoulda_macros/juwelier_macros.rb +35 -0
  162. data/test/test_helper.rb +174 -0
  163. data/test/test_juwelier.rb +177 -0
  164. metadata +396 -0
@@ -0,0 +1,78 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ require 'semver'
6
+
7
+ def s_version
8
+ SemVer.find.format "%M.%m.%p%s"
9
+ end
10
+
11
+ begin
12
+ Bundler.setup(:default, :xzibit, :development)
13
+ rescue Bundler::BundlerError => e
14
+ $stderr.puts e.message
15
+ $stderr.puts "Run `bundle install` to install missing gems"
16
+ exit e.status_code
17
+ end
18
+
19
+ require 'rake'
20
+ require 'juwelier'
21
+
22
+ Juwelier::Tasks.new do |gem|
23
+ gem.name = "juwelier"
24
+ gem.version = s_version
25
+ gem.required_ruby_version = '>= 2.0'
26
+ gem.homepage = "http://github.com/flajann2/juwelier"
27
+ gem.summary = "Powerful and Opinionated tool for creating and managing RubyGem projects"
28
+ gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
29
+ gem.license = "MIT"
30
+ gem.authors = ["Fred Mitchell", "Josh Nichols", "Yusuke Murata"]
31
+ gem.email = ["fred.mitchell@gmx.de", "fred.mitchell@gmx.com", "info@muratayusuke.com"]
32
+ gem.files.include %w(lib/juwelier/templates/.document lib/juwelier/templates/.gitignore)
33
+
34
+ # dependencies defined in Gemfile
35
+ end
36
+
37
+ Juwelier::RubygemsDotOrgTasks.new
38
+
39
+ require 'rake/testtask'
40
+ Rake::TestTask.new(:test) do |test|
41
+ test.test_files = FileList.new('test/**/test_*.rb') do |list|
42
+ list.exclude 'test/test_helper.rb'
43
+ list.exclude 'test/fixtures/**/*.rb'
44
+ end
45
+ test.libs << 'test'
46
+ test.verbose = true
47
+ end
48
+
49
+ namespace :test do
50
+ task :gemspec_dup do
51
+ gemspec = Rake.application.juwelier.gemspec
52
+ dupped_gemspec = gemspec.dup
53
+ cloned_gemspec = gemspec.clone
54
+ puts gemspec.to_ruby
55
+ puts dupped_gemspec.to_ruby
56
+ end
57
+ end
58
+
59
+ require 'yard'
60
+ YARD::Rake::YardocTask.new do |t|
61
+ t.files = FileList['lib/**/*.rb'].exclude('lib/juwelier/templates/**/*.rb')
62
+ end
63
+
64
+ require 'cucumber/rake/task'
65
+ Cucumber::Rake::Task.new(:features) do |features|
66
+ features.cucumber_opts = "features --format progress"
67
+ end
68
+ namespace :features do
69
+ Cucumber::Rake::Task.new(:pretty) do |features|
70
+ features.cucumber_opts = "features --format progress"
71
+ end
72
+ end
73
+
74
+ if ENV["RUN_CODE_RUN"] == "true"
75
+ task :default => [:test, :features]
76
+ else
77
+ task :default => :test
78
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ # Don't try to run this binary directory. Instead:
3
+ # * `bundle exec juwelier` if doing juwelier development
4
+ # * `bundle exec juwelier` if part of a bundle
5
+ # * `juwelier` if installed through rubygems, relying on the rubygem wrapper
6
+
7
+ require 'juwelier/generator'
8
+
9
+ exit Juwelier::Generator::Application.run!(*ARGV)
@@ -0,0 +1,103 @@
1
+ Feature: generating cucumber stories
2
+ In order to get started using cucumber in a project
3
+ A user should be able to
4
+ generate a project setup for their testing framework of choice
5
+
6
+ Scenario: sans cucumber setup
7
+ Given a working directory
8
+ And I have configured git sanely
9
+ And I do not want cucumber stories
10
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
11
+
12
+ And a file named 'the-perfect-gem/features/the-perfect-gem.feature' is not created
13
+ And a file named 'the-perfect-gem/features/support/env.rb' is not created
14
+ And a file named 'the-perfect-gem/features/steps/the-perfect-gem_steps.rb' is not created
15
+
16
+ Scenario: basic cucumber setup
17
+ Given a working directory
18
+ And I have configured git sanely
19
+ And I want cucumber stories
20
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
21
+
22
+ Then cucumber directories are created
23
+
24
+ And a file named 'the-perfect-gem/features/the-perfect-gem.feature' is created
25
+ And a file named 'the-perfect-gem/features/support/env.rb' is created
26
+ And a file named 'the-perfect-gem/features/step_definitions/the-perfect-gem_steps.rb' is created
27
+
28
+ And 'features/support/env.rb' requires 'bundler'
29
+ And 'features/support/env.rb' sets up bundler using the default and development groups
30
+ And 'features/support/env.rb' requires 'the-perfect-gem'
31
+
32
+ Scenario: bundler
33
+ Given a working directory
34
+ And I want bundler
35
+ And I have configured git sanely
36
+ And I want cucumber stories
37
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
38
+ And 'features/support/env.rb' requires 'bundler'
39
+ And 'features/support/env.rb' sets up bundler using the default and development groups
40
+
41
+ Scenario: no bundler
42
+ Given a working directory
43
+ And I have configured git sanely
44
+ And I do not want bundler
45
+ And I want cucumber stories
46
+ When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
47
+ And 'features/support/env.rb' does not require 'bundler'
48
+ And 'features/support/env.rb' does not setup bundler
49
+
50
+ Scenario: cucumber setup for bacon
51
+ Given a working directory
52
+ And I have configured git sanely
53
+ And I want cucumber stories
54
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
55
+
56
+ Then 'features/support/env.rb' requires 'test/unit/assertions'
57
+ And cucumber world extends "Test::Unit::Assertions"
58
+
59
+ Scenario: cucumber setup for shoulda
60
+ Given a working directory
61
+ And I have configured git sanely
62
+ And I want cucumber stories
63
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
64
+
65
+ Then 'features/support/env.rb' requires 'test/unit/assertions'
66
+ And cucumber world extends "Test::Unit::Assertions"
67
+
68
+ Scenario: cucumber setup for testunit
69
+ Given a working directory
70
+ And I have configured git sanely
71
+ And I want cucumber stories
72
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
73
+
74
+ Then 'features/support/env.rb' requires 'test/unit/assertions'
75
+ And cucumber world extends "Test::Unit::Assertions"
76
+
77
+ Scenario: cucumber setup for minitest
78
+ Given a working directory
79
+ And I have configured git sanely
80
+ And I want cucumber stories
81
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
82
+
83
+ Then 'features/support/env.rb' requires 'minitest/unit'
84
+ And cucumber world extends "MiniTest::Assertions"
85
+
86
+ Scenario: cucumber setup for rspec
87
+ Given a working directory
88
+ And I have configured git sanely
89
+ And I want cucumber stories
90
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
91
+
92
+ Then 'features/support/env.rb' requires 'the-perfect-gem'
93
+ And 'features/support/env.rb' requires 'rspec/expectations'
94
+
95
+ Scenario: cucumber setup for mirconaut
96
+ Given a working directory
97
+ And I have configured git sanely
98
+ And I want cucumber stories
99
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
100
+
101
+ Then 'features/support/env.rb' requires 'the-perfect-gem'
102
+ And 'features/support/env.rb' requires 'micronaut/expectations'
103
+ And cucumber world extends "Micronaut::Matchers"
@@ -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 JUWELIER_OPTS environment variable
4
+
5
+ Scenario: Environment variable set
6
+ Given a working directory
7
+ And I set JUWELIER_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,81 @@
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 juwelier
26
+ And 'Gemfile' has a development dependency on 'simplecov'
27
+ And 'Gemfile' has a development dependency on 'rcov'
28
+ And 'Gemfile' has a development dependency on 'rdoc'
29
+ And 'Gemfile' does not have a development dependency on 'yard'
30
+
31
+ Scenario: bacon
32
+ When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
33
+ Then 'Gemfile' has a development dependency on 'bacon'
34
+
35
+ Scenario: minitest
36
+ When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
37
+ Then 'Gemfile' has a development dependency on 'minitest'
38
+
39
+ Scenario: rspec
40
+ When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
41
+
42
+ Then 'Gemfile' has a development dependency on 'rspec'
43
+
44
+ Scenario: shoulda
45
+ When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
46
+ Then 'Gemfile' has a development dependency on 'shoulda'
47
+
48
+ Scenario: micronaut
49
+ When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
50
+ Then 'Gemfile' has a development dependency on 'micronaut'
51
+
52
+ Scenario: cucumber
53
+ Given I want cucumber stories
54
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
55
+ Then 'Gemfile' has a development dependency on 'cucumber'
56
+
57
+ Scenario: reek
58
+ Given I want reek
59
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
60
+ Then 'Gemfile' has a development dependency on 'reek'
61
+
62
+ Scenario: roodi
63
+ Given I want roodi
64
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
65
+ Then 'Gemfile' has a development dependency on 'roodi'
66
+
67
+ Scenario: rdoc
68
+ Given I want to use rdoc instead of yard
69
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
70
+ Then 'Gemfile' has a development dependency on 'rdoc'
71
+ And 'Gemfile' does not have a development dependency on 'yard'
72
+
73
+ Scenario: yard
74
+ Given I want to use yard instead of rdoc
75
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
76
+ Then 'Gemfile' has a development dependency on 'yard'
77
+ Then 'Gemfile' has a development dependency on 'rdoc'
78
+
79
+ Scenario: shindo
80
+ When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
81
+ 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:flajann2/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