Sha256: 55abb700ba2139a09dd0798dcf5a4dca398a28e24471b26bcb89db275310157e

Contents?: true

Size: 1.43 KB

Versions: 20

Compression:

Stored size: 1.43 KB

Contents

gemfile

route "root :to => \"blogs#index\""

unless have_migration? "insert_admin_user_and_roles"
  user_attr = %w(user_email user_password user_first_name user_last_name user_blog_title user_alias)
  for attrib in user_attr
    class_eval "attr_accessor :#{attrib}"
    send "#{attrib}=", ask("Please enter #{attrib}...")
  end
end

unless File.exist? 'config/amazon_s3.yml'
  class_eval do
    attr_accessor :bucket, :access_key_id, :secret_access_key
  end
  say ("If you have your S3 info handy, put it in now.")
  for attribute in %w(bucket access_key_id secret_access_key)
    self.send "#{attribute}=", ask("What's the #{attribute}?")
  end

  template 'config/amazon_s3.yml', 'config/amazon_s3.yml'
end

generate "wheels_checkout_assets_readonly"

stategies << lambda do
  generate "devise:install"
  source_root File.expand_path('../../../../', __FILE__)
  my_migrations = Dir.new(File.expand_path('db/migrate', source_root)).entries

  my_migrations.each do |file|
    migration_oldnum = file.split("_").first
    migration_name = file.split('.').first.
                      split("_").reject{|t| t==migration_oldnum}.join('_')
    if migrations.select{|t| t.include?(migration_name)}.empty?
      migration_template "db/migrate/#{file}", "db/migrate/#{migration_name}"
      sleep 1
    end
  end

  # create wheels_resources first so that devise_for :users will appear first in routes.rb
  route "wheels_resources"
  route "devise_for :users"
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
wheels-0.1.30 lib/generators/recipes/wheels.rb
wheels-0.1.28 lib/generators/recipes/wheels.rb
wheels-0.1.27 lib/generators/recipes/wheels.rb
wheels-0.1.25 lib/generators/recipes/wheels.rb
wheels-0.1.24 lib/generators/recipes/wheels.rb
wheels-0.1.23 lib/generators/recipes/wheels.rb
wheels-0.1.22 lib/generators/recipes/wheels.rb
wheels-0.1.21 lib/generators/recipes/wheels.rb
wheels-0.1.20 lib/generators/recipes/wheels.rb
wheels-0.1.19 lib/generators/recipes/wheels.rb
wheels-0.1.18 lib/generators/recipes/wheels.rb
wheels-0.1.17 lib/generators/recipes/wheels.rb
wheels-0.1.16 lib/generators/recipes/wheels.rb
wheels-0.1.15 lib/generators/recipes/wheels.rb
wheels-0.1.14 lib/generators/recipes/wheels.rb
wheels-0.1.13 lib/generators/recipes/wheels.rb
wheels-0.1.12 lib/generators/recipes/wheels.rb
wheels-0.1.11 lib/generators/wheels/recipes/wheels.rb
wheels-0.1.10 lib/generators/recipes/wheels.rb
wheels-0.1.9 lib/generators/recipes/wheels.rb