cloudfuji_paperclip 2.4.6
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/.gitignore +22 -0
- data/.travis.yml +13 -0
- data/Appraisals +14 -0
- data/CONTRIBUTING.md +38 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +137 -0
- data/LICENSE +26 -0
- data/README.md +444 -0
- data/Rakefile +41 -0
- data/cucumber/paperclip_steps.rb +6 -0
- data/features/basic_integration.feature +46 -0
- data/features/rake_tasks.feature +63 -0
- data/features/step_definitions/attachment_steps.rb +65 -0
- data/features/step_definitions/html_steps.rb +15 -0
- data/features/step_definitions/rails_steps.rb +182 -0
- data/features/step_definitions/s3_steps.rb +14 -0
- data/features/step_definitions/web_steps.rb +209 -0
- data/features/support/env.rb +8 -0
- data/features/support/fakeweb.rb +3 -0
- data/features/support/fixtures/.boot_config.rb.swo +0 -0
- data/features/support/fixtures/boot_config.txt +15 -0
- data/features/support/fixtures/gemfile.txt +5 -0
- data/features/support/fixtures/preinitializer.txt +20 -0
- data/features/support/paths.rb +28 -0
- data/features/support/rails.rb +46 -0
- data/features/support/selectors.rb +19 -0
- data/gemfiles/rails2.gemfile +9 -0
- data/gemfiles/rails3.gemfile +9 -0
- data/gemfiles/rails3_1.gemfile +9 -0
- data/generators/paperclip/USAGE +5 -0
- data/generators/paperclip/paperclip_generator.rb +27 -0
- data/generators/paperclip/templates/paperclip_migration.rb.erb +19 -0
- data/init.rb +4 -0
- data/lib/generators/paperclip/USAGE +8 -0
- data/lib/generators/paperclip/paperclip_generator.rb +33 -0
- data/lib/generators/paperclip/templates/paperclip_migration.rb.erb +19 -0
- data/lib/paperclip/attachment.rb +468 -0
- data/lib/paperclip/callback_compatibility.rb +61 -0
- data/lib/paperclip/geometry.rb +120 -0
- data/lib/paperclip/interpolations.rb +174 -0
- data/lib/paperclip/iostream.rb +45 -0
- data/lib/paperclip/matchers/have_attached_file_matcher.rb +57 -0
- data/lib/paperclip/matchers/validate_attachment_content_type_matcher.rb +81 -0
- data/lib/paperclip/matchers/validate_attachment_presence_matcher.rb +54 -0
- data/lib/paperclip/matchers/validate_attachment_size_matcher.rb +95 -0
- data/lib/paperclip/matchers.rb +64 -0
- data/lib/paperclip/missing_attachment_styles.rb +87 -0
- data/lib/paperclip/processor.rb +58 -0
- data/lib/paperclip/railtie.rb +31 -0
- data/lib/paperclip/schema.rb +39 -0
- data/lib/paperclip/storage/filesystem.rb +81 -0
- data/lib/paperclip/storage/fog.rb +174 -0
- data/lib/paperclip/storage/s3.rb +333 -0
- data/lib/paperclip/storage.rb +3 -0
- data/lib/paperclip/style.rb +103 -0
- data/lib/paperclip/thumbnail.rb +105 -0
- data/lib/paperclip/upfile.rb +62 -0
- data/lib/paperclip/url_generator.rb +64 -0
- data/lib/paperclip/version.rb +3 -0
- data/lib/paperclip.rb +487 -0
- data/lib/tasks/paperclip.rake +101 -0
- data/paperclip.gemspec +41 -0
- data/rails/init.rb +2 -0
- data/shoulda_macros/paperclip.rb +124 -0
- data/test/.gitignore +1 -0
- data/test/attachment_test.rb +1116 -0
- data/test/database.yml +4 -0
- data/test/fixtures/12k.png +0 -0
- data/test/fixtures/50x50.png +0 -0
- data/test/fixtures/5k.png +0 -0
- data/test/fixtures/animated.gif +0 -0
- data/test/fixtures/bad.png +1 -0
- data/test/fixtures/fog.yml +8 -0
- data/test/fixtures/question?mark.png +0 -0
- data/test/fixtures/s3.yml +8 -0
- data/test/fixtures/spaced file.png +0 -0
- data/test/fixtures/text.txt +1 -0
- data/test/fixtures/twopage.pdf +0 -0
- data/test/fixtures/uppercase.PNG +0 -0
- data/test/geometry_test.rb +206 -0
- data/test/helper.rb +177 -0
- data/test/integration_test.rb +654 -0
- data/test/interpolations_test.rb +216 -0
- data/test/iostream_test.rb +71 -0
- data/test/matchers/have_attached_file_matcher_test.rb +24 -0
- data/test/matchers/validate_attachment_content_type_matcher_test.rb +87 -0
- data/test/matchers/validate_attachment_presence_matcher_test.rb +26 -0
- data/test/matchers/validate_attachment_size_matcher_test.rb +51 -0
- data/test/paperclip_missing_attachment_styles_test.rb +80 -0
- data/test/paperclip_test.rb +390 -0
- data/test/processor_test.rb +10 -0
- data/test/schema_test.rb +98 -0
- data/test/storage/filesystem_test.rb +56 -0
- data/test/storage/fog_test.rb +219 -0
- data/test/storage/s3_live_test.rb +138 -0
- data/test/storage/s3_test.rb +943 -0
- data/test/style_test.rb +209 -0
- data/test/support/mock_attachment.rb +22 -0
- data/test/support/mock_interpolator.rb +24 -0
- data/test/support/mock_model.rb +2 -0
- data/test/support/mock_url_generator_builder.rb +27 -0
- data/test/thumbnail_test.rb +383 -0
- data/test/upfile_test.rb +53 -0
- data/test/url_generator_test.rb +187 -0
- metadata +404 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
rvm:
|
|
2
|
+
- 1.8.7
|
|
3
|
+
- 1.9.2
|
|
4
|
+
- ree
|
|
5
|
+
- rbx-2.0
|
|
6
|
+
|
|
7
|
+
before_script: "sudo ntpdate -ub ntp.ubuntu.com pool.ntp.org; true"
|
|
8
|
+
script: "bundle exec rake clean test cucumber"
|
|
9
|
+
|
|
10
|
+
gemfile:
|
|
11
|
+
- gemfiles/rails2.gemfile
|
|
12
|
+
- gemfiles/rails3.gemfile
|
|
13
|
+
- gemfiles/rails3_1.gemfile
|
data/Appraisals
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
appraise "rails2" do
|
|
2
|
+
gem "rails", "~> 2.3.14"
|
|
3
|
+
gem "paperclip", :path => "../"
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
appraise "rails3" do
|
|
7
|
+
gem "rails", "~> 3.0.10"
|
|
8
|
+
gem "paperclip", :path => "../"
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
appraise "rails3_1" do
|
|
12
|
+
gem "rails", "~> 3.1.0"
|
|
13
|
+
gem "paperclip", :path => "../"
|
|
14
|
+
end
|
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
We love pull requests. Here's a quick guide:
|
|
2
|
+
|
|
3
|
+
1. Fork the repo.
|
|
4
|
+
|
|
5
|
+
2. Run the tests. We only take pull requests with passing tests, and it's great
|
|
6
|
+
to know that you have a clean slate: `bundle && rake`
|
|
7
|
+
|
|
8
|
+
3. Add a test for your change. Only refactoring and documentation changes
|
|
9
|
+
require no new tests. If you are adding functionality or fixing a bug, we need
|
|
10
|
+
a test!
|
|
11
|
+
|
|
12
|
+
4. Make the test pass.
|
|
13
|
+
|
|
14
|
+
5. Push to your fork and submit a pull request.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
At this point you're waiting on us. We like to at least comment on, if not
|
|
18
|
+
accept, pull requests within three business days (and, typically, one business
|
|
19
|
+
day). We may suggest some changes or improvements or alternatives.
|
|
20
|
+
|
|
21
|
+
Some things that will increase the chance that your pull request is accepted,
|
|
22
|
+
taken straight from the Ruby on Rails guide:
|
|
23
|
+
|
|
24
|
+
* Use Rails idioms and helpers
|
|
25
|
+
* Include tests that fail without your code, and pass with it
|
|
26
|
+
* Update the documentation, the surrounding one, examples elsewhere, guides,
|
|
27
|
+
whatever is affected by your contribution
|
|
28
|
+
|
|
29
|
+
Syntax:
|
|
30
|
+
|
|
31
|
+
* Two spaces, no tabs.
|
|
32
|
+
* No trailing whitespace. Blank lines should not have any space.
|
|
33
|
+
* Prefer &&/|| over and/or.
|
|
34
|
+
* MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
|
35
|
+
* a = b and not a=b.
|
|
36
|
+
* Follow the conventions you see used in the source already.
|
|
37
|
+
|
|
38
|
+
And in case we didn't emphasize it enough: we love tests!
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
cloudfuji_paperclip (2.4.6)
|
|
5
|
+
activerecord (>= 2.3.0)
|
|
6
|
+
activesupport (>= 2.3.2)
|
|
7
|
+
cocaine (>= 0.0.2)
|
|
8
|
+
mime-types
|
|
9
|
+
|
|
10
|
+
GEM
|
|
11
|
+
remote: http://rubygems.org/
|
|
12
|
+
specs:
|
|
13
|
+
activemodel (3.2.3)
|
|
14
|
+
activesupport (= 3.2.3)
|
|
15
|
+
builder (~> 3.0.0)
|
|
16
|
+
activerecord (3.2.3)
|
|
17
|
+
activemodel (= 3.2.3)
|
|
18
|
+
activesupport (= 3.2.3)
|
|
19
|
+
arel (~> 3.0.2)
|
|
20
|
+
tzinfo (~> 0.3.29)
|
|
21
|
+
activesupport (3.2.3)
|
|
22
|
+
i18n (~> 0.6)
|
|
23
|
+
multi_json (~> 1.0)
|
|
24
|
+
appraisal (0.4.0)
|
|
25
|
+
bundler
|
|
26
|
+
rake
|
|
27
|
+
arel (3.0.2)
|
|
28
|
+
aruba (0.4.6)
|
|
29
|
+
bcat (>= 0.6.1)
|
|
30
|
+
childprocess (>= 0.2.0)
|
|
31
|
+
cucumber (>= 1.0.2)
|
|
32
|
+
rdiscount (>= 1.6.8)
|
|
33
|
+
rspec (>= 2.6.0)
|
|
34
|
+
aws-sdk (1.2.1)
|
|
35
|
+
httparty (~> 0.7)
|
|
36
|
+
json (~> 1.4)
|
|
37
|
+
nokogiri (>= 1.4.4)
|
|
38
|
+
uuidtools (~> 2.1)
|
|
39
|
+
bcat (0.6.2)
|
|
40
|
+
rack (~> 1.0)
|
|
41
|
+
builder (3.0.0)
|
|
42
|
+
capybara (1.1.1)
|
|
43
|
+
mime-types (>= 1.16)
|
|
44
|
+
nokogiri (>= 1.3.3)
|
|
45
|
+
rack (>= 1.0.0)
|
|
46
|
+
rack-test (>= 0.5.4)
|
|
47
|
+
selenium-webdriver (~> 2.0)
|
|
48
|
+
xpath (~> 0.1.4)
|
|
49
|
+
childprocess (0.2.2)
|
|
50
|
+
ffi (~> 1.0.6)
|
|
51
|
+
cocaine (0.2.0)
|
|
52
|
+
cucumber (1.1.4)
|
|
53
|
+
builder (>= 2.1.2)
|
|
54
|
+
diff-lcs (>= 1.1.2)
|
|
55
|
+
gherkin (~> 2.7.1)
|
|
56
|
+
json (>= 1.4.6)
|
|
57
|
+
term-ansicolor (>= 1.0.6)
|
|
58
|
+
diff-lcs (1.1.3)
|
|
59
|
+
excon (0.6.6)
|
|
60
|
+
fakeweb (1.3.0)
|
|
61
|
+
ffi (1.0.9)
|
|
62
|
+
fog (0.11.0)
|
|
63
|
+
builder
|
|
64
|
+
excon (~> 0.6.5)
|
|
65
|
+
formatador (~> 0.2.0)
|
|
66
|
+
mime-types
|
|
67
|
+
multi_json (~> 1.0.3)
|
|
68
|
+
net-scp (~> 1.0.4)
|
|
69
|
+
net-ssh (~> 2.1.4)
|
|
70
|
+
nokogiri (~> 1.5.0)
|
|
71
|
+
ruby-hmac
|
|
72
|
+
formatador (0.2.1)
|
|
73
|
+
gherkin (2.7.1)
|
|
74
|
+
json (>= 1.4.6)
|
|
75
|
+
httparty (0.8.1)
|
|
76
|
+
multi_json
|
|
77
|
+
multi_xml
|
|
78
|
+
i18n (0.6.0)
|
|
79
|
+
json (1.6.3)
|
|
80
|
+
json_pure (1.6.1)
|
|
81
|
+
metaclass (0.0.1)
|
|
82
|
+
mime-types (1.16)
|
|
83
|
+
mocha (0.10.0)
|
|
84
|
+
metaclass (~> 0.0.1)
|
|
85
|
+
multi_json (1.0.3)
|
|
86
|
+
multi_xml (0.4.1)
|
|
87
|
+
net-scp (1.0.4)
|
|
88
|
+
net-ssh (>= 1.99.1)
|
|
89
|
+
net-ssh (2.1.4)
|
|
90
|
+
nokogiri (1.5.0)
|
|
91
|
+
rack (1.3.3)
|
|
92
|
+
rack-test (0.6.1)
|
|
93
|
+
rack (>= 1.0)
|
|
94
|
+
rake (0.9.2)
|
|
95
|
+
rdiscount (1.6.8)
|
|
96
|
+
rspec (2.6.0)
|
|
97
|
+
rspec-core (~> 2.6.0)
|
|
98
|
+
rspec-expectations (~> 2.6.0)
|
|
99
|
+
rspec-mocks (~> 2.6.0)
|
|
100
|
+
rspec-core (2.6.4)
|
|
101
|
+
rspec-expectations (2.6.0)
|
|
102
|
+
diff-lcs (~> 1.1.2)
|
|
103
|
+
rspec-mocks (2.6.0)
|
|
104
|
+
ruby-hmac (0.4.0)
|
|
105
|
+
rubyzip (0.9.4)
|
|
106
|
+
selenium-webdriver (2.7.0)
|
|
107
|
+
childprocess (>= 0.2.1)
|
|
108
|
+
ffi (>= 1.0.7)
|
|
109
|
+
json_pure
|
|
110
|
+
rubyzip
|
|
111
|
+
shoulda (2.11.3)
|
|
112
|
+
sqlite3 (1.3.4)
|
|
113
|
+
term-ansicolor (1.0.7)
|
|
114
|
+
tzinfo (0.3.33)
|
|
115
|
+
uuidtools (2.1.2)
|
|
116
|
+
xpath (0.1.4)
|
|
117
|
+
nokogiri (~> 1.3)
|
|
118
|
+
|
|
119
|
+
PLATFORMS
|
|
120
|
+
ruby
|
|
121
|
+
|
|
122
|
+
DEPENDENCIES
|
|
123
|
+
appraisal (~> 0.4.0)
|
|
124
|
+
aruba
|
|
125
|
+
aws-sdk
|
|
126
|
+
bundler
|
|
127
|
+
capybara
|
|
128
|
+
cloudfuji_paperclip!
|
|
129
|
+
cocaine (~> 0.2)
|
|
130
|
+
cucumber (~> 1.1.0)
|
|
131
|
+
fakeweb
|
|
132
|
+
fog
|
|
133
|
+
jruby-openssl
|
|
134
|
+
mocha
|
|
135
|
+
rake
|
|
136
|
+
shoulda
|
|
137
|
+
sqlite3 (~> 1.3.4)
|
data/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
LICENSE
|
|
3
|
+
|
|
4
|
+
The MIT License
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2008 Jon Yurek and thoughtbot, inc.
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
|