remitmd 0.2.2 → 0.2.4

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: 89e33624f2d762d529c1f727720f3a7b9a5ba39df81bbdbda192ca73c95c5d32
4
- data.tar.gz: 00bcf98a0cfa530fcf3089427b03de8ce52547507f938789d6a3ca3c042d92ea
3
+ metadata.gz: 7726bbaff2286aa99b1f12cf78138e376d620b6063dfc2c844cc3334d9d3af56
4
+ data.tar.gz: 438d8d1cff61e10468d5ef368bde13ffc291a977362ba6d4bde447f1bbaf8892
5
5
  SHA512:
6
- metadata.gz: 7525dfa5051c771825bb88fec51670af753664e694b1de97192ec1049f7766bbdd0b161277014033e2e18ae69207d1ba6d997cbeaa23e7f294e7668caf31ccb9
7
- data.tar.gz: 7b2db9d35227e187ef67d809e175f4a329032764082ea97ace71896adafdf9a460524f9e808a1400ed18607549613b33125ac823c8ee262188463cde78de0840
6
+ metadata.gz: 54b55932ceeff519a091e3a745e862feae46ccf9fd9dcc53ce66a6556f11c9a641c57f96ec10b2d82d7d391deb931caff6402263edb320027d3db9ffd6dd213c
7
+ data.tar.gz: 0aae67743e0462a6081ad907f97203d921b456beef974a81df3825c5b324e377d0c9702b8f72a7e7fed7e213ec8a2dab0455ac2c55f4b4e6148ee46cbbe8881c
@@ -67,11 +67,11 @@ module Remitmd
67
67
 
68
68
  alias to_s inspect
69
69
 
70
- # Check all three conditions for CliSigner activation.
70
+ # Check conditions for CliSigner activation.
71
71
  #
72
72
  # 1. CLI binary found on PATH (via `which` / `where`)
73
- # 2. Keystore file exists at ~/.remit/keys/default.enc
74
- # 3. REMIT_KEY_PASSWORD env var is set
73
+ # 2. Meta file at ~/.remit/keys/default.meta (keychain — no password needed), OR
74
+ # 3. Keystore file at ~/.remit/keys/default.enc AND REMIT_KEY_PASSWORD env var set
75
75
  #
76
76
  # @param cli_path [String] path or name of the remit CLI binary
77
77
  # @return [Boolean]
@@ -81,11 +81,15 @@ module Remitmd
81
81
  _out, _err, st = Open3.capture3(which_cmd, cli_path)
82
82
  return false unless st.success?
83
83
 
84
- # 2. Keystore file exists
85
- keystore = File.join(Dir.home, ".remit", "keys", "default.enc")
84
+ keys_dir = File.join(Dir.home, ".remit", "keys")
85
+
86
+ # 2. Keychain meta file — no password needed
87
+ return true if File.exist?(File.join(keys_dir, "default.meta"))
88
+
89
+ # 3. Encrypted keystore + password
90
+ keystore = File.join(keys_dir, "default.enc")
86
91
  return false unless File.exist?(keystore)
87
92
 
88
- # 3. REMIT_KEY_PASSWORD set
89
93
  password = ENV["REMIT_KEY_PASSWORD"]
90
94
  return false if password.nil? || password.empty?
91
95
 
data/lib/remitmd.rb CHANGED
@@ -26,5 +26,5 @@ require_relative "remitmd/x402_paywall"
26
26
  # mock.was_paid?("0x0000000000000000000000000000000000000001", 1.00) # => true
27
27
  #
28
28
  module Remitmd
29
- VERSION = "0.2.2"
29
+ VERSION = "0.2.4"
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remitmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - remit.md