imp_exp 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/imp_exp/models/base.rb +9 -6
- data/lib/imp_exp/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26e8634a3041bbe34e2d8488bc6238dfd44544fa862704ef18fd40f5a0544a97
|
4
|
+
data.tar.gz: 16aae84ac54c68d7c14c988f22ea2d19363f2eacb0c6043b7a495980ced72c90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 062176d6f62d1e9b8043a7e2730499e1e73319a756176e729f86eceec29c1ca13acc86f77928cc8b41f7cad56845d9a5f1fed28b088843694bfd12a19d4d1dbb
|
7
|
+
data.tar.gz: 811d80f670688704d2fd839bdf26a43d26281e57b88e19fcd72bc0bd418530fe9daad0a3c50014177ba1b9b26fc3cdfca558c3e86938d55b7d665b56afc8c82d
|
@@ -87,8 +87,13 @@ module ImpExp
|
|
87
87
|
def headers_translated
|
88
88
|
(attributes + relations).map do |name, opts = {}|
|
89
89
|
i18n_path = opts[:i18n_path].presence || "#{active_record_class.model_name.i18n_key}.#{name}"
|
90
|
-
|
91
|
-
|
90
|
+
begin
|
91
|
+
I18n.t("activerecord.attributes.#{i18n_path}", raise: true)
|
92
|
+
rescue I18n::MissingTranslationData
|
93
|
+
raise if opts[:i18n_path].present?
|
94
|
+
|
95
|
+
I18n.t("attributes.#{name}", raise: true)
|
96
|
+
end
|
92
97
|
end
|
93
98
|
end
|
94
99
|
|
@@ -97,11 +102,9 @@ module ImpExp
|
|
97
102
|
end
|
98
103
|
|
99
104
|
def rows(scoping_parent)
|
100
|
-
|
101
|
-
|
102
|
-
rows << row(record)
|
105
|
+
preload_associations(order(scoped(scoping_parent))).map do |record|
|
106
|
+
row(record)
|
103
107
|
end
|
104
|
-
rows
|
105
108
|
end
|
106
109
|
|
107
110
|
def row(record)
|
data/lib/imp_exp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imp_exp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dev team Nerya
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caxlsx
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.4'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: observer
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rails
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,7 +47,7 @@ dependencies:
|
|
33
47
|
version: 7.0.0
|
34
48
|
- - "<"
|
35
49
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
50
|
+
version: 8.0.0
|
37
51
|
type: :runtime
|
38
52
|
prerelease: false
|
39
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +57,7 @@ dependencies:
|
|
43
57
|
version: 7.0.0
|
44
58
|
- - "<"
|
45
59
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
60
|
+
version: 8.0.0
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: rubyzip
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|