Skip to content

Commit

Permalink
Added a rspec spec.opts. Also updated how development dependencies ar…
Browse files Browse the repository at this point in the history
…e handled, so we can depend on a recent release of rspec.
  • Loading branch information
technicalpickles committed Oct 18, 2009
1 parent e3a5f9a commit 14d6e21
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 10 deletions.
9 changes: 8 additions & 1 deletion lib/jeweler/generator.rb
Expand Up @@ -85,7 +85,7 @@ def initialize(options = {})
self.should_setup_gemcutter = options[:gemcutter]
self.should_setup_rubyforge = options[:rubyforge]

development_dependencies << "cucumber" if should_use_cucumber
development_dependencies << ["cucumber", ">= 0"] if should_use_cucumber

self.user_name = options[:user_name]
self.user_email = options[:user_email]
Expand Down Expand Up @@ -173,6 +173,13 @@ def create_files
output_template_in_target File.join(testing_framework.to_s, 'flunking.rb'),
File.join(test_dir, test_filename)


if testing_framework == :rspec
output_template_in_target File.join(testing_framework.to_s, 'spec.opts'),
File.join(test_dir, 'spec.opts')

end

if should_use_cucumber
mkdir_in_target features_dir
output_template_in_target File.join(%w(features default.feature)), File.join('features', feature_filename)
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/bacon_mixin.rb
Expand Up @@ -3,7 +3,7 @@ class Generator
module BaconMixin

def self.extended(generator)
generator.development_dependencies << "bacon"
generator.development_dependencies << ["bacon", ">= 0"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/micronaut_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module MicronautMixin
def self.extended(generator)
generator.development_dependencies << "spicycode-micronaut"
generator.development_dependencies << ["spicycode-micronaut", ">= 0"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/minitest_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module MinitestMixin
def self.extended(generator)
generator.development_dependencies << "minitest"
generator.development_dependencies << ["minitest", ">= 0"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/riot_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module RiotMixin
def self.extended(generator)
generator.development_dependencies << "riot"
generator.development_dependencies << ["riot", ">= 0"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/rspec_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module RspecMixin
def self.extended(generator)
generator.development_dependencies << "rspec"
generator.development_dependencies << ["rspec", ">= 1.2.9"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/shoulda_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module ShouldaMixin
def self.extended(generator)
generator.development_dependencies << "thoughtbot-shoulda"
generator.development_dependencies << ["thoughtbot-shoulda", ">= 0"]
end

def default_task
Expand Down
2 changes: 1 addition & 1 deletion lib/jeweler/generator/yard_mixin.rb
Expand Up @@ -2,7 +2,7 @@ class Jeweler
class Generator
module YardMixin
def self.extended(generator)
generator.development_dependencies << "yard"
generator.development_dependencies << ["yard", ">= 0"]
end

def doc_task
Expand Down
4 changes: 2 additions & 2 deletions lib/jeweler/templates/Rakefile
Expand Up @@ -13,8 +13,8 @@ begin
<% if should_setup_rubyforge %>
gem.rubyforge_project = "<%= project_name %>"
<% end %>
<% development_dependencies.each do |dependency| %>
gem.add_development_dependency "<%= dependency %>"
<% development_dependencies.each do |name, version| %>
gem.add_development_dependency "<%= name %>", "<%= version %>"
<% end %>
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Expand Down
1 change: 1 addition & 0 deletions lib/jeweler/templates/rspec/spec.opts
@@ -0,0 +1 @@
--color

0 comments on commit 14d6e21

Please sign in to comment.