cistern 1.0.1.pre5 → 1.0.1.pre6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
1
  module Cistern::Attributes
2
2
  def self.parsers
3
3
  @parsers ||= {
4
- :string => lambda { |v,opts| v.to_s },
5
- :time => lambda { |v,opts| v.is_a?(Time) ? v : v && Time.parse(v.to_s) },
6
- :integer => lambda { |v,opts| v && v.to_i },
7
- :float => lambda { |v,opts| v && v.to_f },
8
- :array => lambda { |v,opts| [*v] },
9
- :boolean => lambda { |v,opts| ['true', '1'].include?(v.to_s.downcase) }
4
+ :string => lambda { |v, _| v.to_s },
5
+ :time => lambda { |v, _| v.is_a?(Time) ? v : v && Time.parse(v.to_s) },
6
+ :integer => lambda { |v, _| v && v.to_i },
7
+ :float => lambda { |v, _| v && v.to_f },
8
+ :array => lambda { |v, _| [*v] },
9
+ :boolean => lambda { |v, _| ['true', '1'].include?(v.to_s.downcase) }
10
10
  }
11
11
  end
12
12
 
@@ -121,7 +121,7 @@ module Cistern::Attributes
121
121
  def read_attribute(name)
122
122
  options = self.class.attributes[name] || {}
123
123
  # record the attribute was accessed
124
- self.class.attributes[name.to_s.to_sym][:coverage_hits] += 1 rescue nil
124
+ self.class.attributes[name.to_s.to_sym][:coverage_hits] += 1 rescue nil
125
125
 
126
126
  attributes.fetch(name.to_s.to_sym, options[:default])
127
127
  end
@@ -160,7 +160,7 @@ module Cistern::Attributes
160
160
 
161
161
  def dup
162
162
  copy = super
163
- copy.attributes= copy.attributes.dup
163
+ copy.attributes = copy.attributes.dup
164
164
  copy
165
165
  end
166
166
 
@@ -55,9 +55,9 @@ class Cistern::Service
55
55
  include Cistern::Collection
56
56
 
57
57
  def self.inherited(klass)
58
- klass.extend(Cistern::Attributes::ClassMethods)
59
- klass.extend(Cistern::Collection::ClassMethods)
60
- klass.include(Cistern::Attributes::InstanceMethods)
58
+ klass.send(:extend, Cistern::Attributes::ClassMethods)
59
+ klass.send(:extend, Cistern::Collection::ClassMethods)
60
+ klass.send(:include, Cistern::Attributes::InstanceMethods)
61
61
 
62
62
  Cistern::Collection.service_collection(service, klass)
63
63
  end
@@ -1,3 +1,3 @@
1
1
  module Cistern
2
- VERSION = "1.0.1.pre5"
2
+ VERSION = "1.0.1.pre6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cistern
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1.pre5
4
+ version: 1.0.1.pre6
5
+ prerelease: 6
5
6
  platform: ruby
6
7
  authors:
7
8
  - Josh Lane
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
12
+ date: 2015-02-28 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: API client framework extracted from Fog
14
15
  email:
@@ -17,8 +18,8 @@ executables: []
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
- - ".gitignore"
21
- - ".travis.yml"
21
+ - .gitignore
22
+ - .travis.yml
22
23
  - Gemfile
23
24
  - Guardfile
24
25
  - LICENSE.txt
@@ -61,26 +62,27 @@ files:
61
62
  homepage: http://joshualane.com/cistern
62
63
  licenses:
63
64
  - MIT
64
- metadata: {}
65
65
  post_install_message:
66
66
  rdoc_options: []
67
67
  require_paths:
68
68
  - lib
69
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
70
71
  requirements:
71
- - - ">="
72
+ - - ! '>='
72
73
  - !ruby/object:Gem::Version
73
74
  version: '0'
74
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
+ none: false
75
77
  requirements:
76
- - - ">"
78
+ - - ! '>'
77
79
  - !ruby/object:Gem::Version
78
80
  version: 1.3.1
79
81
  requirements: []
80
82
  rubyforge_project:
81
- rubygems_version: 2.2.2
83
+ rubygems_version: 1.8.23.2
82
84
  signing_key:
83
- specification_version: 4
85
+ specification_version: 3
84
86
  summary: API client framework
85
87
  test_files:
86
88
  - spec/collection_spec.rb
@@ -95,4 +97,3 @@ test_files:
95
97
  - spec/spec_helper.rb
96
98
  - spec/support/service.rb
97
99
  - spec/wait_for_spec.rb
98
- has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 3350600e9eb0c61a630d3ea85419cb2b8051fc9c
4
- data.tar.gz: 8cba84fcb1050da9caff1ad8155ba5fca2b43cc9
5
- SHA512:
6
- metadata.gz: f244f5d9a7fb8c9d43e378cb7b0d69714930488c3601d953d3df938bf2284fdfb67a6dc2cdce0ca9d0c2cef3472f7917600f2c6f9a0cbf821a0a03bc0a8dfed8
7
- data.tar.gz: 65bdec7b34bc34aa14e17089631f9bf47a3c352294b7dc2fb856a2ce4639395f3578f5b52d8602dba7ce5a5a65bd3b0ac79ac124b0c3c7ce2635d8831644f4ae