Sha256: 587574118ea52749ca8241e7a94acf52170a8395d4ff43bfec55147ac99bbe92

Contents?: true

Size: 657 Bytes

Versions: 119

Compression:

Stored size: 657 Bytes

Contents

require 'travis/cli'

module Travis
  module CLI
    class Enable < RepoCommand
      description "enables a project"
      on('-s', '--skip-sync', "don't trigger a sync if the repo is unknown")

      def run
        authenticate
        repository.enable
        say "enabled", color("#{slug}: %s :)", :success)
      end

      private

        def repository
          repo(slug)
        rescue Travis::Client::NotFound
          unless skip_sync?
            say "repository not known to Travis CI (or no access?)"
            say "triggering sync: "
            sync
            say " done"
          end
          super
        end
    end
  end
end

Version data entries

119 entries across 119 versions & 1 rubygems

Version Path
travis-1.6.8.travis.456.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.455.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.454.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.453.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.452.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.451.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.450.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.449.6 lib/travis/cli/enable.rb
travis-1.6.8.travis.447.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.446.6 lib/travis/cli/enable.rb
travis-1.6.7 lib/travis/cli/enable.rb
travis-1.6.7.travis.445.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.443.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.442.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.441.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.434.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.431.6 lib/travis/cli/enable.rb
travis-1.6.7.travis.428.9 lib/travis/cli/enable.rb
travis-1.6.7.travis.427.9 lib/travis/cli/enable.rb
travis-1.6.7.travis.426.8 lib/travis/cli/enable.rb