cr.rb 4.1.3 → 4.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cr +17 -10
  3. data/lib/cr/version.rb +2 -2
  4. data/lib/cr.rb +4 -5
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 572931031815b1f284c44e722df17147b330a853439f79f0953946bfb42bb69d
4
- data.tar.gz: 653b3090e8f85a8b962d3d62d0a3a5e362e65c4abb5db506b7b2d2091ff343ab
3
+ metadata.gz: 624c2bec73d0e1c7af063aec76ce582a38a2b73c56d8680a3d67a8f293b8695b
4
+ data.tar.gz: 49b1c1aa5c178087d94e70d3110c7a7e3b479478723be80c5ff67467c05d1634
5
5
  SHA512:
6
- metadata.gz: f105ec4f493687a15e205b8ded554172a47369c5ed61a4dd0139ca335005cb73d56284c8bd881acb6f50b62fe89ae9a996a9dacecfaf0a1d0bffa53d107036bd
7
- data.tar.gz: db01b4bdcc86d62017d043db81c561e1f5e14b56931aeaacf820b31c7f9ee8d524912dd0bdb78ef0ea011f4eb8697e8e6cd090a15e8b7888e14798a6ae060128
6
+ metadata.gz: 83b2810d78b2081006474f50df69ab8765327c8c9715d491204548ac4bd5f0c17edb30c5b551a9d30c0d825d93b8d709258a13dc359aa3fce9c9e9c0379893dd
7
+ data.tar.gz: 98c6ac9a3eb0273097d24144013477c7d11cc20ed3818ac79c1779e72b0aad932573b0e39bda08ac1c8c14588ab6929dc2bad6e920e7e287df6e0454b15db9be
data/bin/cr CHANGED
@@ -3,7 +3,7 @@
3
3
  # File : cr.rb
4
4
  # Authors : ccmywish <ccmywish@qq.com>
5
5
  # Created on : <2021-07-08>
6
- # Last modified : <2023-02-13>
6
+ # Last modified : <2023-03-22>
7
7
  #
8
8
  # cr:
9
9
  #
@@ -556,24 +556,31 @@ A info looks like this
556
556
  # 2. List Extra library's dicts
557
557
  # 3. List official dicts
558
558
  def list_dicts
559
- Dir.chdir DEFAULT_LIB_PATH do
560
- puts blue("=> Default library: #{DEFAULT_LIB_PATH}")
561
- Dir.children(DEFAULT_LIB_PATH).each_with_index do |dict,i|
562
- puts "#{blue(i+1)}. #{bold(green(dict))}"
559
+
560
+ def _do_the_same_thing
561
+ count = 0
562
+ Dir.children(".").each do |dict|
563
+ next if File.file? dict
564
+ count += 1
565
+ prefix = (count.to_s + '.').ljust 4
566
+ puts " #{prefix}#{dict}"
563
567
  end
564
568
  end
565
569
 
570
+ Dir.chdir DEFAULT_LIB_PATH do
571
+ puts bold(green("Default library: #{DEFAULT_LIB_PATH}"))
572
+ _do_the_same_thing
573
+ end
574
+
566
575
  if @extra_lib_path
567
576
  puts
568
577
  Dir.chdir @extra_lib_path do
569
- puts blue("=> Extra library: #{@extra_lib_path}")
570
- Dir.children(@extra_lib_path).each_with_index do |dict,i|
571
- puts "#{blue(i+1)}. #{bold(green(dict))}"
572
- end
578
+ puts bold(green("Extra library: #{@extra_lib_path}"))
579
+ _do_the_same_thing
573
580
  end
574
581
  end
575
582
 
576
- puts ; puts blue("=> Official dicts: (Add it by 'cr -a xxx')")
583
+ puts ; puts bold(green("Official dictionaries: (Add it by 'cr -a xxx')"))
577
584
  puts RECOMMENDED_DICTS
578
585
  end
579
586
 
data/lib/cr/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # File : version.rb
3
3
  # Authors : ccmywish <ccmywish@qq.com>
4
4
  # Created on : <2023-02-12>
5
- # Last modified : <2023-02-13>
5
+ # Last modified : <2023-03-22>
6
6
  #
7
7
  # version:
8
8
  #
@@ -11,6 +11,6 @@
11
11
 
12
12
  module CrypticResolver
13
13
 
14
- GEM_VERSION = "4.1.3"
14
+ GEM_VERSION = "4.1.4"
15
15
 
16
16
  end
data/lib/cr.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # File : cr.rb
3
3
  # Authors : ccmywish <ccmywish@qq.com>
4
4
  # Created on : <2022-04-15>
5
- # Last modified : <2023-02-13>
5
+ # Last modified : <2023-03-22>
6
6
  #
7
7
  # cr:
8
8
  #
@@ -55,15 +55,14 @@ class CrypticResolver::Resolver
55
55
  linux technology
56
56
 
57
57
  #{yellow("Field:")}
58
- electronics economy medicine
59
- mechanical science math
58
+ economy medicine electronics
59
+ science math
60
60
 
61
61
  #{yellow("Specific:")}
62
- dos x86 signal
62
+ x86 signal
63
63
 
64
64
  #{yellow("Feature:")}
65
65
  ccmywish/CRuby-Source-Code-Dictionary
66
- ccmywish/mruby-Source-Code-Dictionary
67
66
 
68
67
  EOF
69
68
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cr.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.3
4
+ version: 4.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aoran Zeng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-13 00:00:00.000000000 Z
11
+ date: 2023-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tomlrb
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubygems_version: 3.4.1
74
+ rubygems_version: 3.4.8
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: 'cr: Cryptic Resolver'