deployangel 0.1.17 → 0.1.18

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: a288e6edf81d6e4119526b5ce13d87e033a9bc54d5a02679bf5d5585771e67fb
4
- data.tar.gz: 0530abbe1a6dd018fbb528697e0a86fd7c10377ba09271b1bfd576ac2cca2e3e
3
+ metadata.gz: 66584e07c5d50f166891f5b6779fa2fa8db383a923d074458e7bb09ff46e525a
4
+ data.tar.gz: 95b445b37424f7b92ab0ec5394f5fa35c10864f5738f10959dfb9822c73c0980
5
5
  SHA512:
6
- metadata.gz: 12968f549c284c8c96f5151455341f6966f1c4dc5ee2e3a8a634cbe0d751235c8868ec254a6e40a49376ab260497262107da682ab16f20f0a53c5446ebde6989
7
- data.tar.gz: '01408cbd6f6fcb74ef21eb0b3f2db04ebf9c24981c7d798f897edca04487018ad84383216cb6744102b5e6eba1a51f6be5a6204b7757daab328176bca1f76f63'
6
+ metadata.gz: 87ce3ddb256c2df177bb3a4c2390b2ce50a98d97bd25e654d90153b29d9474bd4208cfb80b2bca3cf61d6a5174042dbe8a4e2c966e374a38b0371bf2e3dc19ad
7
+ data.tar.gz: ff4a1a677217b025f7393b0c586472a57b4b232406d44e4c76b3cb37ed4fd09d265f9052f47d9d50e182c9d3ddb5892e1757dbd7293b3910cb3a248000dabb0d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.18 (2026-10-08)
4
+
5
+ - In Rails, the agent gets its file digests when it starts, so the reporter
6
+ works out the code fingerprint right away rather than at its first send, a
7
+ minute or two later. A file changed in between, as by an in-place
8
+ `git pull`, no longer ends up in the fingerprint of code that isn't running.
9
+
3
10
  ## 0.1.17 (2026-10-08)
4
11
 
5
12
  - The agent reports from every Rails environment but `development` and `test`,
@@ -20,7 +20,7 @@ module DeployAngel
20
20
  attr_writer :metadata
21
21
 
22
22
  def initialize(config:, environment:, root: nil, framework: nil, framework_version: nil,
23
- env: ENV, transport: nil, clock: -> { Time.now.utc }, eager: false)
23
+ env: ENV, transport: nil, clock: -> { Time.now.utc }, eager: false, metadata: nil)
24
24
  @config = config
25
25
  @active = config.active?(environment)
26
26
  @release = Release.resolve(config: config, env: env, root: root)
@@ -35,6 +35,7 @@ module DeployAngel
35
35
  @root = root
36
36
  @clock = clock
37
37
  @eager = eager
38
+ @metadata = metadata
38
39
  @thread_mutex = Mutex.new
39
40
  @warned = {}
40
41
  reset_process_state
@@ -22,14 +22,16 @@ module DeployAngel
22
22
 
23
23
  config.after_initialize do |app|
24
24
  DeployAngel::Apartment.install if DeployAngel.configuration.exception_messages
25
- agent = DeployAngel.start(
25
+ # The metadata goes in at start, before the reporter thread can run:
26
+ # the code fingerprint is built from its file digests.
27
+ DeployAngel.start(
26
28
  environment: ::Rails.env,
27
29
  root: ::Rails.root.to_s,
28
30
  framework: "rails",
29
31
  framework_version: ::Rails.version,
30
- logger: ::Rails.logger
32
+ logger: ::Rails.logger,
33
+ metadata: DeployAngel::Rails::Metadata.new(app: app, config: DeployAngel.configuration, root: ::Rails.root.to_s, environment: ::Rails.env)
31
34
  )
32
- agent&.metadata = DeployAngel::Rails::Metadata.new(app: app, config: DeployAngel.configuration, root: ::Rails.root.to_s, environment: ::Rails.env)
33
35
  end
34
36
  end
35
37
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeployAngel
4
- VERSION = "0.1.17"
4
+ VERSION = "0.1.18"
5
5
  end
data/lib/deployangel.rb CHANGED
@@ -34,10 +34,10 @@ module DeployAngel
34
34
  # Called by the Railtie after the app boots. Web server processes start
35
35
  # reporting immediately, so idle processes still send heartbeats; other
36
36
  # processes (console, rake) only report after recording a request.
37
- def start(environment:, root: nil, framework: nil, framework_version: nil, logger: nil)
37
+ def start(environment:, root: nil, framework: nil, framework_version: nil, logger: nil, metadata: nil)
38
38
  configuration.logger = logger if logger
39
39
  @agent = Agent.new(config: configuration, environment: environment, root: root,
40
- framework: framework, framework_version: framework_version, eager: server_process?)
40
+ framework: framework, framework_version: framework_version, eager: server_process?, metadata: metadata)
41
41
  install_exit_hook
42
42
  @agent
43
43
  rescue StandardError => e
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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Owens