@@ -1,104 +1,105 | |||
|
1 | 1 | source 'https://rubygems.org' |
|
2 | 2 | |
|
3 | 3 | gem "rails", "4.1.8" |
|
4 | 4 | gem "jquery-rails", "~> 3.1.1" |
|
5 | 5 | gem "coderay", "~> 1.1.0" |
|
6 | 6 | gem "builder", ">= 3.0.4" |
|
7 | 7 | gem "request_store", "1.0.5" |
|
8 | 8 | gem "mime-types" |
|
9 | 9 | gem "awesome_nested_set", "3.0.0" |
|
10 | 10 | gem "protected_attributes" |
|
11 | 11 | gem "actionpack-action_caching" |
|
12 | gem "actionpack-xml_parser" | |
|
12 | 13 | |
|
13 | 14 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem |
|
14 | 15 | gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin, :jruby] |
|
15 | 16 | gem "rbpdf", "~> 1.18.3" |
|
16 | 17 | |
|
17 | 18 | # Optional gem for LDAP authentication |
|
18 | 19 | group :ldap do |
|
19 | 20 | gem "net-ldap", "~> 0.3.1" |
|
20 | 21 | end |
|
21 | 22 | |
|
22 | 23 | # Optional gem for OpenID authentication |
|
23 | 24 | group :openid do |
|
24 | 25 | gem "ruby-openid", "~> 2.3.0", :require => "openid" |
|
25 | 26 | gem "rack-openid" |
|
26 | 27 | end |
|
27 | 28 | |
|
28 | 29 | platforms :mri, :mingw, :x64_mingw do |
|
29 | 30 | # Optional gem for exporting the gantt to a PNG file, not supported with jruby |
|
30 | 31 | group :rmagick do |
|
31 | 32 | gem "rmagick", ">= 2.0.0" |
|
32 | 33 | end |
|
33 | 34 | |
|
34 | 35 | # Optional Markdown support, not for JRuby |
|
35 | 36 | group :markdown do |
|
36 | 37 | gem "redcarpet", "~> 3.1.2" |
|
37 | 38 | end |
|
38 | 39 | end |
|
39 | 40 | |
|
40 | 41 | platforms :jruby do |
|
41 | 42 | # jruby-openssl is bundled with JRuby 1.7.0 |
|
42 | 43 | gem "jruby-openssl" if Object.const_defined?(:JRUBY_VERSION) && JRUBY_VERSION < '1.7.0' |
|
43 | 44 | gem "activerecord-jdbc-adapter", "~> 1.3.2" |
|
44 | 45 | end |
|
45 | 46 | |
|
46 | 47 | # Include database gems for the adapters found in the database |
|
47 | 48 | # configuration file |
|
48 | 49 | require 'erb' |
|
49 | 50 | require 'yaml' |
|
50 | 51 | database_file = File.join(File.dirname(__FILE__), "config/database.yml") |
|
51 | 52 | if File.exist?(database_file) |
|
52 | 53 | database_config = YAML::load(ERB.new(IO.read(database_file)).result) |
|
53 | 54 | adapters = database_config.values.map {|c| c['adapter']}.compact.uniq |
|
54 | 55 | if adapters.any? |
|
55 | 56 | adapters.each do |adapter| |
|
56 | 57 | case adapter |
|
57 | 58 | when 'mysql2' |
|
58 | 59 | gem "mysql2", "~> 0.3.11", :platforms => [:mri, :mingw, :x64_mingw] |
|
59 | 60 | gem "activerecord-jdbcmysql-adapter", :platforms => :jruby |
|
60 | 61 | when 'mysql' |
|
61 | 62 | gem "activerecord-jdbcmysql-adapter", :platforms => :jruby |
|
62 | 63 | when /postgresql/ |
|
63 | 64 | gem "pg", ">= 0.11.0", :platforms => [:mri, :mingw, :x64_mingw] |
|
64 | 65 | gem "activerecord-jdbcpostgresql-adapter", :platforms => :jruby |
|
65 | 66 | when /sqlite3/ |
|
66 | 67 | gem "sqlite3", :platforms => [:mri, :mingw, :x64_mingw] |
|
67 | 68 | gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby |
|
68 | 69 | when /sqlserver/ |
|
69 | 70 | gem "tiny_tds", "~> 0.6.2", :platforms => [:mri, :mingw, :x64_mingw] |
|
70 | 71 | gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] |
|
71 | 72 | else |
|
72 | 73 | warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems") |
|
73 | 74 | end |
|
74 | 75 | end |
|
75 | 76 | else |
|
76 | 77 | warn("No adapter found in config/database.yml, please configure it first") |
|
77 | 78 | end |
|
78 | 79 | else |
|
79 | 80 | warn("Please configure your config/database.yml first") |
|
80 | 81 | end |
|
81 | 82 | |
|
82 | 83 | group :development do |
|
83 | 84 | gem "rdoc", ">= 2.4.2" |
|
84 | 85 | gem "yard" |
|
85 | 86 | end |
|
86 | 87 | |
|
87 | 88 | group :test do |
|
88 | 89 | gem "minitest" |
|
89 | 90 | gem "mocha", "~> 1.0.0", :require => 'mocha/api' |
|
90 | 91 | gem "simplecov", "~> 0.9.1", :require => false |
|
91 | 92 | # For running UI tests |
|
92 | 93 | gem "capybara", "~> 2.1.0" |
|
93 | 94 | gem "selenium-webdriver" |
|
94 | 95 | end |
|
95 | 96 | |
|
96 | 97 | local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") |
|
97 | 98 | if File.exists?(local_gemfile) |
|
98 | 99 | eval_gemfile local_gemfile |
|
99 | 100 | end |
|
100 | 101 | |
|
101 | 102 | # Load plugins' Gemfiles |
|
102 | 103 | Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| |
|
103 | 104 | eval_gemfile file |
|
104 | 105 | end |
@@ -1,64 +1,68 | |||
|
1 | 1 | require File.expand_path('../boot', __FILE__) |
|
2 | 2 | |
|
3 | 3 | require 'rails/all' |
|
4 | 4 | |
|
5 | 5 | Bundler.require(*Rails.groups) |
|
6 | 6 | |
|
7 | 7 | module RedmineApp |
|
8 | 8 | class Application < Rails::Application |
|
9 | 9 | # Settings in config/environments/* take precedence over those specified here. |
|
10 | 10 | # Application configuration should go into files in config/initializers |
|
11 | 11 | # -- all .rb files in that directory are automatically loaded. |
|
12 | 12 | |
|
13 | 13 | # Custom directories with classes and modules you want to be autoloadable. |
|
14 | 14 | config.autoload_paths += %W(#{config.root}/lib) |
|
15 | 15 | |
|
16 | 16 | # Only load the plugins named here, in the order given (default is alphabetical). |
|
17 | 17 | # :all can be used as a placeholder for all plugins not explicitly named. |
|
18 | 18 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] |
|
19 | 19 | |
|
20 | 20 | config.active_record.store_full_sti_class = true |
|
21 | 21 | config.active_record.default_timezone = :local |
|
22 | 22 | |
|
23 | 23 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. |
|
24 | 24 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. |
|
25 | 25 | # config.time_zone = 'Central Time (US & Canada)' |
|
26 | 26 | |
|
27 | 27 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
|
28 | 28 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
|
29 | 29 | # config.i18n.default_locale = :de |
|
30 | 30 | |
|
31 | 31 | I18n.enforce_available_locales = true |
|
32 | 32 | |
|
33 | 33 | # Configure the default encoding used in templates for Ruby 1.9. |
|
34 | 34 | config.encoding = "utf-8" |
|
35 | 35 | |
|
36 | 36 | # Configure sensitive parameters which will be filtered from the log file. |
|
37 | 37 | config.filter_parameters += [:password] |
|
38 | 38 | |
|
39 | 39 | # Enable the asset pipeline |
|
40 | 40 | config.assets.enabled = false |
|
41 | 41 | |
|
42 | 42 | # Version of your assets, change this if you want to expire all your assets |
|
43 | 43 | config.assets.version = '1.0' |
|
44 | 44 | |
|
45 | 45 | config.action_mailer.perform_deliveries = false |
|
46 | 46 | |
|
47 | 47 | # Do not include all helpers |
|
48 | 48 | config.action_controller.include_all_helpers = false |
|
49 | 49 | |
|
50 | # XML parameter parser removed from core in Rails 4.0 | |
|
51 | # and extracted to actionpack-xml_parser gem | |
|
52 | config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser | |
|
53 | ||
|
50 | 54 | # Specific cache for search results, the default file store cache is not |
|
51 | 55 | # a good option as it could grow fast. A memory store (32MB max) is used |
|
52 | 56 | # as the default. If you're running multiple server processes, it's |
|
53 | 57 | # recommended to switch to a shared cache store (eg. mem_cache_store). |
|
54 | 58 | # See http://guides.rubyonrails.org/caching_with_rails.html#cache-stores |
|
55 | 59 | # for more options (same options as config.cache_store). |
|
56 | 60 | config.redmine_search_cache_store = :memory_store |
|
57 | 61 | |
|
58 | 62 | config.session_store :cookie_store, :key => '_redmine_session' |
|
59 | 63 | |
|
60 | 64 | if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) |
|
61 | 65 | instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) |
|
62 | 66 | end |
|
63 | 67 | end |
|
64 | 68 | end |
General Comments 0
You need to be logged in to leave comments.
Login now