uploadbox 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +2 -2
  3. data/Rakefile +1 -1
  4. data/app/assets/javascripts/{file_uploader.coffee → uploadbox.coffee} +0 -0
  5. data/app/assets/stylesheets/{file_uploader.sass → uploadbox.sass} +0 -0
  6. data/app/controllers/{file_uploader → uploadbox}/application_controller.rb +1 -1
  7. data/app/controllers/{file_uploader → uploadbox}/images_controller.rb +1 -1
  8. data/app/helpers/{file_uploader → uploadbox}/application_helper.rb +1 -1
  9. data/app/views/layouts/uploadbox/application.html.erb +14 -0
  10. data/app/views/{file_uploader → uploadbox}/images/_uploader.html.slim +2 -2
  11. data/app/views/{file_uploader → uploadbox}/images/create.json.jbuilder +0 -0
  12. data/config/routes.rb +1 -1
  13. data/lib/generators/{file_uploader → uploadbox}/image/USAGE +0 -0
  14. data/lib/generators/{file_uploader → uploadbox}/image/image_generator.rb +5 -1
  15. data/lib/generators/{file_uploader → uploadbox}/image/templates/initializers/carrierwave.rb +0 -0
  16. data/lib/generators/{file_uploader → uploadbox}/image/templates/migrate/create_images.rb +0 -0
  17. data/lib/generators/{file_uploader → uploadbox}/image/templates/models/image.rb +0 -0
  18. data/lib/generators/{file_uploader → uploadbox}/image/templates/uploaders/image_uploader.rb +0 -0
  19. data/lib/tasks/{file_uploader_tasks.rake → uploadbox_tasks.rake} +1 -1
  20. data/lib/{file_uploader → uploadbox}/engine.rb +3 -4
  21. data/lib/uploadbox/version.rb +3 -0
  22. data/lib/uploadbox.rb +4 -0
  23. data/test/dummy/app/assets/javascripts/application.coffee +1 -1
  24. data/test/dummy/app/assets/stylesheets/application.sass +1 -1
  25. data/test/dummy/config/application.rb +1 -1
  26. data/test/dummy/config/routes.rb +1 -1
  27. data/test/uploadbox_test.rb +7 -0
  28. metadata +23 -384
  29. data/app/assets/stylesheets/bootstrap/_buttons.css +0 -93
  30. data/app/views/layouts/file_uploader/application.html.erb +0 -14
  31. data/lib/file_uploader/version.rb +0 -3
  32. data/lib/file_uploader.rb +0 -4
  33. data/test/dummy/public/uploads/image/file/10/regular_tree1.jpg +0 -0
  34. data/test/dummy/public/uploads/image/file/10/tree1.jpg +0 -0
  35. data/test/dummy/public/uploads/image/file/11/regular_sports2.jpg +0 -0
  36. data/test/dummy/public/uploads/image/file/11/sports2.jpg +0 -0
  37. data/test/dummy/public/uploads/image/file/12/city1.jpg +0 -0
  38. data/test/dummy/public/uploads/image/file/12/regular_city1.jpg +0 -0
  39. data/test/dummy/public/uploads/image/file/13/regular_tree1.jpg +0 -0
  40. data/test/dummy/public/uploads/image/file/13/tree1.jpg +0 -0
  41. data/test/dummy/public/uploads/image/file/14/regular_sports1.jpg +0 -0
  42. data/test/dummy/public/uploads/image/file/14/sports1.jpg +0 -0
  43. data/test/dummy/public/uploads/image/file/15/regular_sports1.jpg +0 -0
  44. data/test/dummy/public/uploads/image/file/15/sports1.jpg +0 -0
  45. data/test/dummy/public/uploads/image/file/16/regular_sports1.jpg +0 -0
  46. data/test/dummy/public/uploads/image/file/16/sports1.jpg +0 -0
  47. data/test/dummy/public/uploads/image/file/17/regular_sports1.jpg +0 -0
  48. data/test/dummy/public/uploads/image/file/17/sports1.jpg +0 -0
  49. data/test/dummy/public/uploads/image/file/18/regular_sports3.jpg +0 -0
  50. data/test/dummy/public/uploads/image/file/18/sports3.jpg +0 -0
  51. data/test/dummy/public/uploads/image/file/19/regular_sports1.jpg +0 -0
  52. data/test/dummy/public/uploads/image/file/19/sports1.jpg +0 -0
  53. data/test/dummy/public/uploads/image/file/2/city1.jpg +0 -0
  54. data/test/dummy/public/uploads/image/file/2/regular_city1.jpg +0 -0
  55. data/test/dummy/public/uploads/image/file/20/regular_sports1.jpg +0 -0
  56. data/test/dummy/public/uploads/image/file/20/sports1.jpg +0 -0
  57. data/test/dummy/public/uploads/image/file/21/regular_sports1.jpg +0 -0
  58. data/test/dummy/public/uploads/image/file/21/sports1.jpg +0 -0
  59. data/test/dummy/public/uploads/image/file/22/regular_sports1.jpg +0 -0
  60. data/test/dummy/public/uploads/image/file/22/sports1.jpg +0 -0
  61. data/test/dummy/public/uploads/image/file/23/regular_sports2.jpg +0 -0
  62. data/test/dummy/public/uploads/image/file/23/sports2.jpg +0 -0
  63. data/test/dummy/public/uploads/image/file/27/monument1.jpg +0 -0
  64. data/test/dummy/public/uploads/image/file/27/regular_monument1.jpg +0 -0
  65. data/test/dummy/public/uploads/image/file/28/regular_sports3.jpg +0 -0
  66. data/test/dummy/public/uploads/image/file/28/sports3.jpg +0 -0
  67. data/test/dummy/public/uploads/image/file/3/city1.jpg +0 -0
  68. data/test/dummy/public/uploads/image/file/3/regular_city1.jpg +0 -0
  69. data/test/dummy/public/uploads/image/file/33/regular_tree1.jpg +0 -0
  70. data/test/dummy/public/uploads/image/file/33/tree1.jpg +0 -0
  71. data/test/dummy/public/uploads/image/file/34/city1.jpg +0 -0
  72. data/test/dummy/public/uploads/image/file/34/regular_city1.jpg +0 -0
  73. data/test/dummy/public/uploads/image/file/37/regular_sports3.jpg +0 -0
  74. data/test/dummy/public/uploads/image/file/37/sports3.jpg +0 -0
  75. data/test/dummy/public/uploads/image/file/38/regular_sports1.jpg +0 -0
  76. data/test/dummy/public/uploads/image/file/38/sports1.jpg +0 -0
  77. data/test/dummy/public/uploads/image/file/4/food1.jpg +0 -0
  78. data/test/dummy/public/uploads/image/file/4/regular_food1.jpg +0 -0
  79. data/test/dummy/public/uploads/image/file/40/regular_tree1.jpg +0 -0
  80. data/test/dummy/public/uploads/image/file/40/tree1.jpg +0 -0
  81. data/test/dummy/public/uploads/image/file/5/regular_sports1.jpg +0 -0
  82. data/test/dummy/public/uploads/image/file/5/sports1.jpg +0 -0
  83. data/test/dummy/public/uploads/image/file/50/city1.jpg +0 -0
  84. data/test/dummy/public/uploads/image/file/50/regular_city1.jpg +0 -0
  85. data/test/dummy/public/uploads/image/file/51/regular_sports1.jpg +0 -0
  86. data/test/dummy/public/uploads/image/file/51/sports1.jpg +0 -0
  87. data/test/dummy/public/uploads/image/file/56/city1.jpg +0 -0
  88. data/test/dummy/public/uploads/image/file/56/regular_city1.jpg +0 -0
  89. data/test/dummy/public/uploads/image/file/57/monument1.jpg +0 -0
  90. data/test/dummy/public/uploads/image/file/57/regular_monument1.jpg +0 -0
  91. data/test/dummy/public/uploads/image/file/58/regular_sports1.jpg +0 -0
  92. data/test/dummy/public/uploads/image/file/58/sports1.jpg +0 -0
  93. data/test/dummy/public/uploads/image/file/6/city1.jpg +0 -0
  94. data/test/dummy/public/uploads/image/file/6/regular_city1.jpg +0 -0
  95. data/test/dummy/public/uploads/image/file/60/regular_sports1.jpg +0 -0
  96. data/test/dummy/public/uploads/image/file/60/sports1.jpg +0 -0
  97. data/test/dummy/public/uploads/image/file/61/city1.jpg +0 -0
  98. data/test/dummy/public/uploads/image/file/61/regular_city1.jpg +0 -0
  99. data/test/dummy/public/uploads/image/file/62/regular_sports2.jpg +0 -0
  100. data/test/dummy/public/uploads/image/file/62/sports2.jpg +0 -0
  101. data/test/dummy/public/uploads/image/file/63/food1.jpg +0 -0
  102. data/test/dummy/public/uploads/image/file/63/regular_food1.jpg +0 -0
  103. data/test/dummy/public/uploads/image/file/64/food1.jpg +0 -0
  104. data/test/dummy/public/uploads/image/file/64/regular_food1.jpg +0 -0
  105. data/test/dummy/public/uploads/image/file/65/city1.jpg +0 -0
  106. data/test/dummy/public/uploads/image/file/65/regular_city1.jpg +0 -0
  107. data/test/dummy/public/uploads/image/file/66/regular_sports3.jpg +0 -0
  108. data/test/dummy/public/uploads/image/file/66/sports3.jpg +0 -0
  109. data/test/dummy/public/uploads/image/file/67/regular_sports1.jpg +0 -0
  110. data/test/dummy/public/uploads/image/file/67/sports1.jpg +0 -0
  111. data/test/dummy/public/uploads/image/file/68/regular_sports1.jpg +0 -0
  112. data/test/dummy/public/uploads/image/file/68/sports1.jpg +0 -0
  113. data/test/dummy/public/uploads/image/file/69/regular_sports1.jpg +0 -0
  114. data/test/dummy/public/uploads/image/file/69/sports1.jpg +0 -0
  115. data/test/dummy/public/uploads/image/file/7/regular_sports3.jpg +0 -0
  116. data/test/dummy/public/uploads/image/file/7/sports3.jpg +0 -0
  117. data/test/dummy/public/uploads/image/file/71/regular_sports2.jpg +0 -0
  118. data/test/dummy/public/uploads/image/file/71/sports2.jpg +0 -0
  119. data/test/dummy/public/uploads/image/file/73/regular_sports1.jpg +0 -0
  120. data/test/dummy/public/uploads/image/file/73/sports1.jpg +0 -0
  121. data/test/dummy/public/uploads/image/file/75/regular_sports2.jpg +0 -0
  122. data/test/dummy/public/uploads/image/file/75/sports2.jpg +0 -0
  123. data/test/dummy/public/uploads/image/file/76/city1.jpg +0 -0
  124. data/test/dummy/public/uploads/image/file/76/regular_city1.jpg +0 -0
  125. data/test/dummy/public/uploads/image/file/77/regular_sports1.jpg +0 -0
  126. data/test/dummy/public/uploads/image/file/77/sports1.jpg +0 -0
  127. data/test/dummy/public/uploads/image/file/78/regular_tree1.jpg +0 -0
  128. data/test/dummy/public/uploads/image/file/78/tree1.jpg +0 -0
  129. data/test/dummy/public/uploads/image/file/79/regular_sports3.jpg +0 -0
  130. data/test/dummy/public/uploads/image/file/79/sports3.jpg +0 -0
  131. data/test/dummy/public/uploads/image/file/8/regular_sports1.jpg +0 -0
  132. data/test/dummy/public/uploads/image/file/8/sports1.jpg +0 -0
  133. data/test/dummy/public/uploads/image/file/80/regular_tree1.jpg +0 -0
  134. data/test/dummy/public/uploads/image/file/80/tree1.jpg +0 -0
  135. data/test/dummy/public/uploads/image/file/81/food1.jpg +0 -0
  136. data/test/dummy/public/uploads/image/file/81/regular_food1.jpg +0 -0
  137. data/test/dummy/public/uploads/image/file/84/regular_tree1.jpg +0 -0
  138. data/test/dummy/public/uploads/image/file/84/tree1.jpg +0 -0
  139. data/test/dummy/public/uploads/image/file/9/monument1.jpg +0 -0
  140. data/test/dummy/public/uploads/image/file/9/regular_monument1.jpg +0 -0
  141. data/test/dummy/public/uploads/tmp/20130627-0910-4782-4339/regular_sports2.jpg +0 -0
  142. data/test/dummy/public/uploads/tmp/20130627-0910-4782-4339/sports2.jpg +0 -0
  143. data/test/dummy/tmp/cache/assets/development/sass/5b407eb4aa13436bd984a25ae192ac2652db5759/_buttons.cssc +0 -0
  144. data/test/dummy/tmp/cache/assets/development/sass/5b407eb4aa13436bd984a25ae192ac2652db5759/_progress.cssc +0 -0
  145. data/test/dummy/tmp/cache/assets/development/sass/7662e69738309f2449b5f34a623416e02bd31561/_buttons.cssc +0 -0
  146. data/test/dummy/tmp/cache/assets/development/sass/7662e69738309f2449b5f34a623416e02bd31561/_progress.cssc +0 -0
  147. data/test/dummy/tmp/cache/assets/development/sass/8160dfcd3114403b4930d081794c16af3ebe3ba6/file_uploader.sassc +0 -0
  148. data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/_bootstrap_btn.cssc +0 -0
  149. data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/_fileupload.sassc +0 -0
  150. data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/application.sassc +0 -0
  151. data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/bootstrap.cssc +0 -0
  152. data/test/dummy/tmp/cache/assets/development/sass/b3df06ca649a689a4fd2f92938f644fb80a0b76c/scaffold.cssc +0 -0
  153. data/test/dummy/tmp/cache/assets/development/sprockets/036b77eb9437a0b942e844f0664f2f4d +0 -0
  154. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  155. data/test/dummy/tmp/cache/assets/development/sprockets/17aca7a5440d34b72f7519ffa1ab8379 +0 -0
  156. data/test/dummy/tmp/cache/assets/development/sprockets/1a2ba42bd8d58781c7bf0e3d7a33c3c8 +0 -0
  157. data/test/dummy/tmp/cache/assets/development/sprockets/1a6ee5f7be55d7f22c31aef2af1aaad7 +0 -0
  158. data/test/dummy/tmp/cache/assets/development/sprockets/1c9faaf28d05409b88ad3113374d613c +0 -0
  159. data/test/dummy/tmp/cache/assets/development/sprockets/1e8f75a6b5b33970fb8e397347caa0a1 +0 -0
  160. data/test/dummy/tmp/cache/assets/development/sprockets/21252e0c63eb196e8181b7754194d61a +0 -0
  161. data/test/dummy/tmp/cache/assets/development/sprockets/22a20eb270b5f0f317e13738bcb73925 +0 -0
  162. data/test/dummy/tmp/cache/assets/development/sprockets/24204f742af588c8166d3160b500d20f +0 -0
  163. data/test/dummy/tmp/cache/assets/development/sprockets/2822de3b22c28bd5e718c9bf500457b2 +0 -0
  164. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  165. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  166. data/test/dummy/tmp/cache/assets/development/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
  167. data/test/dummy/tmp/cache/assets/development/sprockets/40fc2f3d2a468a00e463f1d313cb1683 +0 -0
  168. data/test/dummy/tmp/cache/assets/development/sprockets/416150dc3ac35079c94273cc46e90aa6 +0 -0
  169. data/test/dummy/tmp/cache/assets/development/sprockets/4726dfba577c185e9355be4a832efb8e +0 -0
  170. data/test/dummy/tmp/cache/assets/development/sprockets/47b830f344f953bcd6328a49ab616646 +0 -0
  171. data/test/dummy/tmp/cache/assets/development/sprockets/4968b24dd091b0fd0e209d67b392be52 +0 -0
  172. data/test/dummy/tmp/cache/assets/development/sprockets/4de2e83f99a4262aa0c8cc6035da959a +0 -0
  173. data/test/dummy/tmp/cache/assets/development/sprockets/4fc9258d221c999ba0aa1d80dbf04e5f +0 -0
  174. data/test/dummy/tmp/cache/assets/development/sprockets/50afae431e200795f9adc76e38e6130d +0 -0
  175. data/test/dummy/tmp/cache/assets/development/sprockets/510da110ae528e2d22533be39ff696c5 +0 -0
  176. data/test/dummy/tmp/cache/assets/development/sprockets/5384ad85f52d3272dbc64d46ef3876a4 +0 -0
  177. data/test/dummy/tmp/cache/assets/development/sprockets/54016e9e60301e29500bab9b9815de1e +0 -0
  178. data/test/dummy/tmp/cache/assets/development/sprockets/5608eba5a4ac26d717d876734486c3f5 +0 -0
  179. data/test/dummy/tmp/cache/assets/development/sprockets/5b6cfeddfda27d92843b8dac8d034ed3 +0 -0
  180. data/test/dummy/tmp/cache/assets/development/sprockets/60f1e97d7008b3ed41f72855a4228bb9 +0 -0
  181. data/test/dummy/tmp/cache/assets/development/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
  182. data/test/dummy/tmp/cache/assets/development/sprockets/734b52a3ac29f5ddc9f0cb98046c2315 +0 -0
  183. data/test/dummy/tmp/cache/assets/development/sprockets/80edcfeb723573fc6499580e5771bb17 +0 -0
  184. data/test/dummy/tmp/cache/assets/development/sprockets/851e2975dd2977ad620f690b923f3253 +0 -0
  185. data/test/dummy/tmp/cache/assets/development/sprockets/87cf3e4938b1fefe951ae62b201d8874 +0 -0
  186. data/test/dummy/tmp/cache/assets/development/sprockets/9199b64aec237a59d258f4f149262be1 +0 -0
  187. data/test/dummy/tmp/cache/assets/development/sprockets/9742c38f2d32a6142740215f517a73f5 +0 -0
  188. data/test/dummy/tmp/cache/assets/development/sprockets/9bccb521761b095f6c0255ab7fc9b3fb +0 -0
  189. data/test/dummy/tmp/cache/assets/development/sprockets/a4b8f7dbc861343715de9ec929b0e4ca +0 -0
  190. data/test/dummy/tmp/cache/assets/development/sprockets/a6ec7a5f259e52c790fb0f84b69a696e +0 -0
  191. data/test/dummy/tmp/cache/assets/development/sprockets/a7ab4e7b3ec8c08a267319920b433fda +0 -0
  192. data/test/dummy/tmp/cache/assets/development/sprockets/a88d9c609d05fcc4670c8742b41816c0 +0 -0
  193. data/test/dummy/tmp/cache/assets/development/sprockets/a9eb7874ccfec01c26d50fdc46d50639 +0 -0
  194. data/test/dummy/tmp/cache/assets/development/sprockets/a9f028f7a492b5907ed80268be8f50f4 +0 -0
  195. data/test/dummy/tmp/cache/assets/development/sprockets/abbcfa48059290465d8e74aa4fd0d4de +0 -0
  196. data/test/dummy/tmp/cache/assets/development/sprockets/add025ab0eb13a6d4180af43d5df39df +0 -0
  197. data/test/dummy/tmp/cache/assets/development/sprockets/b878faf942403e313a5b103e5d80488e +0 -0
  198. data/test/dummy/tmp/cache/assets/development/sprockets/bd0405b0fbaa0e8a1924bd19f9d52570 +0 -0
  199. data/test/dummy/tmp/cache/assets/development/sprockets/c2a831ed79df487d6485a5c9c52766c2 +0 -0
  200. data/test/dummy/tmp/cache/assets/development/sprockets/c85016e7bbd4f3adbb7635d01f85d39b +0 -0
  201. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  202. data/test/dummy/tmp/cache/assets/development/sprockets/d066c004d1fd26ae76a61303a7a18145 +0 -0
  203. data/test/dummy/tmp/cache/assets/development/sprockets/d080d25d00bbfe7b19138cf7a648dd8c +0 -0
  204. data/test/dummy/tmp/cache/assets/development/sprockets/d247dc85ce71f977c809c8b94d0223ed +0 -0
  205. data/test/dummy/tmp/cache/assets/development/sprockets/d2a1c642980b0a48bd71e7021eea73a1 +0 -0
  206. data/test/dummy/tmp/cache/assets/development/sprockets/d4c6a4b4d2ce87da7c22742887071603 +0 -0
  207. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  208. data/test/dummy/tmp/cache/assets/development/sprockets/d795fd4f9a32e134a5dd37f973a17176 +0 -0
  209. data/test/dummy/tmp/cache/assets/development/sprockets/d87810c66e05721ba749c5901c1af296 +0 -0
  210. data/test/dummy/tmp/cache/assets/development/sprockets/ebe08f689f659c024f467b77f32a1c49 +0 -0
  211. data/test/dummy/tmp/cache/assets/development/sprockets/edbef6e0d0a4742346cf479f2c522eb0 +0 -0
  212. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  213. data/test/file_uploader_test.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c004ad26d93b21f7f5cc4e430e80096f073ed0c
4
- data.tar.gz: debf607f9ba2dd29ead960486187552961b414c8
3
+ metadata.gz: c26f587ffb76e97589fabfeccf5d0ce8303ecb15
4
+ data.tar.gz: 87df182c32e2947399ce4b6b019b4dab79a3266e
5
5
  SHA512:
6
- metadata.gz: d74ab2192e6d9b4049393be59722408dd6fee337bab90770dd5ca9079920029f33c7a8799bce5ae6963a9cd25d07d296f9a2d1d72345390a82dac240e5936094
7
- data.tar.gz: d527221ceeb505950a03f04c3adf428e9ebefe08b80241f65f4e185a8bfa894aacd98a7563a5d179ea4c54e93c4eed044a74d38e64be34db04196714dcc9a744
6
+ metadata.gz: 4e6ae3bb264c4c80ca0f4495e282372301b1d88a5213e5188bef00fe30e7e0e29a76c0cd860cabd4e49e1c254256a3980b42a40fbda8e542d6af0e188a78b3e9
7
+ data.tar.gz: 47426e47bf77cd74207c2eb363d7b06e52144adf4ccff4ba7406efdaf4547a803e581c7e954bd5581f8e32d230f77b1a85474b027baf0b2d7ff8f927913f529d
data/README.rdoc CHANGED
@@ -1,3 +1,3 @@
1
- = FileUploader
1
+ = Uploadbox
2
2
 
3
- This project rocks and uses MIT-LICENSE.
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
8
8
 
9
9
  RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'FileUploader'
11
+ rdoc.title = 'Uploadbox'
12
12
  rdoc.options << '--line-numbers'
13
13
  rdoc.rdoc_files.include('README.rdoc')
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,4 +1,4 @@
1
- module FileUploader
1
+ module Uploadbox
2
2
  class ApplicationController < ActionController::Base
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module FileUploader
1
+ module Uploadbox
2
2
  class ImagesController < ApplicationController
3
3
  def create
4
4
  @image = Image.create!(image_params)
@@ -1,4 +1,4 @@
1
- module FileUploader
1
+ module Uploadbox
2
2
  module ApplicationHelper
3
3
  end
4
4
  end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Uploadbox</title>
5
+ <%= stylesheet_link_tag "uploadbox/application", media: "all" %>
6
+ <%= javascript_include_tag "uploadbox/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -8,9 +8,9 @@
8
8
  span.btn.btn-file
9
9
  span.fileupload-new Escolher imagem
10
10
  span.fileupload-exists Alterar
11
- input type="file" data-url="#{file_uploader.images_path}" name="image[file]"
11
+ input type="file" data-url="#{uploadbox.images_path}" name="image[file]"
12
12
  - if resource.image?
13
- = link_to 'Excluir', file_uploader.image_path(resource.image), class: 'btn fileupload-exists', remote: true, method: :delete
13
+ = link_to 'Excluir', uploadbox.image_path(resource.image), class: 'btn fileupload-exists', remote: true, method: :delete
14
14
  - else
15
15
  = link_to 'Excluir', '#', class: 'btn fileupload-exists', remote: true, method: :delete
16
16
 
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
- FileUploader::Engine.routes.draw do
1
+ Uploadbox::Engine.routes.draw do
2
2
  resources :images, only: [:create, :update, :destroy]
3
3
  end
@@ -1,4 +1,4 @@
1
- module FileUploader
1
+ module Uploadbox
2
2
  class ImageGenerator < Rails::Generators::Base
3
3
  include Rails::Generators::Migration
4
4
 
@@ -8,6 +8,10 @@ module FileUploader
8
8
  copy_file 'initializers/carrierwave.rb', 'config/initializers/carrierwave.rb'
9
9
  end
10
10
 
11
+ def update_gitignore
12
+ append_to_file '.gitignore', 'public/uploads'
13
+ end
14
+
11
15
  def create_uploader
12
16
  copy_file 'uploaders/image_uploader.rb', 'app/uploaders/image_uploader.rb'
13
17
  end
@@ -1,4 +1,4 @@
1
1
  # desc "Explaining what the task does"
2
- # task :file_uploader do
2
+ # task :uploadbox do
3
3
  # # Task goes here
4
4
  # end
@@ -8,16 +8,15 @@ require 'mini_magick'
8
8
  require 'jbuilder'
9
9
 
10
10
 
11
- module FileUploader
11
+ module Uploadbox
12
12
  class Engine < ::Rails::Engine
13
13
  config.autoload_paths << File.expand_path('../../../app/uploaders/concerns', __FILE__)
14
- p config.autoload_paths
15
- isolate_namespace FileUploader
14
+ isolate_namespace Uploadbox
16
15
  end
17
16
  end
18
17
 
19
18
  class ActionView::Helpers::FormBuilder
20
19
  def image_uploader
21
- @template.render partial: 'file_uploader/images/uploader', locals: {resource: @object, form: self}
20
+ @template.render partial: 'uploadbox/images/uploader', locals: {resource: @object, form: self}
22
21
  end
23
22
  end
@@ -0,0 +1,3 @@
1
+ module Uploadbox
2
+ VERSION = "0.0.2"
3
+ end
data/lib/uploadbox.rb ADDED
@@ -0,0 +1,4 @@
1
+ require "uploadbox/engine"
2
+
3
+ module Uploadbox
4
+ end
@@ -1,3 +1,3 @@
1
1
  #= require jquery
2
2
  #= require jquery_ujs
3
- #= require file_uploader
3
+ #= require uploadbox
@@ -1,2 +1,2 @@
1
1
  @import scaffold
2
- @import file_uploader
2
+ @import uploadbox
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require "file_uploader"
6
+ require "uploadbox"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -2,5 +2,5 @@ Rails.application.routes.draw do
2
2
  resources :posts
3
3
  root 'posts#index'
4
4
 
5
- mount FileUploader::Engine => '/file_uploader', as: :file_uploader
5
+ mount Uploadbox::Engine => '/uploadbox', as: :uploadbox
6
6
  end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class UploadboxTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, Uploadbox
6
+ end
7
+ end