permanent_records 4.1.6 → 4.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/Rakefile +10 -0
- data/VERSION +1 -1
- data/lib/permanent_records.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20dcb9aa315fd6a5ef68fe0085e48ae281302553
|
4
|
+
data.tar.gz: 630fbfcca7864a15dd4153a5ae43e5f608f8113b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d82a489616bb8429db6850d05108a4f5af30ac2cef7f1971d10340d36b361d859fd59e51d02aaccddda3e44670c327d960d907e6645e790ef2c617e424ab0c01
|
7
|
+
data.tar.gz: bca5df4208d994416d08df2fda5911761eb72953e39e3e385d30e17a50c593ed59e2451c90c7666c213493e583cc936ab61b91580411c10f9da1d9e1b8a27469
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -3,6 +3,7 @@ require 'yaml'
|
|
3
3
|
require 'English'
|
4
4
|
Bundler::GemHelper.install_tasks
|
5
5
|
|
6
|
+
version = File.read('./VERSION').chomp
|
6
7
|
CONFIG = YAML.load_file(
|
7
8
|
File.expand_path('spec/support/database.yml', File.dirname(__FILE__))
|
8
9
|
)
|
@@ -32,4 +33,13 @@ RSpec::Core::RakeTask.new(:rspec) do |t|
|
|
32
33
|
t.rspec_opts = '-f d -c'
|
33
34
|
end
|
34
35
|
|
36
|
+
task :publish do
|
37
|
+
# Ensure the gem builds
|
38
|
+
system('gem build permanent_records.gemspec') &&
|
39
|
+
# And we didn't leave anything (aside from the gem) uncommitted
|
40
|
+
!system('git status -s | egrep -v .') &&
|
41
|
+
system('git push') &&
|
42
|
+
system("gem push permanent_records-#{version}.gem")
|
43
|
+
end
|
44
|
+
|
35
45
|
task default: [:rspec, :rubocop]
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.1.
|
1
|
+
4.1.7
|
data/lib/permanent_records.rb
CHANGED
@@ -107,8 +107,12 @@ module PermanentRecords
|
|
107
107
|
|
108
108
|
def each_counter_cache
|
109
109
|
_reflections.each do |name, reflection|
|
110
|
-
|
110
|
+
association = send(name.to_sym)
|
111
|
+
next if association.nil?
|
111
112
|
next unless reflection.belongs_to? && reflection.counter_cache_column
|
113
|
+
|
114
|
+
associated_class = association.class
|
115
|
+
|
112
116
|
yield(associated_class,
|
113
117
|
reflection.counter_cache_column,
|
114
118
|
send(reflection.foreign_key))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: permanent_records
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Danger Canty
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2016-
|
19
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activerecord
|