fileconv 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: d0c5d033ca9bf1db0e74d9bdc1771d6cc41c3e6fc2729d3fe3f44d67e443a426
4
- data.tar.gz: 583900bf4b63b85b88f1f6c151123c6885ef77315ddfe462d1f401837477e65f
3
+ metadata.gz: a708123572b69d7b44b6c8a9f409df95554a07ac0a7fcbdd0b649b187584e06d
4
+ data.tar.gz: 8985be55557557066289a2e00dc517b2611dd733b9aeb6f698af3d1a2b90e90a
5
5
  SHA512:
6
- metadata.gz: f380da592013613c8a661c3136ac8bdde1eaec479407133cee8a2360983d07474d4c1f6f16f1de0ef4f0f613b66b4678d44bbc7e5acd53cbcbab6a9f72eeff7d
7
- data.tar.gz: e1c1385f7d0eb5f474df3e0a605672a12327c9ae67cd549717987cda3ec55fd00e161b85d55b9b23722ea9e58f894b163104ca3430091375a1f6e21c7b4657d4
6
+ metadata.gz: f227c444b154e4b74d043070188858bca74cedd472d4e2727db2acef35e869f98500b284dce4b4358ad89d031899b806dfc4f7236c1d806772e6fa40f69d9756
7
+ data.tar.gz: 9befc404adf322e8869686f2f12367f507f84c8d3c06e87661b24d7b01e24a0dd89fa929a72408c568b6adca4a601947c246aa415d58363f1e2fad39184b8242
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fileconv (0.2.1)
4
+ fileconv (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -54,7 +54,7 @@ That's it. Now you can use a method `#conv` to convert all text files(`.txt`) fr
54
54
 
55
55
  ```
56
56
  convertor = AddLinenoConvertor.new
57
- covertor.conv
57
+ convertor.conv
58
58
  ```
59
59
 
60
60
  If you have two text(`.txt`) files:
@@ -3,6 +3,10 @@ require 'fileconv'
3
3
  class ListFile
4
4
  include Fileconv::Data
5
5
 
6
+ def input_ext
7
+ "data"
8
+ end
9
+
6
10
  def init_conv
7
11
  @meta[:files] = []
8
12
  @opts[:disable_read_file] = true
@@ -0,0 +1,16 @@
1
+ require 'fileconv'
2
+ require 'base64'
3
+
4
+ class ModifyAndBase64
5
+ include Fileconv::Data
6
+
7
+ def input_ext
8
+ "data"
9
+ end
10
+
11
+ def convert_file(data, acc)
12
+ Base64.encode64(data + "modify")
13
+ end
14
+ end
15
+
16
+ ModifyAndBase64.new.conv
@@ -0,0 +1,2 @@
1
+ test test
2
+ hello world
@@ -15,10 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/hinastory/fileconv"
18
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
19
18
 
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
19
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
21
  end
@@ -1,3 +1,3 @@
1
1
  module Fileconv
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fileconv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hinastory
@@ -60,7 +60,9 @@ files:
60
60
  - example/csv/test2.txt
61
61
  - example/csv/with_header.rb
62
62
  - example/data/list_file.rb
63
+ - example/data/modify_and_base64.rb
63
64
  - example/data/test.data
65
+ - example/data/test2.data
64
66
  - example/file/read_bytes.rb
65
67
  - example/file/test.data
66
68
  - example/json/address.json