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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8556d9d1dd0fd40fc6ed8c292f84e6412b7e8b621f46b6f8ee8fcbb7e0662b5
4
- data.tar.gz: 0b626d3704014cdc29fac7e79a3096d77d6b57c21c970d94d0bf3bbe48ad8738
3
+ metadata.gz: e59f732ddf9f7bc738d978f6ab29c3a13b5d25ef993750a8d45a4978da0f0d83
4
+ data.tar.gz: d1a46873ecc1d37fa3d4723a0d647f69b3b4b24a514dfd7f859c81ece23e9a92
5
5
  SHA512:
6
- metadata.gz: 16d932d584c4ad0b818ce7b06fee69db66322b17378dc8aa60ba29d0585e79deeb570522dc0c0e9610f97613f353ec181a8a031b081e311fac51e21d339c8f15
7
- data.tar.gz: d660410242608a6a9c41d1f32252d4fe84e8203a821f0b5ebf6cd9a97e74bba1aa0be0e2e6082c680f5249bde4590e9a07901efda8402d715a1175d4672b4d55
6
+ metadata.gz: 0c63bf7e646d623d65970ae8295f6096526d968657a526b4891137e44506679ba5456386d27795170e8aa8e66615d45b55d78c6de258c98ad3544287d38b2a7b
7
+ data.tar.gz: 105be466eda2b9e4edfbf1431a4fd8e4ac03b3f0ead00f0f194a7d7280fcca90550a966315144d980b74dc20344b75194ee6f30cc4368ef587e226aa50894f62
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.1)
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.5.1)
15
- excon (0.87.0)
16
- hollaback (0.1.0)
17
- minitest (5.14.4)
18
- parallel (1.21.0)
19
- parser (3.0.2.0)
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.0.0)
24
+ rainbow (3.1.1)
22
25
  rake (13.0.6)
23
- regexp_parser (2.1.1)
26
+ regexp_parser (2.8.0)
24
27
  rexml (3.2.5)
25
- rubocop (1.20.0)
28
+ rubocop (1.50.2)
29
+ json (~> 2.3)
26
30
  parallel (~> 1.10)
27
- parser (>= 3.0.0.0)
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.9.1, < 2.0)
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 (>= 1.4.0, < 3.0)
34
- rubocop-ast (1.12.0)
35
- parser (>= 3.0.1.1)
36
- rubocop-performance (1.11.5)
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.11.0)
40
- standard (1.3.0)
41
- rubocop (= 1.20.0)
42
- rubocop-performance (= 1.11.5)
43
- thor (1.1.0)
44
- thor-hollaback (0.2.0)
45
- hollaback (~> 0.1.0)
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.1.0)
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.22
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
@@ -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 ||= begin
35
- if client_data["content_cache_generated"] &&
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
- else
40
- begin
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
@@ -18,7 +18,7 @@ module SKP
18
18
  data[key] = value
19
19
 
20
20
  begin
21
- File.open(filestore_location, "w") { |f| f.write(YAML.dump(data)) }
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
- begin
66
- YAML.safe_load(File.read(filestore_location), permitted_classes: [Time]) || {}
67
- rescue Errno::ENOENT
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
- bar.tick(set_percent: 1 - (remaining_bytes.to_f / total_bytes).round(2))
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
@@ -1,3 +1,3 @@
1
1
  module SKP
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/skp.rb CHANGED
File without changes
data/skp.gemspec CHANGED
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "thor"
28
28
  spec.add_dependency "thor-hollaback"
29
29
  spec.add_dependency "excon"
30
- spec.add_dependency "cli-ui"
30
+ spec.add_dependency "cli-ui", "~> 2.1.0"
31
31
  end
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.1
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: '0'
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: '0'
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.2.26
122
+ rubygems_version: 3.3.20
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A CLI for Sidekiq in Practice.