skp 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +0 -0
- data/.gitignore +0 -0
- data/.ruby_version +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +40 -27
- data/HISTORY.md +0 -0
- data/LICENSE +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/lib/skp/README.md +0 -0
- data/lib/skp/cli/bannerlord.rb +2 -2
- data/lib/skp/cli/key.rb +1 -1
- data/lib/skp/cli/quiz.rb +0 -0
- data/lib/skp/cli/sub_command_base.rb +0 -0
- data/lib/skp/cli.rb +1 -1
- data/lib/skp/client.rb +9 -11
- data/lib/skp/client_data.rb +4 -6
- data/lib/skp/gateway.rb +2 -1
- data/lib/skp/version.rb +1 -1
- data/lib/skp.rb +0 -0
- data/skp.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e59f732ddf9f7bc738d978f6ab29c3a13b5d25ef993750a8d45a4978da0f0d83
|
4
|
+
data.tar.gz: d1a46873ecc1d37fa3d4723a0d647f69b3b4b24a514dfd7f859c81ece23e9a92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c63bf7e646d623d65970ae8295f6096526d968657a526b4891137e44506679ba5456386d27795170e8aa8e66615d45b55d78c6de258c98ad3544287d38b2a7b
|
7
|
+
data.tar.gz: 105be466eda2b9e4edfbf1431a4fd8e4ac03b3f0ead00f0f194a7d7280fcca90550a966315144d980b74dc20344b75194ee6f30cc4368ef587e226aa50894f62
|
data/.github/workflows/test.yml
CHANGED
File without changes
|
data/.gitignore
CHANGED
File without changes
|
data/.ruby_version
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
skp (1.0.
|
5
|
-
cli-ui
|
4
|
+
skp (1.0.2)
|
5
|
+
cli-ui (~> 2.1.0)
|
6
6
|
excon
|
7
7
|
thor
|
8
8
|
thor-hollaback
|
@@ -11,42 +11,55 @@ GEM
|
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
13
|
ast (2.4.2)
|
14
|
-
cli-ui (1.
|
15
|
-
excon (0.
|
16
|
-
hollaback (0.1.
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
cli-ui (2.1.0)
|
15
|
+
excon (0.99.0)
|
16
|
+
hollaback (0.1.1)
|
17
|
+
json (2.6.3)
|
18
|
+
language_server-protocol (3.17.0.3)
|
19
|
+
lint_roller (1.0.0)
|
20
|
+
minitest (5.18.0)
|
21
|
+
parallel (1.23.0)
|
22
|
+
parser (3.2.2.1)
|
20
23
|
ast (~> 2.4.1)
|
21
|
-
rainbow (3.
|
24
|
+
rainbow (3.1.1)
|
22
25
|
rake (13.0.6)
|
23
|
-
regexp_parser (2.
|
26
|
+
regexp_parser (2.8.0)
|
24
27
|
rexml (3.2.5)
|
25
|
-
rubocop (1.
|
28
|
+
rubocop (1.50.2)
|
29
|
+
json (~> 2.3)
|
26
30
|
parallel (~> 1.10)
|
27
|
-
parser (>= 3.
|
31
|
+
parser (>= 3.2.0.0)
|
28
32
|
rainbow (>= 2.2.2, < 4.0)
|
29
33
|
regexp_parser (>= 1.8, < 3.0)
|
30
|
-
rexml
|
31
|
-
rubocop-ast (>= 1.
|
34
|
+
rexml (>= 3.2.5, < 4.0)
|
35
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
32
36
|
ruby-progressbar (~> 1.7)
|
33
|
-
unicode-display_width (>=
|
34
|
-
rubocop-ast (1.
|
35
|
-
parser (>= 3.
|
36
|
-
rubocop-performance (1.
|
37
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
38
|
+
rubocop-ast (1.28.0)
|
39
|
+
parser (>= 3.2.1.0)
|
40
|
+
rubocop-performance (1.16.0)
|
37
41
|
rubocop (>= 1.7.0, < 2.0)
|
38
42
|
rubocop-ast (>= 0.4.0)
|
39
|
-
ruby-progressbar (1.
|
40
|
-
standard (1.
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
ruby-progressbar (1.13.0)
|
44
|
+
standard (1.28.0)
|
45
|
+
language_server-protocol (~> 3.17.0.2)
|
46
|
+
lint_roller (~> 1.0)
|
47
|
+
rubocop (~> 1.50.2)
|
48
|
+
standard-custom (~> 1.0.0)
|
49
|
+
standard-performance (~> 1.0.1)
|
50
|
+
standard-custom (1.0.0)
|
51
|
+
lint_roller (~> 1.0)
|
52
|
+
standard-performance (1.0.1)
|
53
|
+
lint_roller (~> 1.0)
|
54
|
+
rubocop-performance (~> 1.16.0)
|
55
|
+
thor (1.2.1)
|
56
|
+
thor-hollaback (0.2.1)
|
57
|
+
hollaback (~> 0.1)
|
46
58
|
thor (>= 0.19.1)
|
47
|
-
unicode-display_width (2.
|
59
|
+
unicode-display_width (2.4.2)
|
48
60
|
|
49
61
|
PLATFORMS
|
62
|
+
aarch64-linux
|
50
63
|
x86_64-darwin-17
|
51
64
|
|
52
65
|
DEPENDENCIES
|
@@ -60,4 +73,4 @@ DEPENDENCIES
|
|
60
73
|
thor-hollaback
|
61
74
|
|
62
75
|
BUNDLED WITH
|
63
|
-
2.2.
|
76
|
+
2.2.33
|
data/HISTORY.md
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/lib/skp/README.md
CHANGED
File without changes
|
data/lib/skp/cli/bannerlord.rb
CHANGED
@@ -23,7 +23,7 @@ module SKP
|
|
23
23
|
%(
|
24
24
|
,---.o | | o o
|
25
25
|
`---..,---|,---.|__/ .,---. .,---.
|
26
|
-
||| ||---'|
|
26
|
+
||| ||---'| || | || |
|
27
27
|
`---'``---'`---'` ```---| `` '
|
28
28
|
|
|
29
29
|
,---. | o
|
@@ -38,7 +38,7 @@ module SKP
|
|
38
38
|
+hmNMMMMMm/` -ymMMNh/
|
39
39
|
sMMMMMMMMMy +MMMMMMMMy ,---.o | | o o
|
40
40
|
yMMMMMMMMMMy` yMMMMMMMMN `---..,---|,---.|__/ .,---. .,---.
|
41
|
-
`dMMMMMMMMMMm:-dMMMMMMm: ||| ||---'|
|
41
|
+
`dMMMMMMMMMMm:-dMMMMMMm: ||| ||---'| || | || |
|
42
42
|
`sNMMMMMMMMMMs.:+sso:` `---'``---'`---'` ```---| `` '
|
43
43
|
:dMMMMMMMMMMm/ |
|
44
44
|
:oss+:.sNMMMMMMMMMMy` ,---. | o
|
data/lib/skp/cli/key.rb
CHANGED
@@ -9,7 +9,7 @@ module SKP
|
|
9
9
|
if client.register_email(email)
|
10
10
|
say "Key registered with #{email}. You should receive a Slack invite soon."
|
11
11
|
else
|
12
|
-
say "Key has already been registered. If you believe this is in error,"\
|
12
|
+
say "Key has already been registered. If you believe this is in error," \
|
13
13
|
" please email support@speedshop.co"
|
14
14
|
end
|
15
15
|
end
|
data/lib/skp/cli/quiz.rb
CHANGED
File without changes
|
File without changes
|
data/lib/skp/cli.rb
CHANGED
@@ -262,7 +262,7 @@ module SKP
|
|
262
262
|
|
263
263
|
def warn_if_already_started
|
264
264
|
return unless client.setup?
|
265
|
-
exit(0) unless ::CLI::UI.confirm "You have already started the workshop. Continuing "\
|
265
|
+
exit(0) unless ::CLI::UI.confirm "You have already started the workshop. Continuing " \
|
266
266
|
"this command will wipe all of your current progress. Continue?", default: false
|
267
267
|
end
|
268
268
|
|
data/lib/skp/client.rb
CHANGED
@@ -31,19 +31,17 @@ module SKP
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def list
|
34
|
-
@list ||=
|
35
|
-
|
36
|
-
client_data["content_cache_generated"] >= Time.now - 60 * 60
|
34
|
+
@list ||= if client_data["content_cache_generated"] &&
|
35
|
+
client_data["content_cache_generated"] >= Time.now - 60 * 60
|
37
36
|
|
37
|
+
client_data["content_cache"]
|
38
|
+
else
|
39
|
+
begin
|
40
|
+
client_data["content_cache"] = gateway.list_content
|
41
|
+
client_data["content_cache_generated"] = Time.now
|
38
42
|
client_data["content_cache"]
|
39
|
-
|
40
|
-
|
41
|
-
client_data["content_cache"] = gateway.list_content
|
42
|
-
client_data["content_cache_generated"] = Time.now
|
43
|
-
client_data["content_cache"]
|
44
|
-
rescue
|
45
|
-
client_data["content_cache"] || (raise Error.new("No internet connection"))
|
46
|
-
end
|
43
|
+
rescue
|
44
|
+
client_data["content_cache"] || (raise Error.new("No internet connection"))
|
47
45
|
end
|
48
46
|
end
|
49
47
|
end
|
data/lib/skp/client_data.rb
CHANGED
@@ -18,7 +18,7 @@ module SKP
|
|
18
18
|
data[key] = value
|
19
19
|
|
20
20
|
begin
|
21
|
-
File.
|
21
|
+
File.write(filestore_location, YAML.dump(data))
|
22
22
|
rescue
|
23
23
|
# raise Error, "The SKP data at #{filestore_location} is not writable. \
|
24
24
|
# Check your file permissions."
|
@@ -62,11 +62,9 @@ module SKP
|
|
62
62
|
|
63
63
|
def data
|
64
64
|
@data ||= begin
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
{}
|
69
|
-
end
|
65
|
+
YAML.safe_load(File.read(filestore_location), permitted_classes: [Time]) || {}
|
66
|
+
rescue Errno::ENOENT
|
67
|
+
{}
|
70
68
|
end
|
71
69
|
end
|
72
70
|
end
|
data/lib/skp/gateway.rb
CHANGED
@@ -31,7 +31,8 @@ module SKP
|
|
31
31
|
downloaded_file = File.open("#{folder}/#{content["s3_key"]}.partial", "w")
|
32
32
|
streamer = lambda do |chunk, remaining_bytes, total_bytes|
|
33
33
|
downloaded_file.write(chunk)
|
34
|
-
|
34
|
+
finished = (remaining_bytes.to_f / total_bytes.to_f)
|
35
|
+
bar.tick(set_percent: (1 - finished).round(2))
|
35
36
|
end
|
36
37
|
response = Excon.get(content["url"], response_block: streamer)
|
37
38
|
unless response.status == 200
|
data/lib/skp/version.rb
CHANGED
data/lib/skp.rb
CHANGED
File without changes
|
data/skp.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Berkopec
|
@@ -56,16 +56,16 @@ dependencies:
|
|
56
56
|
name: cli-ui
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 2.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 2.1.0
|
69
69
|
description:
|
70
70
|
email:
|
71
71
|
- nate@speedshop.co
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '0'
|
121
121
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.3.20
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: A CLI for Sidekiq in Practice.
|