flexirest 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -5
- data/CHANGELOG.md +6 -0
- data/docs/body-types.md +10 -1
- data/flexirest.gemspec +1 -0
- data/lib/flexirest/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f91ffbe647c15fa55c5d9ec36a5ae23b9008cedda2779d208a4f0214793197c5
|
4
|
+
data.tar.gz: 755abe793f393deb621ad88ada2f8a2758f61e6ca9ea4da34ec8b683b53d7163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc44703759885c555b55ee80aa5bc5ca38cc4fba25cf9b449b4a0e438dd713dc7c716fdae7795bf76754a65c1a07bfc70cf25b9f973f9158a4ada2d6aaa61b2
|
7
|
+
data.tar.gz: adcdc81fc9ad6252d3948a41e8500f802ff48713325ab96c056a106a15a39fc5dd3d2b92159df1f96fed4cafa5d890a340b41d0ab83a5b16524561d5dc676d08
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/docs/body-types.md
CHANGED
@@ -17,7 +17,16 @@ Flexirest::Base.request_body_type = :json
|
|
17
17
|
|
18
18
|
This will also set the header `Content-Type` to `application/x-www-form-urlencoded` by default or `application/json; charset=utf-8` when `:json`. You can override this using the callback `before_request`.
|
19
19
|
|
20
|
-
You can also use `:form_multipart` if your API requires file uploads. Any parameters set to `File` like object (supporting `#path` and `#read`) will be automatically uploaded with the parameters, in a normal form submission style
|
20
|
+
You can also use `:form_multipart` if your API requires file uploads. Any parameters set to `File` like object (supporting `#path` and `#read`) will be automatically uploaded with the parameters, in a normal form submission style:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
class Person < Flexirest::Base
|
24
|
+
request_body_type :form_multipart
|
25
|
+
put :update, "/people/:id"
|
26
|
+
end
|
27
|
+
|
28
|
+
Person.update(id: 1, avatar: File.open("avatar.png"))
|
29
|
+
```
|
21
30
|
|
22
31
|
If you have an API that is inconsistent in its body type requirements, you can also specify it on the individual method mapping:
|
23
32
|
|
data/flexirest.gemspec
CHANGED
@@ -40,6 +40,7 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency 'typhoeus'
|
41
41
|
spec.add_development_dependency 'activemodel'
|
42
42
|
|
43
|
+
spec.add_runtime_dependency "mime-types"
|
43
44
|
spec.add_runtime_dependency "multi_json"
|
44
45
|
spec.add_runtime_dependency "crack"
|
45
46
|
spec.add_runtime_dependency "faraday"
|
data/lib/flexirest/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexirest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: mime-types
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: multi_json
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|