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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 605bf8452d214954513539e39a999a8b7570be96
4
- data.tar.gz: 32b53beffe0480001068d605f538a5ce2748bd72
3
+ metadata.gz: a1930137c085dec154c0329a8f9fc5a05eea9eb5
4
+ data.tar.gz: fd2022ba77743dec89e0d8b9f4ba831eb43ceb2d
5
5
  SHA512:
6
- metadata.gz: 3a175a0069c8afe53e136c2277a3b90e859062bb22696ceb3387f0d2d421e5db044036527ba469141eadad3a8820afe4c95bba36e997cb6d367df833b023c93e
7
- data.tar.gz: 7224a76723d3465d177bd0a6843562c546ff795487f8ec23c1e6599e5c737600d1c0a6fda870060e8c9ab5d8e51417b1d175b2581ed61b645481c7ce5e000e5b
6
+ metadata.gz: ec66044fbf2abc3be507ab52e1225f938b534a59a8756183a1e9f463a056781dc63feb8a6ed541fd62a646cdc8d315cc985e0894776321ac91eb921fee8a6238
7
+ data.tar.gz: 05fda3d145e912d39839f49a19d826019d77316b2c332ba8fb1690060d8c021f3a934ef9eb78c305a378513625b01ae827e45de8d3567ea113d16f8f6683545e
@@ -1,3 +1,3 @@
1
1
  module Upcloudify
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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,
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+ require 'monkey_patches'
3
+
4
+ describe Time do
5
+ context "tomorrow" do
6
+ it 'gives the time for tomorrow' do
7
+ time_now = Time.now
8
+ expect(time_now.tomorrow).to be_within(0.0001).of(Time.at(time_now.to_f + 86400))
9
+ end
10
+ end
11
+ end
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.3
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