stimulus_plumbers 0.4.10 → 0.4.11

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: 8be63032403e88984349219e9e9e04c838a59cdc1f44788e1f9969464a6d3798
4
- data.tar.gz: 346503ca2ab321ad122aa7e713cc12af068adc0470a5e88a4e65733851849b34
3
+ metadata.gz: d5e0d3bcf8e99d854f9ec64f1831c969a83f0e658f8b0bb7704e51129e24743a
4
+ data.tar.gz: '01789f5f50ccfa6cf83acde5ff4d4f61fb15552f49212742c39fe3540600b487'
5
5
  SHA512:
6
- metadata.gz: 32ee19bb45ed9e0cbe7e18bca963c14f3abda9bb2eaf0600a661766a8543c889ce488e7fd35224e1217a8720057cbed34e63e7adfbaf610eef7db2f545a97e2e
7
- data.tar.gz: 2a26e5c8e76e6b86485f873b0116877aed755a55bb77a4d8e298333ea2d33cbf6172803572194649bc7647e7e63f566d4a0dc572777d540e1c813c7b0876c650
6
+ metadata.gz: 5f16ccf7913cc4122ce9eb12c50d8e39470007ac60bfafc211cd7fb3bba2b22d20ffaaf50ecc1ac31889c0cb85df35dc17b7f649cbc4c72d49b826c62d6797a3
7
+ data.tar.gz: af073d3c389b348b2b312d2616e55f4d921fd09a949684e5517b37483d33f9d707f893a3f1e5019e5a2265f21b346d7fbdd2c06d67978391bd54a904929bba77
data/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
4
4
 
5
+ ---
6
+ ## [0.4.10](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.4.9..stimulus-plumbers-rails/v0.4.10) - 2026-07-19
7
+
8
+ ### Bug Fixes
9
+
10
+ - install generator will copy css file from gem dir into app assets folder ([#179](https://github.com/ryancyq/stimulus-plumbers/issues/179)) - ([2e497f2](https://github.com/ryancyq/stimulus-plumbers/commit/2e497f2119b1c9aa22115c695d48ea4cdbeff9c2)) - Ryan Chang
11
+
12
+ ### Features
13
+
14
+ - form field, code + credit card ([#177](https://github.com/ryancyq/stimulus-plumbers/issues/177)) - ([d3adbab](https://github.com/ryancyq/stimulus-plumbers/commit/d3adbaba5ec345807162b03305d22a67ca3846dd)) - Ryan Chang
15
+
5
16
  ---
6
17
  ## [0.4.9](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.4.8..stimulus-plumbers-rails/v0.4.9) - 2026-07-18
7
18
 
@@ -50,6 +50,37 @@ module StimulusPlumbers
50
50
  say "Could not update #{relative_to_destination(css_file)}: #{e.message}. Skipping.", :yellow
51
51
  end
52
52
 
53
+ def remove_lines(css_file, pattern)
54
+ content = File.read(css_file)
55
+ return unless content.match?(pattern)
56
+
57
+ File.write(css_file, content.lines.grep_v(pattern).join)
58
+ say_status :update, relative_to_destination(css_file), :green
59
+ rescue Errno::EROFS, Errno::EACCES => e
60
+ say "Could not update #{relative_to_destination(css_file)}: #{e.message}. Skipping.", :yellow
61
+ end
62
+
63
+ def write_generated(path, contents)
64
+ FileUtils.mkdir_p(File.dirname(path))
65
+ File.write(path, contents)
66
+ say_status :create, relative_to_destination(path), :green
67
+ rescue Errno::EROFS, Errno::EACCES => e
68
+ say "Could not write #{relative_to_destination(path)}: #{e.message}. Skipping.", :yellow
69
+ end
70
+
71
+ def append_to_gitignore(path)
72
+ gitignore = File.join(destination_root, ".gitignore")
73
+ return unless File.exist?(gitignore)
74
+
75
+ entry = "/#{relative_to_destination(path)}"
76
+ return if File.readlines(gitignore, chomp: true).include?(entry)
77
+
78
+ File.open(gitignore, "a") { |file| file.puts(entry) }
79
+ say_status :append, ".gitignore", :green
80
+ rescue Errno::EROFS, Errno::EACCES => e
81
+ say "Could not update .gitignore: #{e.message}. Skipping.", :yellow
82
+ end
83
+
53
84
  # CSS copied by an installer belongs to the application from this point on.
54
85
  # Keep an existing file intact so a generator rerun never overwrites local
55
86
  # customizations (the same policy used by tailwindcss-rails' installer).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusPlumbers
4
- VERSION = "0.4.10"
4
+ VERSION = "0.4.11"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_plumbers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Chang