shutterbug 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTg4ZGIyYzViMWEwMDkwNzQxMDgxYzZmNTZmOTUxMjY5NDg3YmYxYg==
5
- data.tar.gz: !binary |-
6
- NjU1OTExYzM1ODUyNzI2M2E4M2QzYTAxZjBhYjhkNjllZjc0ZWQ0Mg==
2
+ SHA1:
3
+ metadata.gz: 31cef182f6187554e6fe083245cc67d3d025601a
4
+ data.tar.gz: fdcb7a672f67e974ae0e5184f0f7c133104b28da
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YTk3ZTgwODYwZDY3M2U2NjVlZTkxMDQ0YWQ0ZDNiOGMzNTcwY2Q4ZTI2OGYz
10
- MDBjN2JjYTYwYTUxMGY3M2UxNzA3ZmM0MzBjYjZiNjY1MDkxZTMyYjU4YmU3
11
- ZWNlYTlkMWNlYmNkMTYwNzE4MGQxZmM3NTgzMTBiYWRlNDI5NTQ=
12
- data.tar.gz: !binary |-
13
- OWY2NDNiYzI4NGE1NDIzODZjY2IzMmNiNjZlNjQxZDM5YzE3ZmRlNDZkNTE5
14
- NTYyMmNkMzQ1NWNhYzBmZWZjZjI2N2VjMTRjNGY0ZGZmNmY0NjczZThjNDc1
15
- YmMwNDNhZWI0NmQ0M2JiZWNjNTZkMWQ5ODRjNWIxM2MzMTM4MmY=
6
+ metadata.gz: 7e3a5f571716c24812093c5aa7c25fe94ec840065ee98e34a765945ab7fa2f58a97c0956882c0cb39e816968e8bc9449e81e53172934f0a242f584dca9ec7126
7
+ data.tar.gz: db968653a8e563d7d167a307e7d2377eff351ed8beb44a9298a555a32a80578d275e08ff854345b20a4abec3cc39bce8fbaadcf4940995cabae0276fcd55ac09
data/README.md CHANGED
@@ -91,6 +91,9 @@ And a Procfile which looks like this:
91
91
 
92
92
  ## Changes ##
93
93
 
94
+ * December 3, 2015 – v 0.5.9
95
+ * S3 storage provider explicitly removes temporary files.
96
+
94
97
  * October 6, 2015 – v 0.5.8
95
98
  * Add error_trigger handler, to verify exception reporting.
96
99
  * Remove Ruby 1.9x travis tests, because of Fog and Net-SSH deps on Ruby 2.0
@@ -1,5 +1,5 @@
1
1
  module Shutterbug
2
- VERSION = "0.5.8"
2
+ VERSION = "0.5.9"
3
3
  autoload :Rackapp, "shutterbug/rackapp"
4
4
  autoload :Configuration, "shutterbug/configuration"
5
5
  autoload :Storage, "shutterbug/storage"
@@ -1,3 +1,4 @@
1
+ require 'fileutils'
1
2
  module Shutterbug
2
3
  module Storage
3
4
  class S3Storage
@@ -64,11 +65,21 @@ module Shutterbug
64
65
  self.connection.put_object_url(Configuration.instance.s3_bin, filename, expiry, headers, options)
65
66
  end
66
67
 
68
+ def unlink(filename)
69
+ if File.exists? filename
70
+ FileUtils.rm(filename)
71
+ end
72
+ end
73
+
67
74
  def initialize(filename)
68
75
  @filename = filename
69
- @stream_file = S3Storage.write(filename)
70
- @url = @stream_file.public_url
76
+ begin
77
+ @stream_file = S3Storage.write(filename)
78
+ @url = @stream_file.public_url
79
+ ensure
80
+ unlink(filename)
81
+ end
71
82
  end
72
83
  end
73
84
  end
74
- end
85
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutterbug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Paessel
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-06 00:00:00.000000000 Z
13
+ date: 2015-12-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  name: rake
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ! '>='
33
+ - - '>='
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ! '>='
40
+ - - '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  - !ruby/object:Gem::Dependency
@@ -58,87 +58,87 @@ dependencies:
58
58
  name: guard-rspec
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ! '>='
61
+ - - '>='
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ! '>='
68
+ - - '>='
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rack-cors
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ! '>='
75
+ - - '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
- - - ! '>='
82
+ - - '>='
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: guard-rack
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - ! '>='
89
+ - - '>='
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
- - - ! '>='
96
+ - - '>='
97
97
  - !ruby/object:Gem::Version
98
98
  version: '0'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rack-test
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - ! '>='
103
+ - - '>='
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - ! '>='
110
+ - - '>='
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rack
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - ! '>='
117
+ - - '>='
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  type: :runtime
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - ! '>='
124
+ - - '>='
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: fog
129
129
  requirement: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - ! '>='
131
+ - - '>='
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  type: :runtime
135
135
  prerelease: false
136
136
  version_requirements: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ! '>='
138
+ - - '>='
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
- description: ! "\n A rack utility that will create and save images (pngs)\n for
141
+ description: "\n A rack utility that will create and save images (pngs)\n for
142
142
  a part of your web page's current dom. These images\n become available as public
143
143
  '.png' resources in the rack application.\n Currently shutterbug supports HTML,
144
144
  SVG and Canvas elements.\n "
@@ -200,17 +200,17 @@ require_paths:
200
200
  - lib
201
201
  required_ruby_version: !ruby/object:Gem::Requirement
202
202
  requirements:
203
- - - ! '>='
203
+ - - '>='
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
206
  required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  requirements:
208
- - - ! '>='
208
+ - - '>='
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
212
  rubyforge_project:
213
- rubygems_version: 2.4.5
213
+ rubygems_version: 2.4.6
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: use Shutterbug::Rackapp