diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-30 11:40:04 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-30 11:40:04 +0200 |
commit | e415a84d8faa9c317d34be68a9a2f4c0fc36981c (patch) | |
tree | 00045b2d74f99312db04b2b1329d5fa755b0e053 /lib/api | |
parent | 58069edbcb14230ffe439a61de40c95e266cba87 (diff) | |
parent | 4eef64bb9a1a7be4d71ba65475e1078f762e62fb (diff) | |
download | gitlab-ci-e415a84d8faa9c317d34be68a9a2f4c0fc36981c.tar.gz |
Merge branch 'fix/deprecations' of github.com:pgolm/gitlab-ci into pgolm-fix/deprecations
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
config/initializers/secret_token.rb
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/builds.rb | 2 | ||||
-rw-r--r-- | lib/api/projects.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/builds.rb b/lib/api/builds.rb index 45b2d35..6ecc248 100644 --- a/lib/api/builds.rb +++ b/lib/api/builds.rb @@ -14,7 +14,7 @@ module API required_attributes! [:token] ActiveRecord::Base.transaction do - builds = Build.scoped + builds = Build.all builds = builds.where(project_id: current_runner.projects) unless current_runner.shared? build = builds.first_pending diff --git a/lib/api/projects.rb b/lib/api/projects.rb index f2334a5..dad783f 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -12,7 +12,7 @@ module API gitlab_projects = Project.from_gitlab(current_user, nil, nil, :authorized) ids = gitlab_projects.map { |project| project.id } - projects = Project.where("gitlab_id IN (?)", ids).all + projects = Project.where("gitlab_id IN (?)", ids).load present projects, with: Entities::Project end @@ -24,7 +24,7 @@ module API gitlab_projects = Project.from_gitlab(current_user, nil, nil, :owned) ids = gitlab_projects.map { |project| project.id } - projects = Project.where("gitlab_id IN (?)", ids).all + projects = Project.where("gitlab_id IN (?)", ids).load present projects, with: Entities::Project end |