cr.rb 3.18.2 → 3.19.0

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cr +15 -4
  3. data/lib/cr.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca8565c920ad88810679a65744a52f0c9497ef3a75bab525fae5b501349912b7
4
- data.tar.gz: f6d7f3c3f85caa6382f13492a94a34725600cb5ea57757442cd76a9b69360461
3
+ metadata.gz: dabeb694d7888667b8f6ad18823d22eb7e1bd158e62a9269de719cdf93a067ca
4
+ data.tar.gz: e212e83a3f48df3937ed3d225e3792a72218cbbddd9b758d147b65d4e97a7153
5
5
  SHA512:
6
- metadata.gz: 7c0482249c89b01522d0cb563fe4e0e647c4c4cbb602090fb1ba740fc366c892c039b02242987031494b6077df0365ff5416ccb00eb61b929a085760349f5a00
7
- data.tar.gz: c775012412a10c1fea53f43055f7bd95add6ba9954327d77f182f157556c346de160855348847004aa634700494bdc486eed937b632ae1b5cac31c0c90ca1da4
6
+ metadata.gz: fd749eb80cab8a8b6cd59747e01808e76e2a8703de6ce4b2994703cee2e0869ed1ff272457294bb68efd238755fc45f0570745fd05ccc4abe0885f0c64030e17
7
+ data.tar.gz: ac1f296da503c11a13ea7b9e49d7a2ba31df967151da0558e5eb4aa4e48864737919ac6cc796797ee02872467da31b991192d6a55136c3c472d485a58be38c37
data/bin/cr CHANGED
@@ -158,6 +158,11 @@ def add_dict(repo)
158
158
  # Ensure the cr home dir exists
159
159
  FileUtils.mkdir_p(CRYPTIC_RESOLVER_HOME)
160
160
 
161
+ # Simplify adding dictionary
162
+ if !repo.start_with?("https://") and !repo.start_with?("git@")
163
+ repo = "https://github.com/#{repo}.git"
164
+ end
165
+
161
166
  begin
162
167
  puts "cr: Adding new dictionary..."
163
168
  `git -C #{CRYPTIC_RESOLVER_HOME} clone #{repo} -q`
@@ -237,7 +242,11 @@ def pp_info(info)
237
242
 
238
243
  if see_also = info['see']
239
244
  print "\n", purple("SEE ALSO ")
240
- see_also.each {|x| print underline(x),' '}
245
+ if see_also.is_a?(Array)
246
+ see_also.each {|x| print underline(x),' '}
247
+ else
248
+ print underline(see_also),' '
249
+ end
241
250
  puts
242
251
  end
243
252
  puts
@@ -582,15 +591,17 @@ def help
582
591
  cr: Cryptic Resolver v#{CR_GEM_VERSION} (#{$WordCount} words: default/#{$DefaultWordCount} user/#{user_words})
583
592
 
584
593
  usage:
585
- cr -v => Print version
586
- cr -h => Print this help
594
+
595
+ cr emacs => Edit macros: a feature-rich editor
587
596
  cr -c => Print word count
588
597
  cr -l => List local dictionaries
589
598
  cr -u => Update all dictionaries
590
599
  cr -a repo.git => Add a new dictionary
600
+ cr -a user/repo => Add a new dictionary on Github
591
601
  cr -d cryptic_xx => Delete a dictionary
592
602
  cr -s pattern => Search words matched with pattern
593
- cr emacs => Edit macros: a feature-rich editor
603
+ cr -v => Print version
604
+ cr -h => Print this help
594
605
 
595
606
  HELP
596
607
 
data/lib/cr.rb CHANGED
@@ -10,4 +10,4 @@
10
10
  #
11
11
  # ------------------------------------------------------
12
12
 
13
- CR_GEM_VERSION = "3.18.2"
13
+ CR_GEM_VERSION = "3.19.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cr.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.18.2
4
+ version: 3.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ccmywish