Skip to content
This repository was archived by the owner on Sep 27, 2018. It is now read-only.

Commit d0bc43f

Browse files
davealliemarkphelps
authored andcommitted
Update codeship base URL (#10)
* Update codeship base url * Set rspec as the default rake task * Fix broken rspec tests
1 parent 48bd268 commit d0bc43f

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
require "bundler/gem_tasks"
2+
require "rspec/core/rake_task"
23

34
desc "Open an irb session preloaded with this library"
45
task :console do
56
sh "irb -rubygems -I lib -r codeship.rb"
67
end
8+
9+
RSpec::Core::RakeTask.new(:spec)
10+
11+
task default: :spec

lib/codeship/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Codeship
44
module Request
55

66
def http_request
7-
http = Net::HTTP.new "codeship.com", 443
7+
http = Net::HTTP.new "app.codeship.com", 443
88
http.use_ssl = true
99
http
1010
end

spec/status_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Codeship::Status::STATES.each do |state|
77
it "should parse #{state}" do
88

9-
stub_request(:head, "https://codeship.com/projects/#{state}/status").
9+
stub_request(:head, "https://app.codeship.com/projects/#{state}/status").
1010
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
1111
to_return(status: 200, body: "", headers: {'Content-Disposition' => "inline; filename=\"status_#{state}.png\""})
1212

@@ -20,7 +20,7 @@
2020
Codeship::Status::STATES.each do |state|
2121
it "should parse #{state}" do
2222

23-
stub_request(:head, "https://codeship.com/projects/#{state}/status").
23+
stub_request(:head, "https://app.codeship.com/projects/#{state}/status").
2424
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
2525
to_return(status: 200, body: "", headers: {'Content-Disposition' => "inline; filename=\"status_#{state}.gif\""})
2626

@@ -35,7 +35,7 @@
3535
context 'of a project with completed build' do
3636
Codeship::Status::STATES.each do |state|
3737
it "should parse #{state}" do
38-
stub_request(:head, "https://codeship.com/projects/#{state}/status?branch=master").
38+
stub_request(:head, "https://app.codeship.com/projects/#{state}/status?branch=master").
3939
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
4040
to_return(status: 200, body: "", headers: {'Content-Disposition' => "inline; filename=\"status_#{state}.png\""})
4141

@@ -48,7 +48,7 @@
4848
context 'of a project with active build' do
4949
Codeship::Status::STATES.each do |state|
5050
it "should parse #{state}" do
51-
stub_request(:head, "https://codeship.com/projects/#{state}/status?branch=master").
51+
stub_request(:head, "https://app.codeship.com/projects/#{state}/status?branch=master").
5252
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}).
5353
to_return(status: 200, body: "", headers: {'Content-Disposition' => "inline; filename=\"status_#{state}.gif\""})
5454

0 commit comments

Comments
 (0)