deployangel 0.1.16 → 0.1.17

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6080cb323e886841312b4bab49edd0962e2c5a4379c3f23d6dc7eb738944104d
4
- data.tar.gz: 36c6a15cfa2c70c3c92e58a500537bed8da5a19291af4852d530e857f21181fa
3
+ metadata.gz: a288e6edf81d6e4119526b5ce13d87e033a9bc54d5a02679bf5d5585771e67fb
4
+ data.tar.gz: 0530abbe1a6dd018fbb528697e0a86fd7c10377ba09271b1bfd576ac2cca2e3e
5
5
  SHA512:
6
- metadata.gz: c586644c984d299e424cc0b3042ac5a474c3271de24ca4ee5f0f89103fb574c0253bc362efa7d0b1d8b212b83ef4aa5a2fcfafb2f3c77477282d2a8f52b284e7
7
- data.tar.gz: ed91b7685224b5e613d3cc7de6cf28b36096563d5195e7e4b41069dcd691d6bb7ce49369a8f77fc5c519197bfe1984a4b0f9982520c7a6cb71efe094a69b0150
6
+ metadata.gz: 12968f549c284c8c96f5151455341f6966f1c4dc5ee2e3a8a634cbe0d751235c8868ec254a6e40a49376ab260497262107da682ab16f20f0a53c5446ebde6989
7
+ data.tar.gz: '01408cbd6f6fcb74ef21eb0b3f2db04ebf9c24981c7d798f897edca04487018ad84383216cb6744102b5e6eba1a51f6be5a6204b7757daab328176bca1f76f63'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.17 (2026-10-08)
4
+
5
+ - The agent reports from every Rails environment but `development` and `test`,
6
+ so a staging or preview app running with `RAILS_ENV=staging` works without
7
+ `DEPLOYANGEL_ENABLED=true`. `config.environments`, when set, still limits it to
8
+ the listed environments.
9
+
3
10
  ## 0.1.16 (2026-10-08)
4
11
 
5
12
  - The agent finds the release in a git checkout when nothing earlier names
data/README.md CHANGED
@@ -142,7 +142,7 @@ Environment variables are enough for most apps. To override in code:
142
142
  ```ruby
143
143
  # config/initializers/deployangel.rb
144
144
  DeployAngel.configure do |config|
145
- config.environments = %w[production staging] # default: production only
145
+ config.environments = %w[production] # default: every environment but development and test
146
146
  end
147
147
  ```
148
148
 
@@ -17,7 +17,7 @@ module DeployAngel
17
17
  @token = env["DEPLOYANGEL_TOKEN"]
18
18
  @endpoint = env["DEPLOYANGEL_URL"] || DEFAULT_ENDPOINT
19
19
  @enabled = parse_boolean(env["DEPLOYANGEL_ENABLED"])
20
- @environments = %w[production]
20
+ @environments = nil
21
21
  @release_version = env["DEPLOYANGEL_RELEASE_VERSION"]
22
22
  @revision = env["DEPLOYANGEL_REVISION"]
23
23
  @flush_interval = 60
@@ -38,13 +38,19 @@ module DeployAngel
38
38
  @sidekiq_cron_schedule_file = nil
39
39
  end
40
40
 
41
- # Reports only with a token. By default only in the listed
42
- # environments; DEPLOYANGEL_ENABLED forces it on or off.
41
+ # Reports only with a token, and by default in every environment but
42
+ # these, so staging and preview apps work as they are while a token
43
+ # copied into a developer's .env stays quiet.
44
+ NON_REPORTING_ENVIRONMENTS = %w[development test].freeze
45
+
46
+ # config.environments, when set, lists the only environments to report
47
+ # from; DEPLOYANGEL_ENABLED forces it on or off.
43
48
  def active?(environment)
44
49
  return false if token.to_s.empty? || endpoint.to_s.empty?
45
50
  return enabled unless enabled.nil?
51
+ return environments.map(&:to_s).include?(environment.to_s) if environments
46
52
 
47
- environments.include?(environment.to_s)
53
+ !NON_REPORTING_ENVIRONMENTS.include?(environment.to_s)
48
54
  end
49
55
 
50
56
  # Whether requests to a route are left out. Rails answers HEAD with the
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployAngel
4
- VERSION = "0.1.16"
4
+ VERSION = "0.1.17"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deployangel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Owens