activerecord-virtual_attributes 1.6.0 → 2.0.0

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
  SHA256:
3
- metadata.gz: e0b56d15edaf7d124492c47903569158354ff7ca1887735c706fb342c847e0a2
4
- data.tar.gz: 4674998a27f163fcb2b387ace6f71d3c9c70adf6dcd64332d59219e8e34dc7d3
3
+ metadata.gz: 9ceef88d5be93e1f696e382623d09b421031eae65de7608241b14a943ff5c76c
4
+ data.tar.gz: bcf53221633defb009e5dbf739cf2466360c0a00e35bc312dec15d25def7406b
5
5
  SHA512:
6
- metadata.gz: 70dbabafd878355e63957c7511b1c982716b7412da8fe14ae35c24f348fa676463ef7b1894fd33380f64835b89927643e6f4b11f77703138d6d9d5bb0cad5fb5
7
- data.tar.gz: 7adae59e71766f84d6ce31dc78ed633d7fb449ebf63453c40b75650eef04fbec263465b96efcf24509faba5e42cd1a8d05ce7286dfbb1235dde771a2cd65d57b
6
+ metadata.gz: 554b781f47a4fe637bad32ab5c194e4aa364c78dfb5d9a39f8877a3d22ed9c704b4f5ee8312a4220fe07b08eb5a9d4cb3aeb05af200cf0a54af10c4c2052bad4
7
+ data.tar.gz: 3feaf1fa331f0e40813591d33f7543cda134acf88e6a70516e8f5aa27c4941c999cfb63ceb2bc86b44bce359daed0ce11f79276f7d832d553f82c754f7206d07
@@ -3,7 +3,13 @@
3
3
  Doing our best at supporting [SemVer](http://semver.org/) with
4
4
  a nice looking [Changelog](http://keepachangelog.com).
5
5
 
6
- ## Version [Unreleased]
6
+ ## Version [Unreleased] <small>tbd</small>
7
+
8
+ ## Version [2.0.0] <small>2020-05-22</small>
9
+
10
+ * This is a trivial release, but because it modifies a public interface, the jump makes it look significant.
11
+ * removed legacy virtual_column parameter support. (it is not ruby 2.7 compatible)
12
+ * fixed warnings in ruby 2.7
7
13
 
8
14
  ## Version [1.6.0] <small>2019-12-02</small>
9
15
 
@@ -60,7 +66,8 @@ a nice looking [Changelog](http://keepachangelog.com).
60
66
  * Initial Release
61
67
  * Extracted from ManageIQ/manageiq
62
68
 
63
- [Unreleased]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v1.6.0...HEAD
69
+ [Unreleased]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v2.0.0...HEAD
70
+ [2.0.0]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v1.6.0...v2.0.0
64
71
  [1.6.0]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v1.5.0...v1.6.0
65
72
  [1.5.0]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v1.4.0...v1.5.0
66
73
  [1.4.0]: https://github.com/ManageIQ/activerecord-virtual_attributes/compare/v1.3.1...v1.4.0
@@ -48,13 +48,9 @@ module ActiveRecord
48
48
  #
49
49
 
50
50
  # Compatibility method: `virtual_attribute` is a more accurate name
51
- def virtual_column(name, type_or_options, **options)
52
- if type_or_options.kind_of?(Hash)
53
- options = options.merge(type_or_options)
54
- type = options.delete(:type)
55
- else
56
- type = type_or_options
57
- end
51
+ def virtual_column(name, **options)
52
+ type = options.delete(:type)
53
+ raise ArgumentError, "missing :type attribute" unless type
58
54
 
59
55
  virtual_attribute(name, type, **options)
60
56
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module VirtualAttributes
3
- VERSION = "1.6.0".freeze
3
+ VERSION = "2.0.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-virtual_attributes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keenan Brock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-29 00:00:00.000000000 Z
11
+ date: 2020-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord