infrataster 0.2.4 → 0.2.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ddec9ea2e17c599e93bde43dfcb46d4b4e3eec4
|
4
|
+
data.tar.gz: 542174438bfd08460623954456dabbd72a2d7c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee75a9a51c1da1b37268399e2e444612d934d4f0858299a7b70cbadd5e8d8dc8edad7644a190ab7f343805e6ad91180750982949e6f5b17a3e49fb55ee31e2bb
|
7
|
+
data.tar.gz: 18323691afd689f840ca58b604edd14913dd25cf6668357dd36936d931f7298130c840926a847cf8f78a14286c42c7291bf2aabd0edf8d10acab0a24a9cd5bc5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Infrataster Changelog
|
2
2
|
|
3
|
+
## v0.2.5
|
4
|
+
|
5
|
+
* [body option of http resource](https://github.com/ryotarai/infrataster/pull/57)
|
6
|
+
|
3
7
|
## v0.2.4
|
4
8
|
|
5
9
|
* [Consider how to fetch the current example in RSpec v2.14.x (by @gongo)](https://github.com/ryotarai/infrataster/pull/56)
|
data/lib/infrataster/version.rb
CHANGED
@@ -65,6 +65,24 @@ describe server(:app) do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
describe http('http://app.example.com', method: :post, body: {'foo' => 'bar'}, headers: {'USER' => 'VALUE'}) do
|
69
|
+
it "sends POST request with body entity" do
|
70
|
+
expect(body_as_json['method']).to eq('POST')
|
71
|
+
expect(body_as_json['body']).to eq("foo=bar")
|
72
|
+
expect(body_as_json['headers']['USER']).not_to be_empty
|
73
|
+
expect(body_as_json['headers']['USER']).to eq('VALUE')
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe http('http://app.example.com', method: :post, body: {'foo' => 'bar'}.to_json, headers: {'USER' => 'VALUE'}) do
|
78
|
+
it "sends POST request with body entity as JSON format" do
|
79
|
+
expect(body_as_json['method']).to eq('POST')
|
80
|
+
expect(body_as_json['body']).to eq({"foo" => "bar"}.to_json)
|
81
|
+
expect(body_as_json['headers']['USER']).not_to be_empty
|
82
|
+
expect(body_as_json['headers']['USER']).to eq('VALUE')
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
68
86
|
describe http('/path/to/resource') do
|
69
87
|
it "sends GET request with scheme and host" do
|
70
88
|
expect(body_as_json['headers']['HOST']).to eq('example.com')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infrataster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|