tayo 0.1.3 → 0.1.5

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: 0a521c446bb379872cbb6377859c06259df27c3756077986e49c8a782ded5c8d
4
- data.tar.gz: c691860435a9f43468c79604c71b099b6b273635cb82d1a8b7c74a829f1acf6c
3
+ metadata.gz: '098a40d3039dca1ba3223e0685268fcb0e6af7258fa6fd80c51e3904b45ef14b'
4
+ data.tar.gz: 6696721c2aeb3bf6a149dad936f1ede485e875a17720542bdea1b7a2528c6fae
5
5
  SHA512:
6
- metadata.gz: 74fd3a2b85e0798f7c9c6584eb79eca7b397a961d1304d0bf6e6dc1580e93a2ecb934661863a27babdc9a72978e802072bef97eda36f96c98012560bcb17e9d1
7
- data.tar.gz: 1c10ec62c63fc48c2645714713707d009123f5e0a9d7aca5610ec992902745d7b491d79cc367b281c186b41ab275a1c8e8d7c98b356fb3bef79993544fa3aaa1
6
+ metadata.gz: 3b8c06d6c551fb4a31ffb9da180fb7657db9aebc68f5f879ffb950ec57ee2f086a824c89a0124158ddd354dd5f21efb353efaf55ec784042632a463276a13bbd
7
+ data.tar.gz: 974638244f55935524944f2f6ce14455f9c12c77671825094034999ef87e1aaff563b426d8e3f02f389355a242bb1c2d4e3e36af8e5cba3cd73a6b464b869c36
@@ -163,23 +163,40 @@ module Tayo
163
163
  return unless File.exist?("Dockerfile")
164
164
 
165
165
  dockerfile_content = File.read("Dockerfile")
166
-
167
- # bootsnap precompile 관련 라인들을 찾아서 제거
168
- bootsnap_lines = [
169
- "# Precompile bootsnap code for faster boot times",
170
- "RUN bundle exec bootsnap precompile app/ lib/"
171
- ]
172
-
173
- modified = false
174
- bootsnap_lines.each do |line|
175
- if dockerfile_content.include?(line)
176
- dockerfile_content.gsub!(/^.*#{Regexp.escape(line)}.*\n/, "")
177
- modified = true
166
+ original_content = dockerfile_content.dup
167
+
168
+ # Dockerfile을 라인별로 처리
169
+ lines = dockerfile_content.split("\n")
170
+ filtered_lines = []
171
+ skip_next = false
172
+
173
+ lines.each_with_index do |line, index|
174
+ # bootsnap 관련 주석 찾기
175
+ if line.match?(/^\s*#.*bootsnap.*faster boot times/i)
176
+ skip_next = true # 다음 라인도 제거할 준비
177
+ next # 라인은 제거
178
+ end
179
+
180
+ # bootsnap precompile RUN 명령 찾기
181
+ if line.match?(/^\s*RUN.*bootsnap\s+precompile/i)
182
+ skip_next = false # 리셋
183
+ next # 이 라인은 제거
178
184
  end
185
+
186
+ # skip_next가 true이고 현재 라인이 RUN bootsnap이면 제거
187
+ if skip_next && line.match?(/^\s*RUN.*bootsnap/i)
188
+ skip_next = false
189
+ next
190
+ end
191
+
192
+ skip_next = false
193
+ filtered_lines << line
179
194
  end
180
195
 
181
- if modified
182
- File.write("Dockerfile", dockerfile_content)
196
+ new_content = filtered_lines.join("\n") + "\n"
197
+
198
+ if new_content != original_content
199
+ File.write("Dockerfile", new_content)
183
200
  puts "✅ Dockerfile에서 bootsnap precompile 부분을 제거했습니다. (빌드 문제 해결)".colorize(:green)
184
201
  puts " - 이는 알려진 빌드 문제를 방지하기 위함입니다.".colorize(:gray)
185
202
  end
data/lib/tayo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tayo
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tayo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - 이원섭wonsup Lee/Alfonso