Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
547dc7ac
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
547dc7ac
编写于
8月 22, 2018
作者:
J
Jan Provaznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Switch to Rails 5 by default
* updates Gemfile * uses Rails 5 unless explicitly disabled
上级
c9343960
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
153 addition
and
146 deletion
+153
-146
Gemfile
Gemfile
+1
-1
Gemfile.lock
Gemfile.lock
+74
-65
Gemfile.rails4
Gemfile.rails4
+7
-0
Gemfile.rails4.lock
Gemfile.rails4.lock
+64
-73
bin/setup
bin/setup
+1
-1
config/application.rb
config/application.rb
+1
-1
config/boot.rb
config/boot.rb
+2
-2
config/environment.rb
config/environment.rb
+3
-3
未找到文件。
Gemfile
浏览文件 @
547dc7ac
# --- Special code for migrating to Rails 5.0 ---
# --- Special code for migrating to Rails 5.0 ---
def
rails5?
def
rails5?
%w[1 tru
e]
.
include?
(
ENV
[
"RAILS5"
])
!
%w[0 fals
e]
.
include?
(
ENV
[
"RAILS5"
])
end
end
gem_versions
=
{}
gem_versions
=
{}
...
...
Gemfile.lock
浏览文件 @
547dc7ac
...
@@ -4,41 +4,44 @@ GEM
...
@@ -4,41 +4,44 @@ GEM
RedCloth (4.3.2)
RedCloth (4.3.2)
abstract_type (0.0.7)
abstract_type (0.0.7)
ace-rails-ap (4.1.2)
ace-rails-ap (4.1.2)
actionmailer (4.2.10)
actioncable (5.0.7)
actionpack (= 4.2.10)
actionpack (= 5.0.7)
actionview (= 4.2.10)
nio4r (>= 1.2, < 3.0)
activejob (= 4.2.10)
websocket-driver (~> 0.6.1)
actionmailer (5.0.7)
actionpack (= 5.0.7)
actionview (= 5.0.7)
activejob (= 5.0.7)
mail (~> 2.5, >= 2.5.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-dom-testing (~>
2.0
)
actionpack (
4.2.10
)
actionpack (
5.0.7
)
actionview (=
4.2.10
)
actionview (=
5.0.7
)
activesupport (=
4.2.10
)
activesupport (=
5.0.7
)
rack (~>
1.6
)
rack (~>
2.0
)
rack-test (~> 0.6.
2
)
rack-test (~> 0.6.
3
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-dom-testing (~>
2.0
)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (
4.2.10
)
actionview (
5.0.7
)
activesupport (=
4.2.10
)
activesupport (=
5.0.7
)
builder (~> 3.1)
builder (~> 3.1)
erubis (~> 2.7.0)
erubis (~> 2.7.0)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-dom-testing (~>
2.0
)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (
4.2.10
)
activejob (
5.0.7
)
activesupport (=
4.2.10
)
activesupport (=
5.0.7
)
globalid (>= 0.3.
0
)
globalid (>= 0.3.
6
)
activemodel (
4.2.10
)
activemodel (
5.0.7
)
activesupport (=
4.2.10
)
activesupport (=
5.0.7
)
builder (~> 3.1
)
activerecord (5.0.7
)
activerecord (4.2.10
)
activemodel (= 5.0.7
)
active
model (= 4.2.10
)
active
support (= 5.0.7
)
a
ctivesupport (= 4.2.1
0)
a
rel (~> 7.
0)
arel (~> 6
.0)
activerecord_sane_schema_dumper (1
.0)
activerecord_sane_schema_dumper (0.2
)
rails (>= 5, < 6
)
rails (>= 4, < 5
)
activesupport (5.0.7
)
activesupport (4.2.10
)
concurrent-ruby (~> 1.0, >= 1.0.2
)
i18n (
~> 0.7
)
i18n (
>= 0.7, < 2
)
minitest (~> 5.1)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
tzinfo (~> 1.1)
acts-as-taggable-on (5.0.0)
acts-as-taggable-on (5.0.0)
activerecord (>= 4.2.8)
activerecord (>= 4.2.8)
...
@@ -49,7 +52,7 @@ GEM
...
@@ -49,7 +52,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0)
public_suffix (>= 2.0.2, < 4.0)
aes_key_wrap (1.0.1)
aes_key_wrap (1.0.1)
akismet (2.0.0)
akismet (2.0.0)
arel (
6.0
.4)
arel (
7.1
.4)
asana (0.6.0)
asana (0.6.0)
faraday (~> 0.9)
faraday (~> 0.9)
faraday_middleware (~> 0.9)
faraday_middleware (~> 0.9)
...
@@ -143,8 +146,8 @@ GEM
...
@@ -143,8 +146,8 @@ GEM
html-pipeline
html-pipeline
declarative (0.0.10)
declarative (0.0.10)
declarative-option (0.1.0)
declarative-option (0.1.0)
default_value_for (3.0.
2
)
default_value_for (3.0.
5
)
activerecord (>= 3.2.0, < 5.
1
)
activerecord (>= 3.2.0, < 5.
2
)
descendants_tracker (0.0.4)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
thread_safe (~> 0.3, >= 0.3.1)
device_detector (1.0.0)
device_detector (1.0.0)
...
@@ -376,7 +379,7 @@ GEM
...
@@ -376,7 +379,7 @@ GEM
json (~> 1.8)
json (~> 1.8)
multi_xml (>= 0.5.2)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
httpclient (2.8.3)
i18n (
0.9.5
)
i18n (
1.1.0
)
concurrent-ruby (~> 1.0)
concurrent-ruby (~> 1.0)
icalendar (2.4.1)
icalendar (2.4.1)
ice_nine (0.11.2)
ice_nine (0.11.2)
...
@@ -470,6 +473,7 @@ GEM
...
@@ -470,6 +473,7 @@ GEM
net-ldap (0.16.0)
net-ldap (0.16.0)
net-ssh (5.0.1)
net-ssh (5.0.1)
netrc (0.11.0)
netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.4)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
mini_portile2 (~> 2.3.0)
nokogumbo (1.5.0)
nokogumbo (1.5.0)
...
@@ -542,7 +546,7 @@ GEM
...
@@ -542,7 +546,7 @@ GEM
orm_adapter (0.5.0)
orm_adapter (0.5.0)
os (1.0.0)
os (1.0.0)
parallel (1.12.1)
parallel (1.12.1)
parser (2.5.
3.0
)
parser (2.5.
1.2
)
ast (~> 2.4.0)
ast (~> 2.4.0)
parslet (1.8.2)
parslet (1.8.2)
peek (1.0.1)
peek (1.0.1)
...
@@ -598,7 +602,7 @@ GEM
...
@@ -598,7 +602,7 @@ GEM
get_process_mem (~> 0.2)
get_process_mem (~> 0.2)
puma (>= 2.7, < 4)
puma (>= 2.7, < 4)
pyu-ruby-sasl (0.0.3.3)
pyu-ruby-sasl (0.0.3.3)
rack (
1.6.11
)
rack (
2.0.5
)
rack-accept (0.4.5)
rack-accept (0.4.5)
rack (>= 0.4)
rack (>= 0.4)
rack-attack (4.4.1)
rack-attack (4.4.1)
...
@@ -616,31 +620,36 @@ GEM
...
@@ -616,31 +620,36 @@ GEM
rack
rack
rack-test (0.6.3)
rack-test (0.6.3)
rack (>= 1.0)
rack (>= 1.0)
rails (4.2.10)
rails (5.0.7)
actionmailer (= 4.2.10)
actioncable (= 5.0.7)
actionpack (= 4.2.10)
actionmailer (= 5.0.7)
actionview (= 4.2.10)
actionpack (= 5.0.7)
activejob (= 4.2.10)
actionview (= 5.0.7)
activemodel (= 4.2.10)
activejob (= 5.0.7)
activerecord (= 4.2.10)
activemodel (= 5.0.7)
activesupport (= 4.2.10)
activerecord (= 5.0.7)
bundler (>= 1.3.0, < 2.0)
activesupport (= 5.0.7)
railties (= 4.2.10)
bundler (>= 1.3.0)
sprockets-rails
railties (= 5.0.7)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-deprecated_sanitizer (1.0.3)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0, < 5.0)
activesupport (>= 4.2.0)
nokogiri (~> 1.6)
nokogiri (>= 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
loofah (~> 2.2, >= 2.2.2)
rails-i18n (4.0.9)
rails-i18n (5.1.1)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
railties (~> 4.0)
railties (>= 5.0, < 6)
railties (4.2.10)
railties (5.0.7)
actionpack (= 4.2.10)
actionpack (= 5.0.7)
activesupport (= 4.2.10)
activesupport (= 5.0.7)
method_source
rake (>= 0.8.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rainbow (3.0.0)
...
@@ -731,8 +740,7 @@ GEM
...
@@ -731,8 +740,7 @@ GEM
rspec-core
rspec-core
rspec-set (0.1.3)
rspec-set (0.1.3)
rspec-support (3.7.1)
rspec-support (3.7.1)
rspec_junit_formatter (0.2.3)
rspec_junit_formatter (0.4.1)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rspec-core (>= 2, < 4, != 2.12.0)
rspec_profiling (0.0.5)
rspec_profiling (0.0.5)
activerecord
activerecord
...
@@ -849,8 +857,6 @@ GEM
...
@@ -849,8 +857,6 @@ GEM
sysexits (1.2.0)
sysexits (1.2.0)
temple (0.8.0)
temple (0.8.0)
test-prof (0.2.5)
test-prof (0.2.5)
test_after_commit (1.1.0)
activerecord (>= 3.2)
text (1.3.1)
text (1.3.1)
thin (1.7.2)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
daemons (~> 1.0, >= 1.0.9)
...
@@ -913,6 +919,9 @@ GEM
...
@@ -913,6 +919,9 @@ GEM
hashdiff
hashdiff
webpack-rails (0.9.11)
webpack-rails (0.9.11)
railties (>= 3.2.0)
railties (>= 3.2.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
wikicloth (0.8.1)
wikicloth (0.8.1)
builder
builder
expression_parser
expression_parser
...
@@ -928,7 +937,7 @@ PLATFORMS
...
@@ -928,7 +937,7 @@ PLATFORMS
DEPENDENCIES
DEPENDENCIES
RedCloth (~> 4.3.2)
RedCloth (~> 4.3.2)
ace-rails-ap (~> 4.1.0)
ace-rails-ap (~> 4.1.0)
activerecord_sane_schema_dumper (=
0.2
)
activerecord_sane_schema_dumper (=
1.0
)
acts-as-taggable-on (~> 5.0)
acts-as-taggable-on (~> 5.0)
addressable (~> 2.5.2)
addressable (~> 2.5.2)
akismet (~> 2.0)
akismet (~> 2.0)
...
@@ -962,7 +971,7 @@ DEPENDENCIES
...
@@ -962,7 +971,7 @@ DEPENDENCIES
creole (~> 0.5.0)
creole (~> 0.5.0)
database_cleaner (~> 1.5.0)
database_cleaner (~> 1.5.0)
deckar01-task_list (= 2.0.0)
deckar01-task_list (= 2.0.0)
default_value_for (~> 3.0.
0
)
default_value_for (~> 3.0.
5
)
device_detector
device_detector
devise (~> 4.4)
devise (~> 4.4)
devise-two-factor (~> 3.0.0)
devise-two-factor (~> 3.0.0)
...
@@ -1080,9 +1089,10 @@ DEPENDENCIES
...
@@ -1080,9 +1089,10 @@ DEPENDENCIES
rack-cors (~> 1.0.0)
rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.2.1)
rack-oauth2 (~> 1.2.1)
rack-proxy (~> 0.6.0)
rack-proxy (~> 0.6.0)
rails (= 4.2.10)
rails (= 5.0.7)
rails-controller-testing
rails-deprecated_sanitizer (~> 1.0.3)
rails-deprecated_sanitizer (~> 1.0.3)
rails-i18n (~>
4.0.9
)
rails-i18n (~>
5.1
)
rainbow (~> 3.0)
rainbow (~> 3.0)
raindrops (~> 0.18)
raindrops (~> 0.18)
rblineprof (~> 0.3.6)
rblineprof (~> 0.3.6)
...
@@ -1135,7 +1145,6 @@ DEPENDENCIES
...
@@ -1135,7 +1145,6 @@ DEPENDENCIES
state_machines-activerecord (~> 0.5.1)
state_machines-activerecord (~> 0.5.1)
sys-filesystem (~> 1.1.6)
sys-filesystem (~> 1.1.6)
test-prof (~> 0.2.5)
test-prof (~> 0.2.5)
test_after_commit (~> 1.1)
thin (~> 1.7.0)
thin (~> 1.7.0)
timecop (~> 0.8.0)
timecop (~> 0.8.0)
toml-rb (~> 1.0.0)
toml-rb (~> 1.0.0)
...
...
Gemfile.rails4
0 → 100644
浏览文件 @
547dc7ac
# BUNDLE_GEMFILE=Gemfile.rails5 bundle install
ENV["RAILS5"] = "false"
gemfile = File.expand_path("../Gemfile", __FILE__)
eval(File.read(gemfile), nil, gemfile)
Gemfile.rails
5
.lock
→
Gemfile.rails
4
.lock
浏览文件 @
547dc7ac
...
@@ -4,44 +4,41 @@ GEM
...
@@ -4,44 +4,41 @@ GEM
RedCloth (4.3.2)
RedCloth (4.3.2)
abstract_type (0.0.7)
abstract_type (0.0.7)
ace-rails-ap (4.1.2)
ace-rails-ap (4.1.2)
actioncable (5.0.7)
actionmailer (4.2.10)
actionpack (= 5.0.7)
actionpack (= 4.2.10)
nio4r (>= 1.2, < 3.0)
actionview (= 4.2.10)
websocket-driver (~> 0.6.1)
activejob (= 4.2.10)
actionmailer (5.0.7)
actionpack (= 5.0.7)
actionview (= 5.0.7)
activejob (= 5.0.7)
mail (~> 2.5, >= 2.5.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
actionpack (
5.0.7
)
actionpack (
4.2.10
)
actionview (=
5.0.7
)
actionview (=
4.2.10
)
activesupport (=
5.0.7
)
activesupport (=
4.2.10
)
rack (~>
2.0
)
rack (~>
1.6
)
rack-test (~> 0.6.
3
)
rack-test (~> 0.6.
2
)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (
5.0.7
)
actionview (
4.2.10
)
activesupport (=
5.0.7
)
activesupport (=
4.2.10
)
builder (~> 3.1)
builder (~> 3.1)
erubis (~> 2.7.0)
erubis (~> 2.7.0)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (
5.0.7
)
activejob (
4.2.10
)
activesupport (=
5.0.7
)
activesupport (=
4.2.10
)
globalid (>= 0.3.
6
)
globalid (>= 0.3.
0
)
activemodel (
5.0.7
)
activemodel (
4.2.10
)
activesupport (=
5.0.7
)
activesupport (=
4.2.10
)
activerecord (5.0.7
)
builder (~> 3.1
)
activemodel (= 5.0.7
)
activerecord (4.2.10
)
active
support (= 5.0.7
)
active
model (= 4.2.10
)
a
rel (~> 7.
0)
a
ctivesupport (= 4.2.1
0)
activerecord_sane_schema_dumper (1
.0)
arel (~> 6
.0)
rails (>= 5, < 6
)
activerecord_sane_schema_dumper (0.2
)
activesupport (5.0.7
)
rails (>= 4, < 5
)
concurrent-ruby (~> 1.0, >= 1.0.2
)
activesupport (4.2.10
)
i18n (
>= 0.7, < 2
)
i18n (
~> 0.7
)
minitest (~> 5.1)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
tzinfo (~> 1.1)
acts-as-taggable-on (5.0.0)
acts-as-taggable-on (5.0.0)
activerecord (>= 4.2.8)
activerecord (>= 4.2.8)
...
@@ -52,7 +49,7 @@ GEM
...
@@ -52,7 +49,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0)
public_suffix (>= 2.0.2, < 4.0)
aes_key_wrap (1.0.1)
aes_key_wrap (1.0.1)
akismet (2.0.0)
akismet (2.0.0)
arel (
7.1
.4)
arel (
6.0
.4)
asana (0.6.0)
asana (0.6.0)
faraday (~> 0.9)
faraday (~> 0.9)
faraday_middleware (~> 0.9)
faraday_middleware (~> 0.9)
...
@@ -146,8 +143,8 @@ GEM
...
@@ -146,8 +143,8 @@ GEM
html-pipeline
html-pipeline
declarative (0.0.10)
declarative (0.0.10)
declarative-option (0.1.0)
declarative-option (0.1.0)
default_value_for (3.0.
5
)
default_value_for (3.0.
2
)
activerecord (>= 3.2.0, < 5.
2
)
activerecord (>= 3.2.0, < 5.
1
)
descendants_tracker (0.0.4)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
thread_safe (~> 0.3, >= 0.3.1)
device_detector (1.0.0)
device_detector (1.0.0)
...
@@ -379,7 +376,7 @@ GEM
...
@@ -379,7 +376,7 @@ GEM
json (~> 1.8)
json (~> 1.8)
multi_xml (>= 0.5.2)
multi_xml (>= 0.5.2)
httpclient (2.8.3)
httpclient (2.8.3)
i18n (
1.1.0
)
i18n (
0.9.5
)
concurrent-ruby (~> 1.0)
concurrent-ruby (~> 1.0)
icalendar (2.4.1)
icalendar (2.4.1)
ice_nine (0.11.2)
ice_nine (0.11.2)
...
@@ -473,7 +470,6 @@ GEM
...
@@ -473,7 +470,6 @@ GEM
net-ldap (0.16.0)
net-ldap (0.16.0)
net-ssh (5.0.1)
net-ssh (5.0.1)
netrc (0.11.0)
netrc (0.11.0)
nio4r (2.3.1)
nokogiri (1.8.4)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
mini_portile2 (~> 2.3.0)
nokogumbo (1.5.0)
nokogumbo (1.5.0)
...
@@ -602,7 +598,7 @@ GEM
...
@@ -602,7 +598,7 @@ GEM
get_process_mem (~> 0.2)
get_process_mem (~> 0.2)
puma (>= 2.7, < 4)
puma (>= 2.7, < 4)
pyu-ruby-sasl (0.0.3.3)
pyu-ruby-sasl (0.0.3.3)
rack (
2.0.5
)
rack (
1.6.10
)
rack-accept (0.4.5)
rack-accept (0.4.5)
rack (>= 0.4)
rack (>= 0.4)
rack-attack (4.4.1)
rack-attack (4.4.1)
...
@@ -620,36 +616,31 @@ GEM
...
@@ -620,36 +616,31 @@ GEM
rack
rack
rack-test (0.6.3)
rack-test (0.6.3)
rack (>= 1.0)
rack (>= 1.0)
rails (5.0.7)
rails (4.2.10)
actioncable (= 5.0.7)
actionmailer (= 4.2.10)
actionmailer (= 5.0.7)
actionpack (= 4.2.10)
actionpack (= 5.0.7)
actionview (= 4.2.10)
actionview (= 5.0.7)
activejob (= 4.2.10)
activejob (= 5.0.7)
activemodel (= 4.2.10)
activemodel (= 5.0.7)
activerecord (= 4.2.10)
activerecord (= 5.0.7)
activesupport (= 4.2.10)
activesupport (= 5.0.7)
bundler (>= 1.3.0, < 2.0)
bundler (>= 1.3.0)
railties (= 4.2.10)
railties (= 5.0.7)
sprockets-rails
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
actionview (~> 5.x, >= 5.0.1)
activesupport (~> 5.x)
rails-deprecated_sanitizer (1.0.3)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (2.0.3)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0)
activesupport (>= 4.2.0, < 5.0)
nokogiri (>= 1.6)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
loofah (~> 2.2, >= 2.2.2)
rails-i18n (5.1.1)
rails-i18n (4.0.9)
i18n (>= 0.7, < 2)
i18n (~> 0.7)
railties (>= 5.0, < 6)
railties (~> 4.0)
railties (5.0.7)
railties (4.2.10)
actionpack (= 5.0.7)
actionpack (= 4.2.10)
activesupport (= 5.0.7)
activesupport (= 4.2.10)
method_source
rake (>= 0.8.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rainbow (3.0.0)
...
@@ -740,7 +731,8 @@ GEM
...
@@ -740,7 +731,8 @@ GEM
rspec-core
rspec-core
rspec-set (0.1.3)
rspec-set (0.1.3)
rspec-support (3.7.1)
rspec-support (3.7.1)
rspec_junit_formatter (0.4.1)
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rspec-core (>= 2, < 4, != 2.12.0)
rspec_profiling (0.0.5)
rspec_profiling (0.0.5)
activerecord
activerecord
...
@@ -857,6 +849,8 @@ GEM
...
@@ -857,6 +849,8 @@ GEM
sysexits (1.2.0)
sysexits (1.2.0)
temple (0.8.0)
temple (0.8.0)
test-prof (0.2.5)
test-prof (0.2.5)
test_after_commit (1.1.0)
activerecord (>= 3.2)
text (1.3.1)
text (1.3.1)
thin (1.7.2)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
daemons (~> 1.0, >= 1.0.9)
...
@@ -919,9 +913,6 @@ GEM
...
@@ -919,9 +913,6 @@ GEM
hashdiff
hashdiff
webpack-rails (0.9.11)
webpack-rails (0.9.11)
railties (>= 3.2.0)
railties (>= 3.2.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
wikicloth (0.8.1)
wikicloth (0.8.1)
builder
builder
expression_parser
expression_parser
...
@@ -937,7 +928,7 @@ PLATFORMS
...
@@ -937,7 +928,7 @@ PLATFORMS
DEPENDENCIES
DEPENDENCIES
RedCloth (~> 4.3.2)
RedCloth (~> 4.3.2)
ace-rails-ap (~> 4.1.0)
ace-rails-ap (~> 4.1.0)
activerecord_sane_schema_dumper (=
1.0
)
activerecord_sane_schema_dumper (=
0.2
)
acts-as-taggable-on (~> 5.0)
acts-as-taggable-on (~> 5.0)
addressable (~> 2.5.2)
addressable (~> 2.5.2)
akismet (~> 2.0)
akismet (~> 2.0)
...
@@ -971,7 +962,7 @@ DEPENDENCIES
...
@@ -971,7 +962,7 @@ DEPENDENCIES
creole (~> 0.5.0)
creole (~> 0.5.0)
database_cleaner (~> 1.5.0)
database_cleaner (~> 1.5.0)
deckar01-task_list (= 2.0.0)
deckar01-task_list (= 2.0.0)
default_value_for (~> 3.0.
5
)
default_value_for (~> 3.0.
0
)
device_detector
device_detector
devise (~> 4.4)
devise (~> 4.4)
devise-two-factor (~> 3.0.0)
devise-two-factor (~> 3.0.0)
...
@@ -1089,10 +1080,9 @@ DEPENDENCIES
...
@@ -1089,10 +1080,9 @@ DEPENDENCIES
rack-cors (~> 1.0.0)
rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.2.1)
rack-oauth2 (~> 1.2.1)
rack-proxy (~> 0.6.0)
rack-proxy (~> 0.6.0)
rails (= 5.0.7)
rails (= 4.2.10)
rails-controller-testing
rails-deprecated_sanitizer (~> 1.0.3)
rails-deprecated_sanitizer (~> 1.0.3)
rails-i18n (~>
5.1
)
rails-i18n (~>
4.0.9
)
rainbow (~> 3.0)
rainbow (~> 3.0)
raindrops (~> 0.18)
raindrops (~> 0.18)
rblineprof (~> 0.3.6)
rblineprof (~> 0.3.6)
...
@@ -1145,6 +1135,7 @@ DEPENDENCIES
...
@@ -1145,6 +1135,7 @@ DEPENDENCIES
state_machines-activerecord (~> 0.5.1)
state_machines-activerecord (~> 0.5.1)
sys-filesystem (~> 1.1.6)
sys-filesystem (~> 1.1.6)
test-prof (~> 0.2.5)
test-prof (~> 0.2.5)
test_after_commit (~> 1.1)
thin (~> 1.7.0)
thin (~> 1.7.0)
timecop (~> 0.8.0)
timecop (~> 0.8.0)
toml-rb (~> 1.0.0)
toml-rb (~> 1.0.0)
...
...
bin/setup
浏览文件 @
547dc7ac
#!/usr/bin/env ruby
#!/usr/bin/env ruby
def
rails5?
def
rails5?
%w[1 tru
e]
.
include?
(
ENV
[
"RAILS5"
])
!
%w[0 fals
e]
.
include?
(
ENV
[
"RAILS5"
])
end
end
require
"pathname"
require
"pathname"
...
...
config/application.rb
浏览文件 @
547dc7ac
...
@@ -8,7 +8,7 @@ module Gitlab
...
@@ -8,7 +8,7 @@ module Gitlab
# This method is used for smooth upgrading from the current Rails 4.x to Rails 5.0.
# This method is used for smooth upgrading from the current Rails 4.x to Rails 5.0.
# https://gitlab.com/gitlab-org/gitlab-ce/issues/14286
# https://gitlab.com/gitlab-org/gitlab-ce/issues/14286
def
self
.
rails5?
def
self
.
rails5?
ENV
[
"RAILS5"
].
in?
(
%w[1 true
]
)
!
%w[0 false]
.
include?
(
ENV
[
"RAILS5"
])
end
end
class
Application
<
Rails
::
Application
class
Application
<
Rails
::
Application
...
...
config/boot.rb
浏览文件 @
547dc7ac
def
rails5?
def
rails5?
%w[1 tru
e]
.
include?
(
ENV
[
"RAILS5"
])
!
%w[0 fals
e]
.
include?
(
ENV
[
"RAILS5"
])
end
end
require
'rubygems'
unless
rails5?
require
'rubygems'
unless
rails5?
gemfile
=
rails5?
?
"Gemfile
.rails5"
:
"Gemfile
"
gemfile
=
rails5?
?
"Gemfile
"
:
"Gemfile.rails4
"
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
"../
#{
gemfile
}
"
,
__dir__
)
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
"../
#{
gemfile
}
"
,
__dir__
)
# Set up gems listed in the Gemfile.
# Set up gems listed in the Gemfile.
...
...
config/environment.rb
浏览文件 @
547dc7ac
# Load the rails application
# Load the rails application
# Remove this condition when upgraded to rails 5.0.
# Remove this condition when upgraded to rails 5.0.
if
%w[1 true]
.
include?
(
ENV
[
"RAILS5"
])
if
%w[0 false]
.
include?
(
ENV
[
"RAILS5"
])
require_relative
'application'
else
require
File
.
expand_path
(
'application'
,
__dir__
)
require
File
.
expand_path
(
'application'
,
__dir__
)
else
require_relative
'application'
end
end
# Initialize the rails application
# Initialize the rails application
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录