scout_agent 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 3.1.4
2
+
3
+ * Modified the API to no longer load the JSON gem if we already have JSON
4
+ capabilities (for example, ActiveSupport provides it in Rails)
5
+
1
6
  == 3.1.3
2
7
 
3
8
  * Modified file modes to match lock types to get the file locking code running
data/lib/scout_agent.rb CHANGED
@@ -91,7 +91,7 @@ module ScoutAgent
91
91
  end
92
92
 
93
93
  # The version of this agent.
94
- VERSION = "3.1.3".freeze
94
+ VERSION = "3.1.4".freeze
95
95
  # A Pathname reference to the agent code directory, used in dynamic loading.
96
96
  LIB_DIR = Pathname.new(File.dirname(__FILE__)) + agent_name
97
97
  end
@@ -5,7 +5,11 @@ require "rbconfig" # used to find the Ruby we are running under
5
5
  require "pathname" # all paths are Pathname objects
6
6
 
7
7
  begin
8
- require "json" # the agent communicates in JSON
8
+ #
9
+ # the agent communicates in JSON, so we need to load the gem unless we are in
10
+ # something like Rails that already provides us with JSON capabilities
11
+ #
12
+ require "json" unless Hash.new.respond_to? :to_json
9
13
  rescue LoadError # library not found
10
14
  begin
11
15
  require "rubygems"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Edward Gray II
@@ -12,7 +12,7 @@ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
14
 
15
- date: 2009-05-05 00:00:00 -05:00
15
+ date: 2009-05-08 00:00:00 -05:00
16
16
  default_executable:
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency