locomotivecms_coal 1.2.0 → 1.3.0.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/locomotive/coal/resources/concerns/request.rb +2 -2
- data/lib/locomotive/coal/resources/content_entries.rb +1 -1
- data/lib/locomotive/coal/version.rb +1 -1
- data/spec/fixtures/coal_cassettes/content_entries.yml +1739 -285
- data/spec/fixtures/coal_cassettes/sites.yml +82 -1
- data/spec/integration/resources/content_entries_spec.rb +7 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fbb10dca124e47ac3007917a21a9d17296c8cdc
|
4
|
+
data.tar.gz: 4e8b1c16f2f77ea2667237d16ddbde28ff84222e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54024fcd22dca2aafcb4c063a4187b636966d256fca376f85097061c37d6dc32a168f3a37867cedec86da96fc3539b32697d1323deccdd89826a4ea63a1d502d
|
7
|
+
data.tar.gz: b5e3f9ab8d018bfe5429351b22a4a1033a9cbd3ff536ba08d05067e6a1cb453e3d98e68765495af47198d0876fd2e44614314c9822151edf5f8aefbec3781c8b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
locomotivecms_coal (1.
|
4
|
+
locomotivecms_coal (1.3.0.rc)
|
5
5
|
activesupport (~> 4.2.6)
|
6
6
|
faraday (~> 0.9.1)
|
7
7
|
faraday_middleware (~> 0.10.0)
|
@@ -10,7 +10,7 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (4.2.
|
13
|
+
activesupport (4.2.7)
|
14
14
|
i18n (~> 0.7)
|
15
15
|
json (~> 1.7, >= 1.7.7)
|
16
16
|
minitest (~> 5.1)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
hashdiff (0.3.0)
|
43
43
|
http-cookie (1.0.2)
|
44
44
|
domain_name (~> 0.5)
|
45
|
-
httpclient (2.7.
|
45
|
+
httpclient (2.7.2)
|
46
46
|
i18n (0.7.0)
|
47
47
|
json (1.8.3)
|
48
48
|
json_spec (1.1.4)
|
@@ -50,7 +50,7 @@ GEM
|
|
50
50
|
rspec (>= 2.0, < 4.0)
|
51
51
|
method_source (0.8.2)
|
52
52
|
mime-types (2.99.1)
|
53
|
-
minitest (5.
|
53
|
+
minitest (5.9.0)
|
54
54
|
multi_json (1.11.2)
|
55
55
|
multipart-post (2.0.0)
|
56
56
|
netrc (0.11.0)
|
@@ -51,7 +51,7 @@ module Locomotive::Coal::Resources
|
|
51
51
|
parameters = parameters.merge(auth_token: credentials[:token]) if _token
|
52
52
|
|
53
53
|
_connection.send(action, endpoint) do |request|
|
54
|
-
request.headers
|
54
|
+
request.headers.merge!(_request_headers(parameters))
|
55
55
|
|
56
56
|
if %i(post put).include?(action)
|
57
57
|
request.body = _encode_parameters(parameters)
|
@@ -77,7 +77,7 @@ module Locomotive::Coal::Resources
|
|
77
77
|
@_connection ||= Faraday.new(url: "#{uri.scheme}://#{uri.host}:#{uri.port}") do |faraday|
|
78
78
|
faraday.request :multipart
|
79
79
|
faraday.request :url_encoded # form-encode POST params
|
80
|
-
faraday.basic_auth uri.userinfo.
|
80
|
+
faraday.basic_auth *uri.userinfo.split(':') if uri.userinfo
|
81
81
|
|
82
82
|
faraday.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
|
83
83
|
|
@@ -11,7 +11,7 @@ module Locomotive::Coal
|
|
11
11
|
super(uri, credentials)
|
12
12
|
end
|
13
13
|
|
14
|
-
def index(query = nil, options =
|
14
|
+
def index(query = nil, options = {}, locale = nil)
|
15
15
|
parameters = { where: (query || {}).to_json }.merge(options || {})
|
16
16
|
parameters[:_locale] = locale if locale
|
17
17
|
|