Permalink
Browse files

Initial rails3 porting

  • Loading branch information...
1 parent de3e7eb commit a03f5080a672a1b0410037b54267d2efa9cef31c @jamesu committed Aug 19, 2011
Showing with 295 additions and 364 deletions.
  1. +21 −0 Gemfile
  2. +121 −0 Gemfile.lock
  3. BIN {public/themes/default → app/assets}/images/avatar.gif
  4. BIN {public/themes/default → app/assets}/images/filetypes/archive.png
  5. BIN {public/themes/default → app/assets}/images/filetypes/archive_old.png
  6. BIN {public/themes/default → app/assets}/images/filetypes/audio.png
  7. BIN {public/themes/default → app/assets}/images/filetypes/doc.png
  8. BIN {public/themes/default → app/assets}/images/filetypes/font.png
  9. BIN {public/themes/default → app/assets}/images/filetypes/image.png
  10. BIN {public/themes/default → app/assets}/images/filetypes/mov.png
  11. BIN {public/themes/default → app/assets}/images/filetypes/pdf.png
  12. BIN {public/themes/default → app/assets}/images/filetypes/psd.png
  13. BIN {public/themes/default → app/assets}/images/filetypes/rm.png
  14. BIN {public/themes/default → app/assets}/images/filetypes/svg.png
  15. BIN {public/themes/default → app/assets}/images/filetypes/swf.png
  16. BIN {public/themes/default → app/assets}/images/filetypes/unknown.png
  17. BIN {public/themes/default → app/assets}/images/filetypes/video.png
  18. BIN {public/themes/default → app/assets}/images/icons/billable.gif
  19. BIN {public/themes/default → app/assets}/images/icons/bullet_drop_down.gif
  20. BIN {public/themes/default → app/assets}/images/icons/cancel_gray.gif
  21. BIN {public/themes/default → app/assets}/images/icons/checked.gif
  22. BIN {public/themes/default → app/assets}/images/icons/checked.jpg
  23. BIN {public/themes/default → app/assets}/images/icons/comment.gif
  24. BIN {public/themes/default → app/assets}/images/icons/csv.png
  25. BIN {public/themes/default → app/assets}/images/icons/edit.gif
  26. BIN {public/themes/default → app/assets}/images/icons/feed.gif
  27. BIN {public/themes/default → app/assets}/images/icons/go_gray.gif
  28. BIN {public/themes/default → app/assets}/images/icons/icalendar.png
  29. BIN {public/themes/default → app/assets}/images/icons/more_down.gif
  30. BIN {public/themes/default → app/assets}/images/icons/not-checked.gif
  31. BIN {public/themes/default → app/assets}/images/icons/not-checked.jpg
  32. BIN {public/themes/default → app/assets}/images/icons/ok.gif
  33. BIN {public/themes/default → app/assets}/images/icons/private.gif
  34. BIN {public/themes/default → app/assets}/images/icons/start.gif
  35. BIN {public/themes/default → app/assets}/images/icons/stop.gif
  36. BIN {public/themes/default → app/assets}/images/icons/trash.gif
  37. BIN {public/themes/default → app/assets}/images/im/aim.gif
  38. BIN {public/themes/default → app/assets}/images/im/icq.gif
  39. BIN {public/themes/default → app/assets}/images/im/jabber.gif
  40. BIN {public/themes/default → app/assets}/images/im/msn.gif
  41. BIN {public/themes/default → app/assets}/images/im/skype.gif
  42. BIN {public/themes/default → app/assets}/images/im/yahoo.gif
  43. BIN {public/themes/default → app/assets}/images/layout/content-back.gif
  44. BIN {public/themes/default → app/assets}/images/layout/tab_active_left.gif
  45. BIN {public/themes/default → app/assets}/images/layout/tab_active_right.gif
  46. BIN {public/themes/default → app/assets}/images/layout/tab_left.gif
  47. BIN {public/themes/default → app/assets}/images/layout/tab_right.gif
  48. BIN {public/themes/default → app/assets}/images/layout/yellow-gradient.jpg
  49. BIN {public/themes/default → app/assets}/images/login-bg.gif
  50. BIN {public/themes/default → app/assets}/images/logo.gif
  51. BIN {public/themes/default → app/assets}/images/logtypes/comments.gif
  52. BIN {public/themes/default → app/assets}/images/logtypes/companies.gif
  53. BIN {public/themes/default → app/assets}/images/logtypes/projectfilerevisions.gif
  54. BIN {public/themes/default → app/assets}/images/logtypes/projectfiles.gif
  55. BIN {public/themes/default → app/assets}/images/logtypes/projectfolders.gif
  56. BIN {public/themes/default → app/assets}/images/logtypes/projectmessagecategorys.gif
  57. BIN {public/themes/default → app/assets}/images/logtypes/projectmessages.gif
  58. BIN {public/themes/default → app/assets}/images/logtypes/projectmilestones.gif
  59. BIN {public/themes/default → app/assets}/images/logtypes/projects.gif
  60. BIN {public/themes/default → app/assets}/images/logtypes/projecttasklists.gif
  61. BIN {public/themes/default → app/assets}/images/logtypes/projecttasks.gif
  62. BIN {public/themes/default → app/assets}/images/logtypes/projecttimes.gif
  63. BIN {public/themes/default → app/assets}/images/logtypes/wikipages.gif
  64. 0 {public → app/assets}/javascripts/application.js
  65. 0 {public → app/assets}/javascripts/jquery-ui.js
  66. 0 {public → app/assets}/javascripts/jquery.js
  67. 0 {public → app/assets}/javascripts/jrails.js
  68. 0 {public/themes/default → app/assets}/stylesheets/admin/config.css
  69. 0 {public/themes/default → app/assets}/stylesheets/admin/massmailer.css
  70. 0 {public/themes/default → app/assets}/stylesheets/admin/user_list.css
  71. 0 {public/themes/default → app/assets}/stylesheets/admin/user_permissions.css
  72. 0 {public/themes/default → app/assets}/stylesheets/application_logs.css
  73. 0 {public/themes/default → app/assets}/stylesheets/company_website.css
  74. 0 {public/themes/default → app/assets}/stylesheets/dashboard/my_tasks.css
  75. 0 {public/themes/default → app/assets}/stylesheets/dialog.css
  76. 0 {public/themes/default → app/assets}/stylesheets/general/construction.css
  77. 0 {public/themes/default → app/assets}/stylesheets/general/forms.css
  78. 0 {public/themes/default → app/assets}/stylesheets/general/rewrites.css
  79. 0 {public/themes/default → app/assets}/stylesheets/project/attach_document.css
  80. 0 {public/themes/default → app/assets}/stylesheets/project/attach_files.css
  81. 0 {public/themes/default → app/assets}/stylesheets/project/comments.css
  82. 0 {public/themes/default → app/assets}/stylesheets/project/files.css
  83. 0 {public/themes/default → app/assets}/stylesheets/project/messages.css
  84. 0 {public/themes/default → app/assets}/stylesheets/project/milestones.css
  85. 0 {public/themes/default → app/assets}/stylesheets/project/people.css
  86. 0 {public/themes/default → app/assets}/stylesheets/project/permissions.css
  87. 0 {public/themes/default → app/assets}/stylesheets/project/project_log.css
  88. 0 {public/themes/default → app/assets}/stylesheets/project/search_results.css
  89. 0 {public/themes/default → app/assets}/stylesheets/project/task.css
  90. 0 {public/themes/default → app/assets}/stylesheets/project/task_list.css
  91. 0 {public/themes/default → app/assets}/stylesheets/project/time.css
  92. 0 {public/themes/default → app/assets}/stylesheets/project/wiki.css
  93. 0 {public/themes/default → app/assets}/stylesheets/project_website.css
  94. +4 −0 config.ru
  95. +21 −0 config/application.rb
  96. +4 −108 config/boot.rb
  97. +4 −68 config/environment.rb
  98. +23 −13 config/environments/development.rb
  99. +48 −15 config/environments/production.rb
  100. +34 −16 config/environments/test.rb
  101. +1 −1 config/initializers/backtrace_silencers.rb
  102. +1 −1 config/initializers/inflections.rb
  103. +0 −17 config/initializers/new_rails_defaults.rb
  104. +7 −0 config/initializers/secret_token.rb
  105. +3 −12 config/initializers/session_store.rb
  106. +3 −69 config/routes.rb
  107. +0 −10 public/dispatch.cgi
  108. +0 −24 public/dispatch.fcgi
  109. +0 −10 public/dispatch.rb
  110. 0 public/images/donotreadme
  111. 0 public/stylesheets/donotreadme
View
21 Gemfile
@@ -0,0 +1,21 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.0rc4'
+gem 'sqlite3'
+gem 'cancan'
+gem 'sass-rails', "~> 3.1.0.rc"
+gem 'haml'
+gem 'uglifier'
+
+#group :test, :development do
+# gem 'rspec-rails', '~> 2.3.1'
+#end
+
+#gem 'immortal', :git => "git://github.com/teambox/immortal.git"
+gem 'choices', :git => "git://github.com/teambox/choices.git"
+
+# Rails 3.1 - Heroku
+group :production do
+ gem 'therubyracer-heroku', '0.8.1.pre3'
+ gem 'pg'
+end
View
@@ -0,0 +1,121 @@
+GIT
+ remote: git://github.com/teambox/choices.git
+ revision: 93d0cfb4e5fd4ae03b421b379a69ee00721f337b
+ specs:
+ choices (0.2.4)
+ hashie (>= 0.4.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ mail (~> 2.3.0)
+ actionpack (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ i18n (~> 0.6)
+ rack (~> 1.3.0)
+ rack-cache (~> 1.0.1)
+ rack-mount (~> 0.8.1)
+ rack-test (~> 0.6.0)
+ sprockets (~> 2.0.0.beta.10)
+ tzinfo (~> 0.3.27)
+ activemodel (3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ bcrypt-ruby (~> 2.1.4)
+ builder (~> 3.0.0)
+ i18n (~> 0.6)
+ activerecord (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ arel (~> 2.1.1)
+ tzinfo (~> 0.3.27)
+ activeresource (3.1.0.rc4)
+ activemodel (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ activesupport (3.1.0.rc4)
+ multi_json (~> 1.0)
+ arel (2.1.1)
+ bcrypt-ruby (2.1.4)
+ bcrypt-ruby (2.1.4-java)
+ builder (3.0.0)
+ cancan (1.6.5)
+ erubis (2.7.0)
+ execjs (1.2.0)
+ multi_json (~> 1.0)
+ haml (3.1.2)
+ hashie (1.0.0)
+ hike (1.1.0)
+ i18n (0.6.0)
+ mail (2.3.0)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ multi_json (1.0.3)
+ pg (0.11.0)
+ polyglot (0.3.1)
+ rack (1.3.0)
+ rack-cache (1.0.2)
+ rack (>= 0.4)
+ rack-mount (0.8.1)
+ rack (>= 1.0.0)
+ rack-ssl (1.3.2)
+ rack
+ rack-test (0.6.0)
+ rack (>= 1.0)
+ rails (3.1.0.rc4)
+ actionmailer (= 3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activerecord (= 3.1.0.rc4)
+ activeresource (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ bundler (~> 1.0)
+ railties (= 3.1.0.rc4)
+ railties (3.1.0.rc4)
+ actionpack (= 3.1.0.rc4)
+ activesupport (= 3.1.0.rc4)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2)
+ rdoc (3.6.1)
+ sass (3.1.2)
+ sass-rails (3.1.0.rc.2)
+ actionpack (~> 3.1.0.rc1)
+ railties (~> 3.1.0.rc1)
+ sass (>= 3.1.2)
+ sprockets (>= 2.0.0.beta.9)
+ sprockets (2.0.0.beta.10)
+ hike (~> 1.0)
+ rack (~> 1.0)
+ tilt (!= 1.3.0, ~> 1.1)
+ sqlite3 (1.3.3)
+ therubyracer-heroku (0.8.1.pre3)
+ thor (0.14.6)
+ tilt (1.3.2)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.28)
+ uglifier (0.5.4)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+
+PLATFORMS
+ java
+ ruby
+
+DEPENDENCIES
+ cancan
+ choices!
+ haml
+ pg
+ rails (= 3.1.0rc4)
+ sass-rails (~> 3.1.0.rc)
+ sqlite3
+ therubyracer-heroku (= 0.8.1.pre3)
+ uglifier
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Railscollab::Application
View
@@ -0,0 +1,21 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+# If you have a Gemfile, require the gems listed there, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env) if defined?(Bundler)
+
+module Railscollab
+ class Application < Rails::Application
+ config.encoding = "utf-8"
+ config.filter_parameters += [:password]
+ config.from_file 'railscollab.yml'
+ config.assets.enabled = true
+ config.sass.preferred_syntax = :sass
+ end
+end
+
+require 'authenticated_system'
+require 'authentication'
+require 'authentication/by_cookie_token'
View
@@ -1,110 +1,6 @@
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
+require 'rubygems'
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
-module Rails
- class << self
- def boot!
- unless booted?
- preinitialize
- pick_boot.run
- end
- end
-
- def booted?
- defined? Rails::Initializer
- end
-
- def pick_boot
- (vendor_rails? ? VendorBoot : GemBoot).new
- end
-
- def vendor_rails?
- File.exist?("#{RAILS_ROOT}/vendor/rails")
- end
-
- def preinitialize
- load(preinitializer_path) if File.exist?(preinitializer_path)
- end
-
- def preinitializer_path
- "#{RAILS_ROOT}/config/preinitializer.rb"
- end
- end
-
- class Boot
- def run
- load_initializer
- Rails::Initializer.run(:set_load_path)
- end
- end
-
- class VendorBoot < Boot
- def load_initializer
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
- Rails::Initializer.run(:install_gem_spec_stubs)
- Rails::GemDependency.add_frozen_gem_path
- end
- end
-
- class GemBoot < Boot
- def load_initializer
- self.class.load_rubygems
- load_rails_gem
- require 'initializer'
- end
-
- def load_rails_gem
- if version = self.class.gem_version
- gem 'rails', version
- else
- gem 'rails'
- end
- rescue Gem::LoadError => load_error
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
- exit 1
- end
-
- class << self
- def rubygems_version
- Gem::RubyGemsVersion rescue nil
- end
-
- def gem_version
- if defined? RAILS_GEM_VERSION
- RAILS_GEM_VERSION
- elsif ENV.include?('RAILS_GEM_VERSION')
- ENV['RAILS_GEM_VERSION']
- else
- parse_gem_version(read_environment_rb)
- end
- end
-
- def load_rubygems
- require 'rubygems'
- min_version = '1.3.1'
- unless rubygems_version >= min_version
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
- exit 1
- end
-
- rescue LoadError
- $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
- exit 1
- end
-
- def parse_gem_version(text)
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
- end
-
- private
- def read_environment_rb
- File.read("#{RAILS_ROOT}/config/environment.rb")
- end
- end
- end
-end
-
-# All that for this:
-Rails.boot!
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
View
@@ -1,69 +1,5 @@
-# Be sure to restart your web server when you modify this file.
+# Load the rails application
+require File.expand_path('../application', __FILE__)
-# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '>=2.3.3' unless defined? RAILS_GEM_VERSION
-
-# Bootstrap the Rails environment, frameworks, and default configuration
-require File.join(File.dirname(__FILE__), 'boot')
-require 'config_system'
-
-::AppConfig = OpenStruct.new()
-ConfigSystem.init
-
-# Extensions
-require 'railscollab_extras'
-
-# SSL SMTP
-begin
-require 'smtp-tls'
-rescue Exception
-end
-
-Rails::Initializer.run do |config|
- # Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
-
- # Add additional load paths for your own custom dirs
- config.load_paths += %W( #{RAILS_ROOT}/app/config_handlers )
-
- # Specify gems that this application depends on.
- config.gem 'actionmailer', :version => '>=2.1.0'
- config.gem 'ferret', :version => '>=0.11.6'
- config.gem 'icalendar', :version => '>=1.0.2'
- config.gem 'ruby-openid', :version => '>=2.1.2', :lib => 'openid'
- config.gem 'acts_as_ferret', :version => '>=0.4.4'
-
- # optional gems
- config.gem 'RedCloth', :version => '>= 4.0.0', :lib => 'redcloth'
- config.gem 'aws-s3', :lib => 'aws/s3'
-
- # Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
- # Skip frameworks you're not going to use. To use Rails without a database,
- # you must remove the Active Record framework.
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
-
- # Activate observers that should always be running
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names.
- config.time_zone = 'UTC'
-
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- config.i18n.load_path += Dir[Rails.root.join('vendor', 'plugins', '*', 'locales', '*.{rb,yml}')]
- # config.i18n.default_locale = :de
-end
-
-ConfigSystem.post_init
-
-# Include your application configuration below
-
-# Merge database & config.yml into AppConfig
-ConfigSystem.load_config
-
-require 'acts_as_ferret'
-ActsAsFerret.index_dir = "#{RAILS_ROOT}#{AppConfig.ferret_index_path}"
+# Initialize the rails application
+Railscollab::Application.initialize!
Oops, something went wrong.

0 comments on commit a03f508

Please sign in to comment.