Sha256: ce2206576581ca641a75b2bb677106c8059be1b65cc15ac67a7889d4b6f74654

Contents?: true

Size: 794 Bytes

Versions: 13

Compression:

Stored size: 794 Bytes

Contents

require 'rake_factory'

require_relative '../../client'

module RakeCircleCI
  module Tasks
    module Projects
      class Follow < RakeFactory::Task
        default_name :follow
        default_description RakeFactory::DynamicValue.new { |t|
          "Follow the #{t.project_slug} project"
        }

        parameter :project_slug, required: true
        parameter :api_token, required: true
        parameter :base_url, default: 'https://circleci.com/api'

        action do |t|
          client = Client.new(
              base_url: t.base_url,
              api_token: t.api_token,
              project_slug: t.project_slug)

          print "Following the '#{t.project_slug}' project... "
          client.follow_project
          puts "Done."
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rake_circle_ci-0.10.0.pre.6 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.10.0.pre.5 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.10.0.pre.4 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.10.0.pre.3 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.10.0.pre.2 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.10.0.pre.1 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.9.0 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.8.0.pre.4 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.8.0.pre.3 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.8.0.pre.2 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.8.0.pre.1 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.7.0 lib/rake_circle_ci/tasks/projects/follow.rb
rake_circle_ci-0.6.0.pre.1 lib/rake_circle_ci/tasks/projects/follow.rb