paperclip-storage-tmp 0.0.1 → 0.0.2
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.
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -79,11 +79,17 @@ The most important part is actually "rolling back the filesystem" after every te
|
|
79
79
|
|
80
80
|
# in spec/spec_helper.rb
|
81
81
|
RSpec.configure do |config|
|
82
|
-
config.after
|
83
|
-
Paperclip::Storage::Tmp.clear
|
84
|
-
end
|
82
|
+
config.after { Paperclip::Storage::Tmp.clear }
|
85
83
|
end
|
86
84
|
|
85
|
+
Or, just use the provided one-line testing helpers for RSpec and Cucumber, which add the necessary after hooks for you:
|
86
|
+
|
87
|
+
# in spec/spec_helper.rb
|
88
|
+
require 'paperclip-storage-tmp/testing/rspec'
|
89
|
+
|
90
|
+
# in features/support/env.rb
|
91
|
+
require 'paperclip-storage-tmp/testing/cucumber'
|
92
|
+
|
87
93
|
## Caveats
|
88
94
|
|
89
95
|
Beware that the file name assigned to the model attribute (`<attachment>_file_name`) is different than the name of the assigned/uploaded file (it's the name of the temporary file - a unique string).
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-storage-tmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: paperclip
|
@@ -74,6 +74,8 @@ files:
|
|
74
74
|
- README.md
|
75
75
|
- Rakefile
|
76
76
|
- lib/paperclip-storage-tmp.rb
|
77
|
+
- lib/paperclip-storage-tmp/testing/cucumber.rb
|
78
|
+
- lib/paperclip-storage-tmp/testing/rspec.rb
|
77
79
|
- lib/paperclip-storage-tmp/version.rb
|
78
80
|
- lib/paperclip/storage/tmp.rb
|
79
81
|
- paperclip-storage-tmp.gemspec
|
@@ -106,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
108
|
version: '0'
|
107
109
|
requirements: []
|
108
110
|
rubyforge_project:
|
109
|
-
rubygems_version: 1.8.
|
111
|
+
rubygems_version: 1.8.24
|
110
112
|
signing_key:
|
111
113
|
specification_version: 3
|
112
114
|
summary: Keep your tests clean by isolating test attachments from development, and
|