file-manager 0.0.3 → 0.0.4

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: e8eaf7733152d271b5aae936b8031ae7288363f9
4
- data.tar.gz: f7a939e41d12b74c8aeef783067b404d2d0689ce
3
+ metadata.gz: 4ecb2233f866b2225be7f7d671373416e30b6ae6
4
+ data.tar.gz: f05f98a02cc008021caee29bd5924f89877e020d
5
5
  SHA512:
6
- metadata.gz: 4ff119bebfb68dc776aad8f5878f189c1851e2c724147083f05406ad45e8f6a46d018fc7cbe70302e50a78334f26c0d2a059d87802a8ab1634ac8b3a3f7edff5
7
- data.tar.gz: 94421f9cdc6f9a05f192be6539898b35c6e135ef68b8535ce77ae8574d37cbcb8b94eb800ca410868cad19c6d3b671257cbfa53f3d4a5f5e47bd774021b32ef1
6
+ metadata.gz: 614ec7b8e7606b11ae977c317d457c32051553e018d14d1e27e39db5abcfd81a5ef1835d9b9a826f7806d9e3c0a68d7dfcf86cfafe63296e40f3a33e53dd77e8
7
+ data.tar.gz: 0be6cb7ac18f524a545bd65eabfbe6a5e8a98d746a86f55eee646cde5f8a33c66815123255f83437d5b6ab22256893e58ac7f51eda2252d94f57f8c79667fb8d
data/config.rb CHANGED
@@ -10,5 +10,11 @@ file_managers = {
10
10
  pdf: {
11
11
  type: 'local',
12
12
  root_path:'reports/'
13
+ },
14
+ txt: {
15
+ type: 'S3',
16
+ access_key_id: 'your key',
17
+ secret_access_key: 'your access',
18
+ bucket: 'your bucket'
13
19
  }
14
- }
20
+ }
data/file-manager.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "file-manager"
6
- spec.version = '0.0.3'
6
+ spec.version = '0.0.4'
7
7
  spec.authors = ["Francisco Barroso / Marlus Saraiva"]
8
8
  spec.email = ["franciscobarroso@grupofortes.com.br"]
9
9
  spec.description = 'File manager, access S3 or local'
@@ -9,7 +9,7 @@ class LocalFileManager
9
9
  def read_file file_name
10
10
  root_path = options[:root_path]
11
11
  print "Reading file \"#{file_name}\" from local folder \"#{root_path}\"..."
12
- contents = File.open("#{root_path}/#{file_name}", 'rb') { |f| f.read }
12
+ contents = File.open("#{root_path}/#{file_name}", 'r:UTF-8') { |f| f.read }
13
13
  puts 'done.'
14
14
 
15
15
  contents
@@ -21,4 +21,4 @@ class LocalFileManager
21
21
  File.open("#{root_path}/#{file_name}", 'wb') { |f| f.write(file_contents) }
22
22
  puts 'done.'
23
23
  end
24
- end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francisco Barroso / Marlus Saraiva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-09 00:00:00.000000000 Z
11
+ date: 2014-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk