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