star 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -3
- data/CHANGELOG.md +4 -0
- data/MIT-LICENSE +1 -1
- data/README.md +7 -7
- data/lib/star/file.rb +14 -1
- data/lib/star/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 921b1766491cba17bb8e2904232605ed118e9173
|
4
|
+
data.tar.gz: 99f39a49d3a80f42186be1e1f3b90a48f8bae5de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 008e6b672365ada179be4e34a3dcd9cd96cd98062d2cc8c4b31edf3831da730dcfb2047e78994768ddff1bcec4a10278bd7753824676d2509613893f924f8224
|
7
|
+
data.tar.gz: 31ee824ab9013b971ccee45e00dedfecdbf742dfd37c6f49249c16dc9ab4084c89c87f12ec48f0eeebf6db8791bf56b3692f820c25b739237f00b60cbb7d9c1b
|
data/.travis.yml
CHANGED
@@ -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=
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/MIT-LICENSE
CHANGED
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/
|
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/
|
9
|
-
[![Coverage Status](http://img.shields.io/coveralls/
|
10
|
-
[![Dependency Status](http://img.shields.io/gemnasium/
|
11
|
-
[![Code Climate](http://img.shields.io/codeclimate/github/
|
12
|
-
[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/
|
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/
|
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
|
data/lib/star/file.rb
CHANGED
@@ -31,7 +31,11 @@ module Star
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def store(tmp_file)
|
34
|
-
Star.remote?
|
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}"
|
data/lib/star/version.rb
CHANGED
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.
|
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:
|
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.
|
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
|