padrino-gen 0.7.4 → 0.7.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/padrino-gen.rb +1 -0
- data/lib/padrino-gen/generators.rb +2 -0
- data/lib/padrino-gen/generators/actions.rb +2 -2
- data/lib/padrino-gen/generators/app.rb +3 -2
- data/lib/padrino-gen/generators/app/config/boot.rb +14 -5
- data/lib/padrino-gen/generators/components/mocks/mocha_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/mocks/rr_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/bacon_test_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/riot_test_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/rspec_test_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/shoulda_test_gen.rb +1 -1
- data/lib/padrino-gen/generators/components/tests/testspec_test_gen.rb +1 -1
- data/lib/padrino-gen/generators/templates/Gemfile.tt +12 -3
- data/padrino-gen.gemspec +5 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.5
|
data/lib/padrino-gen.rb
CHANGED
@@ -90,7 +90,7 @@ module Padrino
|
|
90
90
|
|
91
91
|
# Adds all the specified gems into the Gemfile for bundler
|
92
92
|
# require_dependencies 'active_record'
|
93
|
-
# require_dependencies 'mocha', 'bacon', :group => :
|
93
|
+
# require_dependencies 'mocha', 'bacon', :group => :test
|
94
94
|
def require_dependencies(*gem_names)
|
95
95
|
options = gem_names.extract_options!
|
96
96
|
gem_names.reverse.each { |lib| insert_into_gemfile(lib, options) }
|
@@ -98,7 +98,7 @@ module Padrino
|
|
98
98
|
|
99
99
|
# Inserts a required gem into the Gemfile to add the bundler dependency
|
100
100
|
# insert_into_gemfile(name)
|
101
|
-
# insert_into_gemfile(name, :group => :
|
101
|
+
# insert_into_gemfile(name, :group => :test, :require => 'foo')
|
102
102
|
def insert_into_gemfile(name, options={})
|
103
103
|
after_pattern = options[:group] ? "#{options[:group].to_s.capitalize} requirements\n" : "Component requirements\n"
|
104
104
|
gem_options = options.slice(:group, :require).collect { |k, v| "#{k.inspect} => #{v.inspect}" }.join(", ")
|
@@ -18,8 +18,9 @@ module Padrino
|
|
18
18
|
|
19
19
|
argument :name, :desc => "The name of your padrino project"
|
20
20
|
|
21
|
-
class_option :run_bundler, :aliases => '-b', :default => false, :type => :boolean
|
22
|
-
class_option :root,
|
21
|
+
class_option :run_bundler, :desc => "Run 'bundle install'", :aliases => '-b', :default => false, :type => :boolean
|
22
|
+
class_option :root, :desc => "The root destination", :aliases => '-r', :default => ".", :type => :string
|
23
|
+
class_option :dev, :desc => "Use padrino from a git checkout", :default => false, :type => :boolean
|
23
24
|
|
24
25
|
# Definitions for the available customizable components
|
25
26
|
component_option :orm, "database engine", :aliases => '-d', :choices => [:datamapper, :mongomapper, :activerecord, :sequel, :couchrest]
|
@@ -1,10 +1,19 @@
|
|
1
|
-
#
|
1
|
+
# Defines our constants
|
2
|
+
PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
|
2
3
|
PADRINO_ROOT = File.dirname(__FILE__) + '/..' unless defined? PADRINO_ROOT
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
begin
|
6
|
+
# Require the preresolved locked set of gems.
|
7
|
+
require File.expand_path('../../.bundle/environment', __FILE__)
|
8
|
+
require 'padrino'
|
9
|
+
rescue LoadError
|
10
|
+
# Fallback on doing the resolve at runtime.
|
11
|
+
require 'rubygems'
|
12
|
+
require 'bundler'
|
13
|
+
Bundler.setup
|
7
14
|
end
|
8
15
|
|
9
|
-
require
|
16
|
+
Bundler.require :default, PADRINO_ENV
|
17
|
+
puts "=> Located #{Padrino.bundle} Gemfile for #{Padrino.env} with #{Padrino.support.to_s.humanize}"
|
18
|
+
|
10
19
|
Padrino.load!
|
@@ -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', :group => :
|
19
|
+
require_dependencies 'rspec', :group => :test, :require => 'spec'
|
20
20
|
insert_test_suite_setup RSPEC_SETUP
|
21
21
|
end
|
22
22
|
|
@@ -2,11 +2,20 @@ source 'http://gemcutter.org'
|
|
2
2
|
|
3
3
|
# Project requirements
|
4
4
|
gem 'sinatra', :require => 'sinatra/base'
|
5
|
-
gem 'padrino', "<%= Padrino.version %>"
|
6
5
|
gem 'rack-flash'
|
7
6
|
gem 'thin' # or mongrel
|
8
7
|
|
9
8
|
# Component requirements
|
10
9
|
|
11
|
-
#
|
12
|
-
gem 'rack-test', :require => 'rack/test', :group => :
|
10
|
+
# Test requirements
|
11
|
+
gem 'rack-test', :require => 'rack/test', :group => :test
|
12
|
+
|
13
|
+
<%- if options.dev? -%>
|
14
|
+
# Vendored Padrino
|
15
|
+
%w(core gen helpers mailer admin).each do |gem|
|
16
|
+
gem 'padrino-' + gem, :path => "<%= Padrino::Generators::DEV_PATH %>/padrino-" + gem
|
17
|
+
end
|
18
|
+
<%- else -%>
|
19
|
+
# Padrino
|
20
|
+
gem 'padrino', "<%= Padrino.version %>"
|
21
|
+
<%- end -%>
|
data/padrino-gen.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{padrino-gen}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.5"
|
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"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-09}
|
13
13
|
s.default_executable = %q{padrino-gen}
|
14
14
|
s.description = %q{Generators for easily creating and building padrino applications from the console}
|
15
15
|
s.email = %q{padrinorb@gmail.com}
|
@@ -99,7 +99,7 @@ Gem::Specification.new do |s|
|
|
99
99
|
|
100
100
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
101
101
|
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
|
102
|
-
s.add_runtime_dependency(%q<padrino-core>, ["= 0.7.
|
102
|
+
s.add_runtime_dependency(%q<padrino-core>, ["= 0.7.5"])
|
103
103
|
s.add_runtime_dependency(%q<thor>, [">= 0.13.0"])
|
104
104
|
s.add_runtime_dependency(%q<bundler>, [">= 0.9.3"])
|
105
105
|
s.add_development_dependency(%q<haml>, [">= 2.2.1"])
|
@@ -110,7 +110,7 @@ Gem::Specification.new do |s|
|
|
110
110
|
s.add_development_dependency(%q<fakeweb>, [">= 1.2.3"])
|
111
111
|
else
|
112
112
|
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
|
113
|
-
s.add_dependency(%q<padrino-core>, ["= 0.7.
|
113
|
+
s.add_dependency(%q<padrino-core>, ["= 0.7.5"])
|
114
114
|
s.add_dependency(%q<thor>, [">= 0.13.0"])
|
115
115
|
s.add_dependency(%q<bundler>, [">= 0.9.3"])
|
116
116
|
s.add_dependency(%q<haml>, [">= 2.2.1"])
|
@@ -122,7 +122,7 @@ Gem::Specification.new do |s|
|
|
122
122
|
end
|
123
123
|
else
|
124
124
|
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
|
125
|
-
s.add_dependency(%q<padrino-core>, ["= 0.7.
|
125
|
+
s.add_dependency(%q<padrino-core>, ["= 0.7.5"])
|
126
126
|
s.add_dependency(%q<thor>, [">= 0.13.0"])
|
127
127
|
s.add_dependency(%q<bundler>, [">= 0.9.3"])
|
128
128
|
s.add_dependency(%q<haml>, [">= 2.2.1"])
|
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.7.
|
4
|
+
version: 0.7.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2010-02-
|
15
|
+
date: 2010-02-09 00:00:00 +01:00
|
16
16
|
default_executable: padrino-gen
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
requirements:
|
34
34
|
- - "="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.7.
|
36
|
+
version: 0.7.5
|
37
37
|
version:
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: thor
|