gom 0.4.0 → 0.4.1

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.
@@ -8,6 +8,8 @@ is plugged-in via an adapter interface. Currently, the following adapters are pr
8
8
  * filesystem - http://github.com/phifty/gom-filesystem-adapter
9
9
  * couchdb - http://github.com/phifty/gom-couchdb-adapter
10
10
 
11
+ http://travis-ci.org/phifty/gom.png
12
+
11
13
  == Configuration
12
14
 
13
15
  At the beginning of your program the storage configuration should be done with the <tt>GOM::Storage.configure</tt>
@@ -13,7 +13,7 @@ class GOM::Storage::Configuration
13
13
  not_nil :name, :adapter
14
14
  nested {
15
15
  view {
16
- not_nil :name, :type
16
+ not_nil :name, :kind
17
17
  }
18
18
  }
19
19
  }
@@ -83,9 +83,9 @@ class GOM::Storage::Configuration
83
83
  end
84
84
 
85
85
  def self.view(hash)
86
- type = hash[:type]
87
- method_name = :"#{type}_view"
88
- raise NotImplementedError, "the view type '#{type}' doesn't exists" unless self.respond_to?(method_name)
86
+ kind = hash[:kind]
87
+ method_name = :"#{kind}_view"
88
+ raise NotImplementedError, "the view kind '#{kind}' doesn't exists" unless self.respond_to?(method_name)
89
89
  self.send method_name, hash
90
90
  end
91
91
 
@@ -13,12 +13,12 @@ describe GOM::Storage::Configuration do
13
13
  adapter :test
14
14
  view {
15
15
  name :test_object_class_view
16
- type :class
16
+ kind :class
17
17
  model_class Object
18
18
  }
19
19
  view {
20
20
  name :test_map_view
21
- type :map_reduce
21
+ kind :map_reduce
22
22
  map_function "function(document) { }"
23
23
  reduce_function "function(key, values) { }"
24
24
  }
@@ -113,7 +113,7 @@ describe GOM::Storage::Configuration do
113
113
  end
114
114
 
115
115
  it "should raise a #{NotImplementedError} if the view type is invalid" do
116
- @configuration["view"] << { :name => "test", :type => "invalid" }
116
+ @configuration["view"] << { :name => "test", :kind => "invalid" }
117
117
  lambda do
118
118
  @configuration.views[:test_invalid_view]
119
119
  end.should raise_error(NotImplementedError)
@@ -12,12 +12,12 @@ GOM::Storage.configure {
12
12
  adapter :fake_adapter
13
13
  view {
14
14
  name :test_object_class_view
15
- type :class
15
+ kind :class
16
16
  model_class Object
17
17
  }
18
18
  view {
19
19
  name :test_map_view
20
- type :map_reduce
20
+ kind :map_reduce
21
21
  map_function "function(document) { }"
22
22
  reduce_function "function(key, values) { }"
23
23
  }
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gom
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
5
+ version: 0.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Philipp Br\xC3\xBCll"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-10 00:00:00 +02:00
13
+ date: 2011-05-30 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency