Sha256: 0bff515ebc78c45c431b2b97067ba0eb1c1f6cdd10a06b726dce8dc5c1bb5c72

Contents?: true

Size: 879 Bytes

Versions: 8

Compression:

Stored size: 879 Bytes

Contents

module RubySkynet #:nodoc:
  class Railtie < Rails::Railtie #:nodoc:

    # Exposes RubySkynet configuration to the Rails application configuration.
    #
    # @example Set up configuration in the Rails app.
    #   module MyApplication
    #     class Application < Rails::Application
    #       config.ruby_skynet.region = "Development"
    #     end
    #   end
    config.ruby_skynet = ::RubySkynet

    rake_tasks do
      load "ruby_skynet/railties/ruby_skynet.rake"
    end

    # Load RubySkynet Configuration
    config.before_configuration do
      config_file = Rails.root.join("config", "ruby_skynet.yml")
      if config_file.file?
        ::RubySkynet.configure!(config_file, Rails.env)
      else
        puts "\nRuby Skynet config not found."
        puts "To generate one for the first time: rails generate ruby_skynet:config\n\n"
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_skynet-1.1.1 lib/ruby_skynet/railtie.rb
ruby_skynet-1.1.0 lib/ruby_skynet/railtie.rb
ruby_skynet-1.0.0 lib/ruby_skynet/railtie.rb
ruby_skynet-0.8.1 lib/ruby_skynet/railtie.rb
ruby_skynet-0.8.0 lib/ruby_skynet/railtie.rb
ruby_skynet-0.7.0 lib/ruby_skynet/railtie.rb
ruby_skynet-0.6.0 lib/ruby_skynet/railtie.rb
ruby_skynet-0.5.0 lib/ruby_skynet/railtie.rb