scout 5.7.2 → 5.7.3.pre

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/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  doc/*
2
2
  pkg/*
3
+ log/*
3
4
  .DS_Store
4
5
  **/.DS_Store
5
6
  .idea
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,8 @@
1
+ # 5.7.3
2
+
3
+ * Fix for an issue with JRuby validating keys
4
+ * More helpful output when installing on a version of RVM < 1.12.0
5
+
1
6
  # 5.7.2
2
7
 
3
8
  * updated pusher gem and associated vendored gems
@@ -61,7 +61,7 @@ module Scout
61
61
 
62
62
  if Environment.rvm?
63
63
  file.puts '# Loading the RVM Environment files.'
64
- file.puts "source #{Environment.rvm_path}\n"
64
+ file.puts "source #{Environment.rvm_path_instructions}\n"
65
65
  end
66
66
 
67
67
  if Environment.bundler?
@@ -79,7 +79,15 @@ module Scout
79
79
  end
80
80
 
81
81
  def special_cron_information
82
- "It looks like you've installed Scout under RVM and/or Bundler. We've generated a shell script for you." if cron_script_required?
82
+ info = ""
83
+ info += "It looks like you've installed Scout under RVM and/or Bundler. We've generated a shell script for you." if cron_script_required?
84
+
85
+ if Environment.old_rvm_version?
86
+ info += "\n\n1. CONFIGURE THE SCOUT SHELL SCRIPT\n\n"
87
+ info += "Edit the shell script at #{File.join(config_dir, "scout_cron.sh")} and replace [PATH TO RVM ENVIRONMENT FILE] with the path to your RVM environment file. Usually this is located at #{(File.expand_path("~") rescue "/home/[USER]")}/.rvm/environments/[RUBY VERSION].\n\n"
88
+ info += "2. ADD A CRON JOB FOR SCOUT"
89
+ end
90
+ info
83
91
  end
84
92
 
85
93
  def cron_command(key)
@@ -1,5 +1,5 @@
1
1
  module Scout
2
- class Environment
2
+ module Environment
3
3
  def self.bundler?
4
4
  ENV['BUNDLE_BIN_PATH'] && ENV['BUNDLE_GEMFILE']
5
5
  end
@@ -9,7 +9,16 @@ module Scout
9
9
  end
10
10
 
11
11
  def self.rvm_path
12
- `rvm env --path`
12
+ rvm_path = `rvm env --path`
13
+ $?.exitstatus == 0 ? rvm_path : false
14
+ end
15
+
16
+ def self.rvm_path_instructions
17
+ self.rvm_path || "[PATH TO RVM ENVIRONMENT FILE]"
18
+ end
19
+
20
+ def self.old_rvm_version?
21
+ self.rvm? && !self.rvm_path
13
22
  end
14
23
  end
15
24
  end
data/lib/scout/server.rb CHANGED
@@ -110,9 +110,9 @@ module Scout
110
110
  if signature
111
111
  code=plugin['code'].gsub(/ +$/,'') # we strip trailing whitespace before calculating signatures. Same here.
112
112
  decoded_signature=Base64.decode64(signature)
113
- if !scout_public_key.verify(OpenSSL::Digest::SHA1.new, decoded_signature, code)
113
+ if !verify_public_key(scout_public_key, decoded_signature, code)
114
114
  if account_public_key
115
- if !account_public_key.verify(OpenSSL::Digest::SHA1.new, decoded_signature, code)
115
+ if !verify_public_key(account_public_key, decoded_signature, code)
116
116
  info "#{id_and_name} signature verification failed for both the Scout and account public keys"
117
117
  plugin['sig_error'] = "The code signature failed verification against both the Scout and account public key. Please ensure the public key installed at #{@account_public_key_path} was generated with the same private key used to sign the plugin."
118
118
  @plugins_with_signature_errors << temp_plugins.delete_at(i)
@@ -616,5 +616,11 @@ module Scout
616
616
  end
617
617
  return temp_configs
618
618
  end
619
+
620
+ def verify_public_key(key, decoded_signature, code)
621
+ key.verify(OpenSSL::Digest::SHA1.new, decoded_signature, code)
622
+ rescue OpenSSL::PKey::RSAError
623
+ false
624
+ end
619
625
  end
620
626
  end
data/lib/scout/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scout
2
- VERSION = "5.7.2"
2
+ VERSION = "5.7.3.pre"
3
3
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 47
5
- prerelease:
4
+ hash: -1512852423
5
+ prerelease: 6
6
6
  segments:
7
7
  - 5
8
8
  - 7
9
- - 2
10
- version: 5.7.2
9
+ - 3
10
+ - pre
11
+ version: 5.7.3.pre
11
12
  platform: ruby
12
13
  authors:
13
14
  - Andre Lewis
@@ -221,12 +222,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
221
222
  required_rubygems_version: !ruby/object:Gem::Requirement
222
223
  none: false
223
224
  requirements:
224
- - - ">="
225
+ - - ">"
225
226
  - !ruby/object:Gem::Version
226
- hash: 3
227
+ hash: 25
227
228
  segments:
228
- - 0
229
- version: "0"
229
+ - 1
230
+ - 3
231
+ - 1
232
+ version: 1.3.1
230
233
  requirements: []
231
234
 
232
235
  rubyforge_project: scout