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: 92a090294d94e95de5522b38fd15210388522bdcdd31844fd47d091b7b208011
4
- data.tar.gz: 06c9928adff35d27dd6bcc92c99fdee5e9d48f7753186309baa46d5999505d8d
3
+ metadata.gz: 245489e489d0ca443ee942849812804c4e781764ffadb07a2448f8d0fdccbbb0
4
+ data.tar.gz: 2dfb246c296c6651e38da16eb02e404ec368d877660776848bb8beb0d892866e
5
5
  SHA512:
6
- metadata.gz: 790773b5ff343ca1eb92629215e39f722a1c4638133ca44960a317ad1b9e7805107ba1beed6cc1c597585314e3fe78027fabc8f266515e9aabded6b721f4bde7
7
- data.tar.gz: e0d6ef70d2a1769736343a1104dbdade1aec992e52e604453f495b094f28fd8287dba0d62d52fb063905b9d9c6fa46c28feb65b29f743ab96640a502979d6ba2
6
+ metadata.gz: fd0430f2a599277c3f1aa987060cde15cebe893068a8ce08704de8e976195192fe22de84a4a2e3c6b543151d023511622ab5085caf27c92bf518a1bfbf7a4fa5
7
+ data.tar.gz: f1d2c6c7cdbbace83d16573dcd2b5ac21775336ffcb86c4aefa639ed6ca4cee512a3eeac72ea02873d9b6b20de8d3231bb89624add12ea259d370d2d7e96450c
@@ -17,7 +17,7 @@ module Tailwinds
17
17
  def size_classes
18
18
  {
19
19
  small: 'text-sm py-1 px-2 rounded',
20
- middle: 'py-2 px-4',
20
+ middle: 'py-2 px-4 h-10',
21
21
  large: 'text-lg px-5 py-3'
22
22
  }[size]
23
23
  end
@@ -118,6 +118,7 @@ module.exports = {
118
118
  'whitespace-nowrap',
119
119
  'h-fit',
120
120
  'gap-1',
121
+ 'h-10',
121
122
 
122
123
  // === Button color presets ===
123
124
  'bg-gray-500',
@@ -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
- @agents_template_body = response.body.to_s
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
- say_status(
149
- :info,
150
- "Tramway will replace the content between \"#{agents_section_start}\" and " \
151
- "\"#{agents_section_end}\" in AGENTS.md."
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
- return create_file(agents_file_path, "#{agents_template}\n") unless File.exist?(agents_file_path)
160
+ content = File.read(agents_file_path)
161
+ updated = replace_agents_section(content)
162
+ return if updated == content
155
163
 
156
- content = File.read(agents_file_path)
157
- updated = replace_agents_section(content)
158
- return if updated == content
164
+ File.write(agents_file_path, updated, mode: 'w:UTF-8')
165
+ end
166
+ end
167
+ # rubocop:enable Metrics/MethodLength
159
168
 
160
- File.write(agents_file_path, updated)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tramway
4
- VERSION = '2.1.3'
4
+ VERSION = '2.1.3.1'
5
5
  end
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-10 00:00:00.000000000 Z
12
+ date: 2026-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: anyway_config