active_recall 1.5.0 → 1.6.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: 37b52862b045e1e9c7a189acd1a611e84b5bd260ff1149472ed5b724530a0943
4
- data.tar.gz: 7dbacf4db26d857144e91a68a4b4a5ea5c6012ec9579079d4b649c7fc7f8e388
3
+ metadata.gz: 1784eaa3c18a644a3b7b16935626de436851355d6ec1f0ac19367ef2d789a873
4
+ data.tar.gz: '08e4a478783a55852dbefa1d0f6703ab2e44b4c02cd493e7091ff8cd715f4f43'
5
5
  SHA512:
6
- metadata.gz: 10d110f43d6e845f1f3bc8269e7bf053a94ebb13bb1b9355d9915dd6e515b94492a7f4421d2e83978f24d45c471de4c881ea5d84f919f6eb9511cdec055dfacd
7
- data.tar.gz: 0a3ef619b273e692bb1ef325971a3baa79562bc013ac3fc999eaa87ca4e4c2ff29607c3491f22d2ad419d79cd44f41cb1a5fb2ba41cba01357784f15e14ca3cc
6
+ metadata.gz: d80c727f175317bb7173721981dba6eaea93e8e6a13793e3fc38ffebf0215b998c58904b936c6fb9cbd9784a3a6641ce35016402e6b85ef335f8df3c8bf622a5
7
+ data.tar.gz: e645b4e3cd9ee513885f3a766d7d0566efa12bae1be14e0c3593c130bc6a10083544ffdb1e71a22e9a0cd313f1415811aa9fec3c734c9839c677a367f21e91be
@@ -28,7 +28,7 @@ jobs:
28
28
  include:
29
29
  - os: ubuntu
30
30
  ruby: ruby-head
31
- allow_failures: true
31
+ allow_failures: false
32
32
  env:
33
33
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
34
34
  ALLOW_FAILURES: "${{ matrix.allow_failures }}"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_recall (1.5.0)
4
+ active_recall (1.6.0)
5
5
  activerecord (>= 5.2.3, <= 6.1)
6
6
  activesupport (>= 5.2.3, <= 6.1)
7
7
 
@@ -23,7 +23,7 @@ GEM
23
23
  diff-lcs (1.3)
24
24
  i18n (1.8.9)
25
25
  concurrent-ruby (~> 1.0)
26
- minitest (5.14.3)
26
+ minitest (5.14.4)
27
27
  rake (12.3.3)
28
28
  rdoc (6.2.0)
29
29
  rspec (3.8.0)
@@ -3,10 +3,10 @@
3
3
  module ActiveRecall
4
4
  module DeckMethods
5
5
  def deck
6
- d = ActiveRecall::Deck.where(user_id: id, user_type: self.class.name).first_or_create
6
+ d = ActiveRecall::Deck.find_or_create_by(user_id: id, user_type: self.class.name)
7
7
  d.source_class.module_eval do
8
8
  def stats
9
- ActiveRecall::Item.where(source_id: id, source_type: self.class.name).first
9
+ ActiveRecall::Item.find_by(source_id: id, source_type: self.class.name)
10
10
  end
11
11
  end
12
12
  d
@@ -37,8 +37,9 @@ module ActiveRecall
37
37
  end
38
38
 
39
39
  def delete(source)
40
- item = ActiveRecall::Item.new(deck: self, source_id: source.id, source_type: source.class.name)
41
- item.destroy
40
+ ActiveRecall::Item
41
+ .find_by(deck: self, source_id: source.id, source_type: source.class.name)
42
+ .destroy
42
43
  end
43
44
 
44
45
  def review
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecall
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_recall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gravina
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-02-19 00:00:00.000000000 Z
12
+ date: 2021-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake