Sha256: 4021222d26d909dedd55a36701c01a6787f8f738c88f30bee5d4a29d766e21c6

Contents?: true

Size: 1 KB

Versions: 13

Compression:

Stored size: 1 KB

Contents

require 'rails/generators'

module TryApi
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)
    desc "This generator generates config file for API interface."

    def init_environment
      app = ::Rails.application
      @app_name = app.class.to_s.split("::").first
    end

    def create_config_file
      template 'config/try_api.yml', 'config/try_api.yml'

      # Bundler.with_clean_env do
      #   run "mkdir vendor/assets/try_api"
      #   run "cd vendor/assets/try_api && bower install jquery"
      #   run "cd vendor/assets/try_api && bower install bootstrap"
      #   run "cd vendor/assets/try_api && bower install slimScroll"
      #   run "cd vendor/assets/try_api && bower install highlightjs"
      #   run "cd vendor/assets/try_api && bower install angular"
      #   run "cd vendor/assets/try_api && bower install angular-bootstrap"
      #   run "cd vendor/assets/try_api && bower install angular-highlightjs"
      # end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
try_api-0.0.18 lib/generators/try_api/install_generator.rb
try_api-0.0.17 lib/generators/try_api/install_generator.rb
try_api-0.0.16 lib/generators/try_api/install_generator.rb
try_api-0.0.15 lib/generators/try_api/install_generator.rb
try_api-0.0.14 lib/generators/try_api/install_generator.rb
try_api-0.0.13 lib/generators/try_api/install_generator.rb
try_api-0.0.12 lib/generators/try_api/install_generator.rb
try_api-0.0.11 lib/generators/try_api/install_generator.rb
try_api-0.0.10 lib/generators/try_api/install_generator.rb
try_api-0.0.9 lib/generators/try_api/install_generator.rb
try_api-0.0.8 lib/generators/try_api/install_generator.rb
try_api-0.0.7 lib/generators/try_api/install_generator.rb
try_api-0.0.6 lib/generators/try_api/install_generator.rb