active_type 0.6.1 → 0.6.2
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/gemfiles/Gemfile.3.2.mysql2.lock +1 -1
- data/gemfiles/Gemfile.3.2.sqlite3.lock +1 -1
- data/gemfiles/Gemfile.4.0.sqlite3.lock +1 -1
- data/gemfiles/Gemfile.4.1.sqlite3.lock +1 -1
- data/gemfiles/Gemfile.4.2.1.mysql2.lock +1 -1
- data/gemfiles/Gemfile.4.2.1.pg.lock +1 -1
- data/gemfiles/Gemfile.4.2.1.sqlite3.lock +1 -1
- data/gemfiles/Gemfile.5.0.0.mysql2.lock +1 -1
- data/gemfiles/Gemfile.5.0.0.pg.lock +1 -1
- data/gemfiles/Gemfile.5.0.0.sqlite3.lock +1 -1
- data/lib/active_type/version.rb +1 -1
- data/lib/active_type.rb +27 -10
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc7ab992e4c50b6b75f74a62feb7b12c65a46703
|
|
4
|
+
data.tar.gz: 4b03beac33f4608904815d836cdf05fc68e2f769
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cda677b927c7c8af52015bf23f2ebd3bb597ccf793bdecbc793ca3ea7a4da80bee0986d0f9a651b06dfdccdaae7ce2b7066de9aec7f76a5104db8d79918e79c
|
|
7
|
+
data.tar.gz: 8e4ce97d57197a2e618774e660a7ad70547ee12d906650d492cafb2f7c2dbf4adb4d12b29d3643d0e8de27917e2a93ac166cc5da000b66ba5d569ef2f1f14721
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
ActiveType is in a pre-1.0 state. This means that its APIs and behavior are subject to breaking changes without deprecation notices. Until 1.0, version numbers will follow a [Semver][]-ish `0.y.z` format, where `y` is incremented when new features or breaking changes are introduced, and `z` is incremented for lesser changes or bug fixes.
|
|
6
6
|
|
|
7
|
+
## [0.6.2][] (2017-01-30)
|
|
8
|
+
|
|
9
|
+
* When used with Rails, defer loading to not interfere with `ActiveRecord` configuration in initializers.
|
|
10
|
+
|
|
11
|
+
## [0.6.1][] (2016-12-05)
|
|
12
|
+
|
|
13
|
+
* Remove spec folder from packaged gem.
|
|
14
|
+
|
|
7
15
|
## [0.6.0][] (2016-07-05)
|
|
8
16
|
|
|
9
17
|
* Drop support for 1.8.7.
|
data/lib/active_type/version.rb
CHANGED
data/lib/active_type.rb
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require 'active_type/version'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require 'active_type/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
load_now = proc do
|
|
7
|
+
require 'active_type/util'
|
|
8
|
+
require 'active_type/record'
|
|
9
|
+
require 'active_type/object'
|
|
10
|
+
|
|
11
|
+
if ActiveRecord::VERSION::STRING == '4.2.0'
|
|
12
|
+
raise(<<-MESSAGE.strip_heredoc)
|
|
13
|
+
ActiveType is not compatible with ActiveRecord 4.2.0. Please upgrade to 4.2.1
|
|
14
|
+
For details see https://github.com/makandra/active_type/issues/31
|
|
15
|
+
MESSAGE
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
if defined?(Rails) && defined?(ActiveSupport)
|
|
21
|
+
# If we are inside Rails, we'll assume active_record will be required anyways
|
|
22
|
+
# in this case, wait until then, to not mess with ActiveRecord configuration.
|
|
23
|
+
# (compare https://github.com/rails/rails/issues/23589)
|
|
24
|
+
ActiveSupport.on_load(:active_record) do
|
|
25
|
+
load_now.call()
|
|
26
|
+
end
|
|
27
|
+
else
|
|
28
|
+
# No Rails.
|
|
29
|
+
require 'active_record'
|
|
30
|
+
load_now.call()
|
|
14
31
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_type
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tobias Kraze
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|