diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-02-19 15:00:36 +0300 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-02-19 15:18:49 +0300 |
commit | f2f6f77328fab308df5474a044e3205b6bd611c3 (patch) | |
tree | 161d32dde611dbdf14532fc9dc7ce9549f01632e | |
parent | 982368815e8e1deae9beee6c677a7fb2ac198752 (diff) |
Rename Entities::ForkedFromProject to Entities::BasicProjectDetails
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index c31ef5352dd..857705dbf12 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -49,7 +49,7 @@ module API expose :enable_ssl_verification end - class ForkedFromProject < Grape::Entity + class BasicProjectDetails < Grape::Entity expose :id expose :name, :name_with_namespace expose :path, :path_with_namespace @@ -67,7 +67,7 @@ module API expose :shared_runners_enabled expose :creator_id expose :namespace - expose :forked_from_project, using: Entities::ForkedFromProject, if: lambda{ |project, options| project.forked? } + expose :forked_from_project, using: Entities::BasicProjectDetails, if: lambda{ |project, options| project.forked? } expose :avatar_url expose :star_count, :forks_count expose :open_issues_count, if: lambda { |project, options| project.issues_enabled? && project.default_issues_tracker? } @@ -382,7 +382,7 @@ module API expose :version, :revision, :platform, :architecture expose :contacted_at expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? } - expose :projects, with: Entities::ForkedFromProject do |runner, options| + expose :projects, with: Entities::BasicProjectDetails do |runner, options| if options[:current_user].is_admin? runner.projects else |