Sha256: 13772ca752e48d7c3b7ed45f6ab5ec0fa3f4bc6cf9cf1947db882747d456598a

Contents?: true

Size: 911 Bytes

Versions: 12

Compression:

Stored size: 911 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 once rails has started
    initializer 'ruby_skynet.initialize' 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

12 entries across 12 versions & 1 rubygems

Version Path
ruby_skynet-1.3.0.alpha3 lib/ruby_skynet/railtie.rb
ruby_skynet-1.3.0.alpha2 lib/ruby_skynet/railtie.rb
ruby_skynet-1.3.0.alpha1 lib/ruby_skynet/railtie.rb
ruby_skynet-2.0.0.rc1 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.7 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.6 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.5 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.4 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.3 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.2 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.1 lib/ruby_skynet/railtie.rb
ruby_skynet-1.2.0 lib/ruby_skynet/railtie.rb