upcloudify 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/upcloudify/version.rb +1 -1
- data/lib/upcloudify.rb +3 -0
- data/spec/monkey_patches_spec.rb +11 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1930137c085dec154c0329a8f9fc5a05eea9eb5
|
4
|
+
data.tar.gz: fd2022ba77743dec89e0d8b9f4ba831eb43ceb2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec66044fbf2abc3be507ab52e1225f938b534a59a8756183a1e9f463a056781dc63feb8a6ed541fd62a646cdc8d315cc985e0894776321ac91eb921fee8a6238
|
7
|
+
data.tar.gz: 05fda3d145e912d39839f49a19d826019d77316b2c332ba8fb1690060d8c021f3a934ef9eb78c305a378513625b01ae827e45de8d3567ea113d16f8f6683545e
|
data/lib/upcloudify/version.rb
CHANGED
data/lib/upcloudify.rb
CHANGED
@@ -46,6 +46,9 @@ module Upcloudify
|
|
46
46
|
# Uploads data into Amazon S3
|
47
47
|
# Returns an object representing the uploaded file
|
48
48
|
def upload(filename, data)
|
49
|
+
filename.gsub!(/\//, '-') # replace slashes with dashes
|
50
|
+
filename.gsub!(/^\-|\-$/, '') # remove leading and trailing dashes
|
51
|
+
|
49
52
|
file = cloud.create(
|
50
53
|
:key => "#{filename}.zip",
|
51
54
|
:body => Zippy.new("#{filename}" => data).data,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upcloudify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- parasquid
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- sample_app/Gemfile
|
188
188
|
- sample_app/sample.rb
|
189
189
|
- sample_app/views/index.erb
|
190
|
+
- spec/monkey_patches_spec.rb
|
190
191
|
- spec/spec_helper.rb
|
191
192
|
- spec/upcloudify_spec.rb
|
192
193
|
- upcloudify.gemspec
|
@@ -215,5 +216,6 @@ signing_key:
|
|
215
216
|
specification_version: 4
|
216
217
|
summary: Upload a file to the cloud and email a link for the attachment
|
217
218
|
test_files:
|
219
|
+
- spec/monkey_patches_spec.rb
|
218
220
|
- spec/spec_helper.rb
|
219
221
|
- spec/upcloudify_spec.rb
|