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 +4 -4
- data/README.md +5 -1
- data/lib/cistern/attributes.rb +7 -1
- data/lib/cistern/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486d6ae38fe4fb055f282a50835760d082fbebd9
|
4
|
+
data.tar.gz: aa7beb5d10b38bfcfa328ea86d5c7aaff78c080b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
|
data/lib/cistern/attributes.rb
CHANGED
@@ -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
|
-
|
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)
|
data/lib/cistern/version.rb
CHANGED
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.
|
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-
|
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:
|