mongo_mapper_connector 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
File without changes
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Chris Hanks
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # MongoMapper Connector
2
+
3
+ MongoMapper Connector is a tiny, tiny gem I wrote to set up MongoMapper connections in several of my Rails apps. I was repeating the same tiny initializer across many apps, and decided that a simple gem would just be easier.
4
+
5
+ Just define your environment variables:
6
+
7
+ MONGO_HOST - Production mongo host, such as 'localhost' (defaults to localhost on development/test)
8
+ MONGO_PORT - Such as '27017' (defaults to 27017 on development/test)
9
+ MONGO_DB_PREFIX - If this is 'ferret', your databases will be 'ferret-development', 'ferret-production'...
10
+ MONGO_USERNAME - Username for production database
11
+ MONGO_PASSWORD - Password for production database.
data/ROADMAP.md ADDED
File without changes
@@ -0,0 +1,10 @@
1
+ MongoMapper.connection =
2
+ if Rails.env.production?
3
+ Mongo::Connection.new ENV['MONGO_HOST'], ENV['MONGO_PORT'].to_i, :logger => Rails.logger
4
+ else
5
+ Mongo::Connection.new 'localhost', 27017, :logger => Rails.logger
6
+ end
7
+
8
+ MongoMapper.database = [ENV['MONGO_DB_PREFIX'], Rails.env].join '-'
9
+
10
+ MongoMapper.database.authenticate(ENV['MONGO_USERNAME'], ENV['MONGO_PASSWORD']) if Rails.env.production?
@@ -0,0 +1,3 @@
1
+ module MongoMapperConnector
2
+ VERSION = '0.0.1'
3
+ end
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mongo_mapper_connector
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Chris Hanks
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-07-20 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: A tiny gem that sets up a MongoMapper connection for you.
23
+ email:
24
+ - christopher.m.hanks@gmail.com
25
+ executables: []
26
+
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - lib/mongo_mapper_connector.rb
33
+ - lib/mongo_mapper_connector/version.rb
34
+ - LICENSE
35
+ - README.md
36
+ - ROADMAP.md
37
+ - CHANGELOG.md
38
+ has_rdoc: true
39
+ homepage: http://github.com/chanks/mongo_mapper_connector
40
+ licenses: []
41
+
42
+ post_install_message:
43
+ rdoc_options: []
44
+
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ hash: 3
53
+ segments:
54
+ - 0
55
+ version: "0"
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 23
62
+ segments:
63
+ - 1
64
+ - 3
65
+ - 6
66
+ version: 1.3.6
67
+ requirements: []
68
+
69
+ rubyforge_project: mongo_mapper_connector
70
+ rubygems_version: 1.3.7
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: A tiny gem that sets up a MongoMapper connection.
74
+ test_files: []
75
+