rdeis 0.0.12 → 0.0.13

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c9387bf448349d59690236456bc8abe5637581e5
4
- data.tar.gz: a9070c49d860c263eeee49c2bb9eea315e04f034
3
+ metadata.gz: 3eb09348d27697c9f046a8c1df44fe060bd2faee
4
+ data.tar.gz: 8b0511dcba674211a21020849d817a23449631a5
5
5
  SHA512:
6
- metadata.gz: f47f55d18685df21039af34441933cc266e61cb7cdaa9f63da02836e41c0a48054e50cc411d6597a3c8abb1037e9e89d0c04d12ecbbce47a0cc113f28bf11c9b
7
- data.tar.gz: 4ee81aed9fdf1e8df47d3c48c67195d417e2195848e7cab3770f03df74a2a155c54f9d404252bd84e698701d7c2c278022c2ec03a5faa5120296b325dff12d20
6
+ metadata.gz: ba213ddedc11df0158e607804df8d6b3b15a47cd24ee348179fef4d7eb9f05bed67f05a85f572cdc6e2e1f5831458f380cd1cfff178c6830e1c160d7ba8eca40
7
+ data.tar.gz: 0f2d49c55dcdde867af08739ff5213eb60a92d8a783f0895f16cc81be9af32e99e159d71502b30ab26d89d11bc73ed0da7c137fa18e457e0d8d3d48f2842b6b0
data/lib/rdeis/deis.rb CHANGED
@@ -163,11 +163,16 @@ module DEIS
163
163
  end
164
164
  end
165
165
 
166
- desc "updgrade", "See if older version exists we can copy over"
167
- def updgrade
168
- run = DEIS::Upgrade.new(options)
166
+ desc "updgrade <from>", "See if older version exists we can copy over"
167
+ def updgrade(from=nil)
168
+ run = DEIS::Upgrade.new(options, from)
169
169
  run.all
170
170
  end
171
171
 
172
+ desc "version", "See version number"
173
+ def version
174
+ say "rdeis #{DEIS::VERSION}"
175
+ end
176
+
172
177
  end
173
178
  end
data/lib/rdeis/deploy.rb CHANGED
@@ -17,7 +17,7 @@ module DEIS
17
17
  @branch = DEIS::Git.branch
18
18
  @remote = DEIS::Git.remote
19
19
 
20
- @name = @repo+"-"+@environment
20
+ @name = @repo.gsub("_", "-")+"-"+@environment
21
21
  @deploy_to = @base_path.to_s + "/"+ @name + "/"
22
22
  @ssh = SSH.new({:host => @proxy, :user => nil}) if ! @proxy.nil?
23
23
  end
data/lib/rdeis/git.rb CHANGED
@@ -44,7 +44,7 @@ module DEIS
44
44
  end
45
45
  6
46
46
  def self.checkout_to_ref_cmd(ref, branch)
47
- "git fetch origin && git checkout -f origin/#{branch} && git branch -d #{branch} ; git checkout -f #{branch} && git checkout -f #{ref} 2>&1 | grep 'error:' | wc -l"
47
+ "git fetch origin && git checkout -f origin/#{branch} 2>&1 /dev/null && git branch -d #{branch} 2>&1 /dev/null; git checkout -f #{branch} 2>&1 /dev/null && git checkout -f #{ref} 2>&1 | grep 'error:' | wc -l"
48
48
  end
49
49
 
50
50
  # find env based token
data/lib/rdeis/storage.rb CHANGED
@@ -24,13 +24,13 @@ module DEIS
24
24
  current = DEIS::Storage.load(repo, env)
25
25
  # key asked for and is present
26
26
  if ! key.nil? && current.has_key?(key)
27
- current[key]
27
+ current[key].sort_by{|k,v| k }
28
28
  # key asked for but not present
29
29
  elsif !key.nil?
30
30
  {}
31
31
  # key not asked for
32
32
  else
33
- current
33
+ current.sort_by{|k,v| k }
34
34
  end
35
35
  end
36
36
 
data/lib/rdeis/upgrade.rb CHANGED
@@ -4,19 +4,20 @@ module DEIS
4
4
 
5
5
  attr_accessor :proxy, :token, :ssh, :deploy_to
6
6
 
7
- def initialize(options)
7
+ def initialize(options, previous=nil)
8
8
  @repo = DEIS::Git.name
9
9
  @verbose = options[:verbose]
10
10
  @environment = options[:environment]
11
11
  @proxy = if ! options["proxy"].nil? then options["proxy"] elsif ! ENV['RDEIS_PROXY'].nil? then ENV['RDEIS_PROXY'] else nil end
12
12
  @ssh = SSH.new({:host => @proxy, :user => nil}) if ! @proxy.nil?
13
+ @previous = if previous.nil? then DEIS::LAST_VERSION else previous end
13
14
  end
14
15
 
15
16
 
16
17
 
17
18
  def all
18
19
  # check for current version
19
- previous_version = DEIS::Storage::BASE_PATH.gsub(DEIS::VERSION, DEIS::LAST_VERSION)
20
+ previous_version = DEIS::Storage::BASE_PATH.gsub(DEIS::VERSION, @previous)
20
21
  local_prev = previous_version.gsub("$HOME", ENV['HOME'])
21
22
  current_version = DEIS::Storage::BASE_PATH
22
23
  local_curr = current_version.gsub("$HOME", ENV['HOME'])
data/lib/rdeis/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DEIS
2
- VERSION='0.0.12'
3
- LAST_VERSION='0.0.11'
4
- end
2
+ VERSION='0.0.13'
3
+ LAST_VERSION='0.0.12'
4
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdeis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Marshall
@@ -79,7 +79,7 @@ files:
79
79
  - lib/rdeis/version.rb
80
80
  - lib/ssh.rb
81
81
  - rdeis.gemspec
82
- homepage: https://github.com/charlesmarshall/deis_deploy/tree/0.0.12
82
+ homepage: https://github.com/charlesmarshall/deis_deploy/tree/0.0.13
83
83
  licenses:
84
84
  - MIT
85
85
  metadata: {}