wkcheck 0.1 → 0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a3c233258ccef57b89d501ed11e8994805e4e17
4
- data.tar.gz: d8a78e9973dafb85b932082c8ac9809b8a0a8405
3
+ metadata.gz: c6a2ddf753e3b3f83d73c0606d95e95399e88552
4
+ data.tar.gz: 44c4aab54c1ab96d28f46b00d4007f17b507e1d9
5
5
  SHA512:
6
- metadata.gz: dba137a0403ef172b9b932ab450c974a11a5f9604d7ed55fea18adfc40935b68adc8025b74155952829e0c0430d261e65d1ea49bc273a684ce933d34c28edb73
7
- data.tar.gz: ec1e50aa221fe8ac2c366c0dda17e29db4a05526cb9f4bb9a8ba0280dd18b25a8519e7f4f8c61965f7239392367221c4857e7092c6896054f7386fb0361ce7b1
6
+ metadata.gz: 81ca2928e4037847fd41479aeb357593ed41e8ee6e21bccc3aa67ca0df3667d0990aa0afbec9bd45478c5b7feb62e3a9f392c5c6ea59a18d9a97ff4cf25fd9ea
7
+ data.tar.gz: bb7041366daa37c2833f51c916e4ca682e1dfccdd170ca9528358e28ffd8b364c661711f4f300445be9626d4658e71bf16a2713107c98061fb8bb0e23eb18ba8
data/bin/wkcheck CHANGED
@@ -6,19 +6,23 @@ require 'slop'
6
6
  $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
7
7
  require 'wkcheck'
8
8
 
9
- opts = Slop.parse(help: true) do
10
- banner "Usage: wkcheck [options]"
9
+ opts = Slop.parse do |o|
10
+ o.banner = "Usage: wkcheck [options]"
11
11
 
12
- on "api-key=", "Saves your WaniKani API Key to #{WKCheck::CONFIG_FILE}"
13
- on "q", "queue", "Displays your current study queue (new lessons / pending reviews)"
14
- on "l", "level", "Displays your current level progression (radicals / kanji)"
15
- on "c", "critical", "Displays your current critical items, with an optional argument to set the maximum percentage", argument: :optional
16
- on "k", "kanji", "Displays information of a randomly selected kanji"
17
- on "w", "word", "Displays information of a randomly selected vocabulary word"
18
- on "v", "version", "Show version number and quit" do
12
+ o.string "--api-key", "Saves your WaniKani API Key to #{WKCheck::CONFIG_FILE}", suppress_errors: true
13
+ o.on "-q", "--queue", "Displays your current study queue (new lessons / pending reviews)"
14
+ o.on "-l", "--level", "Displays your current level progression (radicals / kanji)"
15
+ o.integer "-c", "--critical", "Displays your current critical items, with an optional argument to set the maximum percentage", suppress_errors: true
16
+ o.on "-k", "--kanji", "Displays information of a randomly selected kanji"
17
+ o.on "-w", "--word", "Displays information of a randomly selected vocabulary word"
18
+ o.on "-v", "--version", "Show version number and quit" do
19
19
  puts "wkcheck #{WKCheck::VERSION}"
20
20
  exit
21
21
  end
22
+ o.on "-h", "--help", "Displays this help information" do
23
+ puts o
24
+ exit
25
+ end
22
26
  end
23
27
 
24
28
  unless opts["api-key"].nil? || opts["api-key"].empty?
@@ -52,7 +56,7 @@ if opts.level?
52
56
  end
53
57
 
54
58
  if opts.critical?
55
- percentage = opts["critical"] || 75
59
+ percentage = opts[:critical] || 75
56
60
 
57
61
  if percentage.to_i.between?(1, 99)
58
62
  critical = WKCheck::CriticalItems.new(percentage.to_i)
@@ -77,4 +81,4 @@ if opts.word?
77
81
  end
78
82
 
79
83
  # No flags / Invalid flags - Display the help.
80
- puts opts.help
84
+ puts opts
@@ -1,3 +1,3 @@
1
1
  module WKCheck
2
- VERSION = '0.1'
2
+ VERSION = '0.2'
3
3
  end
data/wkcheck.gemspec CHANGED
@@ -6,7 +6,7 @@ require 'wkcheck/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "wkcheck"
8
8
  s.version = WKCheck::VERSION
9
- s.date = "2014-04-14"
9
+ s.date = "2015-08-25"
10
10
  s.summary = "Check your WaniKani stats from the command line"
11
11
  s.description = "Check your pending lessons and reviews of your WaniKani account (http://www.wanikani.com/) from the command line"
12
12
  s.authors = ["Dennis Martinez"]
@@ -25,14 +25,14 @@ Gem::Specification.new do |s|
25
25
  lib/wkcheck/version.rb
26
26
  ]
27
27
 
28
- s.required_ruby_version = '>= 1.9.3'
28
+ s.required_ruby_version = '>= 2.0.0'
29
29
 
30
- s.add_runtime_dependency "wanikani", "~> 1.2"
31
- s.add_runtime_dependency "slop", "~> 3.6"
30
+ s.add_runtime_dependency "wanikani", "~> 1.3"
31
+ s.add_runtime_dependency "slop", "~> 4.2"
32
32
  s.add_runtime_dependency "rainbow", "~> 2.0"
33
33
 
34
- s.add_development_dependency "aruba", "~> 0.6"
34
+ s.add_development_dependency "aruba", "~> 0.8"
35
35
  s.add_development_dependency "mocha", "~> 1.1"
36
36
  s.add_development_dependency "rake", "~> 10.0"
37
- s.add_development_dependency "minitest", "~> 5.6"
37
+ s.add_development_dependency "minitest", "~> 5.8"
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wkcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Martinez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-14 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wanikani
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: slop
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.6'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.6'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rainbow
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.6'
61
+ version: '0.8'
62
62
  type: :development
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.6'
68
+ version: '0.8'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mocha
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '5.6'
103
+ version: '5.8'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '5.6'
110
+ version: '5.8'
111
111
  description: Check your pending lessons and reviews of your WaniKani account (http://www.wanikani.com/)
112
112
  from the command line
113
113
  email: dennis@dennmart.com
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
- version: 1.9.3
139
+ version: 2.0.0
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - ">="
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.4.5
147
+ rubygems_version: 2.4.5.1
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Check your WaniKani stats from the command line