harpy 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 334b9c942f47ab525f8584fb964e83d5426daea9
4
+ data.tar.gz: 43ac1b2edf84fa8bb46bbf52733fc4daf289a9df
5
+ SHA512:
6
+ metadata.gz: a1c27547eed896c7ba273c8afab358eda18b1184ba7b6471910d91cef670fbcd3edaa4053ff36c50070d6ff5ac1813d6a8265f0a234bae44ba09b646ec7fdb2d
7
+ data.tar.gz: 34586dba6bbee7e4adca1329afd1e14496987ee696580c8f7ff4aab3a82ee66e7965c8f5e306c260e45bc28aa9943f2b21375b45a8c92ef95f4f7bdb4ac0f0ef
data/.travis.yml CHANGED
@@ -6,5 +6,9 @@ rvm:
6
6
  - ruby-head
7
7
  - rbx-18mode
8
8
  - rbx-19mode
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: rbx-18mode
12
+ - rvm: rbx-19mode
9
13
  notifications:
10
14
  disabled: true
@@ -136,7 +136,7 @@ module Harpy
136
136
  end
137
137
  end
138
138
  end
139
-
139
+
140
140
  def as_json(*args)
141
141
  hash = @attrs.dup
142
142
  hash.delete "link"
@@ -146,7 +146,7 @@ module Harpy
146
146
 
147
147
  def save
148
148
  if valid?
149
- _run_save_callbacks do
149
+ run_callbacks :save do
150
150
  json = Yajl::Encoder.encode as_json
151
151
  raise BodyToBig, "Size: #{json.bytesize} bytes (max 1MB)" if json.bytesize > 1.megabyte
152
152
  persisted? ? update(json) : create(json)
@@ -155,14 +155,14 @@ module Harpy
155
155
  false
156
156
  end
157
157
  end
158
-
158
+
159
159
  def destroy
160
160
  raise Harpy::UrlRequired unless url
161
- _run_destroy_callbacks do
161
+ run_callbacks :destroy do
162
162
  process_response Harpy.client.delete(url), :destroy
163
163
  end
164
164
  end
165
-
165
+
166
166
  def link(rel)
167
167
  link = (@attrs["link"]||[]).detect{|l| l["rel"]==rel.to_s}
168
168
  link["href"] if link
@@ -195,7 +195,7 @@ module Harpy
195
195
  def hash
196
196
  urn.hash
197
197
  end
198
-
198
+
199
199
  def ==(other)
200
200
  other.equal?(self) || (urn && other.instance_of?(self.class) && other.urn == urn)
201
201
  end
@@ -204,13 +204,13 @@ module Harpy
204
204
  private
205
205
 
206
206
  def create(json)
207
- _run_create_callbacks do
207
+ run_callbacks :create do
208
208
  process_response Harpy.client.post(url_collection, :body => json), :create
209
209
  end
210
210
  end
211
211
 
212
212
  def update(json)
213
- _run_update_callbacks do
213
+ run_callbacks :update do
214
214
  raise Harpy::UrlRequired unless url
215
215
  process_response Harpy.client.put(url, :body => json), :update
216
216
  end
data/lib/harpy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Harpy
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harpy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
5
- prerelease:
4
+ version: 0.4.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joseph HALTER
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-06-24 00:00:00.000000000 Z
12
+ date: 2013-03-09 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: typhoeus
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,39 +28,34 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: activesupport
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
- - - ! '>='
32
+ - - '>='
37
33
  - !ruby/object:Gem::Version
38
34
  version: 3.1.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
- - - ! '>='
39
+ - - '>='
45
40
  - !ruby/object:Gem::Version
46
41
  version: 3.1.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: activemodel
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
- - - ! '>='
46
+ - - '>='
53
47
  - !ruby/object:Gem::Version
54
48
  version: 3.1.0
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
- - - ! '>='
53
+ - - '>='
61
54
  - !ruby/object:Gem::Version
62
55
  version: 3.1.0
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: hash-deep-merge
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - ~>
69
61
  - !ruby/object:Gem::Version
@@ -71,7 +63,6 @@ dependencies:
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - ~>
77
68
  - !ruby/object:Gem::Version
@@ -79,7 +70,6 @@ dependencies:
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: yajl-ruby
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
74
  - - ~>
85
75
  - !ruby/object:Gem::Version
@@ -87,7 +77,6 @@ dependencies:
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
81
  - - ~>
93
82
  - !ruby/object:Gem::Version
@@ -95,23 +84,20 @@ dependencies:
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: rake
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: 0.8.7
103
91
  type: :development
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
95
+ - - '>='
109
96
  - !ruby/object:Gem::Version
110
97
  version: 0.8.7
111
98
  - !ruby/object:Gem::Dependency
112
99
  name: rspec
113
100
  requirement: !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ~>
117
103
  - !ruby/object:Gem::Version
@@ -119,7 +105,6 @@ dependencies:
119
105
  type: :development
120
106
  prerelease: false
121
107
  version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
108
  requirements:
124
109
  - - ~>
125
110
  - !ruby/object:Gem::Version
@@ -127,7 +112,6 @@ dependencies:
127
112
  - !ruby/object:Gem::Dependency
128
113
  name: rocco
129
114
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
115
  requirements:
132
116
  - - ~>
133
117
  - !ruby/object:Gem::Version
@@ -135,7 +119,6 @@ dependencies:
135
119
  type: :development
136
120
  prerelease: false
137
121
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
122
  requirements:
140
123
  - - ~>
141
124
  - !ruby/object:Gem::Version
@@ -170,33 +153,26 @@ files:
170
153
  - spec/spec_helper.rb
171
154
  homepage: https://github.com/TalentBox/harpy
172
155
  licenses: []
156
+ metadata: {}
173
157
  post_install_message:
174
158
  rdoc_options: []
175
159
  require_paths:
176
160
  - lib
177
161
  required_ruby_version: !ruby/object:Gem::Requirement
178
- none: false
179
162
  requirements:
180
- - - ! '>='
163
+ - - '>='
181
164
  - !ruby/object:Gem::Version
182
165
  version: '0'
183
- segments:
184
- - 0
185
- hash: 3181873478917363202
186
166
  required_rubygems_version: !ruby/object:Gem::Requirement
187
- none: false
188
167
  requirements:
189
- - - ! '>='
168
+ - - '>='
190
169
  - !ruby/object:Gem::Version
191
170
  version: '0'
192
- segments:
193
- - 0
194
- hash: 3181873478917363202
195
171
  requirements: []
196
172
  rubyforge_project:
197
- rubygems_version: 1.8.24
173
+ rubygems_version: 2.0.0
198
174
  signing_key:
199
- specification_version: 3
175
+ specification_version: 4
200
176
  summary: Client for REST API
201
177
  test_files:
202
178
  - spec/harpy/client_spec.rb