flash_flow 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -9
- data/README.md +3 -0
- data/bin/flash_flow +3 -0
- data/flash_flow.gemspec +9 -8
- data/lib/flash_flow/data/store.rb +11 -2
- data/lib/flash_flow/options.rb +1 -0
- data/lib/flash_flow/version.rb +1 -1
- data/test/lib/data/test_store.rb +28 -10
- metadata +25 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9e6ab87ca9801e4629eeb09aa913478f1f79888
|
4
|
+
data.tar.gz: 7a6b1a46d93592d3a3a30e4aa8b265adc964db7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e395f55d85b3bfcfb431c8695a95d5c7a22df811ba13af8ca073a88ab99de269790daa2d11c020a930131b50f2cc712d19149c0f4d3f639279de5805628829
|
7
|
+
data.tar.gz: 5e3af873561db5af9410b4615f2d7f34b6ebd37eb160fa88903c9fa82588ce24adbfcc1697a68ad1d70e058e053e66ac09209ed2691c4fae64e85ef3596e70e0
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
flash_flow (1.
|
5
|
-
hipchat
|
6
|
-
octokit
|
7
|
-
pivotal-tracker
|
4
|
+
flash_flow (1.2.0)
|
5
|
+
hipchat (~> 1.5)
|
6
|
+
octokit (~> 4.1)
|
7
|
+
pivotal-tracker (~> 0.5)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -39,7 +39,7 @@ GEM
|
|
39
39
|
minitest-stub_any_instance (1.0.1)
|
40
40
|
multi_xml (0.5.5)
|
41
41
|
multipart-post (2.0.0)
|
42
|
-
netrc (0.
|
42
|
+
netrc (0.11.0)
|
43
43
|
nokogiri (1.6.6.2)
|
44
44
|
mini_portile (~> 0.6.0)
|
45
45
|
nokogiri-happymapper (0.5.9)
|
@@ -71,11 +71,11 @@ PLATFORMS
|
|
71
71
|
|
72
72
|
DEPENDENCIES
|
73
73
|
bundler (~> 1.6)
|
74
|
-
byebug
|
74
|
+
byebug (> 0)
|
75
75
|
flash_flow!
|
76
|
-
minitest
|
77
|
-
minitest-stub_any_instance
|
78
|
-
rake
|
76
|
+
minitest (> 0)
|
77
|
+
minitest-stub_any_instance (> 0)
|
78
|
+
rake (> 0)
|
79
79
|
|
80
80
|
BUNDLED WITH
|
81
81
|
1.10.6
|
data/README.md
CHANGED
@@ -89,6 +89,9 @@ to which the message will be sent.
|
|
89
89
|
|
90
90
|
### Runtime options
|
91
91
|
|
92
|
+
#### -v, --version
|
93
|
+
Print the current version of flash flow and exit.
|
94
|
+
|
92
95
|
#### -n, --no-merge
|
93
96
|
Runs flash_flow, but excludes the branch that you're on from the merge branch. If the branch you're on has breaking
|
94
97
|
tests, you may want to get it out of your `merge_branch`, and this will do that and ensure that the next times
|
data/bin/flash_flow
CHANGED
data/flash_flow.gemspec
CHANGED
@@ -8,7 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Flashfunders"]
|
9
9
|
spec.email = ["engineering@flashfunders.com"]
|
10
10
|
spec.summary = %q{Implementation of the flashfunders workflow}
|
11
|
-
spec.
|
11
|
+
spec.description = %q{Flash flow is a command line tool for keeping your acceptance environment up to date}
|
12
|
+
spec.homepage = "https://github.com/FlashFunders/flash_flow"
|
12
13
|
spec.license = "MIT"
|
13
14
|
|
14
15
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -16,13 +17,13 @@ Gem::Specification.new do |spec|
|
|
16
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
18
|
spec.require_paths = ["lib"]
|
18
19
|
|
19
|
-
spec.add_dependency 'octokit'
|
20
|
-
spec.add_dependency 'hipchat'
|
21
|
-
spec.add_dependency 'pivotal-tracker'
|
20
|
+
spec.add_dependency 'octokit', "~> 4.1"
|
21
|
+
spec.add_dependency 'hipchat', "~> 1.5"
|
22
|
+
spec.add_dependency 'pivotal-tracker', "~> 0.5"
|
22
23
|
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
|
-
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "minitest"
|
26
|
-
spec.add_development_dependency "byebug"
|
27
|
-
spec.add_development_dependency 'minitest-stub_any_instance'
|
25
|
+
spec.add_development_dependency "rake", "> 0"
|
26
|
+
spec.add_development_dependency "minitest", "> 0"
|
27
|
+
spec.add_development_dependency "byebug", "> 0"
|
28
|
+
spec.add_development_dependency 'minitest-stub_any_instance', "> 0"
|
28
29
|
end
|
@@ -22,12 +22,21 @@ module FlashFlow
|
|
22
22
|
def write(branches, file=nil)
|
23
23
|
@git.in_temp_merge_branch do
|
24
24
|
file ||= File.open(@filename, 'w')
|
25
|
-
file.puts JSON.pretty_generate(branches)
|
25
|
+
file.puts JSON.pretty_generate(sort_branches(branches))
|
26
26
|
file.close
|
27
27
|
|
28
28
|
@git.add_and_commit(@filename, 'Branch Info', add: { force: true })
|
29
29
|
end
|
30
30
|
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
def sort_branches(branches)
|
35
|
+
return branches unless branches.is_a?(Hash)
|
36
|
+
sorted_branches = {}
|
37
|
+
branches.keys.sort.each { |key| sorted_branches[key] = sort_branches(branches[key]) }
|
38
|
+
sorted_branches
|
39
|
+
end
|
31
40
|
end
|
32
41
|
end
|
33
|
-
end
|
42
|
+
end
|
data/lib/flash_flow/options.rb
CHANGED
@@ -9,6 +9,7 @@ module FlashFlow
|
|
9
9
|
opts.separator ""
|
10
10
|
|
11
11
|
opts.on('--install', 'Copy flash_flow.yml.erb to your repo and exit') { |v| options[:install] = true }
|
12
|
+
opts.on('-v', '--version', 'Print the current version of flash flow and exit') { |v| options[:version] = true }
|
12
13
|
opts.on('--prod-deploy', 'Run IssueTracker#deploy_production and exit') { |v| options[:prod_deploy] = true }
|
13
14
|
opts.on('--review-deploy', 'Run IssueTracker#deploy_review and exit') { |v| options[:review_deploy] = true }
|
14
15
|
opts.on('--release-notes hours', 'Run IssueTracker#release_notes and exit') { |v| options[:release_notes] = v }
|
data/lib/flash_flow/version.rb
CHANGED
data/test/lib/data/test_store.rb
CHANGED
@@ -4,13 +4,6 @@ require 'flash_flow/data/store'
|
|
4
4
|
module FlashFlow
|
5
5
|
module Data
|
6
6
|
class TestStore < Minitest::Test
|
7
|
-
def sample_branches
|
8
|
-
{
|
9
|
-
'origin/branch 1' => {'branch' => 'branch 1', 'remote' => 'origin', 'status' => 'success', 'stories' => ['123']},
|
10
|
-
'other_origin/branch 2' => {'branch' => 'branch 2', 'remote' => 'origin', 'status' => 'success', 'stories' => ['456']}
|
11
|
-
}
|
12
|
-
end
|
13
|
-
|
14
7
|
def setup
|
15
8
|
@mock_git = MockGit.new
|
16
9
|
@collection = Collection.new({ 'origin' => 'the_origin_url' })
|
@@ -28,15 +21,40 @@ module FlashFlow
|
|
28
21
|
str = StringIO.new
|
29
22
|
@storage.write(old_branches, str)
|
30
23
|
|
31
|
-
assert_equal(str.string.strip, JSON.pretty_generate(
|
24
|
+
assert_equal(str.string.strip, JSON.pretty_generate(sorted_branches).strip)
|
32
25
|
end
|
33
26
|
|
34
27
|
private # Helpers
|
35
28
|
|
36
29
|
def old_branches
|
37
30
|
@old_branches ||= {
|
38
|
-
'
|
39
|
-
'
|
31
|
+
'version' => '1.0.0',
|
32
|
+
'branches' => {
|
33
|
+
'the_origin_url/some_old_branch' => {'ref' => 'some_old_branch', 'remote_url' => 'the_origin_url', 'remote' => 'origin', 'created_at' => (Time.now - 3600).to_s, 'stories' => ['111']},
|
34
|
+
'the_origin_url/some_branch' => {'ref' => 'some_branch', 'remote_url' => 'the_origin_url', 'remote' => 'origin', 'status' => 'success', 'created_at' => (Time.now - 1800).to_s, 'stories' => ['222']}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def sorted_branches
|
40
|
+
@sorted_branches ||= {
|
41
|
+
'branches' => {
|
42
|
+
'the_origin_url/some_branch' => {
|
43
|
+
'created_at' => (Time.now - 1800).to_s,
|
44
|
+
'ref' => 'some_branch',
|
45
|
+
'remote' => 'origin',
|
46
|
+
'remote_url' => 'the_origin_url',
|
47
|
+
'status' => 'success',
|
48
|
+
'stories' => ['222']
|
49
|
+
},
|
50
|
+
'the_origin_url/some_old_branch' => {
|
51
|
+
'created_at' => (Time.now - 3600).to_s,
|
52
|
+
'ref' => 'some_old_branch',
|
53
|
+
'remote' => 'origin',
|
54
|
+
'remote_url' => 'the_origin_url',
|
55
|
+
'stories' => ['111']},
|
56
|
+
},
|
57
|
+
'version' => '1.0.0',
|
40
58
|
}
|
41
59
|
end
|
42
60
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flash_flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flashfunders
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hipchat
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pivotal-tracker
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.5'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,59 +70,60 @@ dependencies:
|
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: minitest
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: byebug
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - ">"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - ">"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: minitest-stub_any_instance
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - ">"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description:
|
125
|
+
description: Flash flow is a command line tool for keeping your acceptance environment
|
126
|
+
up to date
|
126
127
|
email:
|
127
128
|
- engineering@flashfunders.com
|
128
129
|
executables:
|
@@ -180,7 +181,7 @@ files:
|
|
180
181
|
- test/lib/test_notifier.rb
|
181
182
|
- test/lib/test_resolve.rb
|
182
183
|
- test/minitest_helper.rb
|
183
|
-
homepage:
|
184
|
+
homepage: https://github.com/FlashFunders/flash_flow
|
184
185
|
licenses:
|
185
186
|
- MIT
|
186
187
|
metadata: {}
|