rails_imager 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -12
  3. data/app/controllers/rails_imager/images_controller.rb +1 -3
  4. data/app/helpers/rails_imager/images_helper.rb +17 -14
  5. data/lib/rails_imager.rb +5 -3
  6. data/lib/rails_imager/engine.rb +2 -4
  7. data/lib/rails_imager/version.rb +1 -1
  8. metadata +44 -132
  9. data/test/controllers/rails_imager/images_controller_test.rb +0 -31
  10. data/test/dummy/README.rdoc +0 -28
  11. data/test/dummy/Rakefile +0 -6
  12. data/test/dummy/app/assets/javascripts/application.js +0 -13
  13. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  14. data/test/dummy/app/controllers/application_controller.rb +0 -5
  15. data/test/dummy/app/helpers/application_helper.rb +0 -2
  16. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  17. data/test/dummy/bin/bundle +0 -3
  18. data/test/dummy/bin/rails +0 -4
  19. data/test/dummy/bin/rake +0 -4
  20. data/test/dummy/config.ru +0 -4
  21. data/test/dummy/config/application.rb +0 -23
  22. data/test/dummy/config/boot.rb +0 -5
  23. data/test/dummy/config/database.yml +0 -25
  24. data/test/dummy/config/environment.rb +0 -5
  25. data/test/dummy/config/environments/development.rb +0 -29
  26. data/test/dummy/config/environments/production.rb +0 -80
  27. data/test/dummy/config/environments/test.rb +0 -36
  28. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  29. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  30. data/test/dummy/config/initializers/inflections.rb +0 -16
  31. data/test/dummy/config/initializers/mime_types.rb +0 -5
  32. data/test/dummy/config/initializers/secret_token.rb +0 -12
  33. data/test/dummy/config/initializers/session_store.rb +0 -3
  34. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  35. data/test/dummy/config/locales/en.yml +0 -23
  36. data/test/dummy/config/routes.rb +0 -3
  37. data/test/dummy/db/development.sqlite3 +0 -0
  38. data/test/dummy/db/test.sqlite3 +0 -0
  39. data/test/dummy/log/development.log +0 -1367
  40. data/test/dummy/log/test.log +0 -4561
  41. data/test/dummy/public/404.html +0 -58
  42. data/test/dummy/public/422.html +0 -58
  43. data/test/dummy/public/500.html +0 -57
  44. data/test/dummy/public/favicon.ico +0 -0
  45. data/test/dummy/public/test.png +0 -0
  46. data/test/dummy/tmp/cache/assets/development/sprockets/0664a19cc0f5d977f80bafcefe17e9c9 +0 -0
  47. data/test/dummy/tmp/cache/assets/development/sprockets/0a9ac96e2e41642bb5a979bc1bba099d +0 -0
  48. data/test/dummy/tmp/cache/assets/development/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55 +0 -0
  49. data/test/dummy/tmp/cache/assets/development/sprockets/510b6fd97773642f0b777a14f0ef5366 +0 -0
  50. data/test/dummy/tmp/cache/assets/development/sprockets/9e801b0fd4666d3a5cb45345d7de21a7 +0 -0
  51. data/test/dummy/tmp/cache/assets/development/sprockets/b40bea70cdbfe1b3b11ede81a1d20002 +0 -0
  52. data/test/dummy/tmp/cache/assets/development/sprockets/be7b64afb60161c417c6465682b304ac +0 -0
  53. data/test/dummy/tmp/cache/assets/development/sprockets/c0dbbd2455c6e7638bd41c5f003dff53 +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/cc85e49d1f8af3e2bb0073f666f413be +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/e31424e52369b0afcae5d0350c19ae82 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/f202557856e13ca5921856c87d402bd4 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/fe7c9c32074445201dccf284f19078bf +0 -0
  58. data/test/dummy/tmp/cache/assets/test/sprockets/0a9ac96e2e41642bb5a979bc1bba099d +0 -0
  59. data/test/dummy/tmp/cache/assets/test/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55 +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/510b6fd97773642f0b777a14f0ef5366 +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/9e801b0fd4666d3a5cb45345d7de21a7 +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/b40bea70cdbfe1b3b11ede81a1d20002 +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/be7b64afb60161c417c6465682b304ac +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/c0dbbd2455c6e7638bd41c5f003dff53 +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/e31424e52369b0afcae5d0350c19ae82 +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/f202557856e13ca5921856c87d402bd4 +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/fe7c9c32074445201dccf284f19078bf +0 -0
  68. data/test/helpers/rails_imager/images_helper_test.rb +0 -8
  69. data/test/image_handler_test.rb +0 -138
  70. data/test/integration/navigation_test.rb +0 -10
  71. data/test/rails_imager_test.rb +0 -7
  72. data/test/test.png +0 -0
  73. data/test/test_helper.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aad93b549661a4e7e9688317018b13fb60cba84d
4
- data.tar.gz: 4138657ff54a0a0bee4fa3b057690ed9a72ff7ff
3
+ metadata.gz: 02859dc44fd80ff9525ff1f2f3e4cbd278726623
4
+ data.tar.gz: 0c40754000919731d581d88ec1dd71a7a2b29da5
5
5
  SHA512:
6
- metadata.gz: 1d5b68d6063b6462561123d6b939ae807daf4f77c7ac475702745efe776de5c123bacaf66231b869079f63614a6009afc444622597d9bf8e3c6b581f5d857220
7
- data.tar.gz: 928e47a59f9d233eb592cd2f7945ccdddaf9266dad8549722487dcde811d070c6d77e317636bde570eab2294eb9ed6366aca675e46e68e814424f056328204fa
6
+ metadata.gz: 09be9a6c55179cc42686804a334e993875854f24583c6ec84d371c084d49a4170bd06d8903b8b6d89eb79e8855ef564936156e97821c5274beeaa0fe842b5573
7
+ data.tar.gz: 1585b6269ecb1549843c54e105617abf2bd8381a97f0088c827e7e4a98dc7e9c5fa1df1a18f3a7d5563c0ec91003a461ddd075c2acb406c8eecc940246f6a473
data/Rakefile CHANGED
@@ -14,21 +14,10 @@ RDoc::Task.new(:rdoc) do |rdoc|
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
15
15
  end
16
16
 
17
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
17
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
18
18
  load 'rails/tasks/engine.rake'
19
19
 
20
-
21
-
22
20
  Bundler::GemHelper.install_tasks
23
21
 
24
- require 'rake/testtask'
25
-
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'lib'
28
- t.libs << 'test'
29
- t.pattern = 'test/**/*_test.rb'
30
- t.verbose = false
31
- end
32
-
33
22
 
34
23
  task default: :test
@@ -12,9 +12,7 @@ class RailsImager::ImagesController < ApplicationController
12
12
  raise ArgumentError, "Invalid parameter: '#{key}'." unless RailsImager::ImageHandler::PARAMS_ARGS.map{ |param| param.to_s }.include?(key)
13
13
  end
14
14
 
15
- image_id = params[:id].to_s.gsub("%C3%B8", "ø")
16
-
17
- image_path = "#{Rails.public_path}/#{image_id}"
15
+ image_path = "#{Rails.public_path}/#{params[:id]}"
18
16
  image_path = File.realpath(image_path)
19
17
  validate_path(image_path)
20
18
 
@@ -38,22 +38,25 @@ module RailsImager::ImagesHelper
38
38
 
39
39
 
40
40
  newpath << "/rails_imager/images/"
41
- newpath << URI.encode(path)
42
- newpath << "/?"
41
+ newpath << path
43
42
 
44
- first = true
45
- args.each do |key, val|
46
- if first
47
- first = false
48
- else
49
- newpath << "&"
50
- end
43
+ if args && args.any?
44
+ newpath << "?"
51
45
 
52
- realkey = "image[#{key}]"
53
-
54
- newpath << URI.encode(realkey.to_s)
55
- newpath << "="
56
- newpath << URI.encode(val.to_s)
46
+ first = true
47
+ args.each do |key, val|
48
+ if first
49
+ first = false
50
+ else
51
+ newpath << "&"
52
+ end
53
+
54
+ realkey = "image[#{key}]"
55
+
56
+ newpath << URI.encode(realkey.to_s)
57
+ newpath << "="
58
+ newpath << URI.encode(val.to_s)
59
+ end
57
60
  end
58
61
 
59
62
  return newpath
data/lib/rails_imager.rb CHANGED
@@ -1,13 +1,15 @@
1
+ require "rails/engine"
1
2
  require "rails_imager/engine"
3
+ require "string-cases"
2
4
 
3
5
  module RailsImager
4
6
  def self.const_missing(name)
5
7
  if name.to_s.end_with?("Controller")
6
- path = "#{File.dirname(__FILE__)}/../app/controllers/rails_imager/#{StringCases.camel_to_snake(name)}"
8
+ path = "#{File.dirname(__FILE__)}/../app/controllers/rails_imager/#{::StringCases.camel_to_snake(name)}"
7
9
  elsif name.to_s.end_with?("Helper")
8
- path = "#{File.dirname(__FILE__)}/../app/helpers/rails_imager/#{StringCases.camel_to_snake(name)}"
10
+ path = "#{File.dirname(__FILE__)}/../app/helpers/rails_imager/#{::StringCases.camel_to_snake(name)}"
9
11
  else
10
- path = "#{File.dirname(__FILE__)}/rails_imager/#{StringCases.camel_to_snake(name)}"
12
+ path = "#{File.dirname(__FILE__)}/rails_imager/#{::StringCases.camel_to_snake(name)}"
11
13
  end
12
14
 
13
15
  require path
@@ -1,5 +1,3 @@
1
- module RailsImager
2
- class Engine < ::Rails::Engine
3
- isolate_namespace RailsImager
4
- end
1
+ class RailsImager::Engine < ::Rails::Engine
2
+ isolate_namespace RailsImager
5
3
  end
@@ -1,3 +1,3 @@
1
1
  module RailsImager
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_imager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
@@ -94,6 +94,48 @@ dependencies:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: factory_girl_rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: forgery
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
97
139
  description: Automatic resizing, bordering and more of images.
98
140
  email:
99
141
  - k@spernj.org
@@ -118,71 +160,6 @@ files:
118
160
  - lib/rails_imager.rb
119
161
  - MIT-LICENSE
120
162
  - Rakefile
121
- - test/helpers/rails_imager/images_helper_test.rb
122
- - test/rails_imager_test.rb
123
- - test/controllers/rails_imager/images_controller_test.rb
124
- - test/dummy/bin/rails
125
- - test/dummy/bin/bundle
126
- - test/dummy/bin/rake
127
- - test/dummy/config.ru
128
- - test/dummy/README.rdoc
129
- - test/dummy/Rakefile
130
- - test/dummy/public/404.html
131
- - test/dummy/public/500.html
132
- - test/dummy/public/test.png
133
- - test/dummy/public/422.html
134
- - test/dummy/public/favicon.ico
135
- - test/dummy/log/development.log
136
- - test/dummy/log/test.log
137
- - test/dummy/db/development.sqlite3
138
- - test/dummy/db/test.sqlite3
139
- - test/dummy/app/helpers/application_helper.rb
140
- - test/dummy/app/assets/javascripts/application.js
141
- - test/dummy/app/assets/stylesheets/application.css
142
- - test/dummy/app/controllers/application_controller.rb
143
- - test/dummy/app/views/layouts/application.html.erb
144
- - test/dummy/config/routes.rb
145
- - test/dummy/config/locales/en.yml
146
- - test/dummy/config/application.rb
147
- - test/dummy/config/initializers/wrap_parameters.rb
148
- - test/dummy/config/initializers/secret_token.rb
149
- - test/dummy/config/initializers/backtrace_silencers.rb
150
- - test/dummy/config/initializers/filter_parameter_logging.rb
151
- - test/dummy/config/initializers/mime_types.rb
152
- - test/dummy/config/initializers/session_store.rb
153
- - test/dummy/config/initializers/inflections.rb
154
- - test/dummy/config/database.yml
155
- - test/dummy/config/environment.rb
156
- - test/dummy/config/boot.rb
157
- - test/dummy/config/environments/development.rb
158
- - test/dummy/config/environments/test.rb
159
- - test/dummy/config/environments/production.rb
160
- - test/dummy/tmp/cache/assets/test/sprockets/fe7c9c32074445201dccf284f19078bf
161
- - test/dummy/tmp/cache/assets/test/sprockets/f202557856e13ca5921856c87d402bd4
162
- - test/dummy/tmp/cache/assets/test/sprockets/c0dbbd2455c6e7638bd41c5f003dff53
163
- - test/dummy/tmp/cache/assets/test/sprockets/e31424e52369b0afcae5d0350c19ae82
164
- - test/dummy/tmp/cache/assets/test/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55
165
- - test/dummy/tmp/cache/assets/test/sprockets/0a9ac96e2e41642bb5a979bc1bba099d
166
- - test/dummy/tmp/cache/assets/test/sprockets/b40bea70cdbfe1b3b11ede81a1d20002
167
- - test/dummy/tmp/cache/assets/test/sprockets/9e801b0fd4666d3a5cb45345d7de21a7
168
- - test/dummy/tmp/cache/assets/test/sprockets/be7b64afb60161c417c6465682b304ac
169
- - test/dummy/tmp/cache/assets/test/sprockets/510b6fd97773642f0b777a14f0ef5366
170
- - test/dummy/tmp/cache/assets/development/sprockets/fe7c9c32074445201dccf284f19078bf
171
- - test/dummy/tmp/cache/assets/development/sprockets/f202557856e13ca5921856c87d402bd4
172
- - test/dummy/tmp/cache/assets/development/sprockets/cc85e49d1f8af3e2bb0073f666f413be
173
- - test/dummy/tmp/cache/assets/development/sprockets/c0dbbd2455c6e7638bd41c5f003dff53
174
- - test/dummy/tmp/cache/assets/development/sprockets/e31424e52369b0afcae5d0350c19ae82
175
- - test/dummy/tmp/cache/assets/development/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55
176
- - test/dummy/tmp/cache/assets/development/sprockets/0a9ac96e2e41642bb5a979bc1bba099d
177
- - test/dummy/tmp/cache/assets/development/sprockets/b40bea70cdbfe1b3b11ede81a1d20002
178
- - test/dummy/tmp/cache/assets/development/sprockets/0664a19cc0f5d977f80bafcefe17e9c9
179
- - test/dummy/tmp/cache/assets/development/sprockets/9e801b0fd4666d3a5cb45345d7de21a7
180
- - test/dummy/tmp/cache/assets/development/sprockets/be7b64afb60161c417c6465682b304ac
181
- - test/dummy/tmp/cache/assets/development/sprockets/510b6fd97773642f0b777a14f0ef5366
182
- - test/image_handler_test.rb
183
- - test/test.png
184
- - test/test_helper.rb
185
- - test/integration/navigation_test.rb
186
163
  homepage: http://www.github.com/kaspernj/rails_imager
187
164
  licenses: []
188
165
  metadata: {}
@@ -206,69 +183,4 @@ rubygems_version: 2.0.7
206
183
  signing_key:
207
184
  specification_version: 4
208
185
  summary: Automatic resizing, bordering and more of images.
209
- test_files:
210
- - test/helpers/rails_imager/images_helper_test.rb
211
- - test/rails_imager_test.rb
212
- - test/controllers/rails_imager/images_controller_test.rb
213
- - test/dummy/bin/rails
214
- - test/dummy/bin/bundle
215
- - test/dummy/bin/rake
216
- - test/dummy/config.ru
217
- - test/dummy/README.rdoc
218
- - test/dummy/Rakefile
219
- - test/dummy/public/404.html
220
- - test/dummy/public/500.html
221
- - test/dummy/public/test.png
222
- - test/dummy/public/422.html
223
- - test/dummy/public/favicon.ico
224
- - test/dummy/log/development.log
225
- - test/dummy/log/test.log
226
- - test/dummy/db/development.sqlite3
227
- - test/dummy/db/test.sqlite3
228
- - test/dummy/app/helpers/application_helper.rb
229
- - test/dummy/app/assets/javascripts/application.js
230
- - test/dummy/app/assets/stylesheets/application.css
231
- - test/dummy/app/controllers/application_controller.rb
232
- - test/dummy/app/views/layouts/application.html.erb
233
- - test/dummy/config/routes.rb
234
- - test/dummy/config/locales/en.yml
235
- - test/dummy/config/application.rb
236
- - test/dummy/config/initializers/wrap_parameters.rb
237
- - test/dummy/config/initializers/secret_token.rb
238
- - test/dummy/config/initializers/backtrace_silencers.rb
239
- - test/dummy/config/initializers/filter_parameter_logging.rb
240
- - test/dummy/config/initializers/mime_types.rb
241
- - test/dummy/config/initializers/session_store.rb
242
- - test/dummy/config/initializers/inflections.rb
243
- - test/dummy/config/database.yml
244
- - test/dummy/config/environment.rb
245
- - test/dummy/config/boot.rb
246
- - test/dummy/config/environments/development.rb
247
- - test/dummy/config/environments/test.rb
248
- - test/dummy/config/environments/production.rb
249
- - test/dummy/tmp/cache/assets/test/sprockets/fe7c9c32074445201dccf284f19078bf
250
- - test/dummy/tmp/cache/assets/test/sprockets/f202557856e13ca5921856c87d402bd4
251
- - test/dummy/tmp/cache/assets/test/sprockets/c0dbbd2455c6e7638bd41c5f003dff53
252
- - test/dummy/tmp/cache/assets/test/sprockets/e31424e52369b0afcae5d0350c19ae82
253
- - test/dummy/tmp/cache/assets/test/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55
254
- - test/dummy/tmp/cache/assets/test/sprockets/0a9ac96e2e41642bb5a979bc1bba099d
255
- - test/dummy/tmp/cache/assets/test/sprockets/b40bea70cdbfe1b3b11ede81a1d20002
256
- - test/dummy/tmp/cache/assets/test/sprockets/9e801b0fd4666d3a5cb45345d7de21a7
257
- - test/dummy/tmp/cache/assets/test/sprockets/be7b64afb60161c417c6465682b304ac
258
- - test/dummy/tmp/cache/assets/test/sprockets/510b6fd97773642f0b777a14f0ef5366
259
- - test/dummy/tmp/cache/assets/development/sprockets/fe7c9c32074445201dccf284f19078bf
260
- - test/dummy/tmp/cache/assets/development/sprockets/f202557856e13ca5921856c87d402bd4
261
- - test/dummy/tmp/cache/assets/development/sprockets/cc85e49d1f8af3e2bb0073f666f413be
262
- - test/dummy/tmp/cache/assets/development/sprockets/c0dbbd2455c6e7638bd41c5f003dff53
263
- - test/dummy/tmp/cache/assets/development/sprockets/e31424e52369b0afcae5d0350c19ae82
264
- - test/dummy/tmp/cache/assets/development/sprockets/2ca25a1b4dbb5046e79cdc5c2b0e6d55
265
- - test/dummy/tmp/cache/assets/development/sprockets/0a9ac96e2e41642bb5a979bc1bba099d
266
- - test/dummy/tmp/cache/assets/development/sprockets/b40bea70cdbfe1b3b11ede81a1d20002
267
- - test/dummy/tmp/cache/assets/development/sprockets/0664a19cc0f5d977f80bafcefe17e9c9
268
- - test/dummy/tmp/cache/assets/development/sprockets/9e801b0fd4666d3a5cb45345d7de21a7
269
- - test/dummy/tmp/cache/assets/development/sprockets/be7b64afb60161c417c6465682b304ac
270
- - test/dummy/tmp/cache/assets/development/sprockets/510b6fd97773642f0b777a14f0ef5366
271
- - test/image_handler_test.rb
272
- - test/test.png
273
- - test/test_helper.rb
274
- - test/integration/navigation_test.rb
186
+ test_files: []
@@ -1,31 +0,0 @@
1
- require 'test_helper'
2
- require 'RMagick'
3
-
4
- module RailsImager
5
- class ImagesControllerTest < ActionController::TestCase
6
- test "smartsize" do
7
- get :show, :use_route => :rails_imager, :id => "test.png", :image => {:smartsize => 200}
8
- assert_response :success
9
- assert "image/png", response.content_type
10
- img = ::Magick::Image.from_blob(response.body).first
11
- assert_equal img.columns, 200
12
- assert_equal img.rows, 196
13
- end
14
-
15
- test "cache via expires" do
16
- get :show, :use_route => :rails_imager, :id => "test.png", :image => {:smartsize => 200, :rounded_corners => 8}
17
- image_path = "#{Rails.public_path}/test.png"
18
-
19
- puts "Headers: #{response.headers.to_a}"
20
-
21
- assert_not_nil response.headers["Expires"], "Didn't find expires header in response."
22
- assert_equal response.headers["Last-Modified"], File.mtime(image_path).httpdate
23
- end
24
-
25
- test "invalid parameters" do
26
- assert_raise ArgumentError do
27
- get :show, :use_route => :rails_imager, :id => "test.png", :image => {:invalid_param => "kasper"}
28
- end
29
- end
30
- end
31
- end
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Dummy::Application.load_tasks
@@ -1,13 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file.
9
- //
10
- // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Dummy</title>
5
- <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
- <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>