lurch 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +4 -0
- data/CHANGELOG.md +7 -2
- data/lib/lurch.rb +2 -0
- data/lib/lurch/client.rb +1 -1
- data/lib/lurch/faraday_params_encoder.rb +11 -0
- data/lib/lurch/inflector.rb +2 -2
- data/lib/lurch/version.rb +1 -1
- data/lurch.gemspec +8 -7
- metadata +42 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ef2a3000fed039297ab171d4141121f2b38ffd0e44615213b6b871c42523b4d8
|
4
|
+
data.tar.gz: a91710a41da277b9202512bf2cd660d2b20c6e70e6d344e0dde77ee6e0468ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 947198331bee106ef4231bc11b4be0847295a6e8ea9c54bca4f708e1c2093e9af00eb5b8ae3f2a26da341746f6b3ae661cd3d15d14087df2bddbc13cb1e87299
|
7
|
+
data.tar.gz: 26e972e0c55673097818d701143c88750364f38ad6d063f7704b16226999d0f07f2a4d6c3f9f67fa0e08f54e7089553d772517c66f0a7ff756b9c90ec75f75e4
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased][]
|
8
8
|
|
9
|
+
## [0.3.0][] - 2018-05-31
|
10
|
+
### Fixed
|
11
|
+
- Query parameters like `"foo[0][bar]=one&foo[1][bar]=two"` being turned into `"foo[][bar]=one&foo[][bar]=two"`
|
12
|
+
|
9
13
|
## [0.2.0][] - 2017-11-04
|
10
14
|
### Fixed
|
11
15
|
- Better error handling; server response status code is now always included in the exception message.
|
@@ -14,5 +18,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
14
18
|
## 0.1.0 - 2017-10-30
|
15
19
|
### Initial public release
|
16
20
|
|
17
|
-
[Unreleased]: https://github.com/peek-travel/
|
18
|
-
[0.
|
21
|
+
[Unreleased]: https://github.com/peek-travel/lurch/compare/0.3.0...HEAD
|
22
|
+
[0.3.0]: https://github.com/peek-travel/lurch/compare/0.2.0...0.3.0
|
23
|
+
[0.2.0]: https://github.com/peek-travel/lurch/compare/0.1.0...0.2.0
|
data/lib/lurch.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "uri"
|
2
2
|
|
3
3
|
require "inflecto"
|
4
|
+
require "rack"
|
4
5
|
require "faraday"
|
5
6
|
require "typhoeus"
|
6
7
|
require "typhoeus/adapters/faraday"
|
@@ -40,6 +41,7 @@ require "lurch/query_builder"
|
|
40
41
|
require "lurch/payload_builder"
|
41
42
|
require "lurch/query"
|
42
43
|
require "lurch/changeset"
|
44
|
+
require "lurch/faraday_params_encoder"
|
43
45
|
require "lurch/client"
|
44
46
|
require "lurch/store_configuration"
|
45
47
|
require "lurch/store"
|
data/lib/lurch/client.rb
CHANGED
@@ -80,7 +80,7 @@ module Lurch
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def client
|
83
|
-
@client ||= Faraday.new(url: url) do |conn|
|
83
|
+
@client ||= Faraday.new(url: url, request: { params_encoder: FaradayParamsEncoder }) do |conn|
|
84
84
|
conn.headers[AUTHORIZATION] = authorization unless authorization.nil?
|
85
85
|
|
86
86
|
conn.request :jsonapi
|
data/lib/lurch/inflector.rb
CHANGED
data/lib/lurch/version.rb
CHANGED
data/lurch.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path("
|
1
|
+
require File.expand_path("lib/lurch/version", __dir__)
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "lurch"
|
@@ -15,12 +15,13 @@ Gem::Specification.new do |gem|
|
|
15
15
|
|
16
16
|
gem.add_dependency("faraday", "< 1.0")
|
17
17
|
gem.add_dependency("inflecto", "~> 0.0")
|
18
|
+
gem.add_dependency("rack", ">= 1.0")
|
18
19
|
gem.add_dependency("typhoeus", "< 2.0")
|
19
20
|
|
20
|
-
gem.add_development_dependency("codecov"
|
21
|
-
gem.add_development_dependency("minitest"
|
22
|
-
gem.add_development_dependency("pry"
|
23
|
-
gem.add_development_dependency("rake"
|
24
|
-
gem.add_development_dependency("rubocop"
|
25
|
-
gem.add_development_dependency("webmock"
|
21
|
+
gem.add_development_dependency("codecov")
|
22
|
+
gem.add_development_dependency("minitest")
|
23
|
+
gem.add_development_dependency("pry")
|
24
|
+
gem.add_development_dependency("rake")
|
25
|
+
gem.add_development_dependency("rubocop")
|
26
|
+
gem.add_development_dependency("webmock")
|
26
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lurch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Dosé
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rack
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: typhoeus
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,86 +70,86 @@ dependencies:
|
|
56
70
|
name: codecov
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
75
|
+
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: minitest
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
89
|
+
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: pry
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
103
|
+
version: '0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
117
|
+
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rubocop
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - "
|
129
|
+
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0
|
131
|
+
version: '0'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - "
|
136
|
+
- - ">="
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0
|
138
|
+
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: webmock
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - "
|
143
|
+
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
145
|
+
version: '0'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - "
|
150
|
+
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
152
|
+
version: '0'
|
139
153
|
description: A client library for interacting with JSON API servers, based on http://jsonapi.org/
|
140
154
|
version 1.0.
|
141
155
|
email: chris@peek.com
|
@@ -172,6 +186,7 @@ files:
|
|
172
186
|
- lib/lurch/errors/server_error.rb
|
173
187
|
- lib/lurch/errors/unauthorized.rb
|
174
188
|
- lib/lurch/errors/unprocessable_entity.rb
|
189
|
+
- lib/lurch/faraday_params_encoder.rb
|
175
190
|
- lib/lurch/inflector.rb
|
176
191
|
- lib/lurch/logger.rb
|
177
192
|
- lib/lurch/middleware/json_api_request.rb
|
@@ -229,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
244
|
version: '0'
|
230
245
|
requirements: []
|
231
246
|
rubyforge_project:
|
232
|
-
rubygems_version: 2.6
|
247
|
+
rubygems_version: 2.7.6
|
233
248
|
signing_key:
|
234
249
|
specification_version: 4
|
235
250
|
summary: A simple Ruby JSON API client
|