takenoko 0.2.7 → 0.2.8

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: 08ef0bb4b3b7c4482ec4470db97b30bb6fb85c35
4
- data.tar.gz: 3483c0bbf4a6ed35fde43cda1a2b592042e657d0
3
+ metadata.gz: 9a165d87303e311d9cc084364b37eb20df529e96
4
+ data.tar.gz: 92015f2315fecfb9052617f6f609459dbce33c6b
5
5
  SHA512:
6
- metadata.gz: baaa50a24ac0d47750bdaf42e9e756d4d84cce59bf2418a812766146b3fdff57bd2f36ce781328f585e91a52badb85831c4a603c5d5cc1e321fb4a303ea5f0bc
7
- data.tar.gz: 54a9d7da4fe0e43e3edf3de9ad359f2c300300e91db231f6923e1dd4ccc1d955ab17b6855e29b5dd75e0475a0d8d77a0b2e132ad36aabac390b7ed88f4ab4cfb
6
+ metadata.gz: 0a3662fa414dcd85d7a51df07ac309ec7cda4bc60e90b84dd6a5329ef67484a0f6fd158bc11effb764c60db6f62cf1b6c45e8a9134048838d1071299d7d53bba
7
+ data.tar.gz: 20c7fa57908d935103e534dbcc1385a58de4366a0b685247da9fd881a2edb1433d2afeff24b2ccf03c2fd25c79299efcbe89bda4e9080353619fb7cb6509e36b
@@ -21,7 +21,15 @@ module Takenoko
21
21
  end
22
22
 
23
23
  update_table_config(table,worksheet.header)
24
- postprocess_class = Object.const_get(table[:postprocess_class]) if table[:enable_postprocess]
24
+
25
+ postprocess_class = if table[:enable_postprocess]
26
+ begin
27
+ Object.const_get(table[:postprocess_class])
28
+ rescue NameError => e
29
+ Rails.logger.warn e.message
30
+ false
31
+ end
32
+ end
25
33
 
26
34
  Rails.logger.info "Getting table #{table_name}"
27
35
  rows = worksheet.populated_rows.map do |r|
@@ -41,7 +49,7 @@ module Takenoko
41
49
  hash
42
50
  end
43
51
 
44
- if(table[:enable_postprocess])
52
+ if(postprocess_class)
45
53
  rows.reject do |row|
46
54
  if postprocess_class.respond_to? "spreadsheet_row_valid?"
47
55
  postprocess_class.public_send("spreadsheet_row_valid?",row)
@@ -1,3 +1,3 @@
1
1
  module Takenoko
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takenoko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - KhiemNS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-16 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -89,7 +89,7 @@ files:
89
89
  - lib/tasks/takenoko.rake
90
90
  - test/takenoko_test.rb
91
91
  - test/test_helper.rb
92
- homepage: https://github.com/khiemns54/takenoko/tree/release/0.2.7
92
+ homepage: https://github.com/khiemns54/takenoko/tree/release/0.2.8
93
93
  licenses: []
94
94
  metadata: {}
95
95
  post_install_message: