gosen 0.1.6 → 0.1.7
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.
- data/VERSION +1 -1
- data/lib/gosen.rb +1 -1
- data/lib/gosen/deployment.rb +2 -1
- data/test/gosen/test_deployment.rb +1 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/lib/gosen.rb
CHANGED
data/lib/gosen/deployment.rb
CHANGED
@@ -23,7 +23,8 @@ module Gosen
|
|
23
23
|
@api_options = {}
|
24
24
|
@logger = options.delete(:logger) || NullLogger.new
|
25
25
|
|
26
|
-
@site.session.default_headers['User-Agent']
|
26
|
+
user_agent = @site.session.default_headers['User-Agent']
|
27
|
+
@site.session.default_headers['User-Agent'] = "Gosen/#{Gosen::VERSION} #{user_agent}" unless user_agent =~ /^Gosen\/#{Gosen::VERSION}/
|
27
28
|
|
28
29
|
@min_deployed_nodes = options.delete(:min_deployed_nodes) || 1
|
29
30
|
raise Gosen::Error.new("Invalid minimal number of deployed nodes, should be between 0 and #{@nodes.length}") if @min_deployed_nodes > @nodes.length || @min_deployed_nodes < 0
|
@@ -6,6 +6,7 @@ class TestDeployment < Test::Unit::TestCase
|
|
6
6
|
@site = mock()
|
7
7
|
@session = mock()
|
8
8
|
@default_headers = mock()
|
9
|
+
@default_headers.stubs(:[]).with('User-Agent').returns("Restfully/#{Restfully::VERSION}")
|
9
10
|
@default_headers.stubs(:[]=).with('User-Agent', "Gosen/#{Gosen::VERSION} Restfully/#{Restfully::VERSION}")
|
10
11
|
@session.stubs(:default_headers).returns(@default_headers)
|
11
12
|
@site.stubs(:session).returns(@session)
|