easy_creds 1.0.1 → 1.0.3
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/easy_creds/installer.rb +1 -1
- data/lib/easy_creds/overlay.rb +8 -18
- data/lib/easy_creds/railtie.rb +1 -1
- data/lib/easy_creds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 875f25ae3bfbbaedf516bd6aa81c602339936854bd9601bad3b59fedce8510f6
|
|
4
|
+
data.tar.gz: 72ace424ddc5e12543c401e561d2ea04737b43b6528bc300a29a4b4b9dabadcf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07dd62777e61f759caca06f269eb6a2b237bb3021b0f1616f866b450a4c17fffe9f01acb0f5b21a87598089fda04b683617423a1b10a7ddb5426966378b2da69
|
|
7
|
+
data.tar.gz: 4164fe45f136cf8749e51d5c8caf9889087bfc3038e7154e9f80b67f8e90883f811b51694411f38f91846b94054d660047f2100f1d96639b978492d620f8e2d4
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.3] - 2026-06-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Railtie now loads the packaged rake file from `lib/tasks/easy_creds.rake`
|
|
13
|
+
instead of a non-existent `tasks/easy_creds.rake` (off-by-one relative path),
|
|
14
|
+
which raised `LoadError` and aborted `rails` whenever the gem was loaded in a
|
|
15
|
+
Rails app.
|
|
16
|
+
- Overlay/initializer now use `EasyCreds::Overlay.apply!(Rails.application.credentials,
|
|
17
|
+
Rails.root, Rails.env)`. The previous `apply!(Rails.application)` form called
|
|
18
|
+
`Rails.application.env`, which does not exist (`NoMethodError`), so the boot-time
|
|
19
|
+
overlay was silently skipped. `apply!` is now a plain 3-argument method.
|
|
20
|
+
- Added railtie and installer regression guard tests for both issues above.
|
|
21
|
+
|
|
8
22
|
## [1.0.1] - 2026-06-15
|
|
9
23
|
|
|
10
24
|
### Added
|
data/lib/easy_creds/installer.rb
CHANGED
|
@@ -13,7 +13,7 @@ module EasyCreds
|
|
|
13
13
|
# The local overlay is gitignored and never pushed to 1Password — use it for
|
|
14
14
|
# machine-specific overrides (e.g. a local database URL different from staging).
|
|
15
15
|
require 'easy_creds/overlay'
|
|
16
|
-
EasyCreds::Overlay.apply!(Rails.application)
|
|
16
|
+
EasyCreds::Overlay.apply!(Rails.application.credentials, Rails.root, Rails.env)
|
|
17
17
|
RUBY
|
|
18
18
|
|
|
19
19
|
def initialize(root)
|
data/lib/easy_creds/overlay.rb
CHANGED
|
@@ -9,28 +9,18 @@ module EasyCreds
|
|
|
9
9
|
module Overlay
|
|
10
10
|
# Merge config/credentials/<env>_local.yml.enc on top of the base credentials.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
12
|
+
# Call it from a Rails initializer with the credentials object, project root,
|
|
13
|
+
# and environment — the values are pulled straight off the Rails globals:
|
|
14
14
|
#
|
|
15
|
-
# EasyCreds::Overlay.apply!(Rails.application)
|
|
16
15
|
# EasyCreds::Overlay.apply!(Rails.application.credentials, Rails.root, Rails.env)
|
|
17
16
|
#
|
|
18
|
-
# @param
|
|
19
|
-
# credentials
|
|
20
|
-
# @param root [String, Pathname
|
|
21
|
-
# @param env [String, Symbol
|
|
17
|
+
# @param creds [#public_send] the credentials object to mutate (e.g.
|
|
18
|
+
# Rails.application.credentials)
|
|
19
|
+
# @param root [String, Pathname] project root (Rails.root)
|
|
20
|
+
# @param env [String, Symbol] environment name (Rails.env)
|
|
22
21
|
# @return [void]
|
|
23
|
-
def self.apply!(
|
|
24
|
-
|
|
25
|
-
app = app_or_creds
|
|
26
|
-
creds = app.credentials
|
|
27
|
-
root = app.root
|
|
28
|
-
env = app.env.to_s
|
|
29
|
-
else
|
|
30
|
-
creds = app_or_creds
|
|
31
|
-
env = env.to_s
|
|
32
|
-
end
|
|
33
|
-
|
|
22
|
+
def self.apply!(creds, root, env)
|
|
23
|
+
env = env.to_s
|
|
34
24
|
enc = Pathname.new(root).join("config/credentials/#{env}_local.yml.enc")
|
|
35
25
|
key = Pathname.new(root).join("config/credentials/#{env}_local.key")
|
|
36
26
|
|
data/lib/easy_creds/railtie.rb
CHANGED
|
@@ -5,6 +5,6 @@ module EasyCreds
|
|
|
5
5
|
# Registers the credentials:sync, easy_creds:install, and easy_creds:onboard
|
|
6
6
|
# rake tasks without booting the full Rails environment upfront.
|
|
7
7
|
class Railtie < ::Rails::Railtie
|
|
8
|
-
rake_tasks { load File.expand_path('
|
|
8
|
+
rake_tasks { load File.expand_path('../tasks/easy_creds.rake', __dir__) }
|
|
9
9
|
end
|
|
10
10
|
end
|
data/lib/easy_creds/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy_creds
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pawel Niemczyk
|
|
@@ -286,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
286
286
|
- !ruby/object:Gem::Version
|
|
287
287
|
version: '0'
|
|
288
288
|
requirements: []
|
|
289
|
-
rubygems_version:
|
|
289
|
+
rubygems_version: 3.6.9
|
|
290
290
|
specification_version: 4
|
|
291
291
|
summary: Interactive TUI to sync encrypted credentials with 1Password
|
|
292
292
|
test_files: []
|