Sha256: 3b4306521d6b91e7d38567995734c0663386608ee37981d8aaead6799a6ff7f5

Contents?: true

Size: 580 Bytes

Versions: 8

Compression:

Stored size: 580 Bytes

Contents

module ActionPresenter
  class InstallGenerator < Rails::Generators::Base
    desc <<-DESC
    Description:
      Generate application and test/spec presenter folders
    DESC

    class_option 'test-framework', type: :string, default: :rspec, aliases: '-t', desc: 'Test framework (RSpec or Test::Unit)'

    def build_presenters_folder
      empty_directory 'app/presenters'

      case options['test-framework']
        when 'rspec'
          empty_directory 'spec/presenters'
        when 'test_unit'
          empty_directory 'test/unit/presenters'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
action_presenter-1.1.6 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1.5 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1.4 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1.3 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1.2 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1.1 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.1 lib/generators/action_presenter/install/install_generator.rb
action_presenter-1.0.2 lib/generators/action_presenter/install/install_generator.rb