Sha256: b71229f385624cec18706f3479de4cb94c6d93162d571cd8212a633d3c092efe

Contents?: true

Size: 407 Bytes

Versions: 7

Compression:

Stored size: 407 Bytes

Contents

module Cp8Cli
  class Ci
    def initialize(branch_name:, repo:)
      @branch_name = branch_name
      @repo = repo
    end

    def open
      Command.open_url url
    end

    private

      attr_reader :branch_name, :repo

      def url
        "https://circleci.com/gh/#{repo.user}/#{repo.name}/tree/#{escape branch_name}"
      end

      def escape(text)
        CGI.escape(text)
      end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cp8_cli-6.0.1 lib/cp8_cli/ci.rb
cp8_cli-6.0.0 lib/cp8_cli/ci.rb
cp8_cli-5.0.0 lib/cp8_cli/ci.rb
cp8_cli-4.2.1 lib/cp8_cli/ci.rb
cp8_cli-4.2.0 lib/cp8_cli/ci.rb
cp8_cli-4.1.3 lib/cp8_cli/ci.rb
cp8_cli-4.1.2 lib/cp8_cli/ci.rb