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 +4 -4
- data/config.rb +7 -1
- data/file-manager.gemspec +1 -1
- data/lib/local_file_manager.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ecb2233f866b2225be7f7d671373416e30b6ae6
|
4
|
+
data.tar.gz: f05f98a02cc008021caee29bd5924f89877e020d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 614ec7b8e7606b11ae977c317d457c32051553e018d14d1e27e39db5abcfd81a5ef1835d9b9a826f7806d9e3c0a68d7dfcf86cfafe63296e40f3a33e53dd77e8
|
7
|
+
data.tar.gz: 0be6cb7ac18f524a545bd65eabfbe6a5e8a98d746a86f55eee646cde5f8a33c66815123255f83437d5b6ab22256893e58ac7f51eda2252d94f57f8c79667fb8d
|
data/config.rb
CHANGED
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.
|
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'
|
data/lib/local_file_manager.rb
CHANGED
@@ -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}", '
|
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.
|
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-
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|