flextures 4.2.3 → 4.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74293ed4bb2a7a79c1d03f921a299331da61d048
4
- data.tar.gz: d4793912cbc2f6ca4df60dd9c4a1b95946ebf920
3
+ metadata.gz: f5f9232492730533453bc33fa9d4df6fca93c97d
4
+ data.tar.gz: fd0a2033c60d24f2a24f42eb787c1326bc1c1ba4
5
5
  SHA512:
6
- metadata.gz: 44fdd34a46caa7c339c1ee4031919a57e58ce9b5021403b63010c022efbfa5ca9e126b972496efd688c39729ebb907e8f286b4f9d31b3e4bbfb185aabe655d6a
7
- data.tar.gz: 5eb1fb89027ef0ccee3ec97fe6fc4b1feb9e5285ed2c4149d9785fbf1616c86632c2b1ad5acc60d2e0081f3d17e63acdb1f1c699289b5af8126029ee3c77b659
6
+ metadata.gz: b90609635f77c66f1b1d9d02ee8fc3dc00bddbacb8465d4a4169401b03ec8996dea1c2417865f411eee34ae1bc7e4e7d647ef179717e17c6755c27c738efc8d0
7
+ data.tar.gz: db4611e30584f94a7a50ed5caed610eb5b5f84a786fa8849ea73ca1801ccbd13001bc5669687953babe3a2b1a43f4bb959a13c755bdf73d94d08a1f9732db701
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flextures (4.2.3)
4
+ flextures (4.2.4)
5
5
  activerecord
6
6
  activesupport
7
7
 
@@ -14,11 +14,11 @@ module Flextures
14
14
  puts "dumping..."
15
15
  case ENV["FORMAT"].to_s.to_sym
16
16
  when :yml,:yaml
17
- table_names.map { |fmt| Flextures::Dumper::yml(fmt) }
17
+ table_names.each { |fmt| Flextures::Dumper::yml(fmt) }
18
18
  when :csv
19
- table_names.map { |fmt| Flextures::Dumper::csv(fmt) }
19
+ table_names.each { |fmt| Flextures::Dumper::csv(fmt) }
20
20
  else
21
- table_names.map { |fmt| Flextures::Dumper::csv(fmt) }
21
+ table_names.each { |fmt| Flextures::Dumper::csv(fmt) }
22
22
  end
23
23
  end
24
24
 
@@ -30,11 +30,11 @@ module Flextures
30
30
  puts "loading..."
31
31
  case file_format.to_s.to_sym
32
32
  when :csv
33
- table_names.map { |fmt| Flextures::Loader::load(fmt, %i[csv]) }
33
+ table_names.each { |fmt| Flextures::Loader::load(fmt, %i[csv]) }
34
34
  when :yml
35
- table_names.map { |fmt| Flextures::Loader::load(fmt, %i[yml]) }
35
+ table_names.each { |fmt| Flextures::Loader::load(fmt, %i[yml]) }
36
36
  else
37
- table_names.map { |fmt| Flextures::Loader::load(fmt) }
37
+ table_names.each { |fmt| Flextures::Loader::load(fmt) }
38
38
  end
39
39
  end
40
40
 
@@ -47,11 +47,20 @@ module Flextures
47
47
  puts "generating..."
48
48
  case file_format.to_s.to_sym
49
49
  when :yml
50
- table_names.map { |fmt| Flextures::Loader::yml(fmt); Flextures::Dumper::yml(fmt) }
50
+ table_names.each do |fmt|
51
+ Flextures::Loader::load(fmt, %i[yml])
52
+ Flextures::Dumper::yml(fmt)
53
+ end
51
54
  when :csv
52
- table_names.map { |fmt| Flextures::Loader::csv(fmt); Flextures::Dumper::csv(fmt) }
55
+ table_names.each do |fmt|
56
+ Flextures::Loader::load(fmt, %i[csv])
57
+ Flextures::Dumper::csv(fmt)
58
+ end
53
59
  else
54
- table_names.map { |fmt| Flextures::Loader::csv(fmt); Flextures::Dumper::csv(fmt) }
60
+ table_names.each do |fmt|
61
+ Flextures::Loader::load(fmt)
62
+ Flextures::Dumper::csv(fmt)
63
+ end
55
64
  end
56
65
  end
57
66
  end
@@ -191,9 +191,9 @@ module Flextures
191
191
  # fixture file prefer YAML to CSV
192
192
  # @params [Hash] format file load format(table name, file name, options...)
193
193
  def self.load(format, type = %i[csv yml])
194
- file_name, *exts = file_exist(format)
194
+ file_name, *exts = file_exist(format, type)
195
195
  format[:erb] = exts.include?(:erb)
196
- method = exts.find { |k| %i[csv yml].include?(k) }
196
+ method = exts.find { |k| type.include?(k) }
197
197
 
198
198
  return unless self.file_loadable?(format, file_name)
199
199
 
@@ -1,3 +1,3 @@
1
1
  module Flextures
2
- VERSION="4.2.3"
2
+ VERSION="4.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flextures
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.3
4
+ version: 4.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - baban