figjam 2.1.0 → 2.2.0
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/README.md +16 -5
- data/lib/figjam/rails/engine.rb +16 -0
- data/lib/figjam/rails.rb +1 -0
- data/lib/figjam/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb55c0209ee029e45d1868e1eb32d159ac3b50b6bdbc8ba469a818c1058c4f00
|
4
|
+
data.tar.gz: 3c7febb9ba1368b82458221f2914348a344474cf50c5ef1bbbfd4247d853d18d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ba7fd124b00dcaa9f789a43556ab4725d1f7a8f0ed4b4112eafe6dfad72fefb583f4779df2a5a7fed1b8062764a149890ae952d16c7dcb03680a4531d13a390
|
7
|
+
data.tar.gz: b18b0f948baf4005b858cf38c162d66fd9620c62992f52a738c682be1b3abc7548529e03de36114123ebf89d060ccd3cba11877e11c8655bf33c461d342de79e
|
data/README.md
CHANGED
@@ -59,15 +59,26 @@ overrides.
|
|
59
59
|
|
60
60
|
Figjam is perfect for Rails engines. They can have their own configuration file, and
|
61
61
|
they can be loaded independently or in addition of the main application. To do this,
|
62
|
-
you can create a `config/application.yml` file in your engine, and add this
|
62
|
+
you can create a `config/application.yml` file in your engine, and add this to the `Rails::Engine`:
|
63
63
|
|
64
64
|
```ruby
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
module MyEngine
|
66
|
+
class Engine < ::Rails::Engine
|
67
|
+
Figjam::Rails::Engine.configure(self)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Or if you wish to pass in a specific value for the environment:
|
72
|
+
module MyEngine
|
73
|
+
class Engine < ::Rails::Engine
|
74
|
+
Figjam::Rails::Engine.configure(self, "my_engine_environment")
|
75
|
+
end
|
76
|
+
end
|
69
77
|
```
|
70
78
|
|
79
|
+
This will ensure that the engine's configuration is loaded when the Rails application starts, and
|
80
|
+
before any other initializers run.
|
81
|
+
|
71
82
|
### Usage without Rails
|
72
83
|
|
73
84
|
If you are not using Rails, you can load Figjam in your gem. Note, you can
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Figjam
|
2
|
+
module Rails
|
3
|
+
module Engine
|
4
|
+
class << self
|
5
|
+
def configure(engine_context, environment = ::Rails.env)
|
6
|
+
engine_context.config.before_configuration do
|
7
|
+
Figjam::Application.new(
|
8
|
+
environment: environment,
|
9
|
+
path: "#{engine_context.root}/config/application.yml"
|
10
|
+
).load
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/figjam/rails.rb
CHANGED
data/lib/figjam/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: figjam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Lascelles
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -336,6 +336,7 @@ files:
|
|
336
336
|
- lib/figjam/figaro_alias.rb
|
337
337
|
- lib/figjam/rails.rb
|
338
338
|
- lib/figjam/rails/application.rb
|
339
|
+
- lib/figjam/rails/engine.rb
|
339
340
|
- lib/figjam/rails/railtie.rb
|
340
341
|
- lib/figjam/version.rb
|
341
342
|
homepage: https://github.com/hlascelles/figjam
|