sbs 0.1.7 → 0.1.8
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/sbs.rb +18 -11
- data/lib/sbs/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: 340b41d2f5261cc5de537a531b504aa9ee46ea6d64600e4ded3c71e559f48e75
|
|
4
|
+
data.tar.gz: 194677c4d885261179553f16561ebab982e8b8c6a6e4bf4d61b13efae3e6829d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 11a3c8c3c68183246ab0c9dd5e8571967436f5ca7a6606b820088bb2c0dce414c12ae032b367015016bf77bb69d8c679c1b0d6e3bd8530c48efe2b2565334836
|
|
7
|
+
data.tar.gz: 16ada5cd9150bcef611225cfd06a6638471fe73054a592c40162f82bcacf231001b8dd44c0d8755c7ff20ea49f29c50421420c97cdbf71a774f9b77b93258c00
|
data/lib/sbs.rb
CHANGED
|
@@ -199,22 +199,27 @@ module Sbs
|
|
|
199
199
|
puts "*** Customizing '#{chain_name}' ..."
|
|
200
200
|
Find.find(".") do |path|
|
|
201
201
|
if not File.directory? path
|
|
202
|
-
content = `sed "s/Substrate Node Template/#{chain_name.titleize} Node/g" "#{path}"`
|
|
203
|
-
File.open(path, "w") do |f| f.write(content) end
|
|
204
202
|
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
if path.end_with?('README.md')
|
|
204
|
+
content = `sed "s/Substrate Node Template/#{chain_name.titleize} Node/g" "#{path}"`
|
|
205
|
+
File.open(path, "w") do |f| f.write(content) end
|
|
206
|
+
|
|
207
|
+
content = `sed "s/Substrate node/#{chain_name.titleize} node/g" "#{path}"`
|
|
208
|
+
File.open(path, "w") do |f| f.write(content) end
|
|
209
|
+
end
|
|
207
210
|
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
if path.end_with?('main.rs')
|
|
212
|
+
content = `sed "s/Substrate Node/#{chain_name.titleize} Node/g" "#{path}"`
|
|
213
|
+
File.open(path, "w") do |f| f.write(content) end
|
|
214
|
+
end
|
|
210
215
|
|
|
211
|
-
content = `sed "s/node_template/#{chain_name.titleize.gsub(" ", "").underscore}/g" "#{path}"`
|
|
212
|
-
File.open(path, "w") do |f| f.write(content) end
|
|
216
|
+
# content = `sed "s/node_template/#{chain_name.titleize.gsub(" ", "").underscore}/g" "#{path}"`
|
|
217
|
+
# File.open(path, "w") do |f| f.write(content) end
|
|
213
218
|
|
|
214
|
-
|
|
215
|
-
|
|
219
|
+
if path.end_with?('Cargo.toml')
|
|
220
|
+
content = `sed "s/node-template/#{chain_name.titleize.downcase.gsub(" ", "-")}/g" "#{path}"`
|
|
221
|
+
File.open(path, "w") do |f| f.write(content) end
|
|
216
222
|
|
|
217
|
-
if path.end_with?("toml")
|
|
218
223
|
if not author.nil?
|
|
219
224
|
content = `sed "s/Anonymous/#{author}/g" "#{path}"`
|
|
220
225
|
File.open(path, "w") do |f| f.write(content) end
|
|
@@ -223,11 +228,13 @@ module Sbs
|
|
|
223
228
|
if is_branch
|
|
224
229
|
sed = "sed \"s/path = \\\"\\\.\\\.\\\/.*\\\"/git = 'https:\\\/\\\/github.com\\\/paritytech\\\/substrate.git', branch='#{branch_or_commit}'/g\" #{path}"
|
|
225
230
|
else
|
|
231
|
+
puts "fuck............"
|
|
226
232
|
sed = "sed \"s/path = \\\"\\\.\\\.\\\/.*\\\"/git = 'https:\\\/\\\/github.com\\\/paritytech\\\/substrate.git', rev='#{branch_or_commit}'/g\" #{path}"
|
|
227
233
|
end
|
|
228
234
|
content = `#{sed}`
|
|
229
235
|
File.open(path, "w") do |f| f.write(content) end
|
|
230
236
|
end
|
|
237
|
+
|
|
231
238
|
end
|
|
232
239
|
end
|
|
233
240
|
|
data/lib/sbs/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sbs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- wuminzhe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|