pluck_all 2.1.0 → 2.2.1

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: 354039f4cc64b82166b1a2aeac1e25979f9b4ad397e577b07081a578112221db
4
- data.tar.gz: 64cf4442b69dbe15c72dfd9e0e668ca7da5816d1a05023fcabb540c069e6aa0e
3
+ metadata.gz: 62194780f059033abab44433aac51b49752f7b95f9b08518c37a65b2bc729d16
4
+ data.tar.gz: a0856040c77449cb4ecc6652feb35e21385938df0a7b2af79832f6d27877f5a6
5
5
  SHA512:
6
- metadata.gz: d42bbd5912b01808fd2814f4629e8637d54f4fea91c5dd9b7adfeab22a1475e7182ede7f19f06b4bf476ef65ca0cd11e047a5a14082fc82ddbcf886d1b86dfe2
7
- data.tar.gz: 2e0fe754f2a029f955fbadf72d3c9954fb9c0de2fad0485bb323df1161cd2c57e870256bab6378b4decc3edbe88bf9ec697ed50b8c0a15e6a1a239336e78356d
6
+ metadata.gz: 78002041f27e7602c728b40198ee30132fa8cc4c37b42e69e3c51813731113fdbd6177bb8fca5c0b92ccaf217037c969031cd25b822963752a97360bd5970254
7
+ data.tar.gz: b32613a3db28633eaf158ceedeb21dba77caa9c42157adf7e3876612a61944e7181921eea5c00618616bf10198850447bfd5050e64a3bf2236ecb7985f99e3ed
@@ -19,6 +19,7 @@ gemfile:
19
19
  - gemfiles/active_record_51.gemfile
20
20
  - gemfiles/active_record_52.gemfile
21
21
  - gemfiles/active_record_60.gemfile
22
+ - gemfiles/active_record_61.gemfile
22
23
  - gemfiles/mongoid_54.gemfile
23
24
  - gemfiles/mongoid_64.gemfile
24
25
  - gemfiles/mongoid_70.gemfile
@@ -44,6 +45,10 @@ matrix:
44
45
  rvm: 2.2
45
46
  - gemfile: gemfiles/active_record_60.gemfile
46
47
  env: ORM_TYPE=MONGOID
48
+ - gemfile: gemfiles/active_record_61.gemfile
49
+ rvm: 2.2
50
+ - gemfile: gemfiles/active_record_61.gemfile
51
+ env: ORM_TYPE=MONGOID
47
52
  - gemfile: gemfiles/mongoid_54.gemfile
48
53
  rvm: 2.7
49
54
  - gemfile: gemfiles/mongoid_54.gemfile
@@ -1,12 +1,15 @@
1
1
  ## Change Log
2
2
 
3
- ### [upcoming](https://github.com/khiav223577/pluck_all/compare/v2.0.4...HEAD) 2019/12/19
3
+ ### [v2.1.0](https://github.com/khiav223577/pluck_all/compare/v2.0.4...v2.1.0) 2020/10/19
4
+ - [#47](https://github.com/khiav223577/pluck_all/pull/47) Use instantiate method to initialize model without calling callbacks (@khiav223577)
5
+ - [#45](https://github.com/khiav223577/pluck_all/pull/45) Support Ruby 2.7 (@khiav223577)
6
+ - [#44](https://github.com/khiav223577/pluck_all/pull/44) Move `require` from begin..rescue block for better debug message (@khiav223577)
4
7
  - [#43](https://github.com/khiav223577/pluck_all/pull/43) Use rails_compatibility to get attribute_types for better compatibility (@khiav223577)
5
8
  - [#41](https://github.com/khiav223577/pluck_all/pull/41) Support Rails 6.0 (@khiav223577)
6
9
 
7
10
  ### [v2.0.4](https://github.com/khiav223577/pluck_all/compare/v2.0.3...v2.0.4) 2019/04/04
8
11
  - [#40](https://github.com/khiav223577/pluck_all/pull/40) Fix: inconsistent with pluck when having `select` on relation (@khiav223577)
9
- - [#39](https://github.com/khiav223577/pluck_all/pull/39) Fix issue#38 (@MasashiYokota)
12
+ - [#39](https://github.com/khiav223577/pluck_all/pull/39) Fix: undefined local variable or method `construct_relation_for_association_calculations` in Rails 5.2.2.1 (@MasashiYokota)
10
13
  - [#36](https://github.com/khiav223577/pluck_all/pull/36) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
11
14
  - [#35](https://github.com/khiav223577/pluck_all/pull/35) refactor #test_pluck_with_includes (@khiav223577)
12
15
  - [#34](https://github.com/khiav223577/pluck_all/pull/34) Provide Arel support as well (@snkashis)
data/README.md CHANGED
@@ -16,7 +16,7 @@ feel free to use this gem and no need to worry about upgrading to Rails 4, 5, 6
16
16
 
17
17
  ## Supports
18
18
  - Ruby 2.2 ~ 2.7
19
- - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0
19
+ - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1
20
20
 
21
21
  ## Installation
22
22
 
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pluck_all.gemspec
4
+
5
+ gem 'sqlite3', '~> 1.4.1'
6
+ gem 'activerecord', '~> 6.1.0'
7
+ gem 'carrierwave', '~> 0.11.0'
8
+
9
+ group :test do
10
+ gem 'simplecov'
11
+ end
12
+
13
+ gemspec path: '../'
@@ -51,7 +51,7 @@ class ActiveRecord::Relation
51
51
  end
52
52
  result = select_all(*column_names)
53
53
  attribute_types = RailsCompatibility.attribute_types(klass)
54
- result.map! do |attributes| # This map! behaves different to array#map!
54
+ result.map do |attributes| # This map behaves different to array#map
55
55
  attributes.each do |key, attribute|
56
56
  attributes[key] = result.send(:column_type, key, attribute_types).deserialize(attribute) # TODO: 現在AS過後的type cast會有一點問題,但似乎原生的pluck也有此問題
57
57
  end
@@ -80,6 +80,7 @@ class ActiveRecord::Relation
80
80
  # ----------------------------------------------------------------
81
81
  def cast_carrier_wave_uploader_url(attributes)
82
82
  if defined?(CarrierWave) && klass.respond_to?(:uploaders)
83
+ @pluck_all_cast_need_columns ||= nil
83
84
  @pluck_all_cast_klass ||= klass
84
85
  @pluck_all_uploaders ||= @pluck_all_cast_klass.uploaders.select{|key, _uploader| attributes.key?(key.to_s) }
85
86
  @pluck_all_uploaders.each do |key, _uploader|
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module PluckAll
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluck_all
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -112,6 +112,7 @@ files:
112
112
  - gemfiles/active_record_51.gemfile
113
113
  - gemfiles/active_record_52.gemfile
114
114
  - gemfiles/active_record_60.gemfile
115
+ - gemfiles/active_record_61.gemfile
115
116
  - gemfiles/mongoid_54.gemfile
116
117
  - gemfiles/mongoid_64.gemfile
117
118
  - gemfiles/mongoid_70.gemfile