startapp 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/autocomplete/rhc_bash +2 -2
- data/conf/express.conf +1 -1
- data/lib/rhc/commands/clone.rb +2 -2
- data/lib/rhc/commands/create.rb +1 -1
- data/lib/rhc/commands/domain.rb +2 -2
- data/lib/rhc/commands/setup.rb +1 -1
- data/lib/rhc/config.rb +1 -1
- data/lib/rhc/context_helper.rb +1 -1
- data/lib/rhc/helpers.rb +4 -4
- data/lib/rhc/rest/mock.rb +1 -1
- data/lib/rhc/wizard.rb +1 -1
- data/spec/rhc/auth_spec.rb +3 -3
- data/spec/rhc/commands/clone_spec.rb +3 -3
- data/spec/rhc/commands/server_spec.rb +2 -2
- data/spec/rhc/commands/setup_spec.rb +3 -3
- data/spec/rhc/config_spec.rb +4 -4
- data/spec/rhc/helpers_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c8008c125db10d76a2209a9e5f46c64b2ba3235
|
4
|
+
data.tar.gz: b388db2718fd20aa8bbc48a84b2e12e7f960014f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1018984dc3c056a459de618d35aa5b5d0f5c4078500ed5ccf85525ebe21ff606ea42afd98fc027904329fa1244540bc017cd9988e9b5184b96c81183e69d700d
|
7
|
+
data.tar.gz: 5c2041a80d03145f99efcd9051930989019c6db19d410a1a134e4f771eb1623debf734c0fb6c7fcf2509713918385c8986197f665783eab3dc01e851289c5607
|
data/autocomplete/rhc_bash
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# This is the bash auto completion script for the app command
|
3
3
|
#
|
4
|
-
|
4
|
+
_startapp()
|
5
5
|
{
|
6
6
|
local cur opts prev
|
7
7
|
COMPREPLY=()
|
@@ -1669,4 +1669,4 @@ _app()
|
|
1669
1669
|
return 0
|
1670
1670
|
}
|
1671
1671
|
|
1672
|
-
complete -o default -F
|
1672
|
+
complete -o default -F _startapp app
|
data/conf/express.conf
CHANGED
data/lib/rhc/commands/clone.rb
CHANGED
@@ -21,7 +21,7 @@ module RHC::Commands
|
|
21
21
|
app_name = options.app = app[:name]
|
22
22
|
options.namespace = app[:domain]
|
23
23
|
else
|
24
|
-
warn "URL is invalid. To clone app your url must be something like this: http://appname-domain.
|
24
|
+
warn "URL is invalid. To clone app your url must be something like this: http://appname-domain.startappcloud.com/"
|
25
25
|
return 1
|
26
26
|
end
|
27
27
|
end
|
@@ -47,7 +47,7 @@ module RHC::Commands
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def startapp_url?(candidate)
|
50
|
-
!!(/[a-zA-Z0-9]+-[a-zA-Z0-9]+\.
|
50
|
+
!!(/[a-zA-Z0-9]+-[a-zA-Z0-9]+\.startappcloud\./.match(candidate))
|
51
51
|
end
|
52
52
|
|
53
53
|
def clean_url(url)
|
data/lib/rhc/commands/create.rb
CHANGED
@@ -69,7 +69,7 @@ module RHC::Commands
|
|
69
69
|
private
|
70
70
|
|
71
71
|
def get_quickstarts
|
72
|
-
@response ||= Net::HTTP.get(URI.parse('http://install.
|
72
|
+
@response ||= Net::HTTP.get(URI.parse('http://install.startappcloud.com/q/quickstarts.json'))
|
73
73
|
JSON.parse @response
|
74
74
|
end
|
75
75
|
|
data/lib/rhc/commands/domain.rb
CHANGED
@@ -11,7 +11,7 @@ module RHC::Commands
|
|
11
11
|
For example, when creating a domain with the name "test", any applications
|
12
12
|
created in that domain will have the public URL:
|
13
13
|
|
14
|
-
http://<appname>-test.
|
14
|
+
http://<appname>-test.startappcloud.com
|
15
15
|
|
16
16
|
Each account may have access to one or more domains shared by others. Depending
|
17
17
|
on your plan or configuration, you may be able to create more than one domain.
|
@@ -31,7 +31,7 @@ module RHC::Commands
|
|
31
31
|
application public URLs. For example, when creating a domain with the name "test",
|
32
32
|
all applications in that domain will have the public URL:
|
33
33
|
|
34
|
-
http://<appname>-test.
|
34
|
+
http://<appname>-test.startappcloud.com
|
35
35
|
|
36
36
|
The domain owner may limit the gear sizes available to applications by using the
|
37
37
|
'--allowed-gear-sizes' option. If '--no-allowed-gear-sizes' is set, no applications
|
data/lib/rhc/commands/setup.rb
CHANGED
@@ -33,7 +33,7 @@ module RHC::Commands
|
|
33
33
|
option ['--autocomplete'], "Instructions for enabling tab-completion"
|
34
34
|
def run
|
35
35
|
if options.autocomplete
|
36
|
-
src = File.join(File.join(Gem.loaded_specs['
|
36
|
+
src = File.join(File.join(Gem.loaded_specs['startapp'].full_gem_path, "autocomplete"), "rhc_bash")
|
37
37
|
dest = File.join(RHC::Config.home_conf_dir, "bash_autocomplete")
|
38
38
|
|
39
39
|
FileUtils.mkdir_p(RHC::Config.home_conf_dir)
|
data/lib/rhc/config.rb
CHANGED
@@ -124,7 +124,7 @@ module RHC
|
|
124
124
|
|
125
125
|
@default_proxy = nil
|
126
126
|
|
127
|
-
@defaults.add('libra_server', '
|
127
|
+
@defaults.add('libra_server', 'api.startappcloud.com')
|
128
128
|
@env_config.add('libra_server', ENV['LIBRA_SERVER']) if ENV['LIBRA_SERVER']
|
129
129
|
@env_config.add('libra_server', ENV['RHC_SERVER']) if ENV['RHC_SERVER']
|
130
130
|
|
data/lib/rhc/context_helper.rb
CHANGED
@@ -94,7 +94,7 @@ module RHC
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def server_context(defaults=nil, arg=nil)
|
97
|
-
value = ENV['LIBRA_SERVER'] || (!options.clean && config['libra_server']) || "
|
97
|
+
value = ENV['LIBRA_SERVER'] || (!options.clean && config['libra_server']) || "api.startappcloud.com"
|
98
98
|
defaults[arg] = value if defaults && arg
|
99
99
|
value
|
100
100
|
end
|
data/lib/rhc/helpers.rb
CHANGED
@@ -108,7 +108,7 @@ module RHC
|
|
108
108
|
|
109
109
|
global_option '-d', '--debug', "Turn on debugging", :hide => true
|
110
110
|
|
111
|
-
global_option '--server NAME', String, 'An StartApp server hostname (default:
|
111
|
+
global_option '--server NAME', String, 'An StartApp server hostname (default: api.startappcloud.com)'
|
112
112
|
global_option '-k', '--insecure', "Allow insecure SSL connections. Potential security risk.", :hide => true
|
113
113
|
|
114
114
|
global_option '--limit INTEGER', Integer, "Maximum number of simultaneous operations to execute.", :hide => true
|
@@ -153,10 +153,10 @@ module RHC
|
|
153
153
|
end
|
154
154
|
|
155
155
|
def openshift_server
|
156
|
-
to_host((options.server rescue nil) || ENV['LIBRA_SERVER'] || "
|
156
|
+
to_host((options.server rescue nil) || ENV['LIBRA_SERVER'] || "api.startappcloud.com")
|
157
157
|
end
|
158
158
|
def openshift_online_server?
|
159
|
-
openshift_server =~ /
|
159
|
+
openshift_server =~ /api.startappcloud.com$/i
|
160
160
|
end
|
161
161
|
def openshift_url
|
162
162
|
"https://#{openshift_server}"
|
@@ -188,7 +188,7 @@ module RHC
|
|
188
188
|
end
|
189
189
|
|
190
190
|
def openshift_rest_endpoint
|
191
|
-
uri = to_uri((options.server rescue nil) || ENV['LIBRA_SERVER'] || "
|
191
|
+
uri = to_uri((options.server rescue nil) || ENV['LIBRA_SERVER'] || "api.startappcloud.com")
|
192
192
|
uri.path = '/broker/rest/api' if uri.path.blank? || uri.path == '/'
|
193
193
|
uri
|
194
194
|
end
|
data/lib/rhc/rest/mock.rb
CHANGED
@@ -157,7 +157,7 @@ module RHC::Rest::Mock
|
|
157
157
|
end
|
158
158
|
def stub_add_authorization(params)
|
159
159
|
|
160
|
-
stub_request(:get, "https://
|
160
|
+
stub_request(:get, "https://api.startappcloud.com/broker/rest/api").
|
161
161
|
with(:headers => {'Accept'=>'application/json', 'Authorization'=>'Bearer 05bad717f5c73d38d0e9cd9839c3445132b1a9df61dcbc4992e72e2cc6faf06f'}).
|
162
162
|
to_return(:status => 200, :body => "", :headers => {})
|
163
163
|
|
data/lib/rhc/wizard.rb
CHANGED
data/spec/rhc/auth_spec.rb
CHANGED
@@ -15,7 +15,7 @@ describe RHC::Auth::Basic do
|
|
15
15
|
its(:password){ should be_nil }
|
16
16
|
its(:options){ should_not be_nil }
|
17
17
|
its(:can_authenticate?){ should be_false }
|
18
|
-
its(:openshift_server){ should == '
|
18
|
+
its(:openshift_server){ should == 'api.startappcloud.com' }
|
19
19
|
|
20
20
|
def resolved(hash)
|
21
21
|
hash.each_pair do |k,v|
|
@@ -234,7 +234,7 @@ describe RHC::Auth::Token do
|
|
234
234
|
its(:username){ should be_nil }
|
235
235
|
its(:options){ should_not be_nil }
|
236
236
|
its(:can_authenticate?){ should be_false }
|
237
|
-
its(:openshift_server){ should == '
|
237
|
+
its(:openshift_server){ should == 'api.startappcloud.com' }
|
238
238
|
|
239
239
|
context "with user options" do
|
240
240
|
its(:username){ should be_nil }
|
@@ -278,7 +278,7 @@ describe RHC::Auth::Token do
|
|
278
278
|
context "when initialized with a store" do
|
279
279
|
subject{ described_class.new(nil, nil, store) }
|
280
280
|
let(:store){ double }
|
281
|
-
before{ store.should_receive(:get).with(nil, '
|
281
|
+
before{ store.should_receive(:get).with(nil, 'api.startappcloud.com').and_return(token) }
|
282
282
|
it("should read the token for the user") do
|
283
283
|
subject.send(:token).should == token
|
284
284
|
end
|
@@ -15,21 +15,21 @@ describe RHC::Commands::Clone do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
context 'with valid url and no domains' do
|
18
|
-
let(:arguments) { ['clone','http://myapp-mydomain.
|
18
|
+
let(:arguments) { ['clone','http://myapp-mydomain.startappcloud.com'] }
|
19
19
|
|
20
20
|
it { expect { run }.to exit_with_code(127) }
|
21
21
|
it { run_output.should match(/Domain *mydomain* not found/) }
|
22
22
|
end
|
23
23
|
|
24
24
|
context 'with valid url and domain' do
|
25
|
-
let(:arguments) { ['clone','http://myapp-myfirsrdomain.
|
25
|
+
let(:arguments) { ['clone','http://myapp-myfirsrdomain.startappcloud.com'] }
|
26
26
|
let!(:domain){ rest_client.add_domain("myfirsrdomain") }
|
27
27
|
|
28
28
|
it { expect { run }.to exit_with_code(101) }
|
29
29
|
it { run_output.should match(/Application myapp does not exist/) }
|
30
30
|
|
31
31
|
context 'with apps' do
|
32
|
-
let(:arguments) { ['clone','http://myapp-myfirsrdomain.
|
32
|
+
let(:arguments) { ['clone','http://myapp-myfirsrdomain.startappcloud.com'] }
|
33
33
|
before{ domain.add_application('myapp') }
|
34
34
|
|
35
35
|
it { expect { run }.to exit_with_code(216) }
|
@@ -41,14 +41,14 @@ describe RHC::Commands::Server do
|
|
41
41
|
before{ rest_client.stub(:auth).and_return(nil) }
|
42
42
|
|
43
43
|
context 'when no issues' do
|
44
|
-
before { stub_request(:get, 'https://
|
44
|
+
before { stub_request(:get, 'https://api.startappcloud.com/app/status/status.json').with(&user_agent_header).to_return(:body => {'issues' => []}.to_json) }
|
45
45
|
it('should output success') { run_output.should =~ /All systems running fine/ }
|
46
46
|
it { expect { run }.to exit_with_code(0) }
|
47
47
|
end
|
48
48
|
|
49
49
|
context 'when 1 issue' do
|
50
50
|
before do
|
51
|
-
stub_request(:get, 'https://
|
51
|
+
stub_request(:get, 'https://api.startappcloud.com/app/status/status.json').with(&user_agent_header).to_return(:body =>
|
52
52
|
{'open' => [
|
53
53
|
{'issue' => {
|
54
54
|
'created_at' => '2011-05-22T17:31:32-04:00',
|
@@ -39,7 +39,7 @@ describe RHC::Commands::Setup do
|
|
39
39
|
it{ expects_running('setup').should call(:run).on(instance).with(no_args) }
|
40
40
|
it{ command_for('setup', '--clean').options.clean.should be_true }
|
41
41
|
|
42
|
-
it{ command_for('setup').options.server.should == '
|
42
|
+
it{ command_for('setup').options.server.should == 'api.startappcloud.com' }
|
43
43
|
it{ command_for('setup', '--server', 'foo.com').options.server.should == 'foo.com' }
|
44
44
|
it{ command_for('setup', '--no-create-token').options.create_token.should == false }
|
45
45
|
it{ command_for('setup', '--create-token').options.create_token.should == true }
|
@@ -63,7 +63,7 @@ describe RHC::Commands::Setup do
|
|
63
63
|
context 'when --clean is used' do
|
64
64
|
let!(:config){ base_config{ |config, defaults| defaults.add 'libra_server', 'test.com' } }
|
65
65
|
|
66
|
-
it("should ignore a config value"){ command_for('setup', '--clean').options.server.should == '
|
66
|
+
it("should ignore a config value"){ command_for('setup', '--clean').options.server.should == 'api.startappcloud.com' }
|
67
67
|
end
|
68
68
|
|
69
69
|
context 'when -d is passed' do
|
@@ -105,7 +105,7 @@ describe RHC::Commands::Setup do
|
|
105
105
|
describe '--autocomplete' do
|
106
106
|
let(:arguments) { ['setup', '--autocomplete'] }
|
107
107
|
before do
|
108
|
-
path = File.join(Gem.loaded_specs['
|
108
|
+
path = File.join(Gem.loaded_specs['startapp'].full_gem_path, "autocomplete")
|
109
109
|
FakeFS::FileUtils.mkdir_p(path)
|
110
110
|
FakeFS::FileUtils.touch(File.join(path, "rhc_bash"))
|
111
111
|
end
|
data/spec/rhc/config_spec.rb
CHANGED
@@ -83,7 +83,7 @@ describe RHC::Config do
|
|
83
83
|
its(:has_opts_config?){ should be_false }
|
84
84
|
|
85
85
|
it "should return openshift.redhat.com for the server" do
|
86
|
-
subject['libra_server'].should == "
|
86
|
+
subject['libra_server'].should == "api.startappcloud.com"
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -115,7 +115,7 @@ describe RHC::Config do
|
|
115
115
|
"global@redhat.com")
|
116
116
|
subject.initialize
|
117
117
|
|
118
|
-
subject['libra_server'].should == "
|
118
|
+
subject['libra_server'].should == "api.startappcloud.com"
|
119
119
|
subject.default_rhlogin.should == "global@redhat.com"
|
120
120
|
end
|
121
121
|
end
|
@@ -171,7 +171,7 @@ describe RHC::Config do
|
|
171
171
|
{"random_value" => 11})
|
172
172
|
stub_config
|
173
173
|
|
174
|
-
subject['libra_server'].should == "
|
174
|
+
subject['libra_server'].should == "api.startappcloud.com"
|
175
175
|
subject.default_rhlogin.should == "global@redhat.com"
|
176
176
|
subject['random_value'].should == "11"
|
177
177
|
end
|
@@ -254,7 +254,7 @@ describe RHC::Config do
|
|
254
254
|
subject.check_cpath({"config" => ConfigHelper.opts_config_path,
|
255
255
|
"random_val" => "ok"})
|
256
256
|
|
257
|
-
subject['libra_server'].should == "
|
257
|
+
subject['libra_server'].should == "api.startappcloud.com"
|
258
258
|
subject.default_rhlogin.should == "global@redhat.com"
|
259
259
|
subject['random_value'].should == "10"
|
260
260
|
subject['local_value'].should == "local"
|
data/spec/rhc/helpers_spec.rb
CHANGED
@@ -29,8 +29,8 @@ describe AllRhcHelpers do
|
|
29
29
|
user_config
|
30
30
|
end
|
31
31
|
|
32
|
-
its(:openshift_server) { should == '
|
33
|
-
its(:openshift_url) { should == 'https://
|
32
|
+
its(:openshift_server) { should == 'api.startappcloud.com' }
|
33
|
+
its(:openshift_url) { should == 'https://api.startappcloud.com' }
|
34
34
|
|
35
35
|
it("should display slashes"){ subject.system_path('foo/bar').should == 'foo/bar' }
|
36
36
|
context "on windows" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: startapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- StartApp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|