Sha256: 6976a7bf1dd25948b73642a93b8de8e468f338b4a699a98c054bbe878aac2c13

Contents?: true

Size: 811 Bytes

Versions: 12

Compression:

Stored size: 811 Bytes

Contents

class AdaptorGenerator < Rails::Generator::NamedBase
  def manifest
    record do |m|
      # Check for class naming collisions.
      m.class_collisions class_path, "ApplicationAdaptor", "#{class_name}Adaptor", "#{class_name}AdaptorTest"

      # Adaptors and test directories.
      m.directory File.join('app/adaptors', class_path)
      m.directory File.join('test/functional', class_path)
      # Adaptor class and functional test.
      m.template 'adaptor.rb',
                  File.join('app/adaptors',
                            class_path,
                            "#{file_name}_adaptor.rb")
      m.template 'functional_test.rb',
                  File.join('test/functional',
                            class_path,
                            "#{file_name}_adaptor_test.rb")
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adaptation-1.0.1 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.0 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.1 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.2 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.3 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.4 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.5 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.6 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.7 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.8 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.10 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb
adaptation-0.1.9 lib/rails_generator/generators/components/adaptor/adaptor_generator.rb