Sha256: ccd8dd7ec3f60349bb88f38821d6abdf74bc2fb9b96be4b0384ce40fdb7a95a6

Contents?: true

Size: 467 Bytes

Versions: 21

Compression:

Stored size: 467 Bytes

Contents

require 'rails/generators'

module Stitches
  class AddDeprecationGenerator < Rails::Generators::Base
    source_root(File.expand_path(File.join(File.dirname(__FILE__),"generator_files")))

    desc "Adds deprecation support to an app creates with an older version of stitches"
    def add_deprecation
      inject_into_file "app/controllers/api/api_controller.rb", after: /^class.*$/ do<<-CODE

  include Stitches::Deprecation
      CODE
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
stitches-5.0.0 lib/stitches/add_deprecation_generator.rb
stitches-5.0.0.RC1 lib/stitches/add_deprecation_generator.rb
stitches-4.2.2 lib/stitches/add_deprecation_generator.rb
stitches-4.2.1 lib/stitches/add_deprecation_generator.rb
stitches-4.2.0 lib/stitches/add_deprecation_generator.rb
stitches-4.2.0.RC3 lib/stitches/add_deprecation_generator.rb
stitches-4.2.0.RC2 lib/stitches/add_deprecation_generator.rb
stitches-4.2.0.RC1 lib/stitches/add_deprecation_generator.rb
stitches-4.0.2 lib/stitches/add_deprecation_generator.rb
stitches-4.1.0RC2 lib/stitches/add_deprecation_generator.rb
stitches-4.0.1 lib/stitches/add_deprecation_generator.rb
stitches-4.0.0 lib/stitches/add_deprecation_generator.rb
stitches-4.0.0.RC1 lib/stitches/add_deprecation_generator.rb
stitches-3.8.3 lib/stitches/add_deprecation_generator.rb
stitches-3.8.2 lib/stitches/add_deprecation_generator.rb
stitches-3.8.1 lib/stitches/add_deprecation_generator.rb
stitches-3.8.0 lib/stitches/add_deprecation_generator.rb
stitches-3.7.3 lib/stitches/add_deprecation_generator.rb
stitches-3.7.2 lib/stitches/add_deprecation_generator.rb
stitches-3.7.0 lib/stitches/add_deprecation_generator.rb