tiupd 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tiupd.rb +23 -23
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 74e50affdeb088755b030f71ec95923c9b6e88fb304871e24fe8ad6fb63bf123
4
- data.tar.gz: 6d26320c43b32e44fac54402744c777370b61bd60507c37115d6456a66a75f9d
3
+ metadata.gz: a41726f93df2db3b90b5d4f502744dfc8f36581b00b094dd2225c86b16bd760b
4
+ data.tar.gz: 8df09a7a38bac32622624e707d9934eaa87dea1391e73f564aa61b7f9cda5661
5
5
  SHA512:
6
- metadata.gz: 5d092e8643388bc8eceff8c9dd1ddffcb54249925ca28eb3a86c73543548da984b0e3ff4a42de87a639feca6cfa3ba2b7f30d33d8884db7f738e62195e0939ce
7
- data.tar.gz: 43af93bcc6f24b572ba59c6047707d739a59f77d65b41c0db5721e3a8701c5931f3ba650184095a1f21ff6405390d6fb5e621129d1955fc6c09c61eaf07f357f
6
+ metadata.gz: 7cdacbf16ec6d55f8cf1ebf6fcad6e23bb5c28165fb6eefd318b19cdfd681417537e299b32123f4e1ae5fc3145307214bd191e6465c3e58c7ca2dd9a812a2fc1
7
+ data.tar.gz: 6ae1ee97f0f4d27bef1bdb5261b115f2db3f7a0bb236128539a78f52eb310ff5f361ef16317ed56aba0a50135c4e5a0681c0f180b6675054b9f411a895c47ae4
data/lib/tiupd.rb CHANGED
@@ -2393,33 +2393,33 @@ class Wordpress
2393
2393
  button(' 폴더째로 불러오기 ') {
2394
2394
 
2395
2395
  on_clicked {
2396
- begin
2397
- path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2398
-
2399
- if Dir.exists?(path) # 경로가 존재하는지 확인
2400
- Dir.entries(path).each do |file|
2401
- # '.' '..'을 제외한 파일들만 처리
2402
- if file != '.' and file != '..'
2403
- begin
2404
- file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
2405
- @data['디엠설정']['내용'] << [false, file, file_data]
2406
- rescue => e
2407
- # 파일 열기 오류 처리
2408
- puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
2409
- end
2396
+ path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2397
+
2398
+ # 경로가 유효한지 확인
2399
+ if Dir.exist?(path)
2400
+ Dir.entries(path).each do |file|
2401
+ if file == '.' or file == '..'
2402
+ next
2403
+ else
2404
+ begin
2405
+ # 파일을 열고 내용을 읽어서 추가
2406
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
2407
+ @data['디엠설정']['디엠'] << [false, file, file_data]
2408
+ rescue => e
2409
+ # 파일을 열 수 없는 경우, 오류 메시지 출력
2410
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
2410
2411
  end
2411
2412
  end
2412
- @data['디엠설정']['디엠'] << []
2413
- @data['디엠설정']['디엠'].pop
2414
- else
2415
- # 경로가 없으면 경고 메시지 출력
2416
- puts "경로 '#{path}'이 존재하지 않습니다."
2417
2413
  end
2418
- rescue => e
2419
- # 경로 처리 발생한 오류 처리
2420
- puts "오류 발생: #{e.message}"
2414
+
2415
+ # 내용 배열에서 마지막 항목 제거
2416
+ @data['디엠설정']['디엠'] << []
2417
+ @data['디엠설정']['디엠'].pop
2418
+ else
2419
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
2420
+ puts "경로가 존재하지 않습니다: #{path}"
2421
2421
  end
2422
- }
2422
+ }
2423
2423
  }
2424
2424
  }
2425
2425
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiupd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - zon
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-30 00:00:00.000000000 Z
10
+ date: 2025-05-01 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: File to Clipboard gem
13
13
  email: mymin26@naver.com