wanikani 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wanikani/user.rb +10 -0
  3. metadata +8 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ba29e271b2724bd87e697a8ecce2534143a41fb
4
- data.tar.gz: 07178f6c928fb403ab17e38afb45f642ae031ced
3
+ metadata.gz: 81966007a1d26767eaa8068600f0cd8f8630771d
4
+ data.tar.gz: 54b19a2b4225f18a8337d6e6f8aa38b2d8b89779
5
5
  SHA512:
6
- metadata.gz: 2b9b81277572c280b57220f14d74698795546b0e32bc06a5a0909f9a35a7e3fa30f05730c90d2be2c448e7472e52baed5419b943390fea76e02762555eef2205
7
- data.tar.gz: 056a25b5a377604510d0418e35a4598ace23b67dc47ad74505ff5573b20451ac6d3b156e6bf205c43c592e2073592ca2a3faaf4c46b6589ee510d00b4b4a464b
6
+ metadata.gz: 7b0ee53a59d4a123aa413133797b3a0d2332bfcbde49582dc3babdbb70b065fc45d9193ab56ad9580e7d877bbaad83f89aedf99f6518be557e7ac0113397fc66
7
+ data.tar.gz: 238c0ff8a65ae7f8171185ff7d507d0c7cde9f4018427e1811fd6034b327c35ada2b47bd01c9bd9f8802ea5dec99ab8d352122b7359f778b6af46003f3b3caaa
@@ -8,5 +8,15 @@ module Wanikani
8
8
  api_response = Wanikani.api_response("user-information")
9
9
  return api_response["user_information"]
10
10
  end
11
+
12
+ # Checks if the user is currently in vacation mode.
13
+ #
14
+ # @return [Boolean] true if vacation_date contains a timestamp, false if
15
+ # vacation_date is null.
16
+ def self.on_vacation?
17
+ api_response = Wanikani.api_response("user-information")
18
+ vacation_date = api_response["user_information"]["vacation_date"]
19
+ return !vacation_date.nil?
20
+ end
11
21
  end
12
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wanikani
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Martinez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-19 00:00:00.000000000 Z
11
+ date: 2013-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -72,15 +72,16 @@ executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
- - lib/wanikani.rb
76
75
  - lib/wanikani/critical_items.rb
76
+ - lib/wanikani/level.rb
77
+ - lib/wanikani/recent_unlocks.rb
77
78
  - lib/wanikani/srs.rb
78
79
  - lib/wanikani/study_queue.rb
79
- - lib/wanikani/recent_unlocks.rb
80
- - lib/wanikani/level.rb
81
80
  - lib/wanikani/user.rb
81
+ - lib/wanikani.rb
82
82
  homepage: http://github.com/dennmart/wanikani-gem
83
- licenses: []
83
+ licenses:
84
+ - MIT
84
85
  metadata: {}
85
86
  post_install_message:
86
87
  rdoc_options: []
@@ -98,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  version: '0'
99
100
  requirements: []
100
101
  rubyforge_project:
101
- rubygems_version: 2.1.9
102
+ rubygems_version: 2.1.11
102
103
  signing_key:
103
104
  specification_version: 4
104
105
  summary: Add Japanese Kanji learning goodness to your Ruby projects!