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 +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +6 -3
- data/lib/flextures/flextures_command.rb +2 -2
- data/lib/flextures/flextures_loader.rb +3 -3
- data/lib/flextures/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: 74293ed4bb2a7a79c1d03f921a299331da61d048
|
4
|
+
data.tar.gz: d4793912cbc2f6ca4df60dd9c4a1b95946ebf920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44fdd34a46caa7c339c1ee4031919a57e58ce9b5021403b63010c022efbfa5ca9e126b972496efd688c39729ebb907e8f286b4f9d31b3e4bbfb185aabe655d6a
|
7
|
+
data.tar.gz: 5eb1fb89027ef0ccee3ec97fe6fc4b1feb9e5285ed2c4149d9785fbf1616c86632c2b1ad5acc60d2e0081f3d17e63acdb1f1c699289b5af8126029ee3c77b659
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
flextures (4.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.
|
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.
|
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::
|
33
|
+
table_names.map { |fmt| Flextures::Loader::load(fmt, %i[csv]) }
|
34
34
|
when :yml
|
35
|
-
table_names.map { |fmt| Flextures::Loader::
|
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.
|
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 = [
|
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
|
data/lib/flextures/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|