flextures 4.2.2 → 4.2.3

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
  SHA1:
3
- metadata.gz: 9726d311d7a8e2ea0e476d87c3aa2c6f55e499aa
4
- data.tar.gz: 5d698420575a089d9752e8a8059cf4502539815f
3
+ metadata.gz: 74293ed4bb2a7a79c1d03f921a299331da61d048
4
+ data.tar.gz: d4793912cbc2f6ca4df60dd9c4a1b95946ebf920
5
5
  SHA512:
6
- metadata.gz: 91f20fc07082d3fd1216109dcc6be7adfe6ab56ce014a828d3907aed6e9e957926130eb73dd5189b45c63bd5d55a5e547455fcbdf989179f8e6054c8d78a2123
7
- data.tar.gz: f5142e6bc66c4b4e889304c616627900e3865651252b7380e9c292335b25c453c5bf09b2fcb1eb9146a781b61edfd273232174652a00267921c728a5b042163a
6
+ metadata.gz: 44fdd34a46caa7c339c1ee4031919a57e58ce9b5021403b63010c022efbfa5ca9e126b972496efd688c39729ebb907e8f286b4f9d31b3e4bbfb185aabe655d6a
7
+ data.tar.gz: 5eb1fb89027ef0ccee3ec97fe6fc4b1feb9e5285ed2c4149d9785fbf1616c86632c2b1ad5acc60d2e0081f3d17e63acdb1f1c699289b5af8126029ee3c77b659
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ ruby ">=2.1.0"
4
+
3
5
  # Specify your gem's dependencies in flextures.gemspec
4
6
  gemspec
5
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- flextures (4.2.2)
4
+ flextures (4.2.3)
5
5
  activerecord
6
6
  activesupport
7
7
 
@@ -21,7 +21,7 @@ GEM
21
21
  tzinfo (~> 1.1)
22
22
  arel (7.1.4)
23
23
  concurrent-ruby (1.0.4)
24
- i18n (0.7.0)
24
+ i18n (0.8.0)
25
25
  minitest (5.4.0)
26
26
  minitest-bang (0.1.1)
27
27
  minitest (>= 4.7.5, <= 5.4.0)
@@ -51,5 +51,8 @@ DEPENDENCIES
51
51
  minitest-power_assert (= 0.0.3)
52
52
  rake
53
53
 
54
+ RUBY VERSION
55
+ ruby 2.2.3p173
56
+
54
57
  BUNDLED WITH
55
- 1.11.2
58
+ 1.14.3
@@ -30,9 +30,9 @@ 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::csv(fmt) }
33
+ table_names.map { |fmt| Flextures::Loader::load(fmt, %i[csv]) }
34
34
  when :yml
35
- table_names.map { |fmt| Flextures::Loader::yml(fmt) }
35
+ table_names.map { |fmt| Flextures::Loader::load(fmt, %i[yml]) }
36
36
  else
37
37
  table_names.map { |fmt| Flextures::Loader::load(fmt) }
38
38
  end
@@ -190,10 +190,10 @@ module Flextures
190
190
  # load fixture data
191
191
  # fixture file prefer YAML to CSV
192
192
  # @params [Hash] format file load format(table name, file name, options...)
193
- def self.load(format)
193
+ def self.load(format, type = %i[csv yml])
194
194
  file_name, *exts = file_exist(format)
195
195
  format[:erb] = exts.include?(:erb)
196
- method = exts.detect { |k| [:csv, :yml].include?(k) }
196
+ method = exts.find { |k| %i[csv yml].include?(k) }
197
197
 
198
198
  return unless self.file_loadable?(format, file_name)
199
199
 
@@ -297,7 +297,7 @@ module Flextures
297
297
  # parse format option and return load file info
298
298
  # @param [Hash] format load file format informations
299
299
  # @return [Array] [file_name, filt_type(:csv or :yml)]
300
- def self.file_exist(format, type = [:csv, :yml])
300
+ def self.file_exist(format, type = %i[csv yml])
301
301
  table_name = format[:table].to_s
302
302
  file_name = (format[:file] || format[:table]).to_s
303
303
  base_dir_name = Flextures::Configuration.load_directory
@@ -1,3 +1,3 @@
1
1
  module Flextures
2
- VERSION="4.2.2"
2
+ VERSION="4.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flextures
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.2
4
+ version: 4.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - baban
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord