anki_record 0.3.1 → 0.3.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 +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +2 -2
- data/lib/anki_record/note/note.rb +2 -4
- data/lib/anki_record/note/note_attributes.rb +1 -1
- data/lib/anki_record/note/note_guid_helper.rb +10 -0
- data/lib/anki_record/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 909927e79a46b38b4a538e4fd0a32cf9a727ac0a9e276645fdd2296ad6d9a464
|
4
|
+
data.tar.gz: 2e75c487b6345606661d746b7d945b538592bbb6bed16b882a6ce42a87892368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb071caaf37a4fcd72c99f66e31b60676b412890883bf2968400bae46ac756433b0d051495a1ff34e477313ab8a296296e1fc1ecdf2b2227c241439712cef48
|
7
|
+
data.tar.gz: 36e4e21fa7238736ac63239e59507042e6567869add24d09523d201b1cf606738de055484e5c21ea7b37e05a1b5872a76c8241890ad32eaea611f56a8038cbc0
|
data/CHANGELOG.md
CHANGED
@@ -37,8 +37,12 @@
|
|
37
37
|
- API documentation changed from using RDoc to SDoc with the Rails template.
|
38
38
|
- RSpec test suite was refactored to improve speed: 4 minutes -> 1.5 minutes.
|
39
39
|
|
40
|
-
## [0.
|
40
|
+
## [0.3.1] - 04-29-2023
|
41
41
|
|
42
42
|
- `Deck.new` was saving the deck to the `collection.anki21` database. Now it will only instantiate it and `#save` must be called to save it.
|
43
43
|
- `Helper` modules moved into the `Helpers` module namespace.
|
44
44
|
- Bug fix addressing using the approximate milliseconds since the epoch as the primary key id causing the uniqueness constraint to fail when creating a lot of notes.
|
45
|
+
|
46
|
+
## [0.3.2] - 05-20-2023
|
47
|
+
- The private `Note` method `globally_unique_id` has been moved to `NoteGuidHelper` and included into note.
|
48
|
+
- The `guid` attribute also now has a public setter.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
anki_record (0.3.
|
4
|
+
anki_record (0.3.2)
|
5
5
|
rubyzip (>= 2.3)
|
6
6
|
sqlite3 (~> 1.3)
|
7
7
|
|
@@ -68,7 +68,7 @@ GEM
|
|
68
68
|
simplecov_json_formatter (~> 0.1)
|
69
69
|
simplecov-html (0.12.3)
|
70
70
|
simplecov_json_formatter (0.1.4)
|
71
|
-
sqlite3 (1.6.
|
71
|
+
sqlite3 (1.6.2-x86_64-linux)
|
72
72
|
stringio (3.0.5)
|
73
73
|
unicode-display_width (2.4.2)
|
74
74
|
|
@@ -5,6 +5,7 @@ require "securerandom"
|
|
5
5
|
require_relative "../helpers/checksum_helper"
|
6
6
|
require_relative "../helpers/time_helper"
|
7
7
|
require_relative "note_attributes"
|
8
|
+
require_relative "note_guid_helper"
|
8
9
|
|
9
10
|
# rubocop:disable Metrics/ClassLength
|
10
11
|
module AnkiRecord
|
@@ -13,6 +14,7 @@ module AnkiRecord
|
|
13
14
|
class Note
|
14
15
|
include Helpers::ChecksumHelper
|
15
16
|
include NoteAttributes
|
17
|
+
include NoteGuidHelper
|
16
18
|
include Helpers::TimeHelper
|
17
19
|
include Helpers::SharedConstantsHelper
|
18
20
|
|
@@ -161,10 +163,6 @@ module AnkiRecord
|
|
161
163
|
|
162
164
|
private
|
163
165
|
|
164
|
-
def globally_unique_id
|
165
|
-
SecureRandom.uuid.slice(5...15)
|
166
|
-
end
|
167
|
-
|
168
166
|
def field_values_separated_by_us
|
169
167
|
# The ASCII control code represented by hexadecimal 1F is the Unit Separator (US)
|
170
168
|
note_type.snake_case_field_names.map { |field_name| @field_contents[field_name] }.join("\x1F")
|
data/lib/anki_record/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anki_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Rego
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/anki_record/helpers/time_helper.rb
|
77
77
|
- lib/anki_record/note/note.rb
|
78
78
|
- lib/anki_record/note/note_attributes.rb
|
79
|
+
- lib/anki_record/note/note_guid_helper.rb
|
79
80
|
- lib/anki_record/note_field/note_field.rb
|
80
81
|
- lib/anki_record/note_field/note_field_attributes.rb
|
81
82
|
- lib/anki_record/note_field/note_field_defaults.rb
|