cistern 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14abaac482ac21a28c8397bc14d3f122f8a8f7b6
4
- data.tar.gz: 1bd8bbc0c5f2c0a11596b5e420042d7a468c2ea6
3
+ metadata.gz: 486d6ae38fe4fb055f282a50835760d082fbebd9
4
+ data.tar.gz: aa7beb5d10b38bfcfa328ea86d5c7aaff78c080b
5
5
  SHA512:
6
- metadata.gz: a30d8da5aac9ea437a76903c3183bfc0ae88ce295080e8703644eece9fa8c81656ef9df60e73d102384a7d9db9ea2e94bb96d39e30802b0e4238fc3d5647bcf0
7
- data.tar.gz: 5bb8cf1014201e231ed9f51456369e410a3802b084f322c1f1d051b24124bdb20ba1048841a71c96b9952e89dd67e8628dd8b9533dc45481af9089ee5079d890
6
+ metadata.gz: f3f29767bf7851718531c0611a6b32b2fca7e0d841f40e13088fe5531a9cf70473049c9da3e3bf782b751b1a6b2717e376d8ad960c807c7794cf98190dc84b1a
7
+ data.tar.gz: 00b3db9eb18a8e047230bd776bb539630055a7811184d0bd77479ddd4a26680a4580dd6f06e7ae09a5b5a2c639d67aa1916673bd7ac4a4df875ca04886bb9140
data/README.md CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  [![Build Status](https://secure.travis-ci.org/lanej/cistern.png)](http://travis-ci.org/lanej/cistern)
4
4
  [![Dependencies](https://gemnasium.com/lanej/cistern.png)](https://gemnasium.com/lanej/cistern.png)
5
+ [![Gem Version](https://badge.fury.io/rb/cistern.svg)](http://badge.fury.io/rb/cistern)
6
+ [![Code Climate](https://codeclimate.com/github/lanej/cistern/badges/gpa.svg)](https://codeclimate.com/github/lanej/cistern)
5
7
 
6
- Cistern helps you consistenly build your API clients and faciliates building mock support.
8
+ Cistern helps you consistently build your API clients and faciliates building mock support.
7
9
 
8
10
  ## Usage
9
11
 
@@ -81,6 +83,7 @@ end
81
83
 
82
84
  Foo::Client.new.respond_to?(:get_bars) # false
83
85
  Foo::Client.new.get_all_the_bars # "all the bars"
86
+ ```
84
87
 
85
88
  All declared requests can be listed via `Cistern::Service#requests`.
86
89
 
@@ -290,6 +293,7 @@ bar.dirty_attributes # => {}
290
293
  ## Examples
291
294
 
292
295
  * [zendesk2](https://github.com/lanej/zendesk2)
296
+ * [you_track](https://github.com/lanej/you_track)
293
297
 
294
298
  ## Releasing
295
299
 
@@ -125,7 +125,13 @@ module Cistern::Attributes
125
125
  # record the attribute was accessed
126
126
  self.class.attributes[name.to_s.to_sym][:coverage_hits] += 1 rescue nil
127
127
 
128
- attributes.fetch(name.to_s.to_sym, options[:default])
128
+ default = options[:default]
129
+
130
+ unless default.nil?
131
+ default = Marshal.load(Marshal.dump(default))
132
+ end
133
+
134
+ attributes.fetch(name.to_s.to_sym, default)
129
135
  end
130
136
 
131
137
  def write_attribute(name, value)
@@ -1,3 +1,3 @@
1
1
  module Cistern
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cistern
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Lane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-05 00:00:00.000000000 Z
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: API client framework extracted from Fog
14
14
  email: