rails_node_module_linker 0.2.1 → 0.2.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ea23d68950f392ad9a8716ff600f096219595e48596e83698e342cf3732b7d4
|
|
4
|
+
data.tar.gz: 2a2bd49b2d0abb6e3427bcad27a1f85bf56337567ad9f72ab4719cbbab33c85e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a0719cb466f01cca5be07cb5b1d5b8c1228206e00bbd3c18f31a676ccf547ddb0d7e6730b86b9596eb6e38ad34ba7b0307a8a14c30173c7bd1d2e8fe36c50a14
|
|
7
|
+
data.tar.gz: 99073a506ccc015bb0755fabcd9ef852099d17094cea8125013d7c387dfbd5e10263b6bcaa0b41f5d90f3fc4c62435cbb35d472684b4b5dc21b8e584368bc584
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.2] - 2026-11-23
|
|
4
|
+
|
|
5
|
+
- Fixes the middleware rewriting the config file when the package is already listed
|
|
6
|
+
- Fixes indentation of list items in the config file when the middleware adds a package
|
|
7
|
+
- Removes the Railtie glob for rake tasks that never matched a file (the Engine loads them)
|
|
8
|
+
- Adds railties and simplecov as development gems, so the specs run on the bundle of the gem
|
|
9
|
+
- Adds specs for the middleware, the link tasks, the Railtie and the Engine initializer
|
|
10
|
+
- Enforces 100% line and branch coverage with SimpleCov
|
|
11
|
+
|
|
3
12
|
## [0.2.1] - 2025-08-21
|
|
4
13
|
|
|
5
14
|
- Adds force_link setting
|
|
@@ -25,11 +25,15 @@ class RailsNodeModuleLinker::Middleware
|
|
|
25
25
|
# * Load existing config or initialize a new one
|
|
26
26
|
config = File.exist?(symlinked_node_modules_config) ? YAML.load_file(symlinked_node_modules_config) : { 'packages' => [] }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
config['packages'] = (config['packages'] | [package]).sort
|
|
28
|
+
packages = config['packages'] || []
|
|
30
29
|
|
|
31
|
-
# *
|
|
32
|
-
|
|
30
|
+
# * Write the config only when the package is new. A relink of a listed package keeps the file unchanged.
|
|
31
|
+
unless packages.include?(package)
|
|
32
|
+
config['packages'] = (packages | [package]).sort
|
|
33
|
+
|
|
34
|
+
# * Psych writes list items at column 0. Indent them by 2 spaces to match common YAML linters.
|
|
35
|
+
File.write(symlinked_node_modules_config, config.to_yaml.gsub(/^- /, ' - '))
|
|
36
|
+
end
|
|
33
37
|
|
|
34
38
|
# * Call the rake task to create the symlink
|
|
35
39
|
system('bin/rails rails_node_module_linker:link')
|
|
@@ -10,10 +10,8 @@ class RailsNodeModuleLinker::Railtie < Rails::Railtie
|
|
|
10
10
|
# * Hardcoded toggle for before/after
|
|
11
11
|
PRECOMPILE_HOOK_POSITION = :before # ? or :after
|
|
12
12
|
|
|
13
|
+
# * RailsNodeModuleLinker::Engine loads the tasks in lib/tasks
|
|
13
14
|
rake_tasks do
|
|
14
|
-
path = File.expand_path(__dir__)
|
|
15
|
-
Dir.glob("#{path}/tasks/**/*.rake").each { |f| load f }
|
|
16
|
-
|
|
17
15
|
Rake::Task.define_task(:environment)
|
|
18
16
|
|
|
19
17
|
case PRECOMPILE_HOOK_POSITION
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_node_module_linker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anthony Veaudry
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: Exposees wanted node_modules to the public directory for Rails apps that
|
|
14
13
|
have transitioned from Sprockets to Propshaft.
|
|
@@ -41,7 +40,6 @@ metadata:
|
|
|
41
40
|
source_code_uri: https://github.com/anthony0030/rails_node_module_linker
|
|
42
41
|
changelog_uri: https://github.com/anthony0030/rails_node_module_linker/blob/main/CHANGELOG.md
|
|
43
42
|
rubygems_mfa_required: 'true'
|
|
44
|
-
post_install_message:
|
|
45
43
|
rdoc_options: []
|
|
46
44
|
require_paths:
|
|
47
45
|
- lib
|
|
@@ -56,8 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
56
54
|
- !ruby/object:Gem::Version
|
|
57
55
|
version: '0'
|
|
58
56
|
requirements: []
|
|
59
|
-
rubygems_version:
|
|
60
|
-
signing_key:
|
|
57
|
+
rubygems_version: 4.0.20
|
|
61
58
|
specification_version: 4
|
|
62
59
|
summary: Link node modules into the public folder of a Rails app using Propshaft
|
|
63
60
|
test_files: []
|