gwtools 0.0.2 → 0.0.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 +4 -4
- data/lib/gwtools/generate/swift.rb +11 -2
- data/lib/gwtools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43e5aaf57e5a1887d0fd602c416c4727a8163296e5cc0cb23c2a3cd6226bcee7
|
4
|
+
data.tar.gz: 72c5d96b01cf73ace17487f392213b6c7e9c186b5c9ecfb82d7884cd11c7d4bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ed11c0b2efadafa7c0564431fc8191a70451b1601ef4603a13078e10b570326c0802a44044f15e80596c12c75765c29c94712c58974fd492756275843307890
|
7
|
+
data.tar.gz: f5eda98e671f387149f20d879efa1aaf5698b7c0544b1224c07f52d50200388daff4fb1171755b7947ce700826929a973d5057163e9efdb1d238919770f5c156
|
@@ -12,7 +12,16 @@ module Gwtools
|
|
12
12
|
attr_accessor :api_name, :this_path
|
13
13
|
|
14
14
|
def config_file
|
15
|
-
ERB.new(File.read('lib/erb/path_url.swift.erb'), nil, '>').result(binding)
|
15
|
+
# ERB.new(File.read('../lib/erb/path_url.swift.erb'), nil, '>').result(binding)
|
16
|
+
template = <<-ERB
|
17
|
+
// 此文件由代码生成,不要任何修
|
18
|
+
|
19
|
+
extension <%="#{@api_name}"%> {
|
20
|
+
// <%="#{@this_path}\n"%>
|
21
|
+
public struct <%="#{@this_path}"%> { }
|
22
|
+
}
|
23
|
+
ERB
|
24
|
+
ERB.new(template, nil, '>').result(binding)
|
16
25
|
end
|
17
26
|
|
18
27
|
def initialize(file_path, api_name, this_path)
|
@@ -31,7 +40,7 @@ module Gwtools
|
|
31
40
|
attr_accessor :api_name, :httpmethod, :prefixPath, :modulePath, :detailPath, :model_name, :model_data
|
32
41
|
|
33
42
|
def config_file
|
34
|
-
ERB.new(File.read('lib/erb/model_req.swift.erb'), nil, '>').result(binding)
|
43
|
+
ERB.new(File.read('../lib/erb/model_req.swift.erb'), nil, '>').result(binding)
|
35
44
|
end
|
36
45
|
|
37
46
|
def initialize(file_path, api_name, httpmethod, prefixPath, modulePath, detailPath, model_name, model_data)
|
data/lib/gwtools/version.rb
CHANGED