tidpd 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/tidpd.rb +14 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 921c10f1af7cc49560a10bbd11acef1c8af4ed397c10fecd9d8c25f6ca5213f4
4
- data.tar.gz: 328358b330a5cf3ba4eb062b91224f77818792fa5bd28ffb5e7b549d1feef3b4
3
+ metadata.gz: 036aa6a30e93cff53110c051dd141b716467a8af2227d2124a02dd2b9ea1eb93
4
+ data.tar.gz: 7c0f9457bbe5258b53c5ec2e36f2ddd60c833210bde2d9d9bf758d861a0a658f
5
5
  SHA512:
6
- metadata.gz: d8fb9df2e049566cc93b65bc87a82bb744a032400d6e8788bb133b967dde4dded7ad725d4bd3952fb35ea23f33c8ae034f0732814a22e9f65253f8fa7d790f1a
7
- data.tar.gz: 7476b2720ecf860e18ade3f347646ef41225c0e2e6d86d6ccf443d89c99442929f45e9110497e36cc3c5be9cce7b747463fd2082269314547275ff8adaed00f3
6
+ metadata.gz: 1832e030eedb46853ef158ff2bc3c623eda0bee16e51b30aa64a0175eb6c93ad450aeacf57db12c8d98795cf2f618c63669f3b48dd543c4cfd0384be0163a86a
7
+ data.tar.gz: a831f268c488ae423bc1556d7266d77ab506f35f4597f087e5a8ef5fb15768720bd6671cffbf511bb2fc50e51d37f652e307ab8759b5233213ce51a2ba114402
data/lib/tidpd.rb CHANGED
@@ -2127,32 +2127,32 @@ class Wordpress
2127
2127
  button(' 폴더째로 불러오기 ') {
2128
2128
 
2129
2129
  on_clicked {
2130
- begin
2131
2130
  path = @data['디엠설정']['폴더경로'].text.to_s.force_encoding('utf-8').force_encoding('utf-8')
2132
2131
 
2133
- if Dir.exists?(path) # 경로가 존재하는지 확인
2132
+ # 경로가 유효한지 확인
2133
+ if Dir.exist?(path)
2134
2134
  Dir.entries(path).each do |file|
2135
- # '.' '..'을 제외한 파일들만 처리
2136
- if file != '.' and file != '..'
2135
+ if file == '.' or file == '..'
2136
+ next
2137
+ else
2137
2138
  begin
2138
- file_data = File.open(path+'/'+file, 'r', encoding: 'utf-8').read()
2139
- @data['디엠설정']['내용'] << [false, file, file_data]
2139
+ # 파일을 열고 내용을 읽어서 추가
2140
+ file_data = File.open(path + '/' + file, 'r', encoding: 'utf-8').read
2141
+ @data['디엠설정']['디엠'] << [false, file, file_data]
2140
2142
  rescue => e
2141
- # 파일 열기 오류 처리
2142
- puts "파일 '#{file}'을 열 수 없습니다: #{e.message}"
2143
+ # 파일을 수 없는 경우, 오류 메시지 출력
2144
+ puts "파일을 열 수 없습니다: #{file}, 오류: #{e.message}"
2143
2145
  end
2144
2146
  end
2145
2147
  end
2148
+
2149
+ # 내용 배열에서 마지막 빈 항목 제거
2146
2150
  @data['디엠설정']['디엠'] << []
2147
2151
  @data['디엠설정']['디엠'].pop
2148
2152
  else
2149
- # 경로가 없으면 경고 메시지 출력
2150
- puts "경로 '#{path}'이 존재하지 않습니다."
2153
+ # 경로가 유효하지 않을 경우, 오류 메시지 출력
2154
+ puts "경로가 존재하지 않습니다: #{path}"
2151
2155
  end
2152
- rescue => e
2153
- # 경로 처리 중 발생한 오류 처리
2154
- puts "오류 발생: #{e.message}"
2155
- end
2156
2156
  }
2157
2157
  }
2158
2158
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidpd
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