couch_rest_adapter 0.3.0 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e409f7007767ad1763351550870f14975c89d76
4
- data.tar.gz: 7a452ab63071ada1ca315655a20b43d4a9143606
3
+ metadata.gz: 80e7938a0be83ff4164281d505b5d390c9aaa8c5
4
+ data.tar.gz: 7fbc6b79a8c57daa074c63fa587e89a77777e851
5
5
  SHA512:
6
- metadata.gz: 05c7407e5ad106b9913e21edb312a0eadd68da1cbb2b344f09845d33bf90e4d75062efd2f3fb05b72901756376597e89c643ce688fdc6215fc353899af1b0b12
7
- data.tar.gz: fc8e3ad684ff3447e9aebecdce9244054b5955d1fe7ac4cdd6559d1bf5f1e4e69d9ffdd7d1aae610d72bb5b49ba3a003e5dc421670a7c7ed9e622192018e6494
6
+ metadata.gz: 073bead5da7207675919c12a47a4e69e7b7c7717f24eed043cece1b771b8916319a26447b3bfcf9adf13307145d418ef2c732ecb1555c2f4dedc3039af21e5af
7
+ data.tar.gz: 1fa69ac85f78e035b2bf87a10e86806bd0c823eca93ca53359b68c015044fa3b80a9b752cba4904b160fcf7e4e5acd21c942abe5d6b0e366d1be13f5b64cbe5d
@@ -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
- @attributes[key]
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
@@ -1,3 +1,3 @@
1
1
  module CouchRestAdapter
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -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
+ ------------------------------
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couch_rest_adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Guerra