rackamole 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +5 -1
- data/README.rdoc +1 -1
- data/Rakefile +1 -0
- data/lib/rackamole.rb +1 -1
- data/lib/rackamole/mole.rb +1 -2
- data/lib/rackamole/store/mongo_db.rb +4 -4
- metadata +12 -2
data/HISTORY
CHANGED
@@ -10,4 +10,8 @@
|
|
10
10
|
0.2.0
|
11
11
|
* YAML options - You can now load the rack component from a yaml file. This is
|
12
12
|
very handy in framework where Rackamole options varies depending on the environment.
|
13
|
-
Please refer to spec/test_configs/rackamole_test.yml for an example
|
13
|
+
Please refer to spec/test_configs/rackamole_test.yml for an example
|
14
|
+
|
15
|
+
0.2.2
|
16
|
+
* NOTICE: Wrong docs and wrong configuration for mongo store initialization
|
17
|
+
* Corrected docs and validation for mongo store init - changed :database to :db_name
|
data/README.rdoc
CHANGED
@@ -98,7 +98,7 @@ interactions and leverage these findings for the next iteration of your applicat
|
|
98
98
|
types a logger and a mongo adapter. By default the store is set to log moled information to the console.
|
99
99
|
To change to a mongo store simply add the following options:
|
100
100
|
|
101
|
-
use Rack::Mole, { :app_name => "Fred", :store => Rackamole::Store::MongoDb.new( :
|
101
|
+
use Rack::Mole, { :app_name => "Fred", :store => Rackamole::Store::MongoDb.new( :db_name => 'mole_fred_alpha_mdb' ) }
|
102
102
|
|
103
103
|
This expect a local mongo instance to be running on the default port. You can change the
|
104
104
|
location by adding :host and :port options.
|
data/Rakefile
CHANGED
@@ -28,6 +28,7 @@ PROJ.rcov.opts = ["--sort", "coverage", "-T", '-x mongo']
|
|
28
28
|
depend_on "logging" , ">= 1.2.2"
|
29
29
|
depend_on "hitimes" , ">= 1.0.3"
|
30
30
|
depend_on "mongo" , ">= 0.17.1"
|
31
|
+
depend_on "mongo_ext" , ">= 0.17.1"
|
31
32
|
depend_on "chronic" , ">= 0.2.3"
|
32
33
|
depend_on "twitter4r" , ">= 0.3.0"
|
33
34
|
depend_on "actionmailer" , ">= 2.1.0"
|
data/lib/rackamole.rb
CHANGED
data/lib/rackamole/mole.rb
CHANGED
@@ -19,9 +19,9 @@ module Rackamole
|
|
19
19
|
#
|
20
20
|
# === Options
|
21
21
|
#
|
22
|
-
# :host
|
23
|
-
# :port
|
24
|
-
# :
|
22
|
+
# :host :: The name of the host running the mongo server. Default: localhost
|
23
|
+
# :port :: The port for the mongo server instance. Default: 27017
|
24
|
+
# :db_name :: The name of the mole databaase. Default: mole_mdb
|
25
25
|
#
|
26
26
|
def initialize( options={} )
|
27
27
|
opts = default_options.merge( options )
|
@@ -86,7 +86,7 @@ module Rackamole
|
|
86
86
|
|
87
87
|
# Validates option hash.
|
88
88
|
def validate_options( opts )
|
89
|
-
%w[host port
|
89
|
+
%w[host port db_name].each do |option|
|
90
90
|
unless opts[option.to_sym]
|
91
91
|
raise "[MOle] Mongo store configuration error -- You must specify a value for option `:#{option}"
|
92
92
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rackamole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernand Galiana
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-07 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,6 +42,16 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: 0.17.1
|
44
44
|
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: mongo_ext
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.17.1
|
54
|
+
version:
|
45
55
|
- !ruby/object:Gem::Dependency
|
46
56
|
name: chronic
|
47
57
|
type: :runtime
|