tramway 2.1.3 → 2.1.3.1
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: 245489e489d0ca443ee942849812804c4e781764ffadb07a2448f8d0fdccbbb0
|
|
4
|
+
data.tar.gz: 2dfb246c296c6651e38da16eb02e404ec368d877660776848bb8beb0d892866e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd0430f2a599277c3f1aa987060cde15cebe893068a8ce08704de8e976195192fe22de84a4a2e3c6b543151d023511622ab5085caf27c92bf518a1bfbf7a4fa5
|
|
7
|
+
data.tar.gz: f1d2c6c7cdbbace83d16573dcd2b5ac21775336ffcb86c4aefa639ed6ca4cee512a3eeac72ea02873d9b6b20de8d3231bb89624add12ea259d370d2d7e96450c
|
data/config/tailwind.config.js
CHANGED
|
@@ -59,7 +59,9 @@ module Tramway
|
|
|
59
59
|
|
|
60
60
|
uri = URI.parse(agents_template_url)
|
|
61
61
|
response = Net::HTTP.get_response(uri)
|
|
62
|
-
|
|
62
|
+
body = response.body.to_s
|
|
63
|
+
body = body.dup.force_encoding(Encoding::UTF_8)
|
|
64
|
+
@agents_template_body = body.encode(Encoding::UTF_8, invalid: :replace, undef: :replace, replace: '')
|
|
63
65
|
end
|
|
64
66
|
|
|
65
67
|
def agents_section_start
|
|
@@ -144,20 +146,30 @@ module Tramway
|
|
|
144
146
|
|
|
145
147
|
desc 'Installs Tramway dependencies and Tailwind safelist configuration.'
|
|
146
148
|
|
|
149
|
+
# rubocop:disable Metrics/MethodLength
|
|
147
150
|
def ensure_agents_file
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
with_agents_update_fallback do
|
|
152
|
+
say_status(
|
|
153
|
+
:info,
|
|
154
|
+
"Tramway will replace the content between \"#{agents_section_start}\" and " \
|
|
155
|
+
"\"#{agents_section_end}\" in AGENTS.md."
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
return create_file(agents_file_path, "#{agents_template}\n") unless File.exist?(agents_file_path)
|
|
153
159
|
|
|
154
|
-
|
|
160
|
+
content = File.read(agents_file_path)
|
|
161
|
+
updated = replace_agents_section(content)
|
|
162
|
+
return if updated == content
|
|
155
163
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
File.write(agents_file_path, updated, mode: 'w:UTF-8')
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
# rubocop:enable Metrics/MethodLength
|
|
159
168
|
|
|
160
|
-
|
|
169
|
+
def with_agents_update_fallback
|
|
170
|
+
yield
|
|
171
|
+
rescue StandardError => e
|
|
172
|
+
say_status(:warning, "Skipping AGENTS.md update: #{e.message}")
|
|
161
173
|
end
|
|
162
174
|
|
|
163
175
|
def ensure_dependencies
|
data/lib/tramway/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tramway
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.3
|
|
4
|
+
version: 2.1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kalashnikovisme
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-01-
|
|
12
|
+
date: 2026-01-11 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: anyway_config
|