Sha256: d52f19d6b792bea764f210825626e9b23d46f3bf623532177dee03876bf19d0d

Contents?: true

Size: 1.37 KB

Versions: 17

Compression:

Stored size: 1.37 KB

Contents

# encoding: utf-8
#
# Author:: Couchbase <info@couchbase.com>
# Copyright:: 2012 Couchbase, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'rails/generators/couchbase_orm_generator'

module CouchbaseOrm
    module Generators
        class ConfigGenerator < Rails::Generators::Base
            desc 'Creates a Couchbase configuration file at config/couchbase.yml'
            argument :database_name, :type => :string, :optional => true

            def self.source_root
                @_couchbase_source_root ||= File.expand_path('../templates', __FILE__)
            end

            def app_name
                Rails::Application.subclasses.first.parent.to_s.underscore
            end

            def create_config_file
                template 'couchbase.yml', File.join('config', 'couchbase.yml')
            end

        end
    end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
couchbase-orm-1.0.0 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.2.1 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.2.0 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.1.2 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.1.1 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.1.0 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.12 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.11 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.10 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.9 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.8 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.6 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.5 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.4 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.3 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.2 lib/rails/generators/couchbase_orm/config/config_generator.rb
couchbase-orm-0.0.1 lib/rails/generators/couchbase_orm/config/config_generator.rb