adaptive_alias 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -6
- data/lib/adaptive_alias/active_model_patches/read_attribute.rb +2 -1
- data/lib/adaptive_alias/active_model_patches/remove_alias_attribute.rb +9 -2
- data/lib/adaptive_alias/active_model_patches/write_attribute.rb +1 -1
- data/lib/adaptive_alias/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0375ca9867e41c41fe18b38cb1f37ff2a0067367304f6481250cd573c5dc5be4
|
4
|
+
data.tar.gz: bc0ebb4c4d63ea36e203b94f5c3ea0411c4fab408e93ea6c9dc0de5354c2db8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0d5f519ab910bcf93c982f2ea6ca9c3e944ea0e90a07d6e938668b4575d450d6d019a60b62dd2020c373434e8ece4f7c1d9ea148ca269a4823718b80f8a8c07
|
7
|
+
data.tar.gz: 9a699915af111f6e01aa6fac45a888583a629b1f6eb0d75c84a15188f329e3f34401a330a6ee33040453b4e9f2d6a018bca61626e0784944004832c3db6d6bc3
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
## Change Log
|
2
2
|
|
3
|
+
### [v0.2.0](https://github.com/khiav223577/adaptive_alias/compare/v0.1.0...v0.2.0) 2022/08/05
|
4
|
+
- [#11](https://github.com/khiav223577/adaptive_alias/pull/11) [Feature] Support polymorphic (@khiav223577)
|
5
|
+
- [#10](https://github.com/khiav223577/adaptive_alias/pull/10) [Enhance] Prevent adding methods directly in class / module (@khiav223577)
|
6
|
+
- [#9](https://github.com/khiav223577/adaptive_alias/pull/9) [Enhance] Prevent changing original order of where conditions (@khiav223577)
|
7
|
+
- [#8](https://github.com/khiav223577/adaptive_alias/pull/8) [Test] Make sure we are reset to use original patch when some test cases fail (@khiav223577)
|
8
|
+
- [#7](https://github.com/khiav223577/adaptive_alias/pull/7) [Test] Add test cases to test destroy (@khiav223577)
|
9
|
+
|
3
10
|
### [v0.1.0](https://github.com/khiav223577/adaptive_alias/compare/v0.0.3...v0.1.0) 2022/08/01
|
4
|
-
- [#6](https://github.com/khiav223577/adaptive_alias/pull/6) Deal with creating records (@khiav223577)
|
5
|
-
- [#5](https://github.com/khiav223577/adaptive_alias/pull/5) Prevent infinite loop if something went wrong (@khiav223577)
|
6
|
-
- [#4](https://github.com/khiav223577/adaptive_alias/pull/4) Fix
|
11
|
+
- [#6](https://github.com/khiav223577/adaptive_alias/pull/6) [Feature] Deal with creating records (@khiav223577)
|
12
|
+
- [#5](https://github.com/khiav223577/adaptive_alias/pull/5) [Enhance] Prevent infinite loop if something went wrong (@khiav223577)
|
13
|
+
- [#4](https://github.com/khiav223577/adaptive_alias/pull/4) [Fix] Attributes writer method should be defined after schema changes (@khiav223577)
|
7
14
|
|
8
15
|
### [v0.0.3](https://github.com/khiav223577/adaptive_alias/compare/v0.0.2...v0.0.3) 2022/07/27
|
9
|
-
- [#3](https://github.com/khiav223577/adaptive_alias/pull/3) Fix
|
16
|
+
- [#3](https://github.com/khiav223577/adaptive_alias/pull/3) [Fix] Prevent calling custom column names from raising missing attributes (@khiav223577)
|
10
17
|
|
11
18
|
### [v0.0.2](https://github.com/khiav223577/adaptive_alias/compare/v0.0.1...v0.0.2) 2022/07/26
|
12
|
-
- [#2](https://github.com/khiav223577/adaptive_alias/pull/2) Doesn't need rails_compatibility in runtime (@khiav223577)
|
19
|
+
- [#2](https://github.com/khiav223577/adaptive_alias/pull/2) [Enhance] Doesn't need rails_compatibility in runtime (@khiav223577)
|
13
20
|
|
14
21
|
### v0.0.1 2022/07/22
|
15
|
-
- [#1](https://github.com/khiav223577/adaptive_alias/pull/1) Implement adaptive_alias features (@khiav223577)
|
22
|
+
- [#1](https://github.com/khiav223577/adaptive_alias/pull/1) [Feature] Implement adaptive_alias features (@khiav223577)
|
@@ -19,6 +19,13 @@ module AdaptiveAlias
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
module
|
23
|
-
|
22
|
+
# Nested module include is not supported until ruby 3.0
|
23
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
|
24
|
+
AdaptiveAlias::ActiveModelPatches::RemoveAliasAttribute.instance_methods.each do |method|
|
25
|
+
ActiveModel::AttributeMethods::ClassMethods.define_method(method, AdaptiveAlias::ActiveModelPatches::RemoveAliasAttribute.instance_method(method))
|
26
|
+
end
|
27
|
+
else
|
28
|
+
module ActiveModel::AttributeMethods::ClassMethods
|
29
|
+
include AdaptiveAlias::ActiveModelPatches::RemoveAliasAttribute
|
30
|
+
end
|
24
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adaptive_alias
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.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: 2022-08-
|
11
|
+
date: 2022-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|