padrino-gen 0.2.6 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.6
1
+ 0.2.9
@@ -10,7 +10,7 @@ module Padrino
10
10
 
11
11
  # Adds all the specified gems into the Gemfile for bundler
12
12
  # require_dependencies 'activerecord'
13
- # require_dependencies 'mocha', 'bacon', :env => :testing
13
+ # require_dependencies 'mocha', 'bacon', :only => :testing
14
14
  def require_dependencies(*gem_names)
15
15
  options = gem_names.extract_options!
16
16
  gem_names.reverse.each { |lib| insert_into_gemfile(lib, options) }
@@ -18,10 +18,10 @@ module Padrino
18
18
 
19
19
  # Inserts a required gem into the Gemfile to add the bundler dependency
20
20
  # insert_into_gemfile(name)
21
- # insert_into_gemfile(name, :env => :testing, :require_as => 'foo')
21
+ # insert_into_gemfile(name, :only => :testing, :require_as => 'foo')
22
22
  def insert_into_gemfile(name, options={})
23
- after_pattern = options[:env] ? "#{options[:env].to_s.capitalize} requirements\n" : "Component requirements\n"
24
- gem_options = options.slice(:env, :require_as).collect { |k, v| "#{k.inspect} => #{v.inspect}" }.join(", ")
23
+ after_pattern = options[:only] ? "#{options[:only].to_s.capitalize} requirements\n" : "Component requirements\n"
24
+ gem_options = options.slice(:only, :require_as).collect { |k, v| "#{k.inspect} => #{v.inspect}" }.join(", ")
25
25
  include_text = "gem '#{name}'" << (gem_options.present? ? ", #{gem_options}" : "") << "\n"
26
26
  options.merge!(:content => include_text, :after => after_pattern)
27
27
  inject_into_file('Gemfile', options[:content], :after => options[:after])
@@ -5,7 +5,7 @@ module Padrino
5
5
 
6
6
  module MochaGen
7
7
  def setup_mock
8
- require_dependencies 'mocha', :env => :testing
8
+ require_dependencies 'mocha', :only => :testing
9
9
  insert_mocking_include "Mocha::API", :path => "test/test_config.rb"
10
10
  end
11
11
  end
@@ -5,7 +5,7 @@ module Padrino
5
5
 
6
6
  module RrGen
7
7
  def setup_mock
8
- require_dependencies 'rr', :env => :testing
8
+ require_dependencies 'rr', :only => :testing
9
9
  insert_mocking_include "RR::Adapters::RRMethods", :path => "test/test_config.rb"
10
10
  end
11
11
  end
@@ -16,7 +16,7 @@ module Padrino
16
16
 
17
17
  # Setup the testing configuration helper and dependencies
18
18
  def setup_test
19
- require_dependencies 'bacon', :env => :testing
19
+ require_dependencies 'bacon', :only => :testing
20
20
  insert_test_suite_setup BACON_SETUP
21
21
  end
22
22
 
@@ -15,7 +15,7 @@ module Padrino
15
15
  TEST
16
16
 
17
17
  def setup_test
18
- require_dependencies 'riot', :env => :testing
18
+ require_dependencies 'riot', :only => :testing
19
19
  insert_test_suite_setup RIOT_SETUP
20
20
  end
21
21
 
@@ -16,7 +16,7 @@ module Padrino
16
16
 
17
17
  # TODO move to spec directory to follow convention
18
18
  def setup_test
19
- require_dependencies 'rspec', :env => :testing, :require_as => 'spec'
19
+ require_dependencies 'rspec', :only => :testing, :require_as => 'spec'
20
20
  insert_test_suite_setup RSPEC_SETUP
21
21
  end
22
22
 
@@ -15,7 +15,7 @@ module Padrino
15
15
  TEST
16
16
 
17
17
  def setup_test
18
- require_dependencies 'test/unit', 'shoulda', :env => :testing
18
+ require_dependencies 'test/unit', 'shoulda', :only => :testing
19
19
  insert_test_suite_setup SHOULDA_SETUP
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ module Padrino
15
15
  TEST
16
16
 
17
17
  def setup_test
18
- require_dependencies 'test/spec', :env => :testing
18
+ require_dependencies 'test/spec', :only => :testing
19
19
  insert_test_suite_setup TESTSPEC_SETUP
20
20
  end
21
21
 
data/padrino-gen.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{padrino-gen}
8
- s.version = "0.2.6"
8
+ s.version = "0.2.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Padrino Team", "Nathan Esquenazi", "Davide D'Agostino", "Arthur Chiu"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team