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,239 @@
1
+ require 'rake'
2
+ require 'rake/tasklib'
3
+
4
+ # Clean up after gem building
5
+ require 'rake/clean'
6
+ CLEAN.include('pkg/*.gem')
7
+
8
+ class Rake::Application
9
+ attr_accessor :juwelier_tasks
10
+
11
+ # The juwelier instance that has be instantiated in the current Rakefile.
12
+ #
13
+ # This is usually useful if you want to get at info like version from other files.
14
+ def juwelier
15
+ juwelier_tasks.juwelier
16
+ end
17
+ end
18
+
19
+ class Juwelier
20
+ # Rake tasks for managing your gem.
21
+ #
22
+ # Here's a basic usage example:
23
+ #
24
+ # Juwelier::Tasks.new do |gem|
25
+ # gem.name = "juwelier"
26
+ # gem.summary = "Simple and opinionated helper for creating RubyGem projects on GitHub"
27
+ # gem.email = "fred.mitchell@gmx.com"
28
+ # gem.homepage = "http://github.com/flajann2/juwelier"
29
+ # gem.description = "Simple and opinionated helper for creating RubyGem projects on GitHub"
30
+ # gem.authors = ["Josh Nichols"]
31
+ # end
32
+ #
33
+ # The block variable gem is actually a Gem::Specification, so you can
34
+ # do anything you would normally do with a Gem::Specification.
35
+ # For more details, see the official gemspec reference:
36
+ # http://guides.rubygems.org/specification-reference
37
+ #
38
+ # In addition, it provides reasonable defaults for several values. See Juwelier::Specification for more details.
39
+ class Tasks < ::Rake::TaskLib
40
+ attr_accessor :gemspec, :juwelier, :gemspec_building_block
41
+
42
+ def initialize(gemspec = nil, &gemspec_building_block)
43
+ @gemspec = gemspec || Gem::Specification.new
44
+ self.gemspec_building_block = gemspec_building_block
45
+
46
+ Rake.application.juwelier_tasks = self
47
+ define
48
+ end
49
+
50
+ def juwelier
51
+ if @juwelier.nil?
52
+ @juwelier = Juwelier.new(gemspec)
53
+ gemspec_building_block.call gemspec if gemspec_building_block
54
+ end
55
+ @juwelier
56
+ end
57
+
58
+ private
59
+
60
+ def yield_gemspec_set_version?
61
+ yielded_gemspec = @gemspec.dup
62
+ yielded_gemspec.extend(Juwelier::Specification)
63
+ yielded_gemspec.files = FileList[]
64
+ yielded_gemspec.extra_rdoc_files = FileList[]
65
+
66
+ gemspec_building_block.call(yielded_gemspec) if gemspec_building_block
67
+
68
+ ! yielded_gemspec.version.nil?
69
+ end
70
+
71
+ def release_args
72
+ args = {}
73
+ args[:remote] = ENV['REMOTE']
74
+ args[:branch] = ENV['BRANCH']
75
+ args[:local_branch] = ENV['LOCAL_BRANCH']
76
+ args[:remote_branch] = ENV['REMOTE_BRANCH']
77
+ return args
78
+ end
79
+
80
+ def define
81
+ task :version_required do
82
+ if juwelier.expects_version_file? && !juwelier.version_file_exists?
83
+ abort "Expected VERSION or VERSION.yml to exist. Use 'rake version:write' to create an initial one."
84
+ end
85
+ end
86
+
87
+ task :gemspec_required do
88
+ if ! File.exist?(juwelier.gemspec_helper.path)
89
+ abort "Expected #{juwelier.gemspec_helper.path} to exist. See 'rake gemspec:write' to create it"
90
+ end
91
+ end
92
+
93
+
94
+ desc "Build gem into pkg/"
95
+ task :build do
96
+ juwelier.build_gem
97
+ end
98
+
99
+
100
+
101
+ desc "Build and install gem using `gem install`"
102
+ task :install => [:build] do
103
+ juwelier.install_gem
104
+ end
105
+
106
+ desc "Displays the current version"
107
+ task :version => :version_required do
108
+ $stdout.puts "Current version: #{juwelier.version}"
109
+ end
110
+
111
+ desc "Release gem"
112
+ task :release => :clean do
113
+ end
114
+
115
+ desc "Generate and validate gemspec"
116
+ task :gemspec => ['gemspec:generate', 'gemspec:validate']
117
+
118
+ namespace :gemspec do
119
+ desc "Validates the gemspec on the filesystem"
120
+ task :validate => :gemspec_required do
121
+ juwelier.validate_gemspec
122
+ end
123
+
124
+ desc "Regenerate the gemspec on the filesystem"
125
+ task :generate => :version_required do
126
+ juwelier.write_gemspec
127
+ end
128
+
129
+ desc "Display the gemspec for debugging purposes, as juwelier knows it (not from the filesystem)"
130
+ task :debug do
131
+ # TODO move to a command
132
+ juwelier.gemspec_helper.spec.version ||= begin
133
+ juwelier.version_helper.refresh
134
+ juwelier.version_helper.to_s
135
+ end
136
+
137
+ puts juwelier.gemspec_helper.to_ruby
138
+ end
139
+
140
+ desc "Regenerate and validate gemspec, and then commits and pushes to git"
141
+ task :release do
142
+ juwelier.release_gemspec(release_args)
143
+ end
144
+ end
145
+
146
+ task :release => 'gemspec:release'
147
+
148
+
149
+ unless yield_gemspec_set_version?
150
+ namespace :version do
151
+ desc "Writes out an explicit version. Respects the following environment variables, or defaults to 0: MAJOR, MINOR, PATCH. Also recognizes BUILD, which defaults to nil"
152
+ task :write do
153
+ major, minor, patch, build = ENV['MAJOR'].to_i, ENV['MINOR'].to_i, ENV['PATCH'].to_i, (ENV['BUILD'] || nil )
154
+ juwelier.write_version(major, minor, patch, build, :announce => false, :commit => false)
155
+ $stdout.puts "Updated version: #{juwelier.version}"
156
+ end
157
+
158
+ namespace :bump do
159
+ desc "Bump the major version by 1"
160
+ task :major => [:version_required, :version] do
161
+ juwelier.bump_major_version
162
+ $stdout.puts "Updated version: #{juwelier.version}"
163
+ end
164
+
165
+ desc "Bump the a minor version by 1"
166
+ task :minor => [:version_required, :version] do
167
+ juwelier.bump_minor_version
168
+ $stdout.puts "Updated version: #{juwelier.version}"
169
+ end
170
+
171
+ desc "Bump the patch version by 1"
172
+ task :patch => [:version_required, :version] do
173
+ juwelier.bump_patch_version
174
+ $stdout.puts "Updated version: #{juwelier.version}"
175
+ end
176
+ end
177
+ end
178
+ end
179
+
180
+
181
+ namespace :git do
182
+ desc "Tag and push release to git. (happens by default with `rake release`)"
183
+ task :release do
184
+ juwelier.release_to_git(release_args)
185
+ end
186
+ end
187
+
188
+ task :release => 'git:release'
189
+
190
+ unless File.exist?('Gemfile')
191
+ desc "Check that runtime and development dependencies are installed"
192
+ task :check_dependencies do
193
+ juwelier.check_dependencies
194
+ end
195
+
196
+ namespace :check_dependencies do
197
+ desc "Check that runtime dependencies are installed"
198
+ task :runtime do
199
+ juwelier.check_dependencies(:runtime)
200
+ end
201
+
202
+ desc"Check that development dependencies are installed"
203
+ task :development do
204
+ juwelier.check_dependencies(:development)
205
+ end
206
+ end
207
+ end
208
+
209
+ desc "Start IRB with all runtime dependencies loaded"
210
+ task :console, [:script] do |t,args|
211
+ # TODO move to a command
212
+ dirs = ['ext', 'lib'].select { |dir| File.directory?(dir) }
213
+
214
+ original_load_path = $LOAD_PATH
215
+
216
+ cmd = if File.exist?('Gemfile')
217
+ require 'bundler'
218
+ Bundler.setup(:default)
219
+ end
220
+
221
+ # add the project code directories
222
+ $LOAD_PATH.unshift(*dirs)
223
+
224
+ # clear ARGV so IRB is not confused
225
+ ARGV.clear
226
+
227
+ require 'irb'
228
+
229
+ # set the optional script to run
230
+ IRB.conf[:SCRIPT] = args.script
231
+ IRB.start
232
+
233
+ # return the $LOAD_PATH to it's original state
234
+ $LOAD_PATH.reject! { |path| !(original_load_path.include?(path)) }
235
+ end
236
+
237
+ end
238
+ end
239
+ end
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
@@ -0,0 +1,49 @@
1
+ # rcov generated
2
+ coverage
3
+ coverage.data
4
+
5
+ # rdoc generated
6
+ rdoc
7
+
8
+ # yard generated
9
+ doc
10
+ .yardoc
11
+
12
+ # bundler
13
+ .bundle
14
+
15
+ # juwelier generated
16
+ pkg
17
+
18
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
+ #
20
+ # * Create a file at ~/.gitignore
21
+ # * Include files you want ignored
22
+ # * Run: git config --global core.excludesfile ~/.gitignore
23
+ #
24
+ # After doing this, these files will be ignored in all your git projects,
25
+ # saving you from having to 'pollute' every project you touch with them
26
+ #
27
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
28
+ #
29
+ # For MacOS:
30
+ #
31
+ #.DS_Store
32
+
33
+ # For TextMate
34
+ #*.tmproj
35
+ #tmtags
36
+
37
+ # For emacs:
38
+ #*~
39
+ #\#*
40
+ #.\#*
41
+
42
+ # For vim:
43
+ #*.swp
44
+
45
+ # For redcar:
46
+ #.redcar
47
+
48
+ # For rubinius:
49
+ #*.rbc
@@ -0,0 +1,12 @@
1
+ source "https://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ <% development_dependencies.each do |name, version| %>
10
+ gem "<%= name %>", "<%= version %>"
11
+ <% end %>
12
+ end
@@ -0,0 +1,20 @@
1
+ Copyright (c) <%= Time.now.year %> <%= user_name %>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,19 @@
1
+ = <%= project_name %>
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to <%= project_name %>
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) <%= Time.now.year %> <%= user_name %>. See LICENSE.txt for
18
+ further details.
19
+
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ <%= render_template 'bundler_setup.erb' %>
5
+ require 'rake'
6
+
7
+ <%= render_template 'juwelier_tasks.erb' %>
8
+
9
+ <%= render_template 'other_tasks.erb' %>
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe "<%= constant_name %>" do
4
+ it "fails" do
5
+ should.flunk "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ <%= render_template 'simplecov.erb' %>
2
+ require 'rubygems'
3
+ <%= render_template 'bundler_setup.erb' %>
4
+ require 'bacon'
5
+
6
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
+ require '<%= require_name %>'
9
+
10
+ Bacon.summary_on_exit
@@ -0,0 +1,10 @@
1
+ <% if should_use_bundler %>
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ <% end %>
@@ -0,0 +1,9 @@
1
+ Feature: something something
2
+ In order to something something
3
+ A user something something
4
+ something something something
5
+
6
+ Scenario: something something
7
+ Given inspiration
8
+ When I create a sweet new gem
9
+ Then everyone should see how awesome I am
@@ -0,0 +1,11 @@
1
+ <%= render_template 'simplecov.erb' %>
2
+ <%= render_template 'bundler_setup.erb' %>
3
+
4
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
5
+ require '<%= require_name %>'
6
+
7
+ require '<%= feature_support_require %>'
8
+ <% if feature_support_extend %>
9
+
10
+ World(<%= feature_support_extend %>)
11
+ <% end %>
@@ -0,0 +1,31 @@
1
+ require 'juwelier'
2
+ Juwelier::Tasks.new do |gem|
3
+ # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
4
+ gem.name = "<%= project_name %>"
5
+ gem.homepage = "<%= homepage %>"
6
+ gem.license = "MIT"
7
+ gem.summary = %Q{<%= summary %>}
8
+ gem.description = %Q{<%= description %>}
9
+ gem.email = "<%= user_email %>"
10
+ gem.authors = ["<%= user_name %>"]
11
+ <% if should_setup_rubyforge %>
12
+ gem.rubyforge_project = "<%= project_name %>"
13
+ <% end %>
14
+ <% if should_use_bundler %>
15
+ # dependencies defined in Gemfile
16
+ <% else %>
17
+ <% development_dependencies.each do |name, version| %>
18
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
19
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
20
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
21
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
22
+ gem.add_development_dependency "<%= name %>", "<%= version %>"
23
+ <% end %>
24
+ <% end %>
25
+ end
26
+ Juwelier::RubygemsDotOrgTasks.new
27
+ <% if should_setup_rubyforge %>
28
+ Juwelier::RubyforgeTasks.new do |rubyforge|
29
+ rubyforge.doc_task = "<%= doc_task %>"
30
+ end
31
+ <% end %>