lhc 3.4.0 → 3.5.0
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/.rubocop.localch.yml +190 -0
- data/.rubocop.yml +10 -0
- data/cider-ci.yml +2 -1
- data/cider-ci/jobs/rspec.yml +48 -0
- data/cider-ci/jobs/rubocop.yml +55 -0
- data/cider-ci/scripts/bundle.yml +2 -0
- data/cider-ci/scripts/github_comment.yml +6 -0
- data/cider-ci/scripts/rspec.yml +4 -0
- data/cider-ci/scripts/rubocop.yml +5 -0
- data/cider-ci/scripts/ruby-version.yml +2 -0
- data/cider-ci/scripts/tmp-cache.yml +2 -0
- data/lhc.gemspec +2 -1
- data/lib/lhc.rb +1 -1
- data/lib/lhc/concerns/lhc/basic_methods.rb +4 -6
- data/lib/lhc/concerns/lhc/formats.rb +0 -2
- data/lib/lhc/endpoint.rb +8 -6
- data/lib/lhc/error.rb +3 -1
- data/lib/lhc/errors/parser_error.rb +4 -0
- data/lib/lhc/formats/json.rb +18 -4
- data/lib/lhc/interceptor.rb +2 -0
- data/lib/lhc/interceptor_processor.rb +1 -1
- data/lib/lhc/request.rb +12 -10
- data/lib/lhc/response.rb +3 -9
- data/lib/lhc/version.rb +1 -1
- data/non_rails_spec/request/request_spec.rb +2 -2
- data/spec/basic_methods/delete_spec.rb +4 -6
- data/spec/basic_methods/get_spec.rb +3 -6
- data/spec/basic_methods/post_spec.rb +7 -9
- data/spec/basic_methods/put_spec.rb +7 -9
- data/spec/basic_methods/request_spec.rb +2 -4
- data/spec/config/endpoints_spec.rb +13 -16
- data/spec/config/placeholders_spec.rb +9 -11
- data/spec/dummy/bin/rails +1 -1
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/config/initializers/cookies_serializer.rb +1 -1
- data/spec/endpoint/compile_spec.rb +3 -5
- data/spec/endpoint/match_spec.rb +10 -12
- data/spec/endpoint/placeholders_spec.rb +1 -3
- data/spec/endpoint/remove_interpolated_params_spec.rb +2 -3
- data/spec/endpoint/values_as_params_spec.rb +2 -4
- data/spec/error/find_spec.rb +37 -39
- data/spec/error/response_spec.rb +0 -2
- data/spec/error/timeout_spec.rb +1 -3
- data/spec/interceptors/after_request_spec.rb +2 -4
- data/spec/interceptors/after_response_spec.rb +3 -5
- data/spec/interceptors/before_request_spec.rb +2 -4
- data/spec/interceptors/before_response_spec.rb +2 -4
- data/spec/interceptors/default_interceptors_spec.rb +3 -5
- data/spec/interceptors/define_spec.rb +4 -6
- data/spec/interceptors/response_competition_spec.rb +6 -7
- data/spec/interceptors/return_response_spec.rb +8 -11
- data/spec/request/encoding_spec.rb +1 -4
- data/spec/request/error_handling_spec.rb +13 -2
- data/spec/request/headers_spec.rb +1 -2
- data/spec/request/option_dup_spec.rb +2 -3
- data/spec/request/parallel_requests_spec.rb +2 -2
- data/spec/request/url_patterns_spec.rb +4 -5
- data/spec/response/body_spec.rb +2 -4
- data/spec/response/code_spec.rb +2 -4
- data/spec/response/data_spec.rb +2 -4
- data/spec/response/effective_url_spec.rb +1 -3
- data/spec/response/headers_spec.rb +2 -4
- data/spec/response/options_spec.rb +2 -4
- data/spec/response/success_spec.rb +2 -3
- data/spec/response/time_spec.rb +3 -5
- data/spec/spec_helper.rb +1 -1
- data/spec/support/reset_config.rb +0 -2
- data/spec/timeouts/no_signal_spec.rb +1 -3
- data/spec/timeouts/timings_spec.rb +27 -33
- metadata +27 -4
- data/cider-ci/contexts/rspec.yml +0 -19
- data/cider-ci/jobs/tests.yml +0 -27
data/lib/lhc/error.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class LHC::Error < StandardError
|
2
2
|
|
3
|
-
attr_accessor :response
|
3
|
+
attr_accessor :response, :_message
|
4
4
|
|
5
5
|
def self.map
|
6
6
|
{
|
@@ -48,6 +48,7 @@ class LHC::Error < StandardError
|
|
48
48
|
|
49
49
|
def initialize(message, response)
|
50
50
|
super(message)
|
51
|
+
self._message = message
|
51
52
|
self.response = response
|
52
53
|
end
|
53
54
|
|
@@ -58,6 +59,7 @@ class LHC::Error < StandardError
|
|
58
59
|
debug << "Params: #{request.options}"
|
59
60
|
debug << "Response Code: #{response.code}"
|
60
61
|
debug << response.body
|
62
|
+
debug << _message
|
61
63
|
debug.join("\n")
|
62
64
|
end
|
63
65
|
end
|
data/lib/lhc/formats/json.rb
CHANGED
@@ -1,10 +1,24 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
class JsonFormat
|
3
2
|
include LHC::BasicMethods
|
4
3
|
|
5
4
|
def self.request(options)
|
6
5
|
options[:headers] ||= {}
|
7
6
|
options[:headers]['Content-Type'] = 'application/json'
|
8
|
-
|
7
|
+
options[:format] = new
|
8
|
+
super(options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def parse(response)
|
12
|
+
JSON.parse(response.body, object_class: OpenStruct)
|
13
|
+
rescue JSON::ParserError => e
|
14
|
+
raise LHC::ParserError.new(e.message, response)
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_s
|
18
|
+
'json'
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_sym
|
22
|
+
to_s.to_sym
|
9
23
|
end
|
10
|
-
end
|
24
|
+
end
|
data/lib/lhc/interceptor.rb
CHANGED
@@ -7,7 +7,7 @@ class LHC::InterceptorProcessor
|
|
7
7
|
def initialize(target)
|
8
8
|
options = target.options if target.is_a? LHC::Request
|
9
9
|
options ||= target.request.options if target.is_a? LHC::Response
|
10
|
-
self.interceptors = (options[:interceptors] || LHC.config.interceptors).map{ |i| i.new }
|
10
|
+
self.interceptors = (options[:interceptors] || LHC.config.interceptors).map { |i| i.new }
|
11
11
|
end
|
12
12
|
|
13
13
|
# Forwards messages to interceptors and handles provided responses.
|
data/lib/lhc/request.rb
CHANGED
@@ -9,7 +9,7 @@ class LHC::Request
|
|
9
9
|
|
10
10
|
TYPHOEUS_OPTIONS = [:params, :method, :body, :headers, :follow_location]
|
11
11
|
|
12
|
-
attr_accessor :response, :options, :raw
|
12
|
+
attr_accessor :response, :options, :raw, :format
|
13
13
|
|
14
14
|
def initialize(options, self_executing = true)
|
15
15
|
self.options = options.deep_dup || {}
|
@@ -17,6 +17,7 @@ class LHC::Request
|
|
17
17
|
generate_url_from_template!
|
18
18
|
self.iprocessor = LHC::InterceptorProcessor.new(self)
|
19
19
|
self.raw = create_request
|
20
|
+
self.format = options.delete('format') || JsonFormat.new
|
20
21
|
iprocessor.intercept(:before_request, self)
|
21
22
|
raw.run if self_executing && !response
|
22
23
|
end
|
@@ -60,7 +61,7 @@ class LHC::Request
|
|
60
61
|
options = options.deep_dup
|
61
62
|
easy = Ethon::Easy.new
|
62
63
|
options.delete(:url)
|
63
|
-
options.each do |key,
|
64
|
+
options.each do |key, _v|
|
64
65
|
next if TYPHOEUS_OPTIONS.include? key
|
65
66
|
method = "#{key}="
|
66
67
|
options.delete key unless easy.respond_to?(method)
|
@@ -71,23 +72,24 @@ class LHC::Request
|
|
71
72
|
# Get configured endpoint and use it for doing the request.
|
72
73
|
# Explicit request options are overriding configured options.
|
73
74
|
def use_configured_endpoint!
|
74
|
-
endpoint = LHC.config.endpoints[
|
75
|
+
endpoint = LHC.config.endpoints[options[:url]]
|
75
76
|
return unless endpoint
|
76
77
|
# explicit options override endpoint options
|
77
|
-
new_options = endpoint.options.deep_merge(
|
78
|
+
new_options = endpoint.options.deep_merge(options)
|
78
79
|
# set new options
|
79
80
|
self.options = new_options
|
80
|
-
|
81
|
+
options[:url] = endpoint.url
|
81
82
|
end
|
82
83
|
|
83
84
|
# Generates URL from a URL template
|
84
85
|
def generate_url_from_template!
|
85
86
|
endpoint = LHC::Endpoint.new(options[:url])
|
86
|
-
params =
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
params =
|
88
|
+
if options[:body] && options[:body].length && (options[:headers] || {}).fetch('Content-Type', nil) == 'application/json'
|
89
|
+
JSON.parse(options[:body]).merge(options[:params] || {}).deep_symbolize_keys
|
90
|
+
else
|
91
|
+
options[:params]
|
92
|
+
end
|
91
93
|
options[:url] = endpoint.compile(params)
|
92
94
|
endpoint.remove_interpolated_params!(options[:params])
|
93
95
|
end
|
data/lib/lhc/response.rb
CHANGED
@@ -16,12 +16,7 @@ class LHC::Response
|
|
16
16
|
# Access response data.
|
17
17
|
# Cache parsing.
|
18
18
|
def data
|
19
|
-
@data ||=
|
20
|
-
when :json
|
21
|
-
JSON.parse(raw.body, object_class: OpenStruct)
|
22
|
-
else # default is json
|
23
|
-
JSON.parse(raw.body, object_class: OpenStruct)
|
24
|
-
end
|
19
|
+
@data ||= format.parse(self)
|
25
20
|
@data
|
26
21
|
end
|
27
22
|
|
@@ -63,9 +58,8 @@ class LHC::Response
|
|
63
58
|
attr_accessor :raw
|
64
59
|
|
65
60
|
def format
|
66
|
-
|
67
|
-
|
68
|
-
return :json if headers['Content-Type'] == 'application/json'
|
61
|
+
return JsonFormat.new if request.nil?
|
62
|
+
request.format
|
69
63
|
end
|
70
64
|
|
71
65
|
end
|
data/lib/lhc/version.rb
CHANGED
@@ -2,8 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe LHC::Request do
|
4
4
|
before do
|
5
|
-
allow_any_instance_of(
|
6
|
-
allow_any_instance_of(
|
5
|
+
allow_any_instance_of(described_class).to receive(:use_configured_endpoint!)
|
6
|
+
allow_any_instance_of(described_class).to receive(:generate_url_from_template!)
|
7
7
|
end
|
8
8
|
context 'request without rails' do
|
9
9
|
it 'does have deep_merge dependency met' do
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'delete' do
|
6
|
-
|
7
5
|
let(:feedback) do
|
8
6
|
{
|
9
7
|
recommended: true,
|
@@ -14,20 +12,20 @@ describe LHC do
|
|
14
12
|
|
15
13
|
before(:each) do
|
16
14
|
stub_request(:delete, "http://datastore/v2/feedbacks/12121")
|
17
|
-
|
15
|
+
.to_return(status: 200, body: feedback.to_json, headers: { 'Content-Encoding' => 'UTF-8' })
|
18
16
|
end
|
19
17
|
|
20
18
|
it 'does a delete request when providing a complete url' do
|
21
|
-
|
19
|
+
described_class.delete('http://datastore/v2/feedbacks/12121')
|
22
20
|
end
|
23
21
|
|
24
22
|
it 'it makes response data available in a rails way' do
|
25
|
-
response =
|
23
|
+
response = described_class.delete('http://datastore/v2/feedbacks/12121')
|
26
24
|
expect(response.data.recommended).to eq true
|
27
25
|
end
|
28
26
|
|
29
27
|
it 'provides response headers' do
|
30
|
-
response =
|
28
|
+
response = described_class.delete('http://datastore/v2/feedbacks/12121')
|
31
29
|
expect(response.headers).to be
|
32
30
|
end
|
33
31
|
end
|
@@ -1,12 +1,10 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'get' do
|
6
|
-
|
7
5
|
before(:each) do
|
8
6
|
stub_request(:get, 'http://datastore/v2/feedbacks?has_reviews=true')
|
9
|
-
.to_return(status: 200, body: { total: 99 }.to_json, headers: {'Content-Encoding' => 'UTF-8'})
|
7
|
+
.to_return(status: 200, body: { total: 99 }.to_json, headers: { 'Content-Encoding' => 'UTF-8' })
|
10
8
|
end
|
11
9
|
|
12
10
|
let(:parameters) do
|
@@ -36,10 +34,9 @@ describe LHC do
|
|
36
34
|
end
|
37
35
|
|
38
36
|
context 'get json' do
|
39
|
-
|
40
37
|
before(:each) do
|
41
|
-
stub_request(:get, 'http://datastore/v2/feedbacks').with(headers: {'Content-Type' => 'application/json'})
|
42
|
-
.to_return(body: {some: 'json'}.to_json)
|
38
|
+
stub_request(:get, 'http://datastore/v2/feedbacks').with(headers: { 'Content-Type' => 'application/json' })
|
39
|
+
.to_return(body: { some: 'json' }.to_json)
|
43
40
|
end
|
44
41
|
|
45
42
|
it 'requests json and parses response body' do
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'post' do
|
6
|
-
|
7
5
|
let(:feedback) do
|
8
6
|
{
|
9
7
|
recommended: true,
|
@@ -14,28 +12,28 @@ describe LHC do
|
|
14
12
|
|
15
13
|
before(:each) do
|
16
14
|
stub_request(:post, "http://datastore/v2/feedbacks")
|
17
|
-
|
18
|
-
|
15
|
+
.with(body: feedback.to_json)
|
16
|
+
.to_return(status: 200, body: feedback.to_json, headers: { 'Content-Encoding' => 'UTF-8' })
|
19
17
|
end
|
20
18
|
|
21
19
|
it 'does a post request when providing a complete url' do
|
22
|
-
|
20
|
+
described_class.post('http://datastore/v2/feedbacks', body: feedback.to_json)
|
23
21
|
end
|
24
22
|
|
25
23
|
it 'does a post request when providing the name of a configured endpoint' do
|
26
24
|
url = 'http://:datastore/v2/feedbacks'
|
27
25
|
options = { params: { datastore: 'datastore' } }
|
28
|
-
|
29
|
-
|
26
|
+
described_class.configure { |c| c.endpoint(:feedbacks, url, options) }
|
27
|
+
described_class.post(:feedbacks, body: feedback.to_json)
|
30
28
|
end
|
31
29
|
|
32
30
|
it 'it makes response data available in a rails way' do
|
33
|
-
response =
|
31
|
+
response = described_class.post('http://datastore/v2/feedbacks', body: feedback.to_json)
|
34
32
|
expect(response.data.source_id).to eq 'aaa'
|
35
33
|
end
|
36
34
|
|
37
35
|
it 'provides response headers' do
|
38
|
-
response =
|
36
|
+
response = described_class.post('http://datastore/v2/feedbacks', body: feedback.to_json)
|
39
37
|
expect(response.headers).to be
|
40
38
|
end
|
41
39
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'post' do
|
6
|
-
|
7
5
|
let(:feedback) do
|
8
6
|
{
|
9
7
|
recommended: false,
|
@@ -20,28 +18,28 @@ describe LHC do
|
|
20
18
|
|
21
19
|
before(:each) do
|
22
20
|
stub_request(:put, "http://datastore/v2/feedbacks")
|
23
|
-
|
24
|
-
|
21
|
+
.with(body: change.to_json)
|
22
|
+
.to_return(status: 200, body: feedback.merge(change).to_json, headers: { 'Content-Encoding' => 'UTF-8' })
|
25
23
|
end
|
26
24
|
|
27
25
|
it 'does a post request when providing a complete url' do
|
28
|
-
|
26
|
+
described_class.put('http://datastore/v2/feedbacks', body: change.to_json)
|
29
27
|
end
|
30
28
|
|
31
29
|
it 'does a post request when providing the name of a configured endpoint' do
|
32
30
|
url = 'http://:datastore/v2/feedbacks'
|
33
31
|
options = { params: { datastore: 'datastore' } }
|
34
|
-
|
35
|
-
|
32
|
+
described_class.configure { |c| c.endpoint(:feedbacks, url, options) }
|
33
|
+
described_class.put(:feedbacks, body: change.to_json)
|
36
34
|
end
|
37
35
|
|
38
36
|
it 'it makes response data available in a rails way' do
|
39
|
-
response =
|
37
|
+
response = described_class.put('http://datastore/v2/feedbacks', body: change.to_json)
|
40
38
|
expect(response.data.recommended).to eq false
|
41
39
|
end
|
42
40
|
|
43
41
|
it 'provides response headers' do
|
44
|
-
response =
|
42
|
+
response = described_class.put('http://datastore/v2/feedbacks', body: change.to_json)
|
45
43
|
expect(response.headers).to be
|
46
44
|
end
|
47
45
|
end
|
@@ -1,18 +1,16 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'request' do
|
6
|
-
|
7
5
|
let(:total) { 99 }
|
8
6
|
|
9
7
|
before(:each) do
|
10
8
|
stub_request(:get, "http://datastore/v2/feedbacks?has_reviews=true")
|
11
|
-
|
9
|
+
.to_return(status: 200, body: { total: total }.to_json, headers: { 'Content-Encoding' => 'UTF-8' })
|
12
10
|
end
|
13
11
|
|
14
12
|
it 'does a request returning a response' do
|
15
|
-
response =
|
13
|
+
response = described_class.request(url: 'http://datastore/v2/feedbacks', params: { has_reviews: true }, method: :get)
|
16
14
|
expect(response.data.total).to eq total
|
17
15
|
end
|
18
16
|
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'configured endpoints' do
|
6
|
-
|
7
5
|
let(:url) { 'http://analytics/track/:entity_id/w/:type' }
|
8
6
|
|
9
7
|
let(:options) do
|
@@ -14,51 +12,50 @@ describe LHC do
|
|
14
12
|
end
|
15
13
|
|
16
14
|
before(:each) do
|
17
|
-
|
15
|
+
described_class.configure do |c|
|
18
16
|
c.endpoint(:kpi_tracker, url, options)
|
19
17
|
end
|
20
18
|
end
|
21
19
|
|
22
20
|
it 'configures urls to be able to access them by name later' do
|
23
|
-
expect(
|
24
|
-
expect(
|
21
|
+
expect(described_class.config.endpoints[:kpi_tracker].url).to eq url
|
22
|
+
expect(described_class.config.endpoints[:kpi_tracker].options).to eq options
|
25
23
|
end
|
26
24
|
|
27
25
|
it 'compile url' do
|
28
26
|
stub_request(:get, 'http://analytics/track/123/w/request?env=PROD')
|
29
|
-
response =
|
27
|
+
response = described_class.get(:kpi_tracker, params: { entity_id: 123, type: 'request' })
|
30
28
|
expect(response.request.options[:followlocation]).to eq false
|
31
29
|
end
|
32
30
|
|
33
31
|
it 'gets overwritten by explicit request options' do
|
34
32
|
stub_request(:get, 'http://analytics/track/123/w/request?env=STG')
|
35
|
-
|
33
|
+
described_class.get(:kpi_tracker, params: { entity_id: 123, type: 'request', env: 'STG' })
|
36
34
|
end
|
37
35
|
|
38
36
|
it 'raises in case of claching endpoint names' do
|
39
|
-
expect(
|
40
|
-
|
37
|
+
expect(lambda {
|
38
|
+
described_class.config.endpoint(:kpi_tracker, 'http://kpi-tracker')
|
41
39
|
}).to raise_error 'Endpoint already exists for that name'
|
42
40
|
end
|
43
41
|
|
44
42
|
it 'enforces endpoint name to be a symbol' do
|
45
|
-
|
46
|
-
expect(
|
43
|
+
described_class.configure { |c| c.endpoint('datastore', 'http://datastore') }
|
44
|
+
expect(described_class.config.endpoints[:datastore].url).to eq 'http://datastore'
|
47
45
|
end
|
48
46
|
end
|
49
47
|
|
50
48
|
context 'configured enpoints with default params' do
|
51
|
-
|
52
49
|
before(:each) do
|
53
|
-
|
50
|
+
described_class.config.endpoint(:telemarketers, 'http://datastore/v2/spamnumbers?order_by=-user_frequency&swiss_number=true&offset=0&limit=:limit', params: { limit: 200 })
|
54
51
|
stub_request(:get, 'http://datastore/v2/spamnumbers?limit=200&offset=0&order_by=-user_frequency&swiss_number=true')
|
55
52
|
.to_return(status: 200)
|
56
53
|
end
|
57
54
|
|
58
55
|
it 'is possible to call them multiple times with default params' do
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
described_class.get(:telemarketers)
|
57
|
+
described_class.get(:telemarketers)
|
58
|
+
described_class.get(:telemarketers)
|
62
59
|
end
|
63
60
|
end
|
64
61
|
end
|
@@ -1,32 +1,30 @@
|
|
1
1
|
require 'rails_helper'
|
2
2
|
|
3
3
|
describe LHC do
|
4
|
-
|
5
4
|
context 'configuration of placeholders' do
|
6
|
-
|
7
5
|
it 'uses values for placeholders defined globally' do
|
8
|
-
|
6
|
+
described_class.configure { |c| c.placeholder(:datastore, 'http://datastore/v2') }
|
9
7
|
stub_request(:get, "http://datastore/v2/feedbacks")
|
10
|
-
|
8
|
+
described_class.get(':datastore/feedbacks')
|
11
9
|
end
|
12
10
|
|
13
11
|
it 'uses explicit values first' do
|
14
|
-
|
12
|
+
described_class.configure { |c| c.placeholder(:campaign_id, '123') }
|
15
13
|
stub_request(:get, 'http://datastore/v2/campaign/456/feedbacks')
|
16
14
|
url = 'http://datastore/v2/campaign/:campaign_id/feedbacks'
|
17
|
-
|
15
|
+
described_class.get(url, params: { campaign_id: '456' })
|
18
16
|
end
|
19
17
|
|
20
18
|
it 'raises in case of claching placeholder name' do
|
21
|
-
|
22
|
-
expect(
|
23
|
-
|
19
|
+
described_class.configure { |c| c.placeholder(:datastore, 'http://datastore') }
|
20
|
+
expect(lambda {
|
21
|
+
described_class.config.placeholder(:datastore, 'http://datastore')
|
24
22
|
}).to raise_error 'Placeholder already exists for that name'
|
25
23
|
end
|
26
24
|
|
27
25
|
it 'enforces placeholder name to be a symbol' do
|
28
|
-
|
29
|
-
expect(
|
26
|
+
described_class.configure { |c| c.placeholder('datatore', 'http://datastore') }
|
27
|
+
expect(described_class.config.placeholders[:datatore]).to eq 'http://datastore'
|
30
28
|
end
|
31
29
|
end
|
32
30
|
end
|