csv2hash 0.6.5 → 0.6.6

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: 1abbff1cb3d760b2d6f7c762a69cd6dbdcbbd2b3
4
- data.tar.gz: aa458b6a73cc2de62b4245431f5adf987aaa7517
3
+ metadata.gz: 18bc8763e096c34ff6118e37ef9fd2247762e91d
4
+ data.tar.gz: 50318a57def57128858b83ccf06ec75a1d62c106
5
5
  SHA512:
6
- metadata.gz: 535644564d7d73cf9a7c28baade14ea09e53443b2f98d1223794e1336f3a0bfa2849ba3ef42b5b0e82adf798aa4faf2a93f291439d5f505437ba40fe5fce8aa5
7
- data.tar.gz: 5f12fe8e872273087f117885885618f4fd67c2a3e178b4d6192bdfd4c51188a572c52c32664246e6a5b5f2c1944bd41c385f92e66e41ad8eb3f54b23533fc860
6
+ metadata.gz: eac65e74ebc8aea9a5ab683ef76c50eff563eec50cd7d07e37d8f9136d10c439f2f242a3d8c44bb1acaf1e42d9461d00851d4123601a514f251e4c4fd0292ea8
7
+ data.tar.gz: e260dd7c94939ebc9acd6e311abb6140afbc3206807f7d4d7272d1feebb48077e77d81cb7654bab52edc859a01d0683133ad32ff6a2af12a55def72478475772
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### VERSION 0.6.6
2
+
3
+ * refactoring
4
+ * little trick on YamlLoader
5
+
6
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/17)
7
+
1
8
  ### VERSION 0.6.5
2
9
 
3
10
  * enhancements
@@ -9,11 +16,15 @@
9
16
  * feature
10
17
  * Add generator for configure csv2hash on Rails app
11
18
 
19
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/16)
20
+
12
21
  ### VERSION 0.6.4
13
22
 
14
23
  * feature
15
24
  * make configuration file can be writing with ERB interpolation.
16
25
 
26
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/15)
27
+
17
28
  ### VERSION 0.6.3
18
29
 
19
30
  * refactoring
@@ -22,16 +33,22 @@
22
33
  * feature
23
34
  * add yml loader
24
35
 
36
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/14)
37
+
25
38
  ### VERSION 0.6.2
26
39
 
27
40
  * feature
28
41
  * Auto discover, you can add floating position on mapping rules
29
42
 
43
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/12)
44
+
30
45
  ### VERSION 0.6.1
31
46
 
32
47
  * deprecations
33
48
  * Structure validation rules, MinColumn, MaxColumn are replaced by :min_columns, :max_columns
34
49
 
50
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/11)
51
+
35
52
  ### VERSION 0.6.0
36
53
 
37
54
  * backwards incompatible changes
@@ -40,6 +57,8 @@
40
57
  * refactoring
41
58
  * replace arguments for rules by DSL of cells
42
59
 
60
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/10)
61
+
43
62
  ### VERSION 0.5.0
44
63
 
45
64
  * backwards incompatible changes
@@ -48,6 +67,8 @@
48
67
  * refactoring
49
68
  * remove params ``` ignore_blank_line ``` to benefit of options of Hash
50
69
 
70
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/9)
71
+
51
72
  ### VERSION 0.4.0
52
73
 
53
74
  * backwards incompatible changes
@@ -56,6 +77,8 @@
56
77
  * refactoring
57
78
  * remove params ``` break_on_failure ``` to benefit of ``` Csv2hash::Main#parse! ``` of ``` Csv2hash::Main#parse ```
58
79
 
80
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/8)
81
+
59
82
  ### VERSION 0.3.0
60
83
 
61
84
  * backwards incompatible changes
@@ -65,6 +88,8 @@
65
88
  * refactoring
66
89
  * Use adapter to select source of data, either file.csv or Array of data, is more transparently, not impact signature of Csv2Hash constructor
67
90
 
91
+ * [fullchanges](https://github.com/FinalCAD/csv2hash/pull/7)
92
+
68
93
  ### VERSION 0.2.1
69
94
 
70
95
  * bug fix
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csv2hash (0.6.5)
4
+ csv2hash (0.6.6)
5
5
  activesupport (~> 4.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -470,6 +470,21 @@ this change is due to Yaml conversion
470
470
 
471
471
  You can write ERB file, should be named with following convention ```<file name>.erb.yml```
472
472
 
473
+ ## YamlLoader
474
+
475
+ You can load your definition with YamlLoader llike that :
476
+
477
+ ```
478
+ loader = Csv2hash::YamlLoader.load!('config/rules.erb.yml')
479
+ loader.definition
480
+ ```
481
+ or
482
+ ```
483
+ loader = Csv2hash::YamlLoader.new('config/rules.erb.yml')
484
+ loader.load!
485
+ loader.definition
486
+ ```
487
+
473
488
  # Type conversion
474
489
 
475
490
  By default Csv2hash doesn't convert basic value, but you can activate this on configuration, for Rails use :
data/UPGRADE.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Upgrading
2
2
 
3
+ # Upgrading from 0.6.5 to 0.6.6
4
+
5
+ nothing
6
+
3
7
  # Upgrading from 0.6.4 to 0.6.5
4
8
 
5
9
  nothing
@@ -1,3 +1,3 @@
1
1
  module Csv2hash
2
- VERSION = '0.6.5'
2
+ VERSION = '0.6.6'
3
3
  end
@@ -12,6 +12,10 @@ module Csv2hash
12
12
  self.conf.deep_symbolize_keys!
13
13
  end
14
14
 
15
+ def self.load! file
16
+ new(file).tap &:load!
17
+ end
18
+
15
19
  def load!
16
20
  mapping = self.conf.fetch(:mapping)
17
21
  header_size = self.conf.fetch(:header_size).to_i
@@ -28,6 +32,7 @@ module Csv2hash
28
32
  end
29
33
 
30
34
  Main[self.conf.fetch(:name)] = self.definition
35
+ nil
31
36
  end
32
37
 
33
38
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv2hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel AZEMAR