Advertisement
Guest User

Untitled

a guest
Jan 13th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. cat Gemfile
  2. source 'https://rubygems.org'
  3.  
  4. gem "rails", "3.2.19"
  5. gem "rake", "~> 10.1.1"
  6. gem "jquery-rails", "~> 2.0.2"
  7. gem "coderay", "~> 1.1.0"
  8. gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
  9. gem "builder", "3.0.0"
  10.  
  11. # Optional gem for LDAP authentication
  12. group :ldap do
  13. gem "net-ldap", "~> 0.3.1"
  14. end
  15.  
  16. # Optional gem for OpenID authentication
  17. group :openid do
  18. gem "ruby-openid", "~> 2.3.0", :require => "openid"
  19. gem "rack-openid"
  20. end
  21.  
  22. # Optional gem for exporting the gantt to a PNG file, not supported with jruby
  23. platforms :mri, :mingw do
  24. group :rmagick do
  25. # RMagick 2 supports ruby 1.9
  26. # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
  27. # different requirements for the same gem on different platforms
  28. gem "rmagick", ">= 2.0.0"
  29. end
  30. end
  31.  
  32. platforms :jruby do
  33. # jruby-openssl is bundled with JRuby 1.7.0
  34. gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0'
  35. gem "activerecord-jdbc-adapter", "~> 1.3.2"
  36. end
  37.  
  38. # Include database gems for the adapters found in the database
  39. # configuration file
  40. require 'erb'
  41. require 'yaml'
  42. database_file = File.join(File.dirname(__FILE__), "config/database.yml")
  43. if File.exist?(database_file)
  44. database_config = YAML::load(ERB.new(IO.read(database_file)).result)
  45. adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
  46. if adapters.any?
  47. adapters.each do |adapter|
  48. case adapter
  49. when 'mysql2'
  50. gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw]
  51. gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
  52. when 'mysql'
  53. gem "mysql", "~> 2.8.1", :platforms => [:mri, :mingw]
  54. gem "activerecord-jdbcmysql-adapter", :platforms => :jruby
  55. when /postgresql/
  56. gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw]
  57. gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby
  58. when /sqlite3/
  59. gem "sqlite3", :platforms => [:mri, :mingw]
  60. gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
  61. when /sqlserver/
  62. gem "tiny_tds", "~> 0.5.1", :platforms => [:mri, :mingw]
  63. gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw]
  64. else
  65. warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
  66. end
  67. end
  68. else
  69. warn("No adapter found in config/database.yml, please configure it first")
  70. end
  71. else
  72. warn("Please configure your config/database.yml first")
  73. end
  74.  
  75. group :development do
  76. gem "rdoc", ">= 2.4.2"
  77. gem "yard"
  78. end
  79.  
  80. group :test do
  81. gem "shoulda", "~> 3.3.2"
  82. gem "mocha", "~> 1.0.0", :require => 'mocha/api'
  83. if RUBY_VERSION >= '1.9.3'
  84. gem "capybara", "~> 2.1.0"
  85. gem "selenium-webdriver"
  86. gem "database_cleaner"
  87. end
  88. end
  89.  
  90. local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
  91. if File.exists?(local_gemfile)
  92. puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
  93. instance_eval File.read(local_gemfile)
  94. end
  95.  
  96. # Load plugins' Gemfiles
  97. Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
  98. puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
  99. #TODO: switch to "eval_gemfile file" when bundler >= 1.2.0 will be required (rails 4)
  100. instance_eval File.read(file), file
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement