file-manager 0.0.6 → 0.0.7

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: b03659786c6c1cc6fed760a7f0ae5bfef77416c6
4
- data.tar.gz: 7c83bd5c29d661eb819c4981438937a862a0fc89
3
+ metadata.gz: de944628d162a00cd8792237dc69f6a85c1a911e
4
+ data.tar.gz: c71bf0d48852374e29baa006579a45e64011346d
5
5
  SHA512:
6
- metadata.gz: 6ec927ad9316d54a91935c831cdcdd48a3a7e4d630c6e9aa83ad6e4c43eb35e4c89d697cb94d25dd5c3cad27bcd537f0316846d53d4fd8fd0abbfd696a719bdc
7
- data.tar.gz: 2f2f76c3435fbc29cacbd32824ea0f4f627ae2b8d39ed95185640cfab79a740753b558c80ec1996787e4e67f4c446be58fac6e57cf47cc25321c28a50f5926b9
6
+ metadata.gz: 6238a0427c302da4adac889dcfdbfbec0638df4b94bcb5f5d552d06a91557102dd4b513ebc15a74018a55345c0efd21a2a6c57a1693c453473e560fb75ac9179
7
+ data.tar.gz: f5d042302ffa9fc3301baf6421eddd4917a0e3d1903da08e714d1ac29dcd3a2de9a53f9512da8804d3951725a628d8d09eb88fd4cfff3e8fb906638be3680cdd
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'
6
+ spec.version = '0.0.7'
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'
@@ -15,7 +15,7 @@ class LocalFileManager
15
15
  contents
16
16
  end
17
17
 
18
- def save_file file_name, file_contents
18
+ def save_file(file_name, file_contents, write_options = {})
19
19
  root_path = options[:root_path]
20
20
  print "Saving file \"#{file_name}\" to local folder \"#{root_path}\"..."
21
21
  File.open("#{root_path}/#{file_name}", 'wb') { |f| f.write(file_contents) }
@@ -18,12 +18,12 @@ class S3FileManager
18
18
  contents
19
19
  end
20
20
 
21
- def save_file file_name, file_contents
21
+ def save_file(file_name, file_contents, write_options = {})
22
22
  print "Saving file \"#{file_name}\" to bucket \"#{options[:bucket]}\"..."
23
23
  s3_service = connect_s3_service
24
24
  bucket = s3_service.buckets[options[:bucket]]
25
25
 
26
- bucket.objects["#{file_name}"].write(file_contents.to_s)
26
+ bucket.objects["#{file_name}"].write(file_contents.to_s, write_options)
27
27
  puts 'done.'
28
28
  end
29
29
 
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.6
4
+ version: 0.0.7
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-10-09 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.1.3
91
+ rubygems_version: 2.0.14
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: File manager, access S3 or local