harpy 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -5
- data/README.md +10 -12
- data/harpy.gemspec +1 -0
- data/lib/harpy/version.rb +1 -1
- metadata +33 -14
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
Harpy
|
2
2
|
======
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/TalentBox/harpy.png?branch=master)](https://travis-ci.org/TalentBox/harpy)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/TalentBox/harpy.png)](https://codeclimate.com/github/TalentBox/harpy)
|
6
|
+
|
4
7
|
Client for REST API with HATEOAS
|
5
8
|
|
6
9
|
Dependencies
|
@@ -31,14 +34,14 @@ Usage
|
|
31
34
|
model.attributes = {"company" => "Stark Enterprises"}
|
32
35
|
model.firstname # => "Anthony"
|
33
36
|
model.company # => "Stark Enterprises"
|
34
|
-
|
37
|
+
|
35
38
|
# Because model is not persisted you can read any attribute, allowing
|
36
39
|
# to use form_for on new resources to which the client doesn't know the
|
37
40
|
# existing attributes yet
|
38
41
|
model.email # => nil
|
39
42
|
|
40
43
|
# Fetch by url
|
41
|
-
MyModel.from_url "http://localhost/mymodel/1"
|
44
|
+
MyModel.from_url "http://localhost/mymodel/1"
|
42
45
|
# => instance of MyModel with attributes filled in on 200
|
43
46
|
# => nil on 404
|
44
47
|
# => raises Harpy::ClientTimeout on timeout
|
@@ -47,7 +50,7 @@ Usage
|
|
47
50
|
|
48
51
|
# Fetch multiple by url in parallel
|
49
52
|
MyModel.from_url ["http://localhost/mymodel/1", "http://localhost/mymodel/2"]
|
50
|
-
|
53
|
+
|
51
54
|
# Get index
|
52
55
|
MyModel.search
|
53
56
|
# will call GET http://localhost/mymodel given the following entry_point response:
|
@@ -60,7 +63,7 @@ Usage
|
|
60
63
|
# => raises Harpy::ClientTimeout on timeout
|
61
64
|
# => raises Harpy::ClientError on Curl error
|
62
65
|
# => raises Harpy::InvalidResponseCode on other response codes
|
63
|
-
|
66
|
+
|
64
67
|
# Search by first_name
|
65
68
|
MyModel.search :firstname => "Anthony" # GET http://localhost/mymodel?firstname=Anthony
|
66
69
|
|
@@ -152,18 +155,13 @@ Usage
|
|
152
155
|
class SecondModel
|
153
156
|
include Harpy::Resource
|
154
157
|
end
|
155
|
-
|
158
|
+
|
156
159
|
Harpy::Resource.from_url({
|
157
|
-
FirstModel => ["http://localhost/firstmodel/1", "http://localhost/firstmodel/2"],
|
158
|
-
SecondModel => ["http://localhost/secondmodel/1"],
|
160
|
+
FirstModel => ["http://localhost/firstmodel/1", "http://localhost/firstmodel/2"],
|
161
|
+
SecondModel => ["http://localhost/secondmodel/1"],
|
159
162
|
})
|
160
163
|
# => {FirstModel => [...], SecondModel => [...]}
|
161
164
|
|
162
|
-
Build Status
|
163
|
-
---------
|
164
|
-
|
165
|
-
[![Build Status](http://travis-ci.org/TalentBox/harpy.png)](http://travis-ci.org/TalentBox/harpy)
|
166
|
-
|
167
165
|
License
|
168
166
|
-------
|
169
167
|
|
data/harpy.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.homepage = "https://github.com/TalentBox/harpy"
|
12
12
|
s.summary = %q{Client for REST API}
|
13
13
|
s.description = %q{Client for REST API with HATEOAS}
|
14
|
+
s.license = "MIT"
|
14
15
|
|
15
16
|
s.files = `git ls-files`.split("\n")
|
16
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
data/lib/harpy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harpy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Joseph HALTER
|
@@ -9,11 +10,12 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
+
date: 2013-07-16 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: typhoeus
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
20
|
- - ~>
|
19
21
|
- !ruby/object:Gem::Version
|
@@ -21,6 +23,7 @@ dependencies:
|
|
21
23
|
type: :runtime
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
28
|
- - ~>
|
26
29
|
- !ruby/object:Gem::Version
|
@@ -28,34 +31,39 @@ dependencies:
|
|
28
31
|
- !ruby/object:Gem::Dependency
|
29
32
|
name: activesupport
|
30
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
31
35
|
requirements:
|
32
|
-
- - '>='
|
36
|
+
- - ! '>='
|
33
37
|
- !ruby/object:Gem::Version
|
34
38
|
version: 3.1.0
|
35
39
|
type: :runtime
|
36
40
|
prerelease: false
|
37
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
38
43
|
requirements:
|
39
|
-
- - '>='
|
44
|
+
- - ! '>='
|
40
45
|
- !ruby/object:Gem::Version
|
41
46
|
version: 3.1.0
|
42
47
|
- !ruby/object:Gem::Dependency
|
43
48
|
name: activemodel
|
44
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
45
51
|
requirements:
|
46
|
-
- - '>='
|
52
|
+
- - ! '>='
|
47
53
|
- !ruby/object:Gem::Version
|
48
54
|
version: 3.1.0
|
49
55
|
type: :runtime
|
50
56
|
prerelease: false
|
51
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
52
59
|
requirements:
|
53
|
-
- - '>='
|
60
|
+
- - ! '>='
|
54
61
|
- !ruby/object:Gem::Version
|
55
62
|
version: 3.1.0
|
56
63
|
- !ruby/object:Gem::Dependency
|
57
64
|
name: hash-deep-merge
|
58
65
|
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
59
67
|
requirements:
|
60
68
|
- - ~>
|
61
69
|
- !ruby/object:Gem::Version
|
@@ -63,6 +71,7 @@ dependencies:
|
|
63
71
|
type: :runtime
|
64
72
|
prerelease: false
|
65
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
66
75
|
requirements:
|
67
76
|
- - ~>
|
68
77
|
- !ruby/object:Gem::Version
|
@@ -70,6 +79,7 @@ dependencies:
|
|
70
79
|
- !ruby/object:Gem::Dependency
|
71
80
|
name: yajl-ruby
|
72
81
|
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
73
83
|
requirements:
|
74
84
|
- - ~>
|
75
85
|
- !ruby/object:Gem::Version
|
@@ -77,6 +87,7 @@ dependencies:
|
|
77
87
|
type: :runtime
|
78
88
|
prerelease: false
|
79
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
80
91
|
requirements:
|
81
92
|
- - ~>
|
82
93
|
- !ruby/object:Gem::Version
|
@@ -84,20 +95,23 @@ dependencies:
|
|
84
95
|
- !ruby/object:Gem::Dependency
|
85
96
|
name: rake
|
86
97
|
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
87
99
|
requirements:
|
88
|
-
- - '>='
|
100
|
+
- - ! '>='
|
89
101
|
- !ruby/object:Gem::Version
|
90
102
|
version: 0.8.7
|
91
103
|
type: :development
|
92
104
|
prerelease: false
|
93
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
94
107
|
requirements:
|
95
|
-
- - '>='
|
108
|
+
- - ! '>='
|
96
109
|
- !ruby/object:Gem::Version
|
97
110
|
version: 0.8.7
|
98
111
|
- !ruby/object:Gem::Dependency
|
99
112
|
name: rspec
|
100
113
|
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
101
115
|
requirements:
|
102
116
|
- - ~>
|
103
117
|
- !ruby/object:Gem::Version
|
@@ -105,6 +119,7 @@ dependencies:
|
|
105
119
|
type: :development
|
106
120
|
prerelease: false
|
107
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
108
123
|
requirements:
|
109
124
|
- - ~>
|
110
125
|
- !ruby/object:Gem::Version
|
@@ -112,6 +127,7 @@ dependencies:
|
|
112
127
|
- !ruby/object:Gem::Dependency
|
113
128
|
name: rocco
|
114
129
|
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
115
131
|
requirements:
|
116
132
|
- - ~>
|
117
133
|
- !ruby/object:Gem::Version
|
@@ -119,6 +135,7 @@ dependencies:
|
|
119
135
|
type: :development
|
120
136
|
prerelease: false
|
121
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
122
139
|
requirements:
|
123
140
|
- - ~>
|
124
141
|
- !ruby/object:Gem::Version
|
@@ -152,27 +169,29 @@ files:
|
|
152
169
|
- spec/harpy_spec.rb
|
153
170
|
- spec/spec_helper.rb
|
154
171
|
homepage: https://github.com/TalentBox/harpy
|
155
|
-
licenses:
|
156
|
-
|
172
|
+
licenses:
|
173
|
+
- MIT
|
157
174
|
post_install_message:
|
158
175
|
rdoc_options: []
|
159
176
|
require_paths:
|
160
177
|
- lib
|
161
178
|
required_ruby_version: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
162
180
|
requirements:
|
163
|
-
- - '>='
|
181
|
+
- - ! '>='
|
164
182
|
- !ruby/object:Gem::Version
|
165
183
|
version: '0'
|
166
184
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
167
186
|
requirements:
|
168
|
-
- - '>='
|
187
|
+
- - ! '>='
|
169
188
|
- !ruby/object:Gem::Version
|
170
189
|
version: '0'
|
171
190
|
requirements: []
|
172
191
|
rubyforge_project:
|
173
|
-
rubygems_version:
|
192
|
+
rubygems_version: 1.8.23
|
174
193
|
signing_key:
|
175
|
-
specification_version:
|
194
|
+
specification_version: 3
|
176
195
|
summary: Client for REST API
|
177
196
|
test_files:
|
178
197
|
- spec/harpy/client_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 334b9c942f47ab525f8584fb964e83d5426daea9
|
4
|
-
data.tar.gz: 43ac1b2edf84fa8bb46bbf52733fc4daf289a9df
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: a1c27547eed896c7ba273c8afab358eda18b1184ba7b6471910d91cef670fbcd3edaa4053ff36c50070d6ff5ac1813d6a8265f0a234bae44ba09b646ec7fdb2d
|
7
|
-
data.tar.gz: 34586dba6bbee7e4adca1329afd1e14496987ee696580c8f7ff4aab3a82ee66e7965c8f5e306c260e45bc28aa9943f2b21375b45a8c92ef95f4f7bdb4ac0f0ef
|