scout 5.6.4 → 5.6.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/scout/command.rb +1 -1
- data/lib/scout/server.rb +1 -1
- data/lib/scout/server_base.rb +1 -1
- data/lib/scout/version.rb +1 -1
- data/test/scout_test.rb +6 -0
- metadata +3 -3
data/lib/scout/command.rb
CHANGED
@@ -177,7 +177,7 @@ module Scout
|
|
177
177
|
@server_name = options[:server_name]
|
178
178
|
@http_proxy = options[:http_proxy] || ""
|
179
179
|
@https_proxy = options[:https_proxy] || ""
|
180
|
-
@fqdn = options[:fqdn] || `hostname -f`
|
180
|
+
@fqdn = (options[:fqdn] || `hostname -f`).chomp
|
181
181
|
|
182
182
|
@options = options
|
183
183
|
@args = args
|
data/lib/scout/server.rb
CHANGED
@@ -61,7 +61,7 @@ module Scout
|
|
61
61
|
def refresh?
|
62
62
|
return true if !ping_key or account_public_key_changed? # fetch the plan again if the account key is modified/created
|
63
63
|
|
64
|
-
url=URI.join( @server.sub("https://","http://"), "/clients/#{ping_key}/ping.scout?roles=#{@roles}&fqdn=#{@fqdn}")
|
64
|
+
url=URI.join( @server.sub("https://","http://"), "/clients/#{ping_key}/ping.scout?roles=#{@roles}&fqdn=#{URI.encode(@fqdn)}")
|
65
65
|
|
66
66
|
headers = {"x-scout-tty" => ($stdin.tty? ? 'true' : 'false')}
|
67
67
|
if @history["plan_last_modified"] and @history["old_plugins"]
|
data/lib/scout/server_base.rb
CHANGED
@@ -29,7 +29,7 @@ module Scout
|
|
29
29
|
"/clients/CLIENT_KEY/#{url_name}.scout".
|
30
30
|
gsub(/\bCLIENT_KEY\b/, @client_key).
|
31
31
|
gsub(/\b[A-Z_]+\b/) { |k| options[k.downcase.to_sym] || k },
|
32
|
-
"?roles=#{@roles}&fqdn=#{@fqdn}&tty=#{$stdin.tty? ? 'y' : 'n'}")
|
32
|
+
"?roles=#{@roles}&fqdn=#{URI.encode(@fqdn)}&tty=#{$stdin.tty? ? 'y' : 'n'}")
|
33
33
|
end
|
34
34
|
|
35
35
|
def post(url, error, body, headers = Hash.new, &response_handler)
|
data/lib/scout/version.rb
CHANGED
data/test/scout_test.rb
CHANGED
@@ -582,6 +582,12 @@ mybar=100
|
|
582
582
|
assert_equal fqdn_override, client.fqdn
|
583
583
|
end
|
584
584
|
|
585
|
+
def test_fqdn_has_newline
|
586
|
+
scout(@roles_account.key, "--fqdn", "db-1.foobar.com\n")
|
587
|
+
client=@roles_account.clients.last
|
588
|
+
assert_equal "db-1.foobar.com", client.fqdn
|
589
|
+
end
|
590
|
+
|
585
591
|
|
586
592
|
######################
|
587
593
|
### Helper Methods ###
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.6.
|
4
|
+
version: 5.6.5.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Lewis
|
@@ -236,9 +236,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
236
236
|
version:
|
237
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- - "
|
239
|
+
- - ">"
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version:
|
241
|
+
version: 1.3.1
|
242
242
|
version:
|
243
243
|
requirements: []
|
244
244
|
|