Skip to content

Commit ea23074

Browse files
committed
create gem 4.0.2, OS agnostic version
1 parent 11d0512 commit ea23074

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

appoptics_apm.gemspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
1212
s.email = %q{support@appoptics.com}
1313
s.homepage = %q{https://www.appoptics.com/}
1414
s.summary = %q{AppOptics APM performance instrumentation gem for Ruby}
15-
s.description = %q{The AppOpticsAPM gem provides performance instrumentation for MRI Ruby, JRuby and related frameworks.}
15+
s.description = %q{The AppOpticsAPM gem provides performance instrumentation for MRI Ruby and related frameworks.}
1616

1717
s.extra_rdoc_files = ["LICENSE"]
1818
s.files = `git ls-files`.split("\n")
@@ -24,7 +24,8 @@ Gem::Specification.new do |s|
2424
'ext/oboe_metal/src/VERSION']
2525
s.test_files = Dir.glob("{test}/**/*.rb")
2626

27-
s.platform = defined?(JRUBY_VERSION) ? 'java' : Gem::Platform::CURRENT
27+
# TODO this is commented out util we can actually provide gems for different platforms
28+
# s.platform = defined?(JRUBY_VERSION) ? 'java' : Gem::Platform::CURRENT
2829
s.extensions = ['ext/oboe_metal/extconf.rb'] unless defined?(JRUBY_VERSION)
2930

3031
s.add_runtime_dependency('json', '>= 0')

lib/appoptics_apm.rb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,28 @@
1818
# with an alternate metal (see the oboe-heroku gem)
1919
unless defined?(OboeHeroku)
2020
require 'appoptics_apm/base'
21+
AppOpticsAPM.loaded = false
2122

2223
begin
2324
if RUBY_PLATFORM == 'java'
2425
require '/usr/local/tracelytics/tracelyticsagent.jar'
2526
require 'joboe_metal'
26-
else
27+
elsif RUBY_PLATFORM =~ /linux/
2728
require "oboe_metal.so"
28-
require "oboe_metal.rb"
29+
require "oboe_metal.rb" # sets AppOpticsAPM.loaded = true if successful
30+
else
31+
$stderr.puts '==================================================================='
32+
$stderr.puts "AppOptics warning: Platform #{RUBY_PLATFORM} not yet supported."
33+
$stderr.puts 'see: https://docs.appoptics.com/kb/apm_tracing/supported_platforms/'
34+
$stderr.puts 'Tracing disabled.'
35+
$stderr.puts 'Contact support@appoptics.com if this is unexpected.'
36+
$stderr.puts '==================================================================='
2937
end
3038
rescue LoadError
31-
AppOpticsAPM.loaded = false
32-
3339
unless ENV['RAILS_GROUP'] == 'assets' or ENV['IGNORE_APPOPTICS_WARNING']
3440
$stderr.puts '=============================================================='
3541
$stderr.puts 'Missing AppOpticsAPM libraries. Tracing disabled.'
36-
$stderr.puts 'See: http://bit.ly/1DaNOjw'
42+
$stderr.puts 'See: https://docs.appoptics.com/kb/apm_tracing/ruby/'
3743
$stderr.puts '=============================================================='
3844
end
3945
end

lib/appoptics_apm/version.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ module AppOpticsAPM
88
module Version
99
MAJOR = 4
1010
MINOR = 0
11-
PATCH = 0
12-
BUILD = 'pre13'
11+
PATCH = 2
1312

14-
STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
13+
STRING = [MAJOR, MINOR, PATCH].compact.join('.')
1514
end
1615
end

0 commit comments

Comments
 (0)