star 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89914a09838e130825c2db61502c74f713b473e7
4
- data.tar.gz: f2a04a96579ae2512a5162ddf771047be89da6f4
3
+ metadata.gz: 921b1766491cba17bb8e2904232605ed118e9173
4
+ data.tar.gz: 99f39a49d3a80f42186be1e1f3b90a48f8bae5de
5
5
  SHA512:
6
- metadata.gz: f633d688af692ccfa96bdbe6fe462d4271c47ad115528731caa3c4423fd54112506aa7b04bdb4ce1bc80990020465cb36553bc8d2c69e7e614247d9e857cad12
7
- data.tar.gz: e5baa3c1eaa12a1810d3be5af46b95e2a4cf27ccdd3ff40cabb3cba2fed012acea8c5176ccc48beb58227f2c6fb582cfebee566b94b693e7b594138d6dcfc00f
6
+ metadata.gz: 008e6b672365ada179be4e34a3dcd9cd96cd98062d2cc8c4b31edf3831da730dcfb2047e78994768ddff1bcec4a10278bd7753824676d2509613893f924f8224
7
+ data.tar.gz: 31ee824ab9013b971ccee45e00dedfecdbf742dfd37c6f49249c16dc9ab4084c89c87f12ec48f0eeebf6db8791bf56b3692f820c25b739237f00b60cbb7d9c1b
@@ -2,6 +2,3 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3.0
4
4
  before_install: gem install bundler -v 1.10.6
5
- env:
6
- matrix:
7
- secure: HraDnUT1Py2HLDuyYvZaVvgRTFLyfHI9iZA+Zo4auN2IYFdBNAK7x8dNh/LzEjKycUcJ+CGz/8QMegoxcD3bZE5AJtIb0O7u9rw81BQBmNVS4F3Q9PitNQ1Qw/nRBStJTOFcFET9L7wmotS7OZMhWE0fj9OLj6/T4TnL08+1VerWNdFm3uHgJCWNh3iRyNRdb2Je399L5lv9Xopqz1Wk2Xy6oRQAX06W7gEQuEVsGUvslIt+pdYWRv3mrzh+pQDiwdGI7GYWEyVqH6xsdPMnrga/+e6ignoYnGcW9GerojhYo+Gb0O+n6zOwL16/ePils/VjwBt7vZ76H52zNmW2Z5IDfrKB7YTubC3Dsw408r1zLF/b/4ShT0weqkxOtfWYpw02BA87S1aV/yWy+9S6f6kx6fE8nzQWP1h7sUO3xvEdco3OxsFr1qcUoxDU/0zDJk1nLKzFSJ221sRmJYusvt4MMHTt8gCp47R+pKii9J1GsbfFFFJF/nDMfG5fdY9A8LPiY8Zz0lKisEJWz6sWssi53tYavps9n2yZ5QNx0msKakzD/k6TiM/wnZ8Hz6GrJqXhSXG3X+uneeEuINHGnL7lus46+5RY/ae4eu3f/Ci2cDjOTkmlzM2JgJQ5zK/zwKd6ZuKUrcCOp65KZ1vSIek6VmxQYvLEsQAUYBwKDP0=
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 1.3.0 - 2017.06.15
10
+
11
+ * [ENHANCEMENT] Retry once if S3 raises a Net::HTTPFatalError
12
+
9
13
  ## 1.2.0 - 2015.01.25
10
14
 
11
15
  * [FEATURE] Add `Star::File#copy_from` to duplicate files
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015 Fullscreen, Inc.
3
+ Copyright (c) 2015–2017 Fullscreen, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the 'Software'), to deal
data/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
 
4
4
  Star helps you write Ruby apps that need to store files on S3 and retrieve them with expiring URLs.
5
5
 
6
- The **source code** is available on [GitHub](https://github.com/Fullscreen/star) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/Fullscreen/star/master/Star/Interface).
6
+ The **source code** is available on [GitHub](https://github.com/claudiob/star) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/claudiob/star/master/Star/Interface).
7
7
 
8
- [![Build Status](http://img.shields.io/travis/Fullscreen/star/master.svg)](https://travis-ci.org/Fullscreen/star)
9
- [![Coverage Status](http://img.shields.io/coveralls/Fullscreen/star/master.svg)](https://coveralls.io/r/Fullscreen/star)
10
- [![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/star.svg)](https://gemnasium.com/Fullscreen/star)
11
- [![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/star.svg)](https://codeclimate.com/github/Fullscreen/star)
12
- [![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/Fullscreen/star/master/Star/File)
8
+ [![Build Status](http://img.shields.io/travis/claudiob/star/master.svg)](https://travis-ci.org/claudiob/star)
9
+ [![Coverage Status](http://img.shields.io/coveralls/claudiob/star/master.svg)](https://coveralls.io/r/claudiob/star)
10
+ [![Dependency Status](http://img.shields.io/gemnasium/claudiob/star.svg)](https://gemnasium.com/claudiob/star)
11
+ [![Code Climate](http://img.shields.io/codeclimate/github/claudiob/star.svg)](https://codeclimate.com/github/claudiob/star)
12
+ [![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/claudiob/star/master/Star/File)
13
13
  [![Gem Version](http://img.shields.io/gem/v/star.svg)](http://rubygems.org/gems/star)
14
14
 
15
15
 
@@ -212,7 +212,7 @@ How to release new versions
212
212
  If you are a manager of this project, remember to upgrade the [Star gem](http://rubygems.org/gems/star)
213
213
  whenever a new feature is added or a bug gets fixed.
214
214
 
215
- Make sure all the tests are passing on [Travis CI](https://travis-ci.org/Fullscreen/star),
215
+ Make sure all the tests are passing on [Travis CI](https://travis-ci.org/claudiob/star),
216
216
  document the changes in CHANGELOG.md and README.md, bump the version, then run
217
217
 
218
218
  rake release
@@ -31,7 +31,11 @@ module Star
31
31
  end
32
32
 
33
33
  def store(tmp_file)
34
- Star.remote? ? store_remote(tmp_file) : store_local(tmp_file)
34
+ if Star.remote?
35
+ retry_on_error {store_remote tmp_file}
36
+ else
37
+ store_local(tmp_file)
38
+ end
35
39
  end
36
40
 
37
41
  def delete
@@ -48,6 +52,15 @@ module Star
48
52
 
49
53
  private
50
54
 
55
+ def retry_on_error
56
+ yield
57
+ rescue Net::HTTPFatalError => e
58
+ raise if @retried
59
+ sleep 5
60
+ @retried = true
61
+ retry
62
+ end
63
+
51
64
  def store_remote(tmp_file)
52
65
  timestamp = Time.now.utc.strftime "%a, %d %b %Y %H:%M:%S UTC"
53
66
  signature = sign "PUT\n\n#{@content_type}\n#{timestamp}"
@@ -1,3 +1,3 @@
1
1
  module Star
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: star
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-26 00:00:00.000000000 Z
12
+ date: 2017-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.5.1
131
+ rubygems_version: 2.6.11
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Write files to S3, read them with expiring URLs