Sha256: 0ffab9fdb873bc166ac82a73c7a8268fb612c37c68ceb162c142228113fc91f8

Contents?: true

Size: 816 Bytes

Versions: 2

Compression:

Stored size: 816 Bytes

Contents

module Padrino
  module Generators
    module Components
      module Orms
        
        module CouchrestGen

          COUCHREST = (<<-COUCHREST).gsub(/^ {10}/, '')
          module CouchRestInitializer
            def self.registered(app)
              app.configure(:development) { set :couchdb, CouchRest.database!('your_dev_db_here') }
              app.configure(:production)  { set :couchdb, CouchRest.database!('your_production_db_here') }
              app.configure(:test)        { set :couchdb, CouchRest.database!('your_test_db_here') }
            end
          end
          COUCHREST


          def setup_orm
            require_dependencies 'couchrest'
            create_file("config/initializers/couch_rest.rb", COUCHREST)
          end
        end
        
      end
    end
  end
end
        

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
padrino-gen-0.1.1 lib/generators/components/orms/couchrest_gen.rb
padrino-gen-0.1.0 lib/generators/components/orms/couchrest_gen.rb