travis 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Travis
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -2,13 +2,13 @@ require 'spec_helper'
2
2
 
3
3
  describe Travis::CLI::Endpoint do
4
4
  example "travis encrypt foo" do
5
- run_cli('encrypt', 'foo').should be_success
5
+ run_cli('encrypt', 'foo', '-E').should be_success
6
6
  stdout.should match(/^".{60,}"\n$/)
7
7
  end
8
8
 
9
9
  example "travis encrypt foo -i" do
10
10
  run_cli('encrypt', 'foo', '-i').should be_success
11
- stdout.should start_with("Please add the following to your \e[33m.travis.yml\e[0m file:\n\n secure: ")
11
+ stdout.should start_with("Please add the following to your .travis.yml file:\n\n secure: ")
12
12
  end
13
13
 
14
14
  example "cat foo | travis encrypt" do
@@ -18,6 +18,6 @@ describe Travis::CLI::Endpoint do
18
18
 
19
19
  example "travis endpoint -i" do
20
20
  run_cli('endpoint', '-i').should be_success
21
- stdout.should be == "API endpoint: \e[1m\e[4mhttps://api.travis-ci.org/\e[0m\n"
21
+ stdout.should be == "API endpoint: https://api.travis-ci.org/\n"
22
22
  end
23
23
  end
@@ -1,12 +1,12 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Travis::CLI::Login do
4
- example "travis login" do
4
+ example "travis login", :unless => Travis::CLI.windows? do
5
5
  run_cli('login') { |i| i.puts('rkh', 'password') }.should be_success
6
6
  run_cli('whoami').out.should be == "rkh\n"
7
7
  end
8
8
 
9
- example "travis login (with bad credentials)" do
9
+ example "travis login (with bad credentials)", :unless => Travis::CLI.windows? do
10
10
  run_cli('login') { |i| i.puts('rkh', 'wrong password') }.should_not be_success
11
11
  run_cli('whoami').should_not be_success
12
12
  end
@@ -21,7 +21,7 @@ describe Travis::CLI::Whoami do
21
21
 
22
22
  example "travis whoami -t token -i" do
23
23
  run_cli('whoami', '-t', 'token', '-i').should be_success
24
- stdout.should be == "You are \e[1m\e[4mrkh\e[0m (Konstantin Haase)\n"
24
+ stdout.should be == "You are rkh (Konstantin Haase)\n"
25
25
  stderr.should be_empty
26
26
  end
27
27
  end
data/spec/spec_helper.rb CHANGED
@@ -4,13 +4,23 @@ require 'support/helpers'
4
4
 
5
5
  require 'fileutils'
6
6
  require 'travis'
7
+ require 'highline'
8
+ require 'tmpdir'
9
+
10
+ temp_dir = nil
7
11
 
8
12
  RSpec.configure do |c|
9
13
  c.include Helpers
14
+
10
15
  c.before do
11
- temp_dir = File.expand_path('../tmp', __FILE__)
16
+ HighLine.use_color = false
17
+ temp_dir = File.expand_path('travis-spec', Dir.tmpdir)
12
18
  FileUtils.rm_rf(temp_dir)
13
19
  FileUtils.mkdir_p(temp_dir)
14
20
  ENV['TRAVIS_CONFIG_PATH'] = File.expand_path('travis', temp_dir)
15
21
  end
22
+
23
+ c.after do
24
+ FileUtils.rm_rf(temp_dir)
25
+ end
16
26
  end
data/travis.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # general infos
4
4
  s.name = "travis"
5
- s.version = "1.0.1"
5
+ s.version = "1.0.2"
6
6
  s.description = "CLI and Ruby client library for Travis CI"
7
7
  s.homepage = "https://github.com/travis-ci/travis"
8
8
  s.summary = "Travis CI client"
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
25
25
  "README.md",
26
26
  "Rakefile",
27
27
  "bin/travis",
28
+ "example/org_overview.rb",
28
29
  "lib/travis.rb",
29
30
  "lib/travis/cacert.pem",
30
31
  "lib/travis/cli.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -167,6 +167,7 @@ files:
167
167
  - README.md
168
168
  - Rakefile
169
169
  - bin/travis
170
+ - example/org_overview.rb
170
171
  - lib/travis.rb
171
172
  - lib/travis/cacert.pem
172
173
  - lib/travis/cli.rb