sbs 0.1.5 → 0.1.6

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 (6) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +10 -0
  4. data/lib/sbs/version.rb +1 -1
  5. data/lib/sbs.rb +24 -22
  6. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c09b9e62e269e00ce7a59ea445749a7346ee6e1dfb865a71c35ebd45fac64e20
4
- data.tar.gz: d7a42b7e217af7af1b3e93c14767c2b7c9a761ac4201c0acdb35a0708d4b033f
3
+ metadata.gz: bbaf991750ed33b4d2e3faab2d56bc732beadfd45d282eff434f16ca25b8ed59
4
+ data.tar.gz: 1425a95c9255349801093b727f3276516d810086c635e7a243b43317430a3f38
5
5
  SHA512:
6
- metadata.gz: 41275828fe782399f0be83335d66711c905eefc679ce7d2d9040f13382e2d72d9c9173d908c45e6db45bf53e4a6e47d76e69f766200ffe3193f28484c9962c60
7
- data.tar.gz: 9d4c1747cbc25e69e1a1dedc2dc19914ef3202a9707569e2a9015c5296132cc1465a6122c7503f15fd7e68fa429120a990cbcc2930556228f5f3c257ac6972b1
6
+ metadata.gz: bf34ce54886da3be6cb9801c51a67c144c574bc16a2019e565bbcf0c7f1bc3a4e77bcc890c18beb34cfd195bfccb507bea16255cfa5cabc1f7fffb3fdbd78eb7
7
+ data.tar.gz: 6b4af3fdd7ad20e84e34b8712b703e9e74e30efe75ea1e193aa70609c5f038b21c47f4572b5bb43c5cb7d55ef69aac3d418d7f44a8fc65a82cfb2da44db705d9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sbs (0.1.5)
4
+ sbs (0.1.6)
5
5
  activesupport (~> 5.2.3)
6
6
  colorize (~> 0.8.1)
7
7
  thor (~> 0.20.3)
data/README.md CHANGED
@@ -52,6 +52,16 @@ Or install it yourself as:
52
52
  ```
53
53
 
54
54
  [fzf](https://github.com/junegunn/fzf) is a great command-line fuzzy finder.
55
+ ## examples
56
+
57
+ - update your chain to lastest substrate node template
58
+
59
+ ```
60
+ 1. sbs diff
61
+ 2. Modify your chain based on the results of 'sbs diff'
62
+ 3. do 'cargo update' in your chain dir.
63
+ 4. see what commit your chain depends on with 'sbs check', it must be the lastest substrate commit
64
+ ```
55
65
 
56
66
  ## Development
57
67
 
data/lib/sbs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sbs
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/sbs.rb CHANGED
@@ -35,35 +35,37 @@ module Sbs
35
35
  end
36
36
  end
37
37
 
38
- desc "check", "Check the rust environment and substrate commits used by your project. Do it in your project directory."
38
+ desc "check", "Check the rust environment and substrate version used by your project. Do it in your project directory."
39
39
  def check
40
- puts "Your rust environment:"
41
- puts " default: #{`rustc --version`}"
42
- puts ""
40
+ if `which rustc`.strip != ""
41
+ puts "Your rust environment:"
42
+ puts " default: #{`rustc --version`}"
43
+ puts ""
43
44
 
44
- puts " stable: #{`rustc +stable --version`}"
45
- puts " targets: "
46
- `rustup target list --installed --toolchain stable`.each_line do |line|
47
- puts " #{line}"
48
- end
49
- puts ""
45
+ puts " stable: #{`rustc +stable --version`}"
46
+ puts " targets: "
47
+ `rustup target list --installed --toolchain stable`.each_line do |line|
48
+ puts " #{line}"
49
+ end
50
+ puts ""
50
51
 
51
- puts " nightly: #{`rustc +nightly --version`}"
52
- puts " targets: "
53
- `rustup target list --installed --toolchain nightly`.each_line do |line|
54
- puts " #{line}"
55
- end
56
- puts ""
52
+ puts " nightly: #{`rustc +nightly --version`}"
53
+ puts " targets: "
54
+ `rustup target list --installed --toolchain nightly`.each_line do |line|
55
+ puts " #{line}"
56
+ end
57
+ puts ""
57
58
 
58
- puts " all toolchains: "
59
- `rustup toolchain list`.each_line do |line|
60
- puts " #{line}"
59
+ puts " all toolchains: "
60
+ `rustup toolchain list`.each_line do |line|
61
+ puts " #{line}"
62
+ end
63
+ puts ""
61
64
  end
62
- puts ""
63
65
 
64
- puts "The substrate commit your project depends:"
66
+ puts "The substrate version your project depends:"
65
67
  get_commits.each do |commit|
66
- puts " #{commit}"
68
+ puts "#{commit}"
67
69
  end
68
70
  puts ""
69
71
  end
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - wuminzhe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-09 00:00:00.000000000 Z
11
+ date: 2019-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler