Permalink
Browse files

Upgrade to Rails 3.1

  • Loading branch information...
1 parent 3df541d commit 8e2e3f445b132d92c26793275fbd18a1014e05ee @mischa78 committed Oct 6, 2011
Showing with 199 additions and 9,351 deletions.
  1. +2 −1 .gitignore
  2. +13 −28 Gemfile
  3. +102 −61 Gemfile.lock
  4. +24 −2 README.md
  5. BIN {public → app/assets}/images/bg-body.png
  6. BIN {public → app/assets}/images/clipboard.png
  7. BIN {public → app/assets}/images/clipboard_add.png
  8. BIN {public → app/assets}/images/copy.png
  9. BIN {public → app/assets}/images/delete.png
  10. BIN {public → app/assets}/images/edit.png
  11. BIN {public → app/assets}/images/exclamation.png
  12. BIN {public → app/assets}/images/file.png
  13. BIN {public → app/assets}/images/file_add.png
  14. BIN {public → app/assets}/images/fileicons/.DS_Store
  15. BIN {public → app/assets}/images/fileicons/7z.png
  16. BIN {public → app/assets}/images/fileicons/ai.png
  17. BIN {public → app/assets}/images/fileicons/aif.png
  18. BIN {public → app/assets}/images/fileicons/aiff.png
  19. BIN {public → app/assets}/images/fileicons/audio.png
  20. BIN {public → app/assets}/images/fileicons/bz2.png
  21. BIN {public → app/assets}/images/fileicons/c.png
  22. BIN {public → app/assets}/images/fileicons/conf.png
  23. BIN {public → app/assets}/images/fileicons/cpp.png
  24. BIN {public → app/assets}/images/fileicons/cs.png
  25. BIN {public → app/assets}/images/fileicons/css.png
  26. BIN {public → app/assets}/images/fileicons/csv.png
  27. BIN {public → app/assets}/images/fileicons/divx.png
  28. BIN {public → app/assets}/images/fileicons/doc.png
  29. BIN {public → app/assets}/images/fileicons/docx.png
  30. BIN {public → app/assets}/images/fileicons/dot.png
  31. BIN {public → app/assets}/images/fileicons/fla.png
  32. BIN {public → app/assets}/images/fileicons/gif.png
  33. BIN {public → app/assets}/images/fileicons/gz.png
  34. BIN {public → app/assets}/images/fileicons/htm.png
  35. BIN {public → app/assets}/images/fileicons/html.png
  36. BIN {public → app/assets}/images/fileicons/image.png
  37. BIN {public → app/assets}/images/fileicons/java.png
  38. BIN {public → app/assets}/images/fileicons/jpeg.png
  39. BIN {public → app/assets}/images/fileicons/jpg.png
  40. BIN {public → app/assets}/images/fileicons/js.png
  41. BIN {public → app/assets}/images/fileicons/mdb.png
  42. BIN {public → app/assets}/images/fileicons/mdbx.png
  43. BIN {public → app/assets}/images/fileicons/mov.png
  44. BIN {public → app/assets}/images/fileicons/mp3.png
  45. BIN {public → app/assets}/images/fileicons/mpg.png
  46. BIN {public → app/assets}/images/fileicons/ogg.png
  47. BIN {public → app/assets}/images/fileicons/pdf.png
  48. BIN {public → app/assets}/images/fileicons/php.png
  49. BIN {public → app/assets}/images/fileicons/pl.png
  50. BIN {public → app/assets}/images/fileicons/png.png
  51. BIN {public → app/assets}/images/fileicons/ppt.png
  52. BIN {public → app/assets}/images/fileicons/pptx.png
  53. BIN {public → app/assets}/images/fileicons/ps.png
  54. BIN {public → app/assets}/images/fileicons/py.png
  55. BIN {public → app/assets}/images/fileicons/ram.png
  56. BIN {public → app/assets}/images/fileicons/rar.png
  57. BIN {public → app/assets}/images/fileicons/rb.png
  58. BIN {public → app/assets}/images/fileicons/rm.png
  59. BIN {public → app/assets}/images/fileicons/rtf.png
  60. BIN {public → app/assets}/images/fileicons/sql.png
  61. BIN {public → app/assets}/images/fileicons/swf.png
  62. BIN {public → app/assets}/images/fileicons/tar.png
  63. BIN {public → app/assets}/images/fileicons/tgz.png
  64. BIN {public → app/assets}/images/fileicons/txt.png
  65. BIN {public → app/assets}/images/fileicons/video.png
  66. BIN {public → app/assets}/images/fileicons/wav.png
  67. BIN {public → app/assets}/images/fileicons/wma.png
  68. BIN {public → app/assets}/images/fileicons/wmv.png
  69. BIN {public → app/assets}/images/fileicons/xls.png
  70. BIN {public → app/assets}/images/fileicons/xlsx.png
  71. BIN {public → app/assets}/images/fileicons/xml.png
  72. BIN {public → app/assets}/images/fileicons/xvid.png
  73. BIN {public → app/assets}/images/fileicons/zip.png
  74. BIN {public → app/assets}/images/folder.png
  75. BIN {public → app/assets}/images/folder_add.png
  76. BIN {public → app/assets}/images/group.png
  77. BIN {public → app/assets}/images/group_add.png
  78. BIN {public → app/assets}/images/group_grey.png
  79. BIN {public → app/assets}/images/information.png
  80. BIN {public → app/assets}/images/left.png
  81. BIN {public → app/assets}/images/logo.png
  82. BIN {public → app/assets}/images/move.png
  83. BIN {public → app/assets}/images/permissions.png
  84. BIN {public → app/assets}/images/right.png
  85. BIN {public → app/assets}/images/share.png
  86. BIN {public → app/assets}/images/user.png
  87. BIN {public → app/assets}/images/user_add.png
  88. BIN app/assets/javascripts/.DS_Store
  89. +6 −0 {public → app/assets}/javascripts/application.js
  90. +10 −5 public/stylesheets/stylesheet.css → app/assets/stylesheets/application.css
  91. +2 −2 app/models/folder.rb
  92. +1 −1 app/models/user_file.rb
  93. +2 −2 app/views/layouts/application.html.erb
  94. +12 −3 config/application.rb
  95. +6 −1 config/environments/development.rb
  96. +9 −0 config/environments/production.rb
  97. +4 −0 config/environments/test.rb
  98. +1 −1 doc/LICENSE
  99. +0 −965 public/javascripts/controls.js
  100. +0 −974 public/javascripts/dragdrop.js
  101. +0 −1,123 public/javascripts/effects.js
  102. +0 −6,001 public/javascripts/prototype.js
  103. +0 −175 public/javascripts/rails.js
  104. +0 −1 test/test_helper.rb
  105. +5 −5 test/unit/share_link_test.rb
View
@@ -2,4 +2,5 @@ db/*.sqlite3
log/*
uploads/*
tmp/*
-config/initializers/mailer.rb
+config/initializers/mailer.rb
+.sass-cache/
View
41 Gemfile
@@ -1,37 +1,22 @@
source 'http://rubygems.org'
-gem 'rake', '0.8.7'
-gem 'rails'
+gem 'rake'
+gem 'rails', '3.1.0'
+gem 'sqlite3'
gem 'dynamic_form'
gem 'acts_as_tree'
gem 'paperclip'
-gem 'sqlite3'
-group :test do
- gem 'factory_girl_rails'
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails', '~> 3.1.0'
+ gem 'coffee-rails', '~> 3.1.0'
+ gem 'uglifier'
end
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
+gem 'prototype-rails'
-# To use debugger
-# gem 'ruby-debug'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
-
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+group :test do
+ gem 'factory_girl_rails'
+end
View
@@ -1,91 +1,132 @@
GEM
remote: http://rubygems.org/
specs:
- abstract (1.0.0)
- actionmailer (3.0.9)
- actionpack (= 3.0.9)
- mail (~> 2.2.19)
- actionpack (3.0.9)
- activemodel (= 3.0.9)
- activesupport (= 3.0.9)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.5.0)
- rack (~> 1.2.1)
- rack-mount (~> 0.6.14)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.9)
- activesupport (= 3.0.9)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activerecord (3.0.9)
- activemodel (= 3.0.9)
- activesupport (= 3.0.9)
- arel (~> 2.0.10)
- tzinfo (~> 0.3.23)
- activeresource (3.0.9)
- activemodel (= 3.0.9)
- activesupport (= 3.0.9)
- activesupport (3.0.9)
+ actionmailer (3.1.0)
+ actionpack (= 3.1.0)
+ mail (~> 2.3.0)
+ actionpack (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.2)
+ rack-cache (~> 1.0.3)
+ rack-mount (~> 0.8.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.0.0)
+ activemodel (3.1.0)
+ activesupport (= 3.1.0)
+ bcrypt-ruby (~> 3.0.0)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ arel (~> 2.2.1)
+ tzinfo (~> 0.3.29)
+ activeresource (3.1.0)
+ activemodel (= 3.1.0)
+ activesupport (= 3.1.0)
+ activesupport (3.1.0)
+ multi_json (~> 1.0)
acts_as_tree (0.1.1)
- arel (2.0.10)
- builder (2.1.2)
- cocaine (0.1.0)
+ arel (2.2.1)
+ bcrypt-ruby (3.0.1)
+ builder (3.0.0)
+ cocaine (0.2.0)
+ coffee-rails (3.1.1)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.1.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.2)
dynamic_form (1.1.4)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- factory_girl (1.3.3)
- factory_girl_rails (1.0.1)
- factory_girl (~> 1.3)
+ erubis (2.7.0)
+ execjs (1.2.9)
+ multi_json (~> 1.0)
+ factory_girl (2.1.2)
+ activesupport
+ factory_girl_rails (1.2.0)
+ factory_girl (~> 2.1.0)
railties (>= 3.0.0)
- i18n (0.5.0)
- mail (2.2.19)
- activesupport (>= 2.3.6)
+ hike (1.2.1)
+ i18n (0.6.0)
+ mail (2.3.0)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.16)
- paperclip (2.3.13)
+ multi_json (1.0.3)
+ paperclip (2.4.3)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
- polyglot (0.3.1)
- rack (1.2.3)
- rack-mount (0.6.14)
+ mime-types
+ polyglot (0.3.2)
+ prototype-rails (3.1.0)
+ rails (~> 3.1)
+ rack (1.3.4)
+ rack-cache (1.0.3)
+ rack (>= 0.4)
+ rack-mount (0.8.3)
rack (>= 1.0.0)
- rack-test (0.5.7)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.1)
rack (>= 1.0)
- rails (3.0.9)
- actionmailer (= 3.0.9)
- actionpack (= 3.0.9)
- activerecord (= 3.0.9)
- activeresource (= 3.0.9)
- activesupport (= 3.0.9)
+ rails (3.1.0)
+ actionmailer (= 3.1.0)
+ actionpack (= 3.1.0)
+ activerecord (= 3.1.0)
+ activeresource (= 3.1.0)
+ activesupport (= 3.1.0)
bundler (~> 1.0)
- railties (= 3.0.9)
- railties (3.0.9)
- actionpack (= 3.0.9)
- activesupport (= 3.0.9)
+ railties (= 3.1.0)
+ railties (3.1.0)
+ actionpack (= 3.1.0)
+ activesupport (= 3.1.0)
+ rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.4)
- rake (0.8.7)
- rdoc (3.8)
- sqlite3 (1.3.3)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.9.4)
+ sass (3.1.8)
+ sass-rails (3.1.4)
+ actionpack (~> 3.1.0)
+ railties (~> 3.1.0)
+ sass (>= 3.1.4)
+ sprockets (~> 2.0.0)
+ tilt (~> 1.3.2)
+ sprockets (2.0.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.4)
thor (0.14.6)
- treetop (1.4.9)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.29)
+ tzinfo (0.3.30)
+ uglifier (1.0.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
PLATFORMS
ruby
DEPENDENCIES
acts_as_tree
+ coffee-rails (~> 3.1.0)
dynamic_form
factory_girl_rails
paperclip
- rails
- rake (= 0.8.7)
+ prototype-rails
+ rails (= 3.1.0)
+ rake
+ sass-rails (~> 3.1.0)
sqlite3
+ uglifier
View
@@ -1,7 +1,7 @@
Welcome to Boxroom
==================
-Boxroom is a Rails 3 application that aims to be a simple interface for sharing
+Boxroom is a Rails 3.1 application that aims to be a simple interface for sharing
files in a web browser. To make this possible the application lets users create
folders and upload and download files. For admins it is possible to create users,
groups and the CRU/D rights these groups have on folders.
@@ -18,7 +18,7 @@ Requirements
The requirements for running Boxroom are:
* Ruby 1.8.7 or Ruby 1.9.2
- * Rails 3.0.x
+ * Rails 3.1.0
* A database (e.g. MySQL or SQLite)
@@ -85,3 +85,25 @@ If you encounter an issue with Boxroom where downloaded files are always empty,
it may help to uncomment the following line in `config/environments/production.rb`:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
+
+
+License
+-------
+Copyright (c) 2011 Mischa Berger
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file not shown.
@@ -1,3 +1,9 @@
+//= require prototype
+//= require prototype_ujs
+//= require effects
+//= require_self
+//= require_tree .
+
Event.observe(window, 'load', function() {
fadeout.delay(1.5, 'notice');
fadeout.delay(1.5, 'alert');
@@ -1,5 +1,10 @@
+/*
+*= require_self
+*= require_tree .
+*/
+
html, body { height: 100%; }
-body { padding: 0px; margin: 0px; background-color: rgb(230,230,230); background-image: url(../images/bg-body.png); background-repeat: repeat-y; background-position: top center; }
+body { padding: 0px; margin: 0px; background-color: rgb(230,230,230); background-image: url(bg-body.png); background-repeat: repeat-y; background-position: top center; }
body, input { font-family: Arial; font-size: 13pt; }
input { padding: 3px; border: 1px solid rgb(210,210,210); }
input[type='button'], input[type='submit'] { background-color: #EEE; padding: 5px; }
@@ -66,8 +71,8 @@ hr { border: 0; width: 800px; margin: 15px 0 10px 15px; color: #CCC; background-
.translation .missing { color: #F0F; }
.error, .notice { display: inline-block; font-size: 16pt; color: #FFF; border: 6px double #FFF; background-repeat: no-repeat; background-position: 10px 7px; }
-.error { background-color: #F00; background-image: url(../images/exclamation.png); }
-.notice { background-color: rgb(0,165,0); background-image: url(../images/information.png); }
+.error { background-color: #F00; background-image: url(exclamation.png); }
+.notice { background-color: rgb(0,165,0); background-image: url(information.png); }
span.field_with_errors input, span.field_with_errors textarea { background-color: #FDD; }
#errorExplanation { width: 500px; border: 2px solid #c00; padding: 7px 7px 15px 7px; margin: 10px 0 10px 15px; background-color: #f0f0f0; }
@@ -78,6 +83,6 @@ span.field_with_errors input, span.field_with_errors textarea { background-color
.folder_menu, .user_menu, .group_menu { padding: 7px 14px 7px 14px; }
.folder_menu a, .user_menu a, .group_menu a { outline: none; }
-.highlight { display: inline-block; margin: -7px 0 -7px 0; padding-left: 14px; background-color: #BA303A; background-image: url(../images/left.png); background-repeat: no-repeat; background-position: top left; }
-.highlight span { display: inline-block; height: 27px; padding: 7px 14px 0 0; background-image: url(../images/right.png); background-repeat: no-repeat; background-position: top right; }
+.highlight { display: inline-block; margin: -7px 0 -7px 0; padding-left: 14px; background-color: #BA303A; background-image: url(left.png); background-repeat: no-repeat; background-position: top left; }
+.highlight span { display: inline-block; height: 27px; padding: 7px 14px 0 0; background-image: url(right.png); background-repeat: no-repeat; background-position: top right; }
.highlight a { text-decoration: none; color: #FFF; outline: none; }
View
@@ -15,7 +15,7 @@ class Folder < ActiveRecord::Base
before_destroy :dont_destroy_root_folder
def copy(target_folder, originally_copied_folder = nil)
- new_folder = self.clone
+ new_folder = self.dup
new_folder.is_copied_folder = true
new_folder.parent = target_folder
new_folder.save!
@@ -24,7 +24,7 @@ def copy(target_folder, originally_copied_folder = nil)
# Copy original folder's permissions
self.permissions.each do |permission|
- new_permission = permission.clone
+ new_permission = permission.dup
new_permission.folder = new_folder
new_permission.save!
end
View
@@ -10,7 +10,7 @@ class UserFile < ActiveRecord::Base
validates_format_of :attachment_file_name, :with => /^[^\/\\\?\*:|"<>]+$/, :message => I18n.t(:invalid_characters, :scope => [:activerecord, :errors, :messages])
def copy(target_folder)
- new_file = self.clone
+ new_file = self.dup
new_file.instance_eval { @errors = nil }
new_file.folder = target_folder
new_file.save!
@@ -6,8 +6,8 @@
<% else -%>
<title>Boxroom</title>
<% end -%>
- <%= stylesheet_link_tag :all, :cache => true %>
- <%= javascript_include_tag :defaults, :cache => true %>
+ <%= stylesheet_link_tag 'application' %>
+ <%= javascript_include_tag 'application' %>
<%= csrf_meta_tag %>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
Oops, something went wrong.

0 comments on commit 8e2e3f4

Please sign in to comment.