couch_rest_adapter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/couch_rest_adapter.rb +1 -2
- data/lib/couch_rest_adapter/attribute_method.rb +1 -1
- data/lib/couch_rest_adapter/version.rb +1 -1
- data/test/dummy/log/test.log +45 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80e7938a0be83ff4164281d505b5d390c9aaa8c5
|
4
|
+
data.tar.gz: 7fbc6b79a8c57daa074c63fa587e89a77777e851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073bead5da7207675919c12a47a4e69e7b7c7717f24eed043cece1b771b8916319a26447b3bfcf9adf13307145d418ef2c732ecb1555c2f4dedc3039af21e5af
|
7
|
+
data.tar.gz: 1fa69ac85f78e035b2bf87a10e86806bd0c823eca93ca53359b68c015044fa3b80a9b752cba4904b160fcf7e4e5acd21c942abe5d6b0e366d1be13f5b64cbe5d
|
data/lib/couch_rest_adapter.rb
CHANGED
@@ -30,7 +30,6 @@ module CouchRestAdapter
|
|
30
30
|
before_save :set_id
|
31
31
|
|
32
32
|
def initialize attributes = {}
|
33
|
-
@attributes = attributes
|
34
33
|
raise NotImplementedError if abstract?
|
35
34
|
super attributes
|
36
35
|
end
|
@@ -82,7 +81,7 @@ module CouchRestAdapter
|
|
82
81
|
end
|
83
82
|
|
84
83
|
def read_attribute_for_validation(key)
|
85
|
-
|
84
|
+
self[key.to_s]
|
86
85
|
end
|
87
86
|
|
88
87
|
protected
|
@@ -15,7 +15,7 @@ module CouchRestAdapter
|
|
15
15
|
def write_value method_name, value
|
16
16
|
base_method_name = method_without_equals(method_name)
|
17
17
|
singleton_class.class_eval do
|
18
|
-
define_method(method_name){ |v| self[base_method_name] = v }
|
18
|
+
define_method(method_name) { |v| self[base_method_name] = v }
|
19
19
|
end
|
20
20
|
send(method_name, value)
|
21
21
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -2641,3 +2641,48 @@ LintTest: test_to_param
|
|
2641
2641
|
------------------------------
|
2642
2642
|
LintTest: test_to_partial_path
|
2643
2643
|
------------------------------
|
2644
|
+
--------------------------------------------------------------
|
2645
|
+
CouchRestAdapterTest: test_attributes_are_available_as_methods
|
2646
|
+
--------------------------------------------------------------
|
2647
|
+
---------------------------------------------------------
|
2648
|
+
CouchRestAdapterTest: test_can_not_instantiate_base_class
|
2649
|
+
---------------------------------------------------------
|
2650
|
+
---------------------------------------------------------------------------------------------
|
2651
|
+
CouchRestAdapterTest: test_find_by_attr_will_return_array_of_docs_with_type_set_to_model_name
|
2652
|
+
---------------------------------------------------------------------------------------------
|
2653
|
+
---------------------------------------------------------
|
2654
|
+
CouchRestAdapterTest: test_find_will_work_with_partial_id
|
2655
|
+
---------------------------------------------------------
|
2656
|
+
-------------------------------------------------------------
|
2657
|
+
CouchRestAdapterTest: test_one_can_update_existing_attributes
|
2658
|
+
-------------------------------------------------------------
|
2659
|
+
--------------------------------------------------------------------------------------------------
|
2660
|
+
CouchRestAdapterTest: test_query_all_by_type_will_return_array_of_docs_with_type_set_to_model_name
|
2661
|
+
--------------------------------------------------------------------------------------------------
|
2662
|
+
----------------------------------------------------------------------
|
2663
|
+
CouchRestAdapterTest: test_query_all_will_bring_array_of_Foo_instances
|
2664
|
+
----------------------------------------------------------------------
|
2665
|
+
-------------------------------------------------------
|
2666
|
+
CouchRestAdapterTest: test_update_to_attr=_will_persist
|
2667
|
+
-------------------------------------------------------
|
2668
|
+
--------------------------------------------------------------
|
2669
|
+
CouchRestAdapterTest: test_will_add_class_underscorename_to_id
|
2670
|
+
--------------------------------------------------------------
|
2671
|
+
--------------------------
|
2672
|
+
LintTest: test_errors_aref
|
2673
|
+
--------------------------
|
2674
|
+
---------------------------
|
2675
|
+
LintTest: test_model_naming
|
2676
|
+
---------------------------
|
2677
|
+
-------------------------
|
2678
|
+
LintTest: test_persisted?
|
2679
|
+
-------------------------
|
2680
|
+
---------------------
|
2681
|
+
LintTest: test_to_key
|
2682
|
+
---------------------
|
2683
|
+
-----------------------
|
2684
|
+
LintTest: test_to_param
|
2685
|
+
-----------------------
|
2686
|
+
------------------------------
|
2687
|
+
LintTest: test_to_partial_path
|
2688
|
+
------------------------------
|