gitscape 1.6.5 → 1.6.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .idea
1
2
  *.gem
2
3
  .bundle
3
4
  Gemfile.lock
@@ -44,7 +44,8 @@ class Gitscape::Base
44
44
  end
45
45
 
46
46
  def live_iteration
47
- toRet = `git branch -a --merged origin/live`.split("\n").select{|b| /release\/i(\d+)$/.match b}.map{|b| b.scan(/release\/i(\d+)$/).flatten[0].to_i}.sort.last
47
+ live_iteration_tag_regex = /^live\/i(\d+)/
48
+ toRet = `git tag`.split("\n").select { |tag| live_iteration_tag_regex.match tag }.map { |tag| tag.scan(live_iteration_tag_regex).flatten[0].to_i }.sort.last
48
49
  toRet
49
50
  end
50
51
 
@@ -316,7 +317,7 @@ class Gitscape::Base
316
317
  # 1. starts with 'service/'
317
318
  # 2. starts with 'rollback-to/' or 'live/', and has an iteration number >= the live_iteration number - 3
318
319
  tags = `git tag`.split "\n"
319
- tags_to_delete = tags.select { |tag| !(!/^service\//.match(tag).nil? || /^(?:live|rollback-to)\/i(\d+)/.match(tag).to_a[1].to_i >= live_iteration - 3) }
320
+ tags_to_delete = tags.select { |tag| !(!/^service\//.match(tag).nil? || /^(?:live|rollback-to)\/i(\d+)/.match(tag).to_a[1].to_i >= live_iteration.to_i - 3) }
320
321
 
321
322
  puts "Deleting the following tags.\nThese changes #{options[:push] ? "will" : "will not"} be pushed to origin.\n"
322
323
 
@@ -1,3 +1,3 @@
1
1
  module Gitscape
2
- VERSION = '1.6.5'
2
+ VERSION = '1.6.6'
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 6
8
- - 5
9
- version: 1.6.5
8
+ - 6
9
+ version: 1.6.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jon Botelho
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-05-16 00:00:00 -04:00
18
+ date: 2013-05-20 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency