pogo 2.32.14 → 2.39.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/README.md +0 -2
  2. data/lib/heroku/auth.rb +3 -1
  3. data/lib/heroku/client.rb +8 -5
  4. data/lib/heroku/client/cisaurus.rb +25 -0
  5. data/lib/heroku/client/heroku_postgresql.rb +0 -3
  6. data/lib/heroku/client/rendezvous.rb +2 -1
  7. data/lib/heroku/command.rb +1 -1
  8. data/lib/heroku/command/addons.rb +11 -2
  9. data/lib/heroku/command/apps.rb +105 -20
  10. data/lib/heroku/command/base.rb +1 -1
  11. data/lib/heroku/command/certs.rb +95 -34
  12. data/lib/heroku/command/config.rb +5 -5
  13. data/lib/heroku/command/domains.rb +4 -4
  14. data/lib/heroku/command/fork.rb +160 -0
  15. data/lib/heroku/command/git.rb +19 -20
  16. data/lib/heroku/command/help.rb +18 -2
  17. data/lib/heroku/command/keys.rb +1 -1
  18. data/lib/heroku/command/labs.rb +1 -1
  19. data/lib/heroku/command/logs.rb +3 -56
  20. data/lib/heroku/command/maintenance.rb +2 -2
  21. data/lib/heroku/command/pg.rb +7 -16
  22. data/lib/heroku/command/pgbackups.rb +37 -17
  23. data/lib/heroku/command/ps.rb +82 -35
  24. data/lib/heroku/command/regions.rb +23 -0
  25. data/lib/heroku/command/releases.rb +3 -3
  26. data/lib/heroku/command/run.rb +40 -27
  27. data/lib/heroku/command/sharing.rb +4 -4
  28. data/lib/heroku/command/ssl.rb +7 -25
  29. data/lib/heroku/command/stack.rb +1 -1
  30. data/lib/heroku/helpers/heroku_postgresql.rb +13 -17
  31. data/lib/heroku/helpers/log_displayer.rb +70 -0
  32. data/lib/heroku/plugin.rb +3 -0
  33. data/lib/heroku/updater.rb +11 -2
  34. data/lib/heroku/version.rb +1 -1
  35. data/spec/heroku/auth_spec.rb +10 -0
  36. data/spec/heroku/client/ssl_endpoint_spec.rb +12 -12
  37. data/spec/heroku/client_spec.rb +100 -100
  38. data/spec/heroku/command/addons_spec.rb +63 -59
  39. data/spec/heroku/command/apps_spec.rb +68 -65
  40. data/spec/heroku/command/base_spec.rb +21 -21
  41. data/spec/heroku/command/certs_spec.rb +31 -31
  42. data/spec/heroku/command/config_spec.rb +18 -18
  43. data/spec/heroku/command/db_spec.rb +3 -3
  44. data/spec/heroku/command/domains_spec.rb +13 -13
  45. data/spec/heroku/command/drains_spec.rb +3 -3
  46. data/spec/heroku/command/fork_spec.rb +56 -0
  47. data/spec/heroku/command/git_spec.rb +57 -29
  48. data/spec/heroku/command/labs_spec.rb +8 -8
  49. data/spec/heroku/command/logs_spec.rb +3 -3
  50. data/spec/heroku/command/maintenance_spec.rb +5 -5
  51. data/spec/heroku/command/pg_spec.rb +11 -25
  52. data/spec/heroku/command/pgbackups_spec.rb +13 -8
  53. data/spec/heroku/command/ps_spec.rb +23 -23
  54. data/spec/heroku/command/releases_spec.rb +22 -24
  55. data/spec/heroku/command/run_spec.rb +12 -15
  56. data/spec/heroku/command/sharing_spec.rb +9 -9
  57. data/spec/heroku/command/stack_spec.rb +4 -4
  58. data/spec/heroku/command_spec.rb +12 -12
  59. data/spec/heroku/helpers/heroku_postgresql_spec.rb +35 -14
  60. data/spec/spec_helper.rb +17 -2
  61. data/spec/support/openssl_mock_helper.rb +1 -1
  62. metadata +11 -6
  63. data/spec/heroku/command/ssl_spec.rb +0 -32
@@ -11,40 +11,40 @@ module Heroku::Command
11
11
 
12
12
  describe "confirming" do
13
13
  it "confirms the app via --confirm" do
14
- Heroku::Command.stub(:current_options).and_return(:confirm => "myapp")
15
- @base.stub(:app).and_return("myapp")
14
+ Heroku::Command.stub(:current_options).and_return(:confirm => "example")
15
+ @base.stub(:app).and_return("example")
16
16
  @base.confirm_command.should be_true
17
17
  end
18
18
 
19
19
  it "does not confirms the app via --confirm on a mismatch" do
20
20
  Heroku::Command.stub(:current_options).and_return(:confirm => "badapp")
21
- @base.stub(:app).and_return("myapp")
21
+ @base.stub(:app).and_return("example")
22
22
  lambda { @base.confirm_command}.should raise_error CommandFailed
23
23
  end
24
24
 
25
25
  it "confirms the app interactively via ask" do
26
- @base.stub(:app).and_return("myapp")
27
- @base.stub(:ask).and_return("myapp")
26
+ @base.stub(:app).and_return("example")
27
+ @base.stub(:ask).and_return("example")
28
28
  Heroku::Command.stub(:current_options).and_return({})
29
29
  @base.confirm_command.should be_true
30
30
  end
31
31
 
32
32
  it "fails if the interactive confirm doesn't match" do
33
- @base.stub(:app).and_return("myapp")
33
+ @base.stub(:app).and_return("example")
34
34
  @base.stub(:ask).and_return("badresponse")
35
35
  Heroku::Command.stub(:current_options).and_return({})
36
36
  capture_stderr do
37
37
  lambda { @base.confirm_command }.should raise_error(SystemExit)
38
38
  end.should == <<-STDERR
39
- ! Confirmation did not match myapp. Aborted.
39
+ ! Confirmation did not match example. Aborted.
40
40
  STDERR
41
41
  end
42
42
  end
43
43
 
44
44
  context "detecting the app" do
45
45
  it "attempts to find the app via the --app option" do
46
- @base.stub!(:options).and_return(:app => "myapp")
47
- @base.app.should == "myapp"
46
+ @base.stub!(:options).and_return(:app => "example")
47
+ @base.app.should == "example"
48
48
  end
49
49
 
50
50
  it "attempts to find the app via the --confirm option" do
@@ -62,8 +62,8 @@ STDERR
62
62
 
63
63
  it "overrides HEROKU_APP when explicitly specified" do
64
64
  ENV['HEROKU_APP'] = "myenvapp"
65
- @base.stub!(:options).and_return(:app => "myapp")
66
- @base.app.should == "myapp"
65
+ @base.stub!(:options).and_return(:app => "example")
66
+ @base.app.should == "example"
67
67
  ENV.delete('HEROKU_APP')
68
68
  end
69
69
 
@@ -71,10 +71,10 @@ STDERR
71
71
  Dir.stub(:chdir)
72
72
  File.should_receive(:exists?).with(".git").and_return(true)
73
73
  @base.should_receive(:git).with('remote -v').and_return(<<-REMOTES)
74
- staging\tgit@heroku.com:myapp-staging.git (fetch)
75
- staging\tgit@heroku.com:myapp-staging.git (push)
76
- production\tgit@heroku.com:myapp.git (fetch)
77
- production\tgit@heroku.com:myapp.git (push)
74
+ staging\tgit@heroku.com:example-staging.git (fetch)
75
+ staging\tgit@heroku.com:example-staging.git (push)
76
+ production\tgit@heroku.com:example.git (fetch)
77
+ production\tgit@heroku.com:example.git (push)
78
78
  other\tgit@other.com:other.git (fetch)
79
79
  other\tgit@other.com:other.git (push)
80
80
  REMOTES
@@ -84,23 +84,23 @@ other\tgit@other.com:other.git (push)
84
84
  @base.stub(:heroku).and_return(@heroku)
85
85
 
86
86
  # need a better way to test internal functionality
87
- @base.send(:git_remotes, '/home/dev/myapp').should == { 'staging' => 'myapp-staging', 'production' => 'myapp' }
87
+ @base.send(:git_remotes, '/home/dev/example').should == { 'staging' => 'example-staging', 'production' => 'example' }
88
88
  end
89
89
 
90
90
  it "gets the app from remotes when there's only one app" do
91
- @base.stub!(:git_remotes).and_return({ 'heroku' => 'myapp' })
91
+ @base.stub!(:git_remotes).and_return({ 'heroku' => 'example' })
92
92
  @base.stub!(:git).with("config heroku.remote").and_return("")
93
- @base.app.should == 'myapp'
93
+ @base.app.should == 'example'
94
94
  end
95
95
 
96
96
  it "accepts a --remote argument to choose the app from the remote name" do
97
- @base.stub!(:git_remotes).and_return({ 'staging' => 'myapp-staging', 'production' => 'myapp' })
97
+ @base.stub!(:git_remotes).and_return({ 'staging' => 'example-staging', 'production' => 'example' })
98
98
  @base.stub!(:options).and_return(:remote => "staging")
99
- @base.app.should == 'myapp-staging'
99
+ @base.app.should == 'example-staging'
100
100
  end
101
101
 
102
102
  it "raises when cannot determine which app is it" do
103
- @base.stub!(:git_remotes).and_return({ 'staging' => 'myapp-staging', 'production' => 'myapp' })
103
+ @base.stub!(:git_remotes).and_return({ 'staging' => 'example-staging', 'production' => 'example' })
104
104
  lambda { @base.app }.should raise_error(Heroku::Command::CommandFailed)
105
105
  end
106
106
  end
@@ -41,7 +41,7 @@ SSL certificate is self signed.
41
41
 
42
42
  describe "certs" do
43
43
  it "shows a list of certs" do
44
- stub_core.ssl_endpoint_list("myapp").returns([endpoint, endpoint2])
44
+ stub_core.ssl_endpoint_list("example").returns([endpoint, endpoint2])
45
45
  stderr, stdout = execute("certs")
46
46
  stdout.should == <<-STDOUT
47
47
  Endpoint Common Name(s) Expires Trusted
@@ -52,11 +52,11 @@ STDOUT
52
52
  end
53
53
 
54
54
  it "warns about no SSL Endpoints if the app has no certs" do
55
- stub_core.ssl_endpoint_list("myapp").returns([])
55
+ stub_core.ssl_endpoint_list("example").returns([])
56
56
  stderr, stdout = execute("certs")
57
57
  stdout.should == <<-STDOUT
58
- myapp has no SSL Endpoints.
59
- Use `heroku certs:add PEM KEY` to add one.
58
+ example has no SSL Endpoints.
59
+ Use `heroku certs:add CRT KEY` to add one.
60
60
  STDOUT
61
61
  end
62
62
  end
@@ -65,61 +65,61 @@ Use `heroku certs:add PEM KEY` to add one.
65
65
  it "adds an endpoint" do
66
66
  File.should_receive(:read).with("pem_file").and_return("pem content")
67
67
  File.should_receive(:read).with("key_file").and_return("key content")
68
- stub_core.ssl_endpoint_add('myapp', 'pem content', 'key content').returns(endpoint)
68
+ stub_core.ssl_endpoint_add('example', 'pem content', 'key content').returns(endpoint)
69
69
 
70
- stderr, stdout = execute("certs:add pem_file key_file")
70
+ stderr, stdout = execute("certs:add --bypass pem_file key_file")
71
71
  stdout.should == <<-STDOUT
72
- Adding SSL Endpoint to myapp... done
73
- myapp now served by tokyo-1050.herokussl.com
72
+ Adding SSL Endpoint to example... done
73
+ example now served by tokyo-1050.herokussl.com
74
74
  Certificate details:
75
75
  #{certificate_details}
76
76
  STDOUT
77
77
  end
78
78
 
79
79
  it "shows usage if two arguments are not provided" do
80
- lambda { execute("certs:add") }.should raise_error(CommandFailed, /Usage:/)
80
+ lambda { execute("certs:add --bypass") }.should raise_error(CommandFailed, /Usage:/)
81
81
  end
82
82
  end
83
83
 
84
84
  describe "certs:info" do
85
85
  it "shows certificate details" do
86
- stub_core.ssl_endpoint_list("myapp").returns([endpoint])
87
- stub_core.ssl_endpoint_info('myapp', 'tokyo-1050.herokussl.com').returns(endpoint)
86
+ stub_core.ssl_endpoint_list("example").returns([endpoint])
87
+ stub_core.ssl_endpoint_info('example', 'tokyo-1050.herokussl.com').returns(endpoint)
88
88
 
89
89
  stderr, stdout = execute("certs:info")
90
90
  stdout.should == <<-STDOUT
91
- Fetching SSL Endpoint tokyo-1050.herokussl.com info for myapp... done
91
+ Fetching SSL Endpoint tokyo-1050.herokussl.com info for example... done
92
92
  Certificate details:
93
93
  #{certificate_details}
94
94
  STDOUT
95
95
  end
96
96
 
97
97
  it "shows an error if an app has no endpoints" do
98
- stub_core.ssl_endpoint_list("myapp").returns([])
98
+ stub_core.ssl_endpoint_list("example").returns([])
99
99
 
100
100
  stderr, stdout = execute("certs:info")
101
101
  stderr.should == <<-STDERR
102
- ! myapp has no SSL Endpoints.
102
+ ! example has no SSL Endpoints.
103
103
  STDERR
104
104
  end
105
105
  end
106
106
 
107
107
  describe "certs:remove" do
108
108
  it "removes an endpoint" do
109
- stub_core.ssl_endpoint_list("myapp").returns([endpoint])
110
- stub_core.ssl_endpoint_remove('myapp', 'tokyo-1050.herokussl.com').returns(endpoint)
109
+ stub_core.ssl_endpoint_list("example").returns([endpoint])
110
+ stub_core.ssl_endpoint_remove('example', 'tokyo-1050.herokussl.com').returns(endpoint)
111
111
 
112
112
  stderr, stdout = execute("certs:remove")
113
- stdout.should include "Removing SSL Endpoint tokyo-1050.herokussl.com from myapp..."
113
+ stdout.should include "Removing SSL Endpoint tokyo-1050.herokussl.com from example..."
114
114
  stdout.should include "NOTE: Billing is still active. Remove SSL Endpoint add-on to stop billing."
115
115
  end
116
116
 
117
117
  it "shows an error if an app has no endpoints" do
118
- stub_core.ssl_endpoint_list("myapp").returns([])
118
+ stub_core.ssl_endpoint_list("example").returns([])
119
119
 
120
120
  stderr, stdout = execute("certs:remove")
121
121
  stderr.should == <<-STDERR
122
- ! myapp has no SSL Endpoints.
122
+ ! example has no SSL Endpoints.
123
123
  STDERR
124
124
  end
125
125
  end
@@ -131,46 +131,46 @@ Certificate details:
131
131
  end
132
132
 
133
133
  it "updates an endpoint" do
134
- stub_core.ssl_endpoint_list("myapp").returns([endpoint])
135
- stub_core.ssl_endpoint_update('myapp', 'tokyo-1050.herokussl.com', 'pem content', 'key content').returns(endpoint)
134
+ stub_core.ssl_endpoint_list("example").returns([endpoint])
135
+ stub_core.ssl_endpoint_update('example', 'tokyo-1050.herokussl.com', 'pem content', 'key content').returns(endpoint)
136
136
 
137
- stderr, stdout = execute("certs:update pem_file key_file")
137
+ stderr, stdout = execute("certs:update --bypass pem_file key_file")
138
138
  stdout.should == <<-STDOUT
139
- Updating SSL Endpoint tokyo-1050.herokussl.com for myapp... done
139
+ Updating SSL Endpoint tokyo-1050.herokussl.com for example... done
140
140
  Updated certificate details:
141
141
  #{certificate_details}
142
142
  STDOUT
143
143
  end
144
144
 
145
145
  it "shows an error if an app has no endpoints" do
146
- stub_core.ssl_endpoint_list("myapp").returns([])
146
+ stub_core.ssl_endpoint_list("example").returns([])
147
147
 
148
- stderr, stdout = execute("certs:update pem_file key_file")
148
+ stderr, stdout = execute("certs:update --bypass pem_file key_file")
149
149
  stderr.should == <<-STDERR
150
- ! myapp has no SSL Endpoints.
150
+ ! example has no SSL Endpoints.
151
151
  STDERR
152
152
  end
153
153
  end
154
154
 
155
155
  describe "certs:rollback" do
156
156
  it "performs a rollback on an endpoint" do
157
- stub_core.ssl_endpoint_list("myapp").returns([endpoint])
158
- stub_core.ssl_endpoint_rollback('myapp', 'tokyo-1050.herokussl.com').returns(endpoint)
157
+ stub_core.ssl_endpoint_list("example").returns([endpoint])
158
+ stub_core.ssl_endpoint_rollback('example', 'tokyo-1050.herokussl.com').returns(endpoint)
159
159
 
160
160
  stderr, stdout = execute("certs:rollback")
161
161
  stdout.should == <<-STDOUT
162
- Rolling back SSL Endpoint tokyo-1050.herokussl.com for myapp... done
162
+ Rolling back SSL Endpoint tokyo-1050.herokussl.com for example... done
163
163
  New active certificate details:
164
164
  #{certificate_details}
165
165
  STDOUT
166
166
  end
167
167
 
168
168
  it "shows an error if an app has no endpoints" do
169
- stub_core.ssl_endpoint_list("myapp").returns([])
169
+ stub_core.ssl_endpoint_list("example").returns([])
170
170
 
171
171
  stderr, stdout = execute("certs:rollback")
172
172
  stderr.should == <<-STDERR
173
- ! myapp has no SSL Endpoints.
173
+ ! example has no SSL Endpoints.
174
174
  STDERR
175
175
  end
176
176
  end
@@ -5,58 +5,58 @@ module Heroku::Command
5
5
  describe Config do
6
6
  before(:each) do
7
7
  stub_core
8
- api.post_app("name" => "myapp", "stack" => "cedar")
8
+ api.post_app("name" => "example", "stack" => "cedar")
9
9
  end
10
10
 
11
11
  after(:each) do
12
- api.delete_app("myapp")
12
+ api.delete_app("example")
13
13
  end
14
14
 
15
15
  it "shows all configs" do
16
- api.put_config_vars("myapp", { 'FOO_BAR' => 'one', 'BAZ_QUX' => 'two' })
16
+ api.put_config_vars("example", { 'FOO_BAR' => 'one', 'BAZ_QUX' => 'two' })
17
17
  stderr, stdout = execute("config")
18
18
  stderr.should == ""
19
19
  stdout.should == <<-STDOUT
20
- === myapp Config Vars
20
+ === example Config Vars
21
21
  BAZ_QUX: two
22
22
  FOO_BAR: one
23
23
  STDOUT
24
24
  end
25
25
 
26
26
  it "does not trim long values" do
27
- api.put_config_vars("myapp", { 'LONG' => 'A' * 60 })
27
+ api.put_config_vars("example", { 'LONG' => 'A' * 60 })
28
28
  stderr, stdout = execute("config")
29
29
  stderr.should == ""
30
30
  stdout.should == <<-STDOUT
31
- === myapp Config Vars
31
+ === example Config Vars
32
32
  LONG: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
33
33
  STDOUT
34
34
  end
35
35
 
36
36
  it "handles when value is nil" do
37
- api.put_config_vars("myapp", { 'FOO_BAR' => 'one', 'BAZ_QUX' => nil })
37
+ api.put_config_vars("example", { 'FOO_BAR' => 'one', 'BAZ_QUX' => nil })
38
38
  stderr, stdout = execute("config")
39
39
  stderr.should == ""
40
40
  stdout.should == <<-STDOUT
41
- === myapp Config Vars
41
+ === example Config Vars
42
42
  BAZ_QUX:
43
43
  FOO_BAR: one
44
44
  STDOUT
45
45
  end
46
46
 
47
47
  it "handles when value is a boolean" do
48
- api.put_config_vars("myapp", { 'FOO_BAR' => 'one', 'BAZ_QUX' => true })
48
+ api.put_config_vars("example", { 'FOO_BAR' => 'one', 'BAZ_QUX' => true })
49
49
  stderr, stdout = execute("config")
50
50
  stderr.should == ""
51
51
  stdout.should == <<-STDOUT
52
- === myapp Config Vars
52
+ === example Config Vars
53
53
  BAZ_QUX: true
54
54
  FOO_BAR: one
55
55
  STDOUT
56
56
  end
57
57
 
58
58
  it "shows configs in a shell compatible format" do
59
- api.put_config_vars("myapp", { 'A' => 'one', 'B' => 'two three' })
59
+ api.put_config_vars("example", { 'A' => 'one', 'B' => 'two three' })
60
60
  stderr, stdout = execute("config --shell")
61
61
  stderr.should == ""
62
62
  stdout.should == <<-STDOUT
@@ -66,7 +66,7 @@ STDOUT
66
66
  end
67
67
 
68
68
  it "shows a single config for get" do
69
- api.put_config_vars("myapp", { 'LONG' => 'A' * 60 })
69
+ api.put_config_vars("example", { 'LONG' => 'A' * 60 })
70
70
  stderr, stdout = execute("config:get LONG")
71
71
  stderr.should == ""
72
72
  stdout.should == <<-STDOUT
@@ -80,7 +80,7 @@ STDOUT
80
80
  stderr, stdout = execute("config:set A=1 B=2")
81
81
  stderr.should == ""
82
82
  stdout.should == <<-STDOUT
83
- Setting config vars and restarting myapp... done, v1
83
+ Setting config vars and restarting example... done, v1
84
84
  A: 1
85
85
  B: 2
86
86
  STDOUT
@@ -90,7 +90,7 @@ B: 2
90
90
  stderr, stdout = execute("config:set A=b=c")
91
91
  stderr.should == ""
92
92
  stdout.should == <<-STDOUT
93
- Setting config vars and restarting myapp... done, v1
93
+ Setting config vars and restarting example... done, v1
94
94
  A: b=c
95
95
  STDOUT
96
96
  end
@@ -99,7 +99,7 @@ STDOUT
99
99
  stderr, stdout = execute("config:set a=b")
100
100
  stderr.should == ""
101
101
  stdout.should == <<-STDOUT
102
- Setting config vars and restarting myapp... done, v1
102
+ Setting config vars and restarting example... done, v1
103
103
  a: b
104
104
  STDOUT
105
105
  end
@@ -123,7 +123,7 @@ STDERR
123
123
  stderr, stdout = execute("config:unset A")
124
124
  stderr.should == ""
125
125
  stdout.should == <<-STDOUT
126
- Unsetting A and restarting myapp... done, v1
126
+ Unsetting A and restarting example... done, v1
127
127
  STDOUT
128
128
  end
129
129
  end
@@ -134,8 +134,8 @@ STDOUT
134
134
  stderr, stdout = execute("config:unset A B")
135
135
  stderr.should == ""
136
136
  stdout.should == <<-STDOUT
137
- Unsetting A and restarting myapp... done, v1
138
- Unsetting B and restarting myapp... done, v2
137
+ Unsetting A and restarting example... done, v1
138
+ Unsetting B and restarting example... done, v2
139
139
  STDOUT
140
140
  end
141
141
  end
@@ -55,7 +55,7 @@ module Heroku::Command
55
55
 
56
56
  it "handles both a url and a --confirm on the command line" do
57
57
  pending("requires taps") unless taps_available?
58
- Heroku::Command.stub!(:current_options).and_return(:confirm => "myapp")
58
+ Heroku::Command.stub!(:current_options).and_return(:confirm => "example")
59
59
  @db.stub!(:args).and_return(["mysql://user:pass@host/db"])
60
60
  opts = { :database_url => 'mysql://user:pass@host/db', :default_chunksize => 1000, :indexes_first => true }
61
61
  @db.should_receive(:taps_client).with(:pull, opts)
@@ -64,7 +64,7 @@ module Heroku::Command
64
64
 
65
65
  it "handles no url and --confirm on the command line" do
66
66
  pending("requires taps") unless taps_available?
67
- Heroku::Command.stub!(:current_options).and_return(:confirm => "myapp")
67
+ Heroku::Command.stub!(:current_options).and_return(:confirm => "example")
68
68
  opts = { :database_url => 'mysql://user:pass@host/db', :default_chunksize => 1000, :indexes_first => true }
69
69
  @db.should_receive(:parse_database_yml).and_return("mysql://user:pass@host/db")
70
70
  @db.should_receive(:taps_client).with(:pull, opts)
@@ -74,7 +74,7 @@ module Heroku::Command
74
74
  it "works with a file-based url" do
75
75
  pending("requires taps") unless taps_available?
76
76
  url = "sqlite://tmp/foo.db"
77
- Heroku::Command.stub(:current_options).and_return(:confirm => "myapp")
77
+ Heroku::Command.stub(:current_options).and_return(:confirm => "example")
78
78
  @db.stub(:args).and_return([url])
79
79
  @db.should_receive(:taps_client).with(:pull, hash_including(:database_url => url))
80
80
  @db.pull
@@ -5,12 +5,12 @@ module Heroku::Command
5
5
  describe Domains do
6
6
 
7
7
  before(:all) do
8
- api.post_app("name" => "myapp", "stack" => "cedar")
9
- api.post_addon("myapp", "custom_domains:basic")
8
+ api.post_app("name" => "example", "stack" => "cedar")
9
+ api.post_addon("example", "custom_domains:basic")
10
10
  end
11
11
 
12
12
  after(:all) do
13
- api.delete_app("myapp")
13
+ api.delete_app("example")
14
14
  end
15
15
 
16
16
  before(:each) do
@@ -23,20 +23,20 @@ module Heroku::Command
23
23
  stderr, stdout = execute("domains")
24
24
  stderr.should == ""
25
25
  stdout.should == <<-STDOUT
26
- myapp has no domain names.
26
+ example has no domain names.
27
27
  STDOUT
28
28
  end
29
29
 
30
30
  it "lists domains when some exist" do
31
- api.post_domain("myapp", "example.com")
31
+ api.post_domain("example", "example.com")
32
32
  stderr, stdout = execute("domains")
33
33
  stderr.should == ""
34
34
  stdout.should == <<-STDOUT
35
- === myapp Domain Names
35
+ === example Domain Names
36
36
  example.com
37
37
 
38
38
  STDOUT
39
- api.delete_domain("myapp", "example.com")
39
+ api.delete_domain("example", "example.com")
40
40
  end
41
41
 
42
42
  end
@@ -45,9 +45,9 @@ STDOUT
45
45
  stderr, stdout = execute("domains:add example.com")
46
46
  stderr.should == ""
47
47
  stdout.should == <<-STDOUT
48
- Adding example.com to myapp... done
48
+ Adding example.com to example... done
49
49
  STDOUT
50
- api.delete_domain("myapp", "example.com")
50
+ api.delete_domain("example", "example.com")
51
51
  end
52
52
 
53
53
  it "shows usage if no domain specified for add" do
@@ -59,11 +59,11 @@ STDOUT
59
59
  end
60
60
 
61
61
  it "removes domain names" do
62
- api.post_domain("myapp", "example.com")
62
+ api.post_domain("example", "example.com")
63
63
  stderr, stdout = execute("domains:remove example.com")
64
64
  stderr.should == ""
65
65
  stdout.should == <<-STDOUT
66
- Removing example.com from myapp... done
66
+ Removing example.com from example... done
67
67
  STDOUT
68
68
  end
69
69
 
@@ -76,11 +76,11 @@ STDOUT
76
76
  end
77
77
 
78
78
  it "removes all domain names" do
79
- stub_core.remove_domains("myapp")
79
+ stub_core.remove_domains("example")
80
80
  stderr, stdout = execute("domains:clear")
81
81
  stderr.should == ""
82
82
  stdout.should == <<-STDOUT
83
- Removing all domain names from myapp... done
83
+ Removing all domain names from example... done
84
84
  STDOUT
85
85
  end
86
86
  end