rearmed_rails 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +7 -2
- data/lib/rearmed_rails/monkey_patches/rails/active_record/base.rb +3 -3
- data/lib/rearmed_rails/version.rb +1 -1
- data/test/tc_rearmed.rb +0 -2
- 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: 7d4600628a08453dea6e8e8a177982331c765a13
|
4
|
+
data.tar.gz: 52efe76a55f2cfcbdf428d4019fb67fcdc5110a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d2bb730931f1d2ac2db064f858931a88118cf8855198fa18e789e54bb91d9c42f62a793891071ea9499edff68157f401feec40ed8451e1b8dc518a9a5c31474
|
7
|
+
data.tar.gz: 484eb3af4136de98b5a5a9075f3c2ca1c5b51b2147b664ab701ca55b6d28507335a6754941b2f626bd40fa2e3b58835a9aa4097ce8da1c8e973ee52f7ffa1ea8
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -141,6 +141,11 @@ If you want to request a new method please raise an issue and we will discuss th
|
|
141
141
|
|
142
142
|
|
143
143
|
# Credits
|
144
|
-
Created by Weston Ganger - @westonganger
|
144
|
+
Created by Weston Ganger - [@westonganger](https://github.com/westonganger)
|
145
145
|
|
146
|
-
|
146
|
+
For any consulting or contract work please contact me via my company website: [Solid Foundation Web Development](https://solidfoundationwebdev.com)
|
147
|
+
|
148
|
+
## Similar Libraries Created By Me
|
149
|
+
- [Rearmed Ruby](https://github.com/westonganger/rearmed-rb)
|
150
|
+
- [Rearmed JS](https://github.com/westonganger/rearmed_rails)
|
151
|
+
- [Rearmed CSS](https://github.com/westonganger/rearmed_css)
|
@@ -103,11 +103,11 @@ if defined?(ActiveRecord)
|
|
103
103
|
end
|
104
104
|
|
105
105
|
if options[:delete][:keep] == :last
|
106
|
-
duplicates.reverse
|
106
|
+
duplicates = duplicates.reverse
|
107
107
|
end
|
108
108
|
|
109
109
|
used = []
|
110
|
-
duplicates.reject
|
110
|
+
duplicates = duplicates.reject do |x|
|
111
111
|
attrs = x.attributes.slice(*options[:columns].collect(&:to_s))
|
112
112
|
|
113
113
|
if used.include?(attrs)
|
@@ -122,7 +122,7 @@ if defined?(ActiveRecord)
|
|
122
122
|
if options[:delete][:delete_method].to_sym == :delete
|
123
123
|
duplicates = self.where(id: duplicates.collect(&:id))
|
124
124
|
|
125
|
-
if
|
125
|
+
if duplicates.respond_to?(:delete_all!)
|
126
126
|
duplicates.delete_all!
|
127
127
|
else
|
128
128
|
duplicates.delete_all
|
data/test/tc_rearmed.rb
CHANGED
@@ -56,8 +56,6 @@ class TestRearmedRails < MiniTest::Test
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def test_general_rails
|
59
|
-
# THE MOST IMPORTANT TESTS HERE WOULD BE dedupe, reset_auto_increment, reset_table
|
60
|
-
|
61
59
|
#Post.pluck_to_hash(:name, :category, :id)
|
62
60
|
#Post.pluck_to_struct(:name, :category, :id)
|
63
61
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rearmed_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weston Ganger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|