Sha256: 0d54b507b8b49af1a292022cbdfb5db7b825c31b1e0b7f7cb8e33702d4e676a1

Contents?: true

Size: 849 Bytes

Versions: 19

Compression:

Stored size: 849 Bytes

Contents

require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/generated_attribute'
require 'rails/generators/active_record'

class WheelsUpdateGenerator < Rails::Generators::Base
  include Rails::Generators::Migration
  require File.join(File.dirname(__FILE__), '../core_extensions.rb')
  source_root File.expand_path('../../../../', __FILE__)
  desc "Updates files to the current version of the gem."

  def init
    initialize_templater
  end

  def load_recipes
    apply recipe('wheels_update')
  end

  def bundle_install
    run 'bundle install'
  end

  def execute
    execute_stategies
  end

  def self.next_migration_number(dirname)

    if ActiveRecord::Base.timestamped_migrations
      Time.now.utc.strftime("%Y%m%d%H%M%S")
    else
      "%.3d" % (current_migration_number(dirname) + 1)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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