appsignal 0.12.beta.35 → 0.12.beta.36

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cfdb043df76d74ac83f045edd351aa8901330cdf
4
- data.tar.gz: 7d67e984a04d00605f4e8bf53f2d47e70f81d963
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NmNkYzEzMjU1YjlhNDQ2NDQxZTNlZTI2YTBiOGZlYzhlNjdhZjMzNA==
5
+ data.tar.gz: !binary |-
6
+ ZmJhNDJiZmI0YjczNmJhMTNjZGZlN2NiMjM3NTkxOTZjNjA4ZjIyYQ==
5
7
  SHA512:
6
- metadata.gz: 0611964579b4ee0c3dc5f31b5bcc13bf880390f328dee6c01de1cdc6715da9fde171ece1e31a505991a6dc0f7b0daee7eebe917243e657622b0b86faa6c96699
7
- data.tar.gz: 0c95d1f4a335a979b9dae2e2f03cd6e18f3a5affca8ab1728e3a3ba96bea2143be0953a6c1d74d876654245e906eb66e82c6ea7e12bcadcd94cbfee8dd0bc106
8
+ metadata.gz: !binary |-
9
+ MGI4YzRiOGI1MWU5NWU4N2E1YTYxMzJhMjI4NDAzNWRmODJjYTRlMzIyNmVk
10
+ YTFlNjE1YTAxYTk0YmVjNjZiZTU1ZmFkZGFlMGM3MjdmYzliYzg4MzlkNmFl
11
+ YmEwMWZjNDQyNGE4NDQ1ZjY1YzQ1NDdlMjIxZGQ4MjMxNjBiOTQ=
12
+ data.tar.gz: !binary |-
13
+ NWUzY2YxMjBlZjc4NTE1OTY2ZDJmZjMzMjRkMDJjZTcxYWIwNDFhNWZmNGVi
14
+ OTI1MTJjOTZjMjNkMGI4MjAyYTQ0ODM3ZTY4ZDFmM2U1NzBhMzQ5N2YxNGYx
15
+ NmU0NzQ3MTMwMWQzMzQ0NTk1MmQ4OWYzZTg5MWE2NzJlOGQyODA=
@@ -2,10 +2,10 @@
2
2
  :version: c0f342f
3
3
  :triples:
4
4
  x86_64-linux:
5
- :checksum: 34ec5169c4ed863a36c113a4bb78609ad77b8bd262d1607cc34ef0b809b6f7b4
6
- :download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c0f342f/appsignal-agent-x86_64-linux.tar.gz
7
- :lib_filename: libappsignal.so
5
+ :checksum: 822058862ff44f8f77d6ee60ae116358b33af35cb09bdf6a87631653cc4da116
6
+ :download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c0f342f/appsignal-agent-x86_64-linux-static.tar.gz
7
+ :lib_filename: libappsignal.a
8
8
  x86_64-darwin:
9
- :checksum: 0ff18e87ea16c40cceda3677fee48e912ea9eeaca81c407935ea59e0fb45eeb4
10
- :download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c0f342f/appsignal-agent-x86_64-darwin.tar.gz
11
- :lib_filename: libappsignal.dylib
9
+ :checksum: 46ce8aad2689df40ad5a323264e6e4b8bb9919adbc6767cdf3bb9fc97e0a5aa7
10
+ :download_url: https://appsignal-agent-releases.global.ssl.fastly.net/c0f342f/appsignal-agent-x86_64-darwin-static.tar.gz
11
+ :lib_filename: libappsignal.a
@@ -37,6 +37,8 @@ module Appsignal
37
37
  end
38
38
 
39
39
  def start
40
+ return unless extension_loaded?
41
+
40
42
  unless @config
41
43
  @config = Config.new(
42
44
  ENV['PWD'],
@@ -75,7 +75,7 @@ module Appsignal
75
75
  ENV['APPSIGNAL_AGENT_PATH'] = File.expand_path('../../../ext', __FILE__).to_s
76
76
  ENV['APPSIGNAL_LOG_PATH'] = File.join(root_path, 'log')
77
77
  ENV['APPSIGNAL_ENVIRONMENT'] = env
78
- ENV['APPSIGNAL_AGENT_VERSION'] = Appsignal::ExtensionLoader.agent_version
78
+ ENV['APPSIGNAL_AGENT_VERSION'] = Appsignal::Extension.agent_version
79
79
  ENV['APPSIGNAL_DEBUG_LOGGING'] = config_hash[:debug].to_s
80
80
  ENV['APPSIGNAL_PUSH_API_ENDPOINT'] = config_hash[:endpoint]
81
81
  ENV['APPSIGNAL_PUSH_API_KEY'] = config_hash[:push_api_key]
@@ -1,60 +1,26 @@
1
+ require 'yaml'
2
+
3
+ begin
4
+ require 'appsignal_extension'
5
+ Appsignal.extension_loaded = true
6
+ rescue LoadError => err
7
+ Appsignal.logger.error(
8
+ "Failed to load extension (#{err}), please check the install.log file in " \
9
+ "the ext directory of the gem and e-mail us at support@appsignal.com"
10
+ )
11
+ Appsignal.extension_loaded = false
12
+ end
13
+
1
14
  module Appsignal
2
- module ExtensionLoader
15
+ class Extension
3
16
  def self.agent_config
4
17
  @agent_config ||= YAML.load(
5
18
  File.read(File.join(File.dirname(__FILE__), '../../ext/agent.yml'))
6
19
  )
7
20
  end
8
21
 
9
- def self.arch
10
- "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}"
11
- end
12
-
13
- def self.lib_path
14
- File.join(
15
- File.dirname(__FILE__),
16
- '../../ext/',
17
- agent_config[:triples][arch][:lib_filename]
18
- )
19
- end
20
-
21
22
  def self.agent_version
22
23
  agent_config[:version]
23
24
  end
24
-
25
- def self.failed(exception)
26
- Appsignal.logger.error(
27
- "Failed to load extension (#{exception}), please check the install.log file in " \
28
- "the ext directory of the gem and e-mail us at support@appsignal.com"
29
- )
30
- Appsignal.extension_loaded = false
31
- end
32
-
33
- def self.load_extension
34
- begin
35
- require 'fiddle'
36
- begin
37
- Fiddle.dlopen(lib_path)
38
- rescue => ex
39
- failed(ex)
40
- return
41
- end
42
- rescue LoadError
43
- # This is Ruby 2.1 or older
44
- require 'dl'
45
- begin
46
- DL.dlopen(lib_path)
47
- rescue => ex
48
- failed(ex)
49
- return
50
- end
51
- end
52
-
53
- require 'appsignal_extension'
54
-
55
- Appsignal.extension_loaded = true
56
- end
57
25
  end
58
26
  end
59
-
60
- Appsignal::ExtensionLoader.load_extension
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
2
 
3
3
  module Appsignal
4
- VERSION = '0.12.beta.35'
4
+ VERSION = '0.12.beta.36'
5
5
  end
@@ -58,7 +58,7 @@ describe Appsignal::Config do
58
58
  ENV['APPSIGNAL_PUSH_API_KEY'].should == 'abc'
59
59
  ENV['APPSIGNAL_APP_NAME'].should == 'TestApp'
60
60
  ENV['APPSIGNAL_ENVIRONMENT'].should == 'production'
61
- ENV['APPSIGNAL_AGENT_VERSION'].should == Appsignal::ExtensionLoader.agent_version
61
+ ENV['APPSIGNAL_AGENT_VERSION'].should == Appsignal::Extension.agent_version
62
62
  ENV['APPSIGNAL_HTTP_PROXY'].should == 'http://localhost'
63
63
  ENV['APPSIGNAL_IGNORE_ACTIONS'].should == 'action1,action2'
64
64
  end
@@ -3,46 +3,22 @@ require 'fileutils'
3
3
 
4
4
  describe "extension loading and operation" do
5
5
  describe ".agent_config" do
6
- subject { Appsignal::ExtensionLoader.agent_config }
6
+ subject { Appsignal::Extension.agent_config }
7
7
 
8
8
  it { should have_key(:version) }
9
9
  it { should have_key(:triples) }
10
10
  end
11
11
 
12
- describe ".arch" do
13
- subject { Appsignal::ExtensionLoader.agent_config }
14
-
15
- it { should_not be_nil }
16
- end
17
-
18
12
  describe ".agent_version" do
19
- subject { Appsignal::ExtensionLoader.agent_version }
13
+ subject { Appsignal::Extension.agent_version }
20
14
 
21
15
  it { should_not be_nil }
22
16
  end
23
17
 
24
- context "when the extension library cannot be loaded" do
25
- before do
26
- Appsignal::ExtensionLoader.stub(:lib_path => '/tmp/nonsense')
27
- end
28
-
29
- it "should log an error and set appsignal to inactive" do
30
- Appsignal.logger.should_receive(:error).with(
31
- 'Failed to load extension (dlopen(/tmp/nonsense, 9): image not found), ' \
32
- 'please check the install.log file in the ext directory of the gem and e-mail us at support@appsignal.com'
33
- )
34
-
35
- Appsignal::ExtensionLoader.load_extension
36
-
37
- Appsignal.extension_loaded?.should be_false
38
- end
39
- end
40
-
41
18
  context "when the extension library can be loaded" do
42
19
  subject { Appsignal::Extension }
43
20
 
44
21
  it "should load the extension" do
45
- Appsignal::ExtensionLoader.load_extension
46
22
  Appsignal.extension_loaded?.should be_true
47
23
  end
48
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.beta.35
4
+ version: 0.12.beta.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -15,98 +15,98 @@ dependencies:
15
15
  name: rack
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - ! '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - ! '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: thread_safe
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - ! '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - ! '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rake
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - ! '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ">="
53
+ - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: 2.14.1
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: 2.14.1
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: pry
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - ! '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ">="
81
+ - - ! '>='
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: timecop
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - ">="
88
+ - - ! '>='
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ">="
95
+ - - ! '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: webmock
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - ! '>='
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  description: The official appsignal.com gem
@@ -118,9 +118,9 @@ extensions:
118
118
  - ext/extconf.rb
119
119
  extra_rdoc_files: []
120
120
  files:
121
- - ".gitignore"
122
- - ".rspec"
123
- - ".travis.yml"
121
+ - .gitignore
122
+ - .rspec
123
+ - .travis.yml
124
124
  - CHANGELOG.md
125
125
  - Gemfile
126
126
  - LICENSE
@@ -244,17 +244,17 @@ require_paths:
244
244
  - ext
245
245
  required_ruby_version: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - ">="
247
+ - - ! '>='
248
248
  - !ruby/object:Gem::Version
249
249
  version: '1.9'
250
250
  required_rubygems_version: !ruby/object:Gem::Requirement
251
251
  requirements:
252
- - - ">"
252
+ - - ! '>'
253
253
  - !ruby/object:Gem::Version
254
254
  version: 1.3.1
255
255
  requirements: []
256
256
  rubyforge_project:
257
- rubygems_version: 2.4.5
257
+ rubygems_version: 2.4.8
258
258
  signing_key:
259
259
  specification_version: 4
260
260
  summary: Logs performance and exception data from your app to appsignal.com