repetition 2.0.1 → 2.1.0

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: a8f83e5a3642ef6323489f00d79859b2641e739c68f2a09dd3fddf0abc17ffdd
4
- data.tar.gz: acfb2c388061a6bb2ce61610cddcecd723ad80e5a0799dc34d01d60b1f52e6d3
3
+ metadata.gz: 826e21633be8df5c5b6bc2aa81d135ddf9c8fda98e60fde9fa3b4a755ec30848
4
+ data.tar.gz: f82050e3e0d8f0fcc12d083bc104f54eb6353de42d6dabe5a41427ba56b7eb32
5
5
  SHA512:
6
- metadata.gz: b7bc7a4f0c11835667cb55e131e169b7cee5807f861299af27dc2a37de816d79931aa2bc9c0c3d8c5da77a247665e21a59ffb36eb36396f0393b793c6dde7c5a
7
- data.tar.gz: d443112a976d1561887bc4fab0614999fe4c0e4d20107fd01fcef4766806f5fe01b9d2e79a6746ba0956430de6e6cab5e7122a4034e1a6f460adcf8a5ff5fd13
6
+ metadata.gz: 1be09f787eba95cef2ced80f86180a2be07a69c2df4526a161e1d24906eea81d52fe196159bd39e19b63eb9e809958ecc9454d85951fd5b6156b8ec4568d8057
7
+ data.tar.gz: ee711126fbbaf9f505b9a838e2057a459b99615b6af955bc8447d6a7d8fd983ad81d773926aa9f7cf034e306e6fb500fb89726565d09b4702d48d41586363aa1
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.0] - 2018-08-18
10
+ ### Added
11
+ - Add `due_at` attribute with exact time
12
+
13
+ ## [2.0.1] - 2018-08-17
9
14
  ### Fixed
10
15
  - Fix interval calculation bug
11
16
 
@@ -17,6 +17,7 @@ require 'date'
17
17
  module Repetition
18
18
  class Flashcard
19
19
  attr_reader :easiness_factor, :interval, :repetitions
20
+ attr_reader :due_at, :due_on
20
21
 
21
22
  def initialize(easiness_factor: 2.5, interval: 0, repetitions: 0)
22
23
  @easiness_factor = easiness_factor
@@ -49,19 +50,12 @@ module Repetition
49
50
  end
50
51
  end
51
52
 
52
- due_on
53
- end
54
-
55
- def due_on
56
- today + @interval
53
+ @due_at = DateTime.now + @interval
54
+ @due_on = Date.today + @interval
57
55
  end
58
56
 
59
57
  private
60
58
 
61
- def today
62
- @today ||= Date.today
63
- end
64
-
65
59
  def calculate_easiness_factor(easiness_factor, quality)
66
60
  result = easiness_factor - 0.8 + (0.28 * quality) - (0.02 * quality * quality)
67
61
  result < 1.3 ? 1.3 : result
@@ -1,3 +1,3 @@
1
1
  module Repetition
2
- VERSION = '2.0.1'
2
+ VERSION = '2.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repetition
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Kim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2018-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler