rearmed_rails 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29358a836471b9e0ae391b261b041fa1f2bcb9df
4
- data.tar.gz: c0c1306eca83b965edfeedc27e1f59fdd4dcd8f6
3
+ metadata.gz: 7d4600628a08453dea6e8e8a177982331c765a13
4
+ data.tar.gz: 52efe76a55f2cfcbdf428d4019fb67fcdc5110a5
5
5
  SHA512:
6
- metadata.gz: 0c6e6c1a33a8a280e52bb107a0744ff6f3a77db8788420105f2bb136ed08f8aa37e117e3eb513e7fdacb0f531a5b7ef77dec13675362c37feae2588805146ea3
7
- data.tar.gz: 2d6cfdcad766d50b871542c4b914efeed9bd35fef0aced93133b8f318d6763f01044a7f08f522f7e7e8e02e320a9eff0da6e7d68b3a5b15a0ae9ce2b6fea6ca3
6
+ metadata.gz: 9d2bb730931f1d2ac2db064f858931a88118cf8855198fa18e789e54bb91d9c42f62a793891071ea9499edff68157f401feec40ed8451e1b8dc518a9a5c31474
7
+ data.tar.gz: 484eb3af4136de98b5a5a9075f3c2ca1c5b51b2147b664ab701ca55b6d28507335a6754941b2f626bd40fa2e3b58835a9aa4097ce8da1c8e973ee52f7ffa1ea8
@@ -1,6 +1,8 @@
1
1
  CHANGELOG
2
2
  ---------
3
3
 
4
+ - **1.0.4 - July 19, 2017**
5
+ - Fix error in `find_duplicates` method
4
6
  - **1.0.3 - May 3, 2017**
5
7
  - Fix error in `or` method
6
8
  - **1.0.2 - April 13, 2017**
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
- <a href='https://ko-fi.com/A5071NK' target='_blank'><img height='32' style='border:0px;height:32px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=a' border='0' alt='Buy Me a Coffee' /></a>
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! do |x|
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 x.respond_to?(:delete_all!)
125
+ if duplicates.respond_to?(:delete_all!)
126
126
  duplicates.delete_all!
127
127
  else
128
128
  duplicates.delete_all
@@ -1,3 +1,3 @@
1
1
  module RearmedRails
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -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.3
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-05-03 00:00:00.000000000 Z
11
+ date: 2017-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake