padrino-gen 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.2
1
+ 0.6.3
@@ -1,4 +1,10 @@
1
1
  # AUTOGENERATED FILE -- Don't change this file unless you know what you are doing!
2
2
  PADRINO_ROOT = File.dirname(__FILE__) + '/..' unless defined? PADRINO_ROOT
3
+
4
+ # Try to load the vendorized padrino.
5
+ Dir[PADRINO_ROOT + "/vendor/padrino/**/lib"].each do |gem|
6
+ $LOAD_PATH.unshift gem
7
+ end
8
+
3
9
  require 'padrino'
4
10
  Padrino.load!
@@ -9,7 +9,7 @@ module Padrino
9
9
  TEST
10
10
 
11
11
  # Adds all the specified gems into the Gemfile for bundler
12
- # require_dependencies 'activerecord'
12
+ # require_dependencies 'active_record'
13
13
  # require_dependencies 'mocha', 'bacon', :only => :testing
14
14
  def require_dependencies(*gem_names)
15
15
  options = gem_names.extract_options!
@@ -126,34 +126,34 @@ if defined?(ActiveRecord)
126
126
  end
127
127
 
128
128
 
129
- desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
129
+ desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking ar:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
130
130
  task :migrate => :environment do
131
131
  ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
132
132
  ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
133
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
133
+ Rake::Task["ar:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
134
134
  end
135
135
 
136
136
  namespace :migrate do
137
137
  desc 'Rollbacks the database one migration and re migrate up. If you want to rollback more than one step, define STEP=x. Target specific version with VERSION=x.'
138
138
  task :redo => :environment do
139
139
  if ENV["VERSION"]
140
- Rake::Task["db:migrate:down"].invoke
141
- Rake::Task["db:migrate:up"].invoke
140
+ Rake::Task["ar:migrate:down"].invoke
141
+ Rake::Task["ar:migrate:up"].invoke
142
142
  else
143
- Rake::Task["db:rollback"].invoke
144
- Rake::Task["db:migrate"].invoke
143
+ Rake::Task["ar:rollback"].invoke
144
+ Rake::Task["ar:migrate"].invoke
145
145
  end
146
146
  end
147
147
 
148
148
  desc 'Resets your database using your migrations for the current environment'
149
- task :reset => ["db:drop", "db:create", "db:migrate"]
149
+ task :reset => ["ar:drop", "ar:create", "ar:migrate"]
150
150
 
151
151
  desc 'Runs the "up" for a given migration VERSION.'
152
152
  task :up => :environment do
153
153
  version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
154
154
  raise "VERSION is required" unless version
155
155
  ActiveRecord::Migrator.run(:up, "db/migrate/", version)
156
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
156
+ Rake::Task["ar:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
157
157
  end
158
158
 
159
159
  desc 'Runs the "down" for a given migration VERSION.'
@@ -161,7 +161,7 @@ if defined?(ActiveRecord)
161
161
  version = ENV["VERSION"] ? ENV["VERSION"].to_i : nil
162
162
  raise "VERSION is required" unless version
163
163
  ActiveRecord::Migrator.run(:down, "db/migrate/", version)
164
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
164
+ Rake::Task["ar:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
165
165
  end
166
166
  end
167
167
 
@@ -169,18 +169,18 @@ if defined?(ActiveRecord)
169
169
  task :rollback => :environment do
170
170
  step = ENV['STEP'] ? ENV['STEP'].to_i : 1
171
171
  ActiveRecord::Migrator.rollback('db/migrate/', step)
172
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
172
+ Rake::Task["ar:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
173
173
  end
174
174
 
175
175
  desc 'Pushes the schema to the next version. Specify the number of steps with STEP=n'
176
176
  task :forward => :environment do
177
177
  step = ENV['STEP'] ? ENV['STEP'].to_i : 1
178
178
  ActiveRecord::Migrator.forward('db/migrate/', step)
179
- Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
179
+ Rake::Task["ar:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
180
180
  end
181
181
 
182
182
  desc 'Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.'
183
- task :reset => [ 'db:drop', 'db:setup' ]
183
+ task :reset => [ 'ar:drop', 'ar:setup' ]
184
184
 
185
185
  desc "Retrieves the charset for the current environment's database"
186
186
  task :charset => :environment do
@@ -224,13 +224,13 @@ if defined?(ActiveRecord)
224
224
  pending_migrations.each do |pending_migration|
225
225
  puts ' %4d %s' % [pending_migration.version, pending_migration.name]
226
226
  end
227
- abort %{Run "rake db:migrate" to update your database then try again.}
227
+ abort %{Run "rake ar:migrate" to update your database then try again.}
228
228
  end
229
229
  end
230
230
  end
231
231
 
232
232
  desc 'Create the database, load the schema, and initialize with the seed data'
233
- task :setup => [ 'db:create', 'db:schema:load', 'db:seed' ]
233
+ task :setup => [ 'ar:create', 'ar:schema:load', 'ar:seed' ]
234
234
 
235
235
  namespace :schema do
236
236
  desc "Create a db/schema.rb file that can be portably used against any DB supported by AR"
@@ -239,7 +239,7 @@ if defined?(ActiveRecord)
239
239
  File.open(ENV['SCHEMA'] || Padrino.root("db", "schema.rb"), "w") do |file|
240
240
  ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, file)
241
241
  end
242
- Rake::Task["db:schema:dump"].reenable
242
+ Rake::Task["ar:schema:dump"].reenable
243
243
  end
244
244
 
245
245
  desc "Load a schema.rb file into the database"
@@ -248,7 +248,7 @@ if defined?(ActiveRecord)
248
248
  if File.exists?(file)
249
249
  load(file)
250
250
  else
251
- raise %{#{file} doesn't exist yet. Run "rake db:migrate" to create it then try again. If you do not intend to use a database, you should instead alter #{Padrino.root}/config/boot.rb to limit the frameworks that will be loaded}
251
+ raise %{#{file} doesn't exist yet. Run "rake ar:migrate" to create it then try again. If you do not intend to use a database, you should instead alter #{Padrino.root}/config/boot.rb to limit the frameworks that will be loaded}
252
252
  end
253
253
  end
254
254
  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.6.2"
8
+ s.version = "0.6.3"
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-01-14}
12
+ s.date = %q{2010-01-15}
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{nesquena@gmail.com}
@@ -98,7 +98,7 @@ Gem::Specification.new do |s|
98
98
 
99
99
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
100
100
  s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
101
- s.add_runtime_dependency(%q<padrino-core>, ["= 0.6.2"])
101
+ s.add_runtime_dependency(%q<padrino-core>, ["= 0.6.3"])
102
102
  s.add_runtime_dependency(%q<thor>, [">= 0.11.8"])
103
103
  s.add_runtime_dependency(%q<bundler>, [">= 0.5.0"])
104
104
  s.add_development_dependency(%q<haml>, [">= 2.2.1"])
@@ -109,7 +109,7 @@ Gem::Specification.new do |s|
109
109
  s.add_development_dependency(%q<fakeweb>, [">= 1.2.3"])
110
110
  else
111
111
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
112
- s.add_dependency(%q<padrino-core>, ["= 0.6.2"])
112
+ s.add_dependency(%q<padrino-core>, ["= 0.6.3"])
113
113
  s.add_dependency(%q<thor>, [">= 0.11.8"])
114
114
  s.add_dependency(%q<bundler>, [">= 0.5.0"])
115
115
  s.add_dependency(%q<haml>, [">= 2.2.1"])
@@ -121,7 +121,7 @@ Gem::Specification.new do |s|
121
121
  end
122
122
  else
123
123
  s.add_dependency(%q<sinatra>, [">= 0.9.2"])
124
- s.add_dependency(%q<padrino-core>, ["= 0.6.2"])
124
+ s.add_dependency(%q<padrino-core>, ["= 0.6.3"])
125
125
  s.add_dependency(%q<thor>, [">= 0.11.8"])
126
126
  s.add_dependency(%q<bundler>, [">= 0.5.0"])
127
127
  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.6.2
4
+ version: 0.6.3
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-01-14 00:00:00 +01:00
15
+ date: 2010-01-15 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.6.2
36
+ version: 0.6.3
37
37
  version:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: thor