tizdppz 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/tizdppz.rb +15 -15
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c0c7e4d51d1caac31dcea017bc86a8b749c932cb5d1b7f908e2ea9d76062b02
4
- data.tar.gz: 7164e83bc386af14258a22836af235ba23b784724d6472054b6cbdfd64d041a0
3
+ metadata.gz: 48e51bf5b38c1f0e0cc9fb1e7e628a17bae1f334250af9fba168bd949f72ae53
4
+ data.tar.gz: ad28043a564db167cfcc6d14d676b186ab31a444e7ecd474a2a1e9c298991208
5
5
  SHA512:
6
- metadata.gz: 1193776959a719660cb88a7aa20d847d13c4f9604ea3cdee6c4196e24eebc34b8b732a7511978bd6a3cbef0c1e11d8e933bd1685646ddf484d639727a28016d6
7
- data.tar.gz: cf67426d9db4a295254d38ebd1d48a9c0326f395b4c2658970fa1f6c54ac348351add6ecd68da2e4ec79938b8bdcfa5174ea502007843b0ccb39649f54a6aab2
6
+ metadata.gz: aaf96d1c2ad4cd6ecb6934fca7d7a1f39d42ae5cd511c1ce2086c20431b8f9036ce709e646ffae01b24407bb9d0f50a2c28cd8aa65c28c3dc6fb49272435e2d6
7
+ data.tar.gz: 7fef59f972689e6669aacab70a7dd434bab1fcf2fda07c924c8e3564fff1cd44d812bca9240f97cb362cfccba9014c970e3ce1be93bbcc79d182de8527199fdb
data/lib/tizdppz.rb CHANGED
@@ -2145,33 +2145,33 @@ end
2145
2145
  }
2146
2146
  button(' 폴더째로 불러오기 ') {
2147
2147
 
2148
- on_clicked {
2149
- begin
2148
+ on_clicked {
2150
2149
  path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2151
2150
 
2152
- if Dir.exists?(path) # 경로가 존재하는지 확인
2151
+ # 경로가 유효한지 확인
2152
+ if Dir.exist?(path)
2153
2153
  Dir.entries(path).each do |file|
2154
- # '.' '..'을 제외한 파일들만 처리
2155
- if file != '.' and file != '..'
2154
+ if file == '.' or file == '..'
2155
+ next
2156
+ else
2156
2157
  begin
2157
- file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
2158
- @data['디엠설정']['내용'] << [false, file, file_data]
2158
+ # 파일을 열고 내용을 읽어서 추가
2159
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
2160
+ @data['디엠설정']['디엠'] << [false, file, file_data]
2159
2161
  rescue => e
2160
- # 파일 열기 오류 처리
2161
- puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
2162
+ # 파일을 수 없는 경우, 오류 메시지 출력
2163
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
2162
2164
  end
2163
2165
  end
2164
2166
  end
2167
+
2168
+ # 내용 배열에서 마지막 빈 항목 제거
2165
2169
  @data['디엠설정']['디엠'] << []
2166
2170
  @data['디엠설정']['디엠'].pop
2167
2171
  else
2168
- # 경로가 없으면 경고 메시지 출력
2169
- puts "경로 '#{path}'이 존재하지 않습니다."
2172
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
2173
+ puts "경로가 존재하지 않습니다: #{path}"
2170
2174
  end
2171
- rescue => e
2172
- # 경로 처리 중 발생한 오류 처리
2173
- puts "오류 발생: #{e.message}"
2174
- end
2175
2175
  }
2176
2176
  }
2177
2177
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tizdppz
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