thoth 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thoth/rails/controller_context.rb +6 -1
- data/lib/thoth/rails/model.rb +4 -4
- data/lib/thoth/version.rb +1 -1
- 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: 36a0fea0a7c3866ead79fbc02e70ff5ae5002e3b
|
4
|
+
data.tar.gz: a2f1581036daafdf21c24d981059e40be9bc2702
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ecb32050cca7bd0cc0e57ff4fdc4367e8833424976bb0d700ae0666be860733611d2b98a7417315eabb1fb669928c158966c95b9f3b5e4e3fe3d9c9c236ff72
|
7
|
+
data.tar.gz: 22bbef5466d1b538531df83eb3e0a7ea6b09e586acba72802f2fef4b5c87ba0dd2f111b04422b1ab00f58731b633583691b9c7d59e4f5ca5d3932505dc3c424e
|
@@ -13,7 +13,12 @@ module Thoth
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def thoth_request_context
|
16
|
-
|
16
|
+
#>= Rails 4.2
|
17
|
+
if ::Rails::VERSION::MAJOR >= 5 || (::Rails::VERSION::MAJOR == 4 && ::Rails::VERSION::MINOR >= 2)
|
18
|
+
context = params.to_unsafe_h
|
19
|
+
else
|
20
|
+
context = params.to_h
|
21
|
+
end
|
17
22
|
context[:current_user] = current_user.try(:id) if defined?(current_user)
|
18
23
|
context
|
19
24
|
end
|
data/lib/thoth/rails/model.rb
CHANGED
@@ -30,11 +30,11 @@ module Thoth
|
|
30
30
|
def thoth_log_update
|
31
31
|
return unless self.class.thoth_options[:on].include?(:update)
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
except_options = self.class.thoth_options[:except]
|
34
|
+
only_options = if except_options.present?
|
35
|
+
self.class.columns.map(&:name) - except_options.map(&:to_s)
|
36
36
|
else
|
37
|
-
|
37
|
+
self.class.thoth_options[:only]
|
38
38
|
end
|
39
39
|
|
40
40
|
if only_options.empty? || !(only_options.map(&:to_s) & changes.keys).empty?
|
data/lib/thoth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thoth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Huibonhoa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|