active_record-framing 0.1.0.pre.6 → 0.1.0.pre.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/README.md +2 -0
- data/lib/active_record/framing/compat/active_record_5_0.rb +2 -2
- data/lib/active_record/framing/compat/active_record_5_1.rb +3 -3
- data/lib/active_record/framing/core_extension.rb +2 -0
- data/lib/active_record/framing/query_methods.rb +2 -0
- data/lib/active_record/framing/version.rb +1 -1
- data/lib/active_record-framing.rb +1 -0
- metadata +3 -9
- data/lib/active_record/framing.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a84c35cce6f059189796de3ed8b120fdf0c078c2fa688bf0e70cd46f41f9ce2b
|
4
|
+
data.tar.gz: f5678727edd6b2ad75939bce7b8c434684970dc3773b1bf7742c1b4e2d4cdafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40d135da789de110cef85ad302cfb8db66d2ef6a826c48c14eea4d8a767f433dcd8469b6fe41b3ce8219ef73593b0d26edcf53aabf64275970618c829d349880
|
7
|
+
data.tar.gz: 4f80b40511c0d1b0e17e8aef18c05ef660724c2fc3fdb873e5682b0c974653cf98a0135bff61c1ffedee8d3bceeb0c429ed18f47d78c60f00aafa9fba1e49eb2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -15,6 +15,8 @@ Unlike scopes, they do not affect the values of attributes upon creation.
|
|
15
15
|
- Ruby 2.3+
|
16
16
|
- ActiveRecord 4.2+
|
17
17
|
|
18
|
+
_Note: Check the builds to be sure your version is in-fact supported. The requirements are left unbounded on the upper constraint for posterity, but may not be gaurenteed to work._
|
19
|
+
|
18
20
|
## Installation
|
19
21
|
|
20
22
|
Add this line to your application's Gemfile:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
frames: ::ActiveRecord::
|
3
|
-
reframe: ::ActiveRecord::
|
2
|
+
frames: ::ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH,
|
3
|
+
reframe: ::ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH
|
4
4
|
}.each do |value_name, default_value|
|
5
5
|
define_method("#{value_name}_values") do
|
6
6
|
@values[value_name] || default_value
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
|
-
frames: ::ActiveRecord::
|
3
|
-
reframe: ::ActiveRecord::
|
2
|
+
frames: ::ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH,
|
3
|
+
reframe: ::ActiveRecord::QueryMethods::FROZEN_EMPTY_HASH
|
4
4
|
}.each do |value_name, default_value|
|
5
5
|
define_method("#{value_name}_values") do
|
6
6
|
get_value(value_name)
|
@@ -8,5 +8,5 @@
|
|
8
8
|
define_method("#{value_name}_values=") do |value|
|
9
9
|
set_value(value_name, value)
|
10
10
|
end
|
11
|
-
::ActiveRecord::
|
11
|
+
::ActiveRecord::QueryMethods::DEFAULT_VALUES[value_name] = default_value
|
12
12
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'active_record/framing/railtie' if defined?(Rails::Railtie)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-framing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dale Stevens
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '4.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: pg
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,7 +147,7 @@ files:
|
|
153
147
|
- CHANGELOG.md
|
154
148
|
- LICENSE
|
155
149
|
- README.md
|
156
|
-
- lib/active_record
|
150
|
+
- lib/active_record-framing.rb
|
157
151
|
- lib/active_record/framing/attribute_methods.rb
|
158
152
|
- lib/active_record/framing/compat/active_record_4_2.rb
|
159
153
|
- lib/active_record/framing/compat/active_record_5_0.rb
|