Skip to content
This repository was archived by the owner on Jun 6, 2022. It is now read-only.

Commit dbae851

Browse files
committed
Prepare for rbenv
1 parent d5e86de commit dbae851

5 files changed

Lines changed: 10 additions & 4 deletions

File tree

Capfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require 'capistrano/deploy'
66

77
require 'capistrano/rails'
88
require 'capistrano/rvm'
9+
#require 'capistrano/rbenv'
910
require 'capistrano/rails/collection'
1011

1112
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined.

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ group :test do
4747
gem 'faker'
4848
end
4949

50-
# Deployment
51-
group :deployment do
50+
group :development do
5251
gem 'capistrano'
5352
gem 'capistrano-rails'
5453
gem 'capistrano-passenger'
5554
gem 'capistrano-rvm'
55+
gem 'capistrano-rbenv'
5656
gem 'capistrano-rails-collection'
5757
end
5858

Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ GEM
6161
capistrano-bundler (~> 1.1)
6262
capistrano-rails-collection (0.0.3)
6363
capistrano-rails (~> 1.1.0)
64+
capistrano-rbenv (2.0.3)
65+
capistrano (~> 3.1)
66+
sshkit (~> 1.3)
6467
capistrano-rvm (0.1.2)
6568
capistrano (~> 3.0)
6669
sshkit (~> 1.2)
@@ -267,6 +270,7 @@ DEPENDENCIES
267270
capistrano-passenger
268271
capistrano-rails
269272
capistrano-rails-collection
273+
capistrano-rbenv
270274
capistrano-rvm
271275
coffee-rails (~> 4.0.0)
272276
coveralls

app/controllers/top4_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def show
1111
@repo_contributors = @top_repos.map do |repo|
1212
Coder.only_with_stats(:score)
1313
.where(repository: repo, date: 1.weeks.ago..Time.current)
14-
.order(score: :desc).run
14+
.order(score: :asc).run
1515
end
1616

1717
@new_issues = Issue.with_stats(:total_bounty_value).includes(:repository)

config/deploy/king.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
}
77

88
set :rails_env, 'production'
9-
set :default_environment, {'RAILS_RELATIVE_URL_ROOT' => '/game'}
9+
set :rbenv_type, :system
10+
set :rbenv_ruby, File.read('.ruby-version').strip

0 commit comments

Comments
 (0)