imp_exp 1.0.3 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95c01a0e842b07be48cdb4ba9d3c8c86b290be303ac295ae7e3bed32c25890b6
4
- data.tar.gz: dfaeeb8bd81df45530ce3fffea3d836c8d443fda8c82cf6f959bd02794c6f27d
3
+ metadata.gz: 6778be6a5af145d10c0e080a3a33085a8721d41cc3080b7e4e9ac0b49e35f8ed
4
+ data.tar.gz: d1b14539b4d4fde177d944913006b5251ac9b4f28e04d889e36b9a383bb67f39
5
5
  SHA512:
6
- metadata.gz: b916927e79f41a5f39f59d55355f4e60fdb13442584eb6192dae9deaf23d4349ef32c9b448f7d5deb056c060b65b8fec083a0bcc45e167d0119c67e1bde71e93
7
- data.tar.gz: 7783e50180c86bc6d9bff432e472b2426c480e6bdfc47307a0c1496a5af1fd5aa4ab223128078767eb38c6d9f2b1623da9bfdc2bc7f3d6e6aae2339ec6538997
6
+ metadata.gz: 3d45e45c432147983beb0c7f5d1ed7052f3e34de499eba768feabdec55fc201db8bb68c91932b05cdd0177166cd796985c36bd234d8e6f11d274c9ec8333ead2
7
+ data.tar.gz: d540eba3c9fd5d711c3d9a036045bcea0969bd5f10f829b12f3efe9b58acd28a4435fcbe85195e1d32e3ee9a4b2804da61f36cb47e618fbdc83b71504e6b08ef
@@ -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
- key = "activerecord.attributes.#{i18n_path}"
91
- I18n.t(key, raise: true)
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
- rows = []
101
- preload_associations(order(scoped(scoping_parent))).each do |record|
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ImpExp
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.5"
5
5
  end
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.3
4
+ version: 1.0.5
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-02-26 00:00:00.000000000 Z
11
+ date: 2024-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caxlsx
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 7.0.0
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: 7.0.5
36
+ version: 7.2.0
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 7.0.0
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: 7.0.5
46
+ version: 7.2.0
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rubyzip
43
49
  requirement: !ruby/object:Gem::Requirement