aitch 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +16 -9
- data/lib/aitch/request.rb +1 -1
- data/lib/aitch/version.rb +1 -1
- data/spec/aitch/request_spec.rb +10 -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: d0dfe4472432f59487033b0e4ee493309ca64ea1
|
4
|
+
data.tar.gz: 7ac2a7504a11fd303cae76c2f626c4ef3e1a8d4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 572b6bd663e91bbfbd40bb1fec56656f7c9ddb6ed36ad4b60ed8595bb87b991ce4aa2a27819521af915e539d0042e27dc07155a4f22d09d29b2ab71cda212078
|
7
|
+
data.tar.gz: 390ff3a7a9dbffd717bbc2b6076e1e46801ed050f03c977ad0a63f77701d8366d539e2025e00f6bc61726897b19954961be44f80f54636153bf75e38586eeae3
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,30 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
aitch (0.4.
|
4
|
+
aitch (0.4.1)
|
5
5
|
activesupport
|
6
6
|
nokogiri (>= 1.6.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (4.
|
12
|
-
i18n (~> 0.
|
11
|
+
activesupport (4.2.0)
|
12
|
+
i18n (~> 0.7)
|
13
13
|
json (~> 1.7, >= 1.7.7)
|
14
14
|
minitest (~> 5.1)
|
15
|
-
thread_safe (~> 0.
|
15
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
16
16
|
tzinfo (~> 1.1)
|
17
17
|
awesome_print (1.2.0)
|
18
|
+
byebug (3.5.1)
|
19
|
+
columnize (~> 0.8)
|
20
|
+
debugger-linecache (~> 1.2)
|
21
|
+
slop (~> 3.6)
|
18
22
|
coderay (1.1.0)
|
23
|
+
columnize (0.9.0)
|
24
|
+
debugger-linecache (1.2.0)
|
19
25
|
diff-lcs (1.2.5)
|
20
26
|
fakeweb (1.3.0)
|
21
|
-
i18n (0.
|
27
|
+
i18n (0.7.0)
|
22
28
|
json (1.8.1)
|
23
29
|
method_source (0.8.2)
|
24
30
|
mini_portile (0.6.1)
|
@@ -30,13 +36,14 @@ GEM
|
|
30
36
|
coderay (~> 1.1.0)
|
31
37
|
method_source (~> 0.8.1)
|
32
38
|
slop (~> 3.4)
|
33
|
-
pry-
|
39
|
+
pry-byebug (2.0.0)
|
40
|
+
byebug (~> 3.4)
|
41
|
+
pry (~> 0.10)
|
42
|
+
pry-meta (0.0.10)
|
34
43
|
awesome_print
|
35
44
|
pry
|
36
|
-
pry-
|
45
|
+
pry-byebug
|
37
46
|
pry-remote
|
38
|
-
pry-nav (0.2.4)
|
39
|
-
pry (>= 0.9.10, < 0.11.0)
|
40
47
|
pry-remote (0.1.8)
|
41
48
|
pry (~> 0.9)
|
42
49
|
slop (~> 3.0)
|
data/lib/aitch/request.rb
CHANGED
data/lib/aitch/version.rb
CHANGED
data/spec/aitch/request_spec.rb
CHANGED
@@ -75,6 +75,16 @@ describe Aitch::Request do
|
|
75
75
|
expect(request.body).to eql({a: 1}.to_json)
|
76
76
|
end
|
77
77
|
|
78
|
+
it "sets json body from object (default headers)" do
|
79
|
+
request = build_request(
|
80
|
+
request_method: "post",
|
81
|
+
data: {a: 1},
|
82
|
+
options: {json_parser: JSON, default_headers: {'Content-Type' => 'application/json'}}
|
83
|
+
).request
|
84
|
+
|
85
|
+
expect(request.body).to eql({a: 1}.to_json)
|
86
|
+
end
|
87
|
+
|
78
88
|
it "sets request body from to_h protocol" do
|
79
89
|
data = double(to_h: {a: 1})
|
80
90
|
request = build_request(request_method: "post", data: data).request
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|