heroku_deployer 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cd94d777dc10d4348774d0b174f44d2f60f648c
4
- data.tar.gz: a3dad8202873e2ec02aef060001b0d186abdc855
3
+ metadata.gz: 1106cf9722f06336b8b2b0d80ca77880c3276249
4
+ data.tar.gz: 2c29af4e74cf24df298311dcda7b1c3d6130a27d
5
5
  SHA512:
6
- metadata.gz: 0fc2c7ac466613167b9c00d38d044369ca4bda3d9f8d9d1cc37a85abb6b17b3243a03794faf7d7c097b873ae5899322a6a3045c91dd8f5212f5e19776c593c48
7
- data.tar.gz: c82ac7bb4a910cd123693c383201a70fb66475cdb48859adcad3fbd55bc792fe086fbbafbf11f4cdf723cdfe30ec3b4bc15d74a879707f1f82d92d9b08617fc9
6
+ metadata.gz: 17ff13e4170dedafb6004e3482e26283408e013d697178ebd82bed08105e442f42bcea635a5684e72935707692cc6a43dd5c70f01dd349a40ce2dd4acb9d58c7
7
+ data.tar.gz: 3be99d675817bb50aac17e1dbfc5f5993080a34db1dbe16b313c2ac506a722cb84c9027871da5acb2e5eb2cbee7ad88f86990ea93555e235f5963bb2349a9a4f
@@ -18,7 +18,7 @@ module Amitree
18
18
 
19
19
  def stories_worked_on_between(rev1, rev2)
20
20
  messages = commit_messages_between(rev1, rev2)
21
- messages.map{|msg| msg.scan /(?<=#)\d+/}.flatten.uniq
21
+ messages.map{|msg| msg.scan /(?<=#)\d+/}.flatten.map(&:to_i).uniq
22
22
  end
23
23
 
24
24
  def link_to(rev)
@@ -55,14 +55,13 @@ module Amitree
55
55
  prod_commit = result.production_release['commit']
56
56
  puts "Production release is #{prod_commit}" if options[:verbose]
57
57
 
58
- @git.stories_worked_on_between(prod_commit, 'HEAD').each do |story_id|
59
- result.stories << ReleaseDetails::Story.new(tracker_data(story_id))
60
- end
58
+ result.stories = stories_worked_on_between(prod_commit, 'HEAD')
59
+ all_stories = Hash[result.stories.map{|story| [story.id, story]}]
61
60
 
62
61
  staging_releases.reverse.each do |staging_release|
63
62
  staging_commit = staging_release['commit']
64
- story_ids = @git.stories_worked_on_between(prod_commit, staging_commit).map(&:to_i)
65
- stories = result.stories.select{|story| story_ids.include?(story.id)}
63
+ stories = all_stories.values_at(*@git.stories_worked_on_between(prod_commit, staging_commit)).compact
64
+ story_ids = stories.map(&:id)
66
65
 
67
66
  puts "- Trying staging release #{staging_release['name']} with commit #{staging_commit}" if options[:verbose]
68
67
  puts " - Stories: #{story_ids.inspect}" if options[:verbose]
@@ -99,5 +98,13 @@ module Amitree
99
98
  def tracker_data(story_id)
100
99
  @tracker_cache[story_id] ||= @tracker_project.stories.find(story_id)
101
100
  end
101
+
102
+ def stories_worked_on_between(rev1, rev2)
103
+ @git.stories_worked_on_between(rev1, rev2).map do |story_id|
104
+ if story = tracker_data(story_id)
105
+ ReleaseDetails::Story.new(story)
106
+ end
107
+ end.compact
108
+ end
102
109
  end
103
110
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Wargnier
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-23 00:00:00.000000000 Z
12
+ date: 2014-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec