cr.rb 4.1.6 → 4.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/cr/version.rb +2 -2
- data/lib/cr.rb +8 -5
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89ce3aed62f15283543a6e4b5822b5d807970afffb447e5bf575618ecaf6b3fb
|
4
|
+
data.tar.gz: f422ddc48d6b28bc313d04024a1ac8debb6c00a52bb06644a2047fe6a8185c1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6a2b34297f35639d1447235688cf4d71127c450fd4a88abd77b341c59bfc6f2a62e1117ffa76692d4571546e772183bc11cb1ad0aa81832d32b4f883d0c6ff
|
7
|
+
data.tar.gz: eaf2b03a13c2cebb8c5d8f4ed04acf26dbfab3f32e79d2dcc0e0cb149ff5ce33d7f6d716458430bbf9027657a6bbc064e70fb97183f4900028f515ddea68ba9d
|
data/lib/cr/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# File : version.rb
|
3
3
|
# Authors : Aoran Zeng <ccmywish@qq.com>
|
4
4
|
# Created on : <2023-02-12>
|
5
|
-
# Last modified : <2023-
|
5
|
+
# Last modified : <2023-08-15>
|
6
6
|
#
|
7
7
|
# version:
|
8
8
|
#
|
@@ -11,6 +11,6 @@
|
|
11
11
|
|
12
12
|
module CrypticResolver
|
13
13
|
|
14
|
-
GEM_VERSION = "4.1.
|
14
|
+
GEM_VERSION = "4.1.8"
|
15
15
|
|
16
16
|
end
|
data/lib/cr.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# File : cr.rb
|
3
3
|
# Authors : Aoran Zeng <ccmywish@qq.com>
|
4
4
|
# Created on : <2022-04-15>
|
5
|
-
# Last modified : <2023-
|
5
|
+
# Last modified : <2023-08-15>
|
6
6
|
#
|
7
7
|
# cr:
|
8
8
|
#
|
@@ -80,7 +80,9 @@ class CrypticResolver::Resolver
|
|
80
80
|
|
81
81
|
begin
|
82
82
|
puts "cr: Adding new dictionary..."
|
83
|
-
|
83
|
+
# Note that, we must add "" to surround the dir
|
84
|
+
# Because some path (e.g. macOS) will have spaces
|
85
|
+
`git -C "#{DEFAULT_LIB_PATH}" clone #{repo} -q`
|
84
86
|
rescue Interrupt
|
85
87
|
abort "cr: Cancel add dict"
|
86
88
|
end
|
@@ -541,10 +543,11 @@ class CrypticResolver::Resolver
|
|
541
543
|
|
542
544
|
require 'tomlrb'
|
543
545
|
require 'fileutils'
|
546
|
+
require 'standard_path'
|
544
547
|
|
545
548
|
# attr_accessor :default_dicts # Default dictionaries lists
|
546
549
|
|
547
|
-
DEFAULT_LIB_PATH =
|
550
|
+
DEFAULT_LIB_PATH = StandardPath.app_data 'Cryptic-Resolver'
|
548
551
|
|
549
552
|
ORIGINAL_DEFAULT_DICTS = [
|
550
553
|
"https://github.com/cryptic-resolver/cryptic_common.git",
|
@@ -640,14 +643,14 @@ class CrypticResolver::Resolver
|
|
640
643
|
# Windows doesn't have fork
|
641
644
|
dicts_user_and_names.each_with_index do |name, i|
|
642
645
|
puts "cr: Pulling #{name}..."
|
643
|
-
`git -C #{DEFAULT_LIB_PATH} clone #{@def_dicts[i]} -q`
|
646
|
+
`git -C "#{DEFAULT_LIB_PATH}" clone #{@def_dicts[i]} -q`
|
644
647
|
end
|
645
648
|
else
|
646
649
|
# *nix-like
|
647
650
|
dicts_user_and_names.each_with_index do |name, i|
|
648
651
|
fork do
|
649
652
|
puts "cr: Pulling #{name}..."
|
650
|
-
`git -C #{DEFAULT_LIB_PATH} clone #{@def_dicts[i]} -q`
|
653
|
+
`git -C "#{DEFAULT_LIB_PATH}" clone #{@def_dicts[i]} -q`
|
651
654
|
end
|
652
655
|
end
|
653
656
|
Process.waitall
|
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.
|
4
|
+
version: 4.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aoran Zeng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tomlrb
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standard_path
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.1'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.1'
|
55
69
|
description: |
|
56
70
|
This command line tool `cr` is used to record and explain cryptic commands, acronyms(initialism), abbreviations and so forth in daily life.
|
57
71
|
Not only can it be used in computer filed via our default sheet cryptic_computer, but also you can use this to manage your own knowledge base easily.
|