gwtools 0.0.12 → 0.0.14

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: 670dd9b4a0d32ab1e294c84b78c12ee087ccaf95968656746aeb14083ed2d714
4
- data.tar.gz: 05e0d47a0d97bcf2c5d61b238bc84997082fb1c843b363931da452a24be91afa
3
+ metadata.gz: 578a4b3c9661d4f9abcb537ff04fa85f9fe4539511f6146a86e51395bf0d4594
4
+ data.tar.gz: 84186267dcd12996e6383d0042fbc73d442a9d9e38e444b01b564ddd2453b331
5
5
  SHA512:
6
- metadata.gz: 2c158030a8039e03495ad4629e2ab14702fbcd65b392325c73a961af601addea3300f3527c61edae47158a506d3df49472c2405e42fff42d1ae9c4e9d2c0734f
7
- data.tar.gz: 6051e050e2b3baf2802f23f1a78b3a3877da7e99def5747299998ddda908d82801de0c108d36ef6b8e1eacc67716634144a31e0abf262ae7d7400f4a439e9afd
6
+ metadata.gz: ffec173635df34cfdb8f2546c49382ddabb461d07ae322bac0aad46855f414462d6bbc3bdbd8fb1574dcb5cd1639745cab3446f522c8f9d6cb918f29a23deab9
7
+ data.tar.gz: 6ad68012b9573bed42efc66b5a8dea87db70b16af339331dc56cc3d5900f6c7a3f375513995791eb1bdd114fcf045fedaaf86bd2061ad7c791ae39c4567a913d
@@ -154,9 +154,11 @@ public extension <%="#{@api_name}"%> {
154
154
  FileUtils.mkdir_p(target_path + "/#{pre_name}") unless File.directory?(target_path + "/#{pre_name}")
155
155
 
156
156
  # 从 .swift 文件读取 enum
157
- Parser.extract_from(target_swift_file)
158
- json1Hash = JSON.parse(Parser.get_clear_enums.to_json)
159
-
157
+ json1Hash = {}
158
+ if File.exist?(target_swift_file)
159
+ Parser.extract_from(target_swift_file)
160
+ json1Hash = JSON.parse(Parser.get_clear_enums.to_json)
161
+ end
160
162
  # 从 url 解析 enum
161
163
  url_enum = Parser.enum_from_url(url)
162
164
  json2Hash = {url_enum.enum_name.to_sym => url_enum}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gwtools
4
- VERSION = "0.0.12"
4
+ VERSION = "0.0.14"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gwtools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - chenglq