Sha256: b0ac2c5daa31ecee0e14f2eabb8ab1caf300d135644bbcc0ba400d4b2792490b

Contents?: true

Size: 584 Bytes

Versions: 1

Compression:

Stored size: 584 Bytes

Contents

module JetsUpgrade
  module Rewrite
    def run(options={})
      Application.run
      Rakefile.run
      Gemfile.run(options)
      Routes.run
      rewrite_environment_files
      rewrite_controllers
    end

    def rewrite_environment_files
      %w[development test production].each do |env|
        Environment.new(env).run
      end
    end

    def rewrite_controllers
      Dir.glob("app/controllers/**/*_controller.rb").each do |path|
        next if path.include?("application_controller.rb")
        Controller.new(path).run
      end
    end

    extend self
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jets-upgrade-0.1.1 lib/jets_upgrade/rewrite.rb