importeer_plan 0.0.6 → 0.0.7

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: 2743853327f4e299d1fff0fa6d1f4d90e644d700
4
- data.tar.gz: 6ca7c85acc4ccc304ebf7ed52614412802b1cd06
3
+ metadata.gz: 592d3c98de9ff2617caa9de9487b526690ab19d9
4
+ data.tar.gz: 97423210c1df02d17a12335fe3bff6ae7bc4bc3b
5
5
  SHA512:
6
- metadata.gz: 3cbf16f68691043d9c32d2802cbf20dc9ef21df07ffd6a5fa8ee752b18556e92336d89da50dd5cdca3d35a3d243b973fb545250db049dd989fd4ee7f4ddc1262
7
- data.tar.gz: 5b94b7ccb82a8e84ebaa7450fa5057e55ffa95f23dfb0ce595eb0512e6f0c81bf7303a7014bf89fd9d703c050a09ff043acdb52567bdd771259360d37cc2c242
6
+ metadata.gz: b49214a5b03ccf887f9fce755b7cc669ef629a42e3df66ba4f4b603976d8c15dd0f9af6f9040aaadb5941e749f393367f5a1851b2fd115c1d45eb8557050b066
7
+ data.tar.gz: fb705b17864cafffa356c4d4bf19e76772d8635a9b5803301358fbebd688395346bd9f2195ea43a640f103ee8d4d827b5b60b5a9fbeed16259fa00fa8d284ba0
data/README.md CHANGED
@@ -28,10 +28,14 @@ Importeer.new takes two options:
28
28
  * size of batch_of_lines_to_import (integer, optional, defaults to 1000)
29
29
 
30
30
 
31
- My applications-classes for processing data from external files inherit from Importeer.
31
+ My applications-classes for processing data from external files inherit from Importeer, depending the file-type:
32
+
33
+ * xls: ImporteerPlan::MyXls
34
+ * csv: ImporteerPlan::MyCsv
35
+ * txt: ImporteerPlan::MyTxt
32
36
 
33
37
  ```ruby
34
- class ImporteerSomething < ImporteerPlan::Importeer
38
+ class ImporteerSomething < ImporteerPlan::MyXls
35
39
  attr_accessor :my_var, :another_var
36
40
  #call importeer("filename") to import the file in batches of 1000, optional importeer("filename", size)
37
41
 
@@ -43,8 +47,9 @@ class ImporteerSomething < ImporteerPlan::Importeer
43
47
  end
44
48
  ```
45
49
 
46
- ## Development
47
-
50
+ ## Test
51
+ ImporteerPlan uses minitest.
52
+ Run rake to start the test-suite.
48
53
 
49
54
 
50
55
  ## Contributing
data/changelog.md CHANGED
@@ -1,5 +1,8 @@
1
+ ###### 0.0.6
2
+ nothing happened
3
+
1
4
  ###### 0.0.5
2
- todo
5
+ nothing happened
3
6
 
4
7
  ###### 0.0.4
5
8
  start logging changes
@@ -1,3 +1,3 @@
1
1
  module ImporteerPlan
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,4 +1,4 @@
1
- require "importeer_plan/version"
1
+ # require "importeer_plan/version"
2
2
 
3
3
  module ImporteerPlan
4
4
  class Importeer
@@ -20,7 +20,6 @@ module ImporteerPlan
20
20
  end
21
21
 
22
22
  def bron
23
- Spreadsheet.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each
24
23
  end
25
24
 
26
25
  def importeer
@@ -29,5 +28,35 @@ module ImporteerPlan
29
28
 
30
29
  end
31
30
 
31
+ class MyXls < Importeer
32
+ def initialize(*)
33
+ super
34
+ end
35
+
36
+ def bron
37
+ Spreadsheet.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each
38
+ end
39
+ end
40
+
41
+ class MyCsv< Importeer
42
+ def initialize(*)
43
+ super
44
+ end
45
+
46
+ def bron
47
+ # Csv.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each
48
+ end
49
+ end
50
+
51
+ class MyTxt< Importeer
52
+ def initialize(*)
53
+ super
54
+ end
55
+
56
+ def bron
57
+ # Csv.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each
58
+ end
59
+
60
+ end
32
61
  end
33
62
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importeer_plan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - rolf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-08 00:00:00.000000000 Z
11
+ date: 2015-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spreadsheet
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.2.2
163
+ rubygems_version: 2.4.6
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: only purpose is provide some reusable defaults for importing and handling