rpw 1.3.0 → 1.4.1

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: 4e52497c6e3760c9aa301c8eeae51459c46458625a809847f83a0d660d104754
4
- data.tar.gz: 01aac30eece6c29a294baa6e6859ff3de5afe52cd33c5113527351430169d4b0
3
+ metadata.gz: 85f7ecbb1ff145d56d6d27f243874ddbf53be414c548e7df75cd13b9c1db7b8a
4
+ data.tar.gz: 320b387e6ad20327f502a0aba06130edf84238e8f91d661c84a293bf12395bb5
5
5
  SHA512:
6
- metadata.gz: c86fdd2626b6d1e49a9c67c51e5476453799ae1a42013056f20064b59cf151e2779a28f5c6ebc7d0ee700f8cf3a1085f64370fa2282290e9eb80aa359433aa29
7
- data.tar.gz: 74368f4f9e457c67ea43358c0e5fcb253bd38fa8487f5cd3fdd6b683a396b765ca0125d29366318536076fdd553020cc2d9349ca0548b15eeb772974de459bf5
6
+ metadata.gz: fd511967c1060335a16b0e1ce1b71ffe3eb1096967b536522fbe9b10dfcdb7923a2fef3cd9542fb02d32a04eb399616c26be553f40479c13c5b5db332e79cd84
7
+ data.tar.gz: 7acaf0763ed13cf8c2ab27ddf028394ecc27c2d39010ede0ce29c0e04340b0c6057bb3dc15d2dd6282dec17415e7d003db67a5085e0291d06878c2ba8b33872e
File without changes
data/.gitignore CHANGED
@@ -3,4 +3,5 @@ bundle
3
3
  .rpw_key
4
4
  .rpw_info
5
5
  smoketest
6
- scripts
6
+ scripts
7
+ .DS_Store
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
- rpw (1.3.0)
5
- cli-ui
4
+ rpw (1.4.1)
5
+ cli-ui (~> 2.1.0)
6
6
  excon
7
7
  thor
8
8
  thor-hollaback
@@ -10,41 +10,53 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- ast (2.4.1)
14
- cli-ui (1.4.0)
15
- excon (0.78.0)
16
- hollaback (0.1.0)
17
- minitest (5.14.2)
18
- parallel (1.20.0)
19
- parser (2.7.2.0)
13
+ ast (2.4.2)
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)
22
- rake (13.0.1)
23
- regexp_parser (1.8.2)
24
- rexml (3.2.4)
25
- rubocop (1.2.0)
24
+ rainbow (3.1.1)
25
+ rake (13.0.6)
26
+ regexp_parser (2.8.0)
27
+ rexml (3.2.5)
28
+ rubocop (1.50.2)
29
+ json (~> 2.3)
26
30
  parallel (~> 1.10)
27
- parser (>= 2.7.1.5)
31
+ parser (>= 3.2.0.0)
28
32
  rainbow (>= 2.2.2, < 4.0)
29
- regexp_parser (>= 1.8)
30
- rexml
31
- rubocop-ast (>= 1.0.1)
33
+ regexp_parser (>= 1.8, < 3.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, < 2.0)
34
- rubocop-ast (1.1.1)
35
- parser (>= 2.7.1.5)
36
- rubocop-performance (1.8.1)
37
- rubocop (>= 0.87.0)
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)
41
+ rubocop (>= 1.7.0, < 2.0)
38
42
  rubocop-ast (>= 0.4.0)
39
- ruby-progressbar (1.10.1)
40
- standard (0.9.0)
41
- rubocop (= 1.2.0)
42
- rubocop-performance (= 1.8.1)
43
- thor (1.0.1)
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 (1.7.0)
59
+ unicode-display_width (2.4.2)
48
60
 
49
61
  PLATFORMS
50
62
  ruby
@@ -56,4 +68,4 @@ DEPENDENCIES
56
68
  standard
57
69
 
58
70
  BUNDLED WITH
59
- 2.1.4
71
+ 2.2.33
data/HISTORY.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.4.0
2
+
3
+ * Add `--quizzes` option to `rpw show`, to see quizzes
4
+
5
+ ## 1.3.1
6
+
7
+ * Removed tar verbose mode
8
+
1
9
  ## 1.3.0
2
10
 
3
11
  * Added suggested schedules to README
@@ -7,11 +15,11 @@
7
15
  * Actual release version!
8
16
  * Greatly streamlined commands
9
17
 
10
- ## 1.1.0
18
+ ## 1.1.0
11
19
 
12
20
  * sick colors
13
21
 
14
- ## 1.0.1
22
+ ## 1.0.1
15
23
 
16
24
  * Pre-launch bugfix
17
25
 
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
data/lib/rpw/README.md CHANGED
File without changes
File without changes
data/lib/rpw/cli/key.rb CHANGED
@@ -9,7 +9,7 @@ module RPW
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/rpw/cli/quiz.rb CHANGED
File without changes
File without changes
data/lib/rpw/cli.rb CHANGED
@@ -155,11 +155,12 @@ module RPW
155
155
 
156
156
  desc "show", "Show any individal workshop lesson"
157
157
  option :"no-open", type: :boolean
158
+ option :quizzes, type: :boolean
158
159
  def show
159
160
  exit_with_no_key
160
161
  title = ::CLI::UI::Prompt.ask(
161
162
  "Which lesson would you like to view?",
162
- options: client.list.reject { |l| l["title"] == "Quiz" }.map { |l| " " * l["indent"] + l["title"] }
163
+ options: client.list.reject { |l| !options[:quizzes] && l["title"] == "Quiz" }.map { |l| " " * l["indent"] + l["title"] }
163
164
  )
164
165
  title.strip!
165
166
  content_order = client.list.find { |l| l["title"] == title }["position"]
@@ -254,7 +255,7 @@ module RPW
254
255
 
255
256
  def warn_if_already_started
256
257
  return unless client.setup?
257
- exit(0) unless ::CLI::UI.confirm "You have already started the workshop. Continuing "\
258
+ exit(0) unless ::CLI::UI.confirm "You have already started the workshop. Continuing " \
258
259
  "this command will wipe all of your current progress. Continue?", default: false
259
260
  end
260
261
 
data/lib/rpw/client.rb CHANGED
@@ -31,19 +31,17 @@ module RPW
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
@@ -152,7 +150,7 @@ module RPW
152
150
 
153
151
  def extract_content(content)
154
152
  folder = content["style"]
155
- `tar -C #{folder} -xvzf #{folder}/#{content["s3_key"]}`
153
+ `tar -C #{folder} -xzf #{folder}/#{content["s3_key"]}`
156
154
  end
157
155
  end
158
156
  end
@@ -18,7 +18,7 @@ module RPW
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 RPW data at #{filestore_location} is not writable. \
24
24
  # Check your file permissions."
@@ -62,11 +62,9 @@ module RPW
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/rpw/gateway.rb CHANGED
File without changes
data/lib/rpw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RPW
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.1"
3
3
  end
data/lib/rpw.rb CHANGED
File without changes
data/rpw.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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpw
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nate Berkopec
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-23 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -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.1.4
122
+ rubygems_version: 3.3.20
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A CLI for the Rails Performance Workshop.