litmus_paper 0.7.3 → 0.7.4
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.
@@ -26,7 +26,7 @@ module LitmusPaper
|
|
26
26
|
def _make_request
|
27
27
|
uri = URI.parse(@uri)
|
28
28
|
request = Net::HTTP.const_get(@method.capitalize).new(uri.normalize.path)
|
29
|
-
request
|
29
|
+
request["User-Agent"] = "Litmus Paper/#{LitmusPaper::VERSION}"
|
30
30
|
request.set_form_data({})
|
31
31
|
request.basic_auth(uri.user, uri.password) if uri.user || uri.password
|
32
32
|
|
data/lib/litmus_paper/version.rb
CHANGED
@@ -21,8 +21,13 @@ describe LitmusPaper::Dependency::HTTP do
|
|
21
21
|
check.should be_available
|
22
22
|
end
|
23
23
|
|
24
|
-
it "sends
|
25
|
-
check = LitmusPaper::Dependency::HTTP.new("#{@url}/
|
24
|
+
it "sends an accept header" do
|
25
|
+
check = LitmusPaper::Dependency::HTTP.new("#{@url}/echo_accept", :method => "GET", :content => Regexp.escape("*/*"))
|
26
|
+
check.should be_available
|
27
|
+
end
|
28
|
+
|
29
|
+
it "sends a user agent" do
|
30
|
+
check = LitmusPaper::Dependency::HTTP.new("#{@url}/echo_agent", :method => "GET", :content => "Litmus Paper")
|
26
31
|
check.should be_available
|
27
32
|
end
|
28
33
|
end
|
@@ -9,12 +9,12 @@ class HttpTestServer < Sinatra::Base
|
|
9
9
|
text 200, "POST"
|
10
10
|
end
|
11
11
|
|
12
|
-
get "/
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
get "/echo_accept" do
|
13
|
+
text 200, request.accept.first
|
14
|
+
end
|
15
|
+
|
16
|
+
get "/echo_agent" do
|
17
|
+
text 200, request.user_agent
|
18
18
|
end
|
19
19
|
|
20
20
|
get "/status/:response_status" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litmus_paper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 4
|
10
|
+
version: 0.7.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Braintreeps
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-01-
|
18
|
+
date: 2013-01-25 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|