lhj-tools 0.1.76 → 0.1.77
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/lhj/command/code/code_template.rb +2 -2
- data/lib/lhj/command/yapi.rb +8 -1
- data/lib/lhj/tools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d672d1cf1227b28c98ba5103e9ee855726948df87cd020304dcfd6e8a6ceee63
|
|
4
|
+
data.tar.gz: 2be43594360da9049569d7c5e1d2f60e68b4a837dce9d4c743f5d326dc2d0a15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '039225bc897b4c4173d42291bd5a008ba0e4d7804d1fe3607357d28d9b10f030cbf9fdbbb60f12734b09c1ead843ed00481fb3e3e3dc3f52d64d7031e7f91cb1'
|
|
7
|
+
data.tar.gz: e39146285cceb19741b7bafead5d63dd422d05f0371838aef011ecf4417c12aee3041d6cd42f1317223b2a2c28ed42ac6232559c70662014c1bd59e71c7ad2aa
|
|
@@ -25,8 +25,8 @@ module Lhj
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def render_template(template_name)
|
|
28
|
-
|
|
29
|
-
Lhj::
|
|
28
|
+
temp = File.read(File.join(File.dirname(__FILE__), 'template', template_name))
|
|
29
|
+
Lhj::ErbTemplateHelper.render(temp, nil, nil)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
end
|
data/lib/lhj/command/yapi.rb
CHANGED
|
@@ -134,11 +134,14 @@ module Lhj
|
|
|
134
134
|
i_url = "#{project_info['data']['basepath']}#{interface_info['data']['path']}"
|
|
135
135
|
username = interface_info['data']['username']
|
|
136
136
|
title = interface_info['data']['title']
|
|
137
|
+
p_id = project_info['data']['_id']
|
|
138
|
+
api_url = api_original_url(p_id)
|
|
137
139
|
temp_vars = upload_info.merge({
|
|
138
140
|
api_id: api_id,
|
|
139
141
|
title: title,
|
|
140
142
|
username: username,
|
|
141
|
-
interface_url: i_url
|
|
143
|
+
interface_url: i_url,
|
|
144
|
+
api_url: api_url
|
|
142
145
|
})
|
|
143
146
|
template = Lhj::ErbTemplateHelper.load('oc_code_notify')
|
|
144
147
|
output = Lhj::ErbTemplateHelper.render(template, temp_vars, '-')
|
|
@@ -153,6 +156,10 @@ module Lhj
|
|
|
153
156
|
"#{@config_base_url}/#{API_PROJECT_URL}#{project_id}"
|
|
154
157
|
end
|
|
155
158
|
|
|
159
|
+
def api_original_url(project_id)
|
|
160
|
+
"#{@config_base_url}/project/#{project_id}/interface/api/#{api_id}"
|
|
161
|
+
end
|
|
162
|
+
|
|
156
163
|
def yml_file
|
|
157
164
|
File.join(Lhj::Config.instance.home_dir, 'yapi.yml')
|
|
158
165
|
end
|
data/lib/lhj/tools/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lhj-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.77
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- lihaijian
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xcodeproj
|