mortar 0.15.15 → 0.15.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mortar/command/version.rb +3 -3
- data/lib/mortar/helpers.rb +1 -1
- data/lib/mortar/version.rb +1 -1
- data/spec/mortar/command/version_spec.rb +6 -5
- metadata +2 -2
@@ -45,15 +45,15 @@ class Mortar::Command::Version < Mortar::Command::Base
|
|
45
45
|
# -v, --version VERSION_NUMBER # specify which version to upgrade to
|
46
46
|
def upgrade
|
47
47
|
validate_arguments!
|
48
|
+
version_argument = ""
|
48
49
|
if installed_with_omnibus?
|
49
|
-
version_number = ''
|
50
50
|
if options[:version]
|
51
|
-
|
51
|
+
version_argument = "MORTAR_VERSION=" + options[:version] +" "
|
52
52
|
end
|
53
53
|
shell_url = ENV.fetch("MORTAR_INSTALL", "http://install.mortardata.com")
|
54
54
|
dir = "/opt/mortar/installer"
|
55
55
|
begin
|
56
|
-
cmd = "echo 'Upgrading will prompt for your sudo password.\n' &&
|
56
|
+
cmd = "echo 'Upgrading will prompt for your sudo password.\n' && MORTAR_URL=\"#{shell_url}\" #{version_argument}bash -c \"$(curl -sSL #{shell_url})\""
|
57
57
|
Kernel.system cmd
|
58
58
|
ensure
|
59
59
|
end
|
data/lib/mortar/helpers.rb
CHANGED
data/lib/mortar/version.rb
CHANGED
@@ -25,9 +25,9 @@ module Mortar::Command
|
|
25
25
|
end
|
26
26
|
|
27
27
|
base_url = "http://install.mortardata.com"
|
28
|
-
base_version = "
|
28
|
+
base_version = ""
|
29
29
|
tmp_dir_dumm = "/opt/mortar/installer"
|
30
|
-
curl_command = "echo 'Upgrading will prompt for your sudo password.\n' &&
|
30
|
+
curl_command = "echo 'Upgrading will prompt for your sudo password.\n' && MORTAR_URL=\"#{base_url}\" bash -c \"$(curl -sSL #{base_url})\""
|
31
31
|
|
32
32
|
context("version in prod") do
|
33
33
|
mortar_install_env = ENV['MORTAR_INSTALL']
|
@@ -48,7 +48,7 @@ module Mortar::Command
|
|
48
48
|
|
49
49
|
it "makes curl request for different versions when requested" do
|
50
50
|
mortar_version = "0.15.1"
|
51
|
-
curl_command_with_version =
|
51
|
+
curl_command_with_version = "echo 'Upgrading will prompt for your sudo password.\n' && MORTAR_URL=\"#{base_url}\" MORTAR_VERSION=#{mortar_version} bash -c \"$(curl -sSL #{base_url})\""
|
52
52
|
mock(Kernel).system( curl_command_with_version)
|
53
53
|
mock(Kernel).system( curl_command_with_version)
|
54
54
|
any_instance_of(Mortar::Command::Version) do |base|
|
@@ -62,8 +62,9 @@ module Mortar::Command
|
|
62
62
|
end
|
63
63
|
|
64
64
|
context("version dev") do
|
65
|
-
dev_url = "
|
66
|
-
|
65
|
+
dev_url = "install.m0rtardata.com"
|
66
|
+
base_version = "0.15.1"
|
67
|
+
dev_curl = "echo 'Upgrading will prompt for your sudo password.\n' && MORTAR_URL=\"#{dev_url}\" bash -c \"$(curl -sSL #{dev_url})\""
|
67
68
|
before(:each) do
|
68
69
|
ENV['MORTAR_INSTALL'] = dev_url
|
69
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mortar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|