constructorio 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/constructorio/client.rb +1 -1
- data/lib/constructorio/version.rb +1 -1
- data/test/configuration_test.rb +1 -1
- data/test/constructorio_test.rb +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92b3238b1ea8b5fbd5e047dcf452fcf01252105c
|
4
|
+
data.tar.gz: 0f38e485dc910f490140a804fe5856e637182604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353c67115b4856ba3d4e17e0518b7e7967229f2c9f3e7ffa172813871830f9e619d6f7c5839e84bb4882157d394ab9a7fbd06c0005567584bcc91c90400c5fd1
|
7
|
+
data.tar.gz: ec5b94e6ce26de0e5db764df3165014fe817d8d28145e6e28673ec0459d07eaa992a63bc394471a097bd53584caa3ad9ef5ca164a9e37fa9edfbe2a1e235bccc
|
data/lib/constructorio/client.rb
CHANGED
@@ -32,7 +32,7 @@ module ConstructorIO
|
|
32
32
|
|
33
33
|
private
|
34
34
|
|
35
|
-
def call_api(path, method, params)
|
35
|
+
def call_api(path, method, params = {})
|
36
36
|
api_token = ConstructorIO.configuration.api_token
|
37
37
|
api_url = ConstructorIO.configuration.api_url || "https://ac.constructor.io/"
|
38
38
|
autocomplete_key = ConstructorIO.configuration.autocomplete_key
|
data/test/configuration_test.rb
CHANGED
data/test/constructorio_test.rb
CHANGED
@@ -47,4 +47,27 @@ class ConstructorIOTest < MiniTest::Test
|
|
47
47
|
c.modify( { item_name: "power drill" } )
|
48
48
|
end
|
49
49
|
|
50
|
+
def test_verify_calls_get
|
51
|
+
c = ConstructorIO::Client.new
|
52
|
+
c.expects(:call_api).with(
|
53
|
+
"verify",
|
54
|
+
"get"
|
55
|
+
)
|
56
|
+
|
57
|
+
c.verify
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_verify_sends_request
|
61
|
+
c = ConstructorIO::Client.new
|
62
|
+
|
63
|
+
c.expects(:send_request).with(
|
64
|
+
"verify",
|
65
|
+
"get",
|
66
|
+
instance_of(Faraday::Connection),
|
67
|
+
{},
|
68
|
+
"example_autocomplete_key"
|
69
|
+
)
|
70
|
+
|
71
|
+
c.verify
|
72
|
+
end
|
50
73
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constructorio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|