appsignal 2.3.3.beta.1 → 2.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c81c8fca61d2e1b863cfd7a0f7ef76ffaf1ece7
4
- data.tar.gz: c5c8afff62d786d175a749a277b2353ab0221559
3
+ metadata.gz: 35d677b53c12a5761308ea3158780deea694d4b7
4
+ data.tar.gz: 0dcbadafab0f964c27814aa38f365eb922d327e0
5
5
  SHA512:
6
- metadata.gz: 88a02cb602057052b92b148390437eda089f1c7499062957a9c53e1d3adccffc6b9f1da85726b150bd9378f5e4806541c916e517313d3a553325a0793fb3fb1f
7
- data.tar.gz: f27550ecb0f924f5a59e92c40618e1ff434b28af6beba5a7cf1ad82c09eb62dbd1e48960eb4364d4c199faaed0dc5f412fd0a431d735055832ebd860c2b23852
6
+ metadata.gz: 244d06180b82d6188f9f7bd4bd100c89772e2eb1ed826dea3605d897436ed070def86a94c593da9fb826aee173880b8b2b69414f82f0c3f16c10a8664454e919
7
+ data.tar.gz: 63683d63c2e268146b652bdf4b0bb7946368c8db76ebed184bbc643918e3604ad74459d8b43a8e08f9d0acef06af131c923da9606ba8d778748f1ff2a0a3cb29
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # Unreleased version
2
+
3
+ # 2.3.3
2
4
  * Accept mixed case env variable values for the `true` value. PR #333
3
5
  * Don't record sensitive HTTP_X_AUTH_TOKEN header. PR #334
4
- * Agent and extension update. Commit e75d2f9b520d46f6cd0266b484b2c26c3bdc8882
6
+ * Support dry run option for Capistrano 3.5.0 and higher. PR #339
7
+ * Agent and extension update. Improve agent connection handling. Commit
8
+ e75d2f9b520d46f6cd0266b484b2c26c3bdc8882
5
9
 
6
10
  # 2.3.2
7
11
  * Improve Rake argument handling. Allow for more detailed view of which
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'capistrano', '3.4.0'
3
+ gem 'capistrano', '~> 3.0'
4
4
  gem 'net-ssh', '2.9.2'
5
5
  gem 'rack', '~> 1.6'
6
6
 
@@ -27,7 +27,8 @@ module Appsignal
27
27
  :enable_minutely_probes => false,
28
28
  :hostname => ::Socket.gethostname,
29
29
  :ca_file_path => File.expand_path(File.join("../../../resources/cacert.pem"), __FILE__),
30
- :dns_servers => []
30
+ :dns_servers => [],
31
+ :files_world_accessible => true
31
32
  }.freeze
32
33
 
33
34
  ENV_TO_KEY_MAPPING = {
@@ -58,7 +59,8 @@ module Appsignal
58
59
  "APPSIGNAL_ENABLE_MINUTELY_PROBES" => :enable_minutely_probes,
59
60
  "APPSIGNAL_HOSTNAME" => :hostname,
60
61
  "APPSIGNAL_CA_FILE_PATH" => :ca_file_path,
61
- "APPSIGNAL_DNS_SERVERS" => :dns_servers
62
+ "APPSIGNAL_DNS_SERVERS" => :dns_servers,
63
+ "APPSIGNAL_FILES_WORLD_ACCESSIBLE" => :files_world_accessible
62
64
  }.freeze
63
65
 
64
66
  attr_reader :root_path, :env, :initial_config, :config_hash
@@ -156,6 +158,7 @@ module Appsignal
156
158
  ENV["_APPSIGNAL_PROCESS_NAME"] = $PROGRAM_NAME
157
159
  ENV["_APPSIGNAL_CA_FILE_PATH"] = config_hash[:ca_file_path].to_s
158
160
  ENV["_APPSIGNAL_DNS_SERVERS"] = config_hash[:dns_servers].join(",")
161
+ ENV["_APPSIGNAL_FILES_WORLD_ACCESSIBLE"] = config_hash[:files_world_accessible].to_s
159
162
  end
160
163
 
161
164
  private
@@ -216,7 +219,8 @@ module Appsignal
216
219
  APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
217
220
  APPSIGNAL_ENABLE_ALLOCATION_TRACKING APPSIGNAL_ENABLE_GC_INSTRUMENTATION
218
221
  APPSIGNAL_RUNNING_IN_CONTAINER APPSIGNAL_ENABLE_HOST_METRICS
219
- APPSIGNAL_SEND_PARAMS APPSIGNAL_ENABLE_MINUTELY_PROBES).each do |var|
222
+ APPSIGNAL_SEND_PARAMS APPSIGNAL_ENABLE_MINUTELY_PROBES
223
+ APPSIGNAL_FILES_WORLD_ACCESSIBLE).each do |var|
220
224
  env_var = ENV[var]
221
225
  next unless env_var
222
226
  config[ENV_TO_KEY_MAPPING[var]] = env_var.casecmp("true").zero?
@@ -1,12 +1,12 @@
1
1
  namespace :appsignal do
2
2
  task :deploy do
3
- env = fetch(:appsignal_env, fetch(:stage, fetch(:rails_env, fetch(:rack_env, "production"))))
3
+ appsignal_env = fetch(:appsignal_env, fetch(:stage, fetch(:rails_env, fetch(:rack_env, "production"))))
4
4
  user = ENV["USER"] || ENV["USERNAME"]
5
5
  revision = fetch(:appsignal_revision, fetch(:current_revision))
6
6
 
7
7
  appsignal_config = Appsignal::Config.new(
8
8
  ENV["PWD"],
9
- env,
9
+ appsignal_env,
10
10
  fetch(:appsignal_config, {}),
11
11
  Logger.new(StringIO.new)
12
12
  )
@@ -18,9 +18,15 @@ namespace :appsignal do
18
18
  }
19
19
 
20
20
  marker = Appsignal::Marker.new(marker_data, appsignal_config)
21
- marker.transmit
21
+ # {#dry_run?} helper was added in Capistrano 3.5.0
22
+ # https://github.com/capistrano/capistrano/commit/38d8d6d2c8485f1b5643857465b16ff01da57aff
23
+ if respond_to?(:dry_run?) && dry_run?
24
+ puts "Dry run: AppSignal deploy marker not actually sent."
25
+ else
26
+ marker.transmit
27
+ end
22
28
  else
23
- puts "Not notifying of deploy, config is not active for environment: #{env}"
29
+ puts "Not notifying of deploy, config is not active for environment: #{appsignal_env}"
24
30
  end
25
31
  end
26
32
  end
@@ -1,5 +1,5 @@
1
1
  require "yaml"
2
2
 
3
3
  module Appsignal
4
- VERSION = "2.3.3.beta.1".freeze
4
+ VERSION = "2.3.3".freeze
5
5
  end
@@ -152,6 +152,19 @@ if DependencyHelper.capistrano3_present?
152
152
  end
153
153
  end
154
154
 
155
+ if Gem::Version.new(Capistrano::VERSION) >= Gem::Version.new("3.5.0")
156
+ context "when dry run" do
157
+ before do
158
+ expect(capistrano_config).to receive(:dry_run?).and_return(true)
159
+ run
160
+ end
161
+
162
+ it "does not transmit the marker" do
163
+ expect(output).to include "Dry run: AppSignal deploy marker not actually sent."
164
+ end
165
+ end
166
+ end
167
+
155
168
  context "with failed request" do
156
169
  before do
157
170
  stub_marker_request.to_return(:status => 500)
@@ -105,7 +105,8 @@ describe Appsignal::Config do
105
105
  :enable_minutely_probes => false,
106
106
  :hostname => Socket.gethostname,
107
107
  :ca_file_path => File.join(resources_dir, "cacert.pem"),
108
- :dns_servers => []
108
+ :dns_servers => [],
109
+ :files_world_accessible => true
109
110
  )
110
111
  end
111
112
 
@@ -274,17 +275,18 @@ describe Appsignal::Config do
274
275
  )
275
276
  end
276
277
  before do
277
- ENV["APPSIGNAL_RUNNING_IN_CONTAINER"] = "true"
278
- ENV["APPSIGNAL_PUSH_API_KEY"] = "aaa-bbb-ccc"
279
- ENV["APPSIGNAL_ACTIVE"] = "true"
280
- ENV["APPSIGNAL_APP_NAME"] = "App name"
281
- ENV["APPSIGNAL_DEBUG"] = "true"
282
- ENV["APPSIGNAL_IGNORE_ACTIONS"] = "action1,action2"
283
- ENV["APPSIGNAL_IGNORE_ERRORS"] = "VerySpecificError,AnotherError"
284
- ENV["APPSIGNAL_IGNORE_NAMESPACES"] = "admin,private_namespace"
285
- ENV["APPSIGNAL_INSTRUMENT_NET_HTTP"] = "false"
286
- ENV["APPSIGNAL_INSTRUMENT_REDIS"] = "false"
287
- ENV["APPSIGNAL_INSTRUMENT_SEQUEL"] = "false"
278
+ ENV["APPSIGNAL_RUNNING_IN_CONTAINER"] = "true"
279
+ ENV["APPSIGNAL_PUSH_API_KEY"] = "aaa-bbb-ccc"
280
+ ENV["APPSIGNAL_ACTIVE"] = "true"
281
+ ENV["APPSIGNAL_APP_NAME"] = "App name"
282
+ ENV["APPSIGNAL_DEBUG"] = "true"
283
+ ENV["APPSIGNAL_IGNORE_ACTIONS"] = "action1,action2"
284
+ ENV["APPSIGNAL_IGNORE_ERRORS"] = "VerySpecificError,AnotherError"
285
+ ENV["APPSIGNAL_IGNORE_NAMESPACES"] = "admin,private_namespace"
286
+ ENV["APPSIGNAL_INSTRUMENT_NET_HTTP"] = "false"
287
+ ENV["APPSIGNAL_INSTRUMENT_REDIS"] = "false"
288
+ ENV["APPSIGNAL_INSTRUMENT_SEQUEL"] = "false"
289
+ ENV["APPSIGNAL_FILES_WORLD_ACCESSIBLE"] = "false"
288
290
  end
289
291
 
290
292
  it "overrides config with environment values" do
@@ -302,6 +304,7 @@ describe Appsignal::Config do
302
304
  expect(config[:instrument_net_http]).to eq(false)
303
305
  expect(config[:instrument_redis]).to eq(false)
304
306
  expect(config[:instrument_sequel]).to eq(false)
307
+ expect(config[:files_world_accessible]).to eq(false)
305
308
  end
306
309
 
307
310
  context "with mixed case `true` env variables values" do
@@ -419,6 +422,7 @@ describe Appsignal::Config do
419
422
  expect(ENV["_APPSIGNAL_PROCESS_NAME"]).to include "rspec"
420
423
  expect(ENV["_APPSIGNAL_CA_FILE_PATH"]).to eq File.join(resources_dir, "cacert.pem")
421
424
  expect(ENV["_APPSIGNAL_DNS_SERVERS"]).to eq "8.8.8.8,8.8.4.4"
425
+ expect(ENV["_APPSIGNAL_FILES_WORLD_ACCESSIBLE"]).to eq "true"
422
426
  expect(ENV).to_not have_key("_APPSIGNAL_WORKING_DIR_PATH")
423
427
  end
424
428
 
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: 2.3.3.beta.1
4
+ version: 2.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-18 00:00:00.000000000 Z
12
+ date: 2017-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -347,9 +347,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
347
347
  version: '1.9'
348
348
  required_rubygems_version: !ruby/object:Gem::Requirement
349
349
  requirements:
350
- - - ">"
350
+ - - ">="
351
351
  - !ruby/object:Gem::Version
352
- version: 1.3.1
352
+ version: '0'
353
353
  requirements: []
354
354
  rubyforge_project:
355
355
  rubygems_version: 2.6.12