git_scf 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/git_scf/subcommands/finish.rb +2 -5
- data/lib/git_scf/subcommands/review.rb +3 -6
- data/lib/git_scf/subcommands/start.rb +2 -5
- data/lib/git_scf/version.rb +1 -1
- data/lib/git_scf.rb +3 -5
- metadata +14 -25
- data/lib/git_scf/logger.rb +0 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 07ff24f20419b29a37a289e231a59b8b2992fe2c
|
4
|
+
data.tar.gz: 10b1921bc88c80e14cb8880ed12c0c404c69a2bf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: efcc2a83fffbf5ac7f0bc31cdbb8328d3dcd62c489f78d9597db3a8c63ba6f1d175b63551ed13cde2331641481d4d56e1faa387b3ab11de6a25f36002263adc5
|
7
|
+
data.tar.gz: 1da5f59dc13cd58a3be0754efad1e1595a3f343a0ae43d2634c19ee7c27af4940d005fb81fb4106c73d45bef6215b9e9181add596389e21e71cf37f2ec2e08b8
|
@@ -1,14 +1,11 @@
|
|
1
1
|
module GitScf
|
2
2
|
class Finish
|
3
|
-
def initialize(ticket
|
3
|
+
def initialize(ticket)
|
4
4
|
@ticket = ticket
|
5
|
-
@logger = logger
|
6
5
|
end
|
7
6
|
|
8
7
|
def execute
|
9
|
-
|
10
|
-
`git add .`
|
11
|
-
`git commit -am "#{@ticket.id} #done"`
|
8
|
+
`git commit --allow-empty --all -m "#{@ticket.id} #done (jira status update)"`
|
12
9
|
`git push`
|
13
10
|
`git flow feature finish #{@ticket.branch_name}`
|
14
11
|
`git push`
|
@@ -1,17 +1,14 @@
|
|
1
1
|
module GitScf
|
2
2
|
class Review
|
3
3
|
|
4
|
-
def initialize(ticket
|
4
|
+
def initialize(ticket)
|
5
5
|
@ticket = ticket
|
6
|
-
@logger = logger
|
7
6
|
end
|
8
7
|
|
9
8
|
def execute
|
10
|
-
|
11
|
-
`git add .`
|
12
|
-
`git commit -am "#{@ticket.id} #review"`
|
9
|
+
`git commit --allow-empty --all -m "#{@ticket.id} #review (jira status update)"`
|
13
10
|
`git push`
|
14
|
-
`hub pull-request "Addresses #{@ticket.id} #{@ticket.summary.gsub('"','')} please review." -b seeclickfix:develop | pbcopy`
|
11
|
+
`hub pull-request "Addresses #{@ticket.id} #{@ticket.summary.gsub('"','')} please review." -b seeclickfix:develop -h seeclickfix:#{@ticket.branch_name}| pbcopy`
|
15
12
|
puts "The code-review URL is in your clipboard."
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
1
|
module GitScf
|
2
2
|
class Start
|
3
|
-
def initialize(ticket
|
3
|
+
def initialize(ticket)
|
4
4
|
@ticket = ticket
|
5
|
-
@logger = logger
|
6
5
|
end
|
7
6
|
|
8
7
|
def execute
|
9
8
|
`git checkout develop`
|
10
9
|
`git pull`
|
11
10
|
`git flow feature start #{@ticket.branch_name}`
|
12
|
-
|
13
|
-
`git add .`
|
14
|
-
`git commit -am "#{@ticket.id} #in-progress"`
|
11
|
+
`git commit --allow-empty --all -m "#{@ticket.id} #in-progress (jira status update)"`
|
15
12
|
`git flow feature publish #{@ticket.branch_name}`
|
16
13
|
end
|
17
14
|
end
|
data/lib/git_scf/version.rb
CHANGED
data/lib/git_scf.rb
CHANGED
@@ -5,7 +5,6 @@ require 'git_scf/ticket'
|
|
5
5
|
require 'git_scf/version'
|
6
6
|
require 'git_scf/jira'
|
7
7
|
require 'git_scf/env_config'
|
8
|
-
require 'git_scf/logger'
|
9
8
|
require 'git_scf/subcommands'
|
10
9
|
|
11
10
|
module GitScf
|
@@ -51,17 +50,16 @@ module GitScf
|
|
51
50
|
config = EnvConfig.new(repo)
|
52
51
|
jira = Jira.new(config)
|
53
52
|
ticket = Ticket.new(jira)
|
54
|
-
logger = Logger.new(ticket)
|
55
53
|
|
56
54
|
case ARGV.first
|
57
55
|
when 'start'
|
58
|
-
Start.new(ticket
|
56
|
+
Start.new(ticket)
|
59
57
|
when 'show'
|
60
58
|
Show.new(ticket, options[:verbose])
|
61
59
|
when 'review'
|
62
|
-
Review.new(ticket
|
60
|
+
Review.new(ticket)
|
63
61
|
when 'finish'
|
64
|
-
Finish.new(ticket
|
62
|
+
Finish.new(ticket)
|
65
63
|
end.execute
|
66
64
|
end
|
67
65
|
end
|
metadata
CHANGED
@@ -1,68 +1,60 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_scf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.7
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jeff Blasius
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-03-06 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: hub
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: jira-ruby
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rugged
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,12 +62,11 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 0.17.0.b7
|
78
|
-
description:
|
69
|
+
description: " Provides git tools that match the SCF workflow. \n"
|
79
70
|
email: jeff@seeclickfix.com
|
80
71
|
executables:
|
81
72
|
- git-scf
|
@@ -85,7 +76,6 @@ files:
|
|
85
76
|
- README.md
|
86
77
|
- lib/git_scf/env_config.rb
|
87
78
|
- lib/git_scf/jira.rb
|
88
|
-
- lib/git_scf/logger.rb
|
89
79
|
- lib/git_scf/subcommands/finish.rb
|
90
80
|
- lib/git_scf/subcommands/review.rb
|
91
81
|
- lib/git_scf/subcommands/show.rb
|
@@ -97,26 +87,25 @@ files:
|
|
97
87
|
- bin/git-scf
|
98
88
|
homepage: http://github.com/SeeClickFix/git_scf
|
99
89
|
licenses: []
|
90
|
+
metadata: {}
|
100
91
|
post_install_message:
|
101
92
|
rdoc_options: []
|
102
93
|
require_paths:
|
103
94
|
- lib
|
104
95
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
96
|
requirements:
|
107
|
-
- -
|
97
|
+
- - '>='
|
108
98
|
- !ruby/object:Gem::Version
|
109
99
|
version: 1.9.2
|
110
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
-
none: false
|
112
101
|
requirements:
|
113
|
-
- -
|
102
|
+
- - '>='
|
114
103
|
- !ruby/object:Gem::Version
|
115
104
|
version: '0'
|
116
105
|
requirements: []
|
117
106
|
rubyforge_project:
|
118
|
-
rubygems_version:
|
107
|
+
rubygems_version: 2.0.6
|
119
108
|
signing_key:
|
120
|
-
specification_version:
|
109
|
+
specification_version: 4
|
121
110
|
summary: Git tools for SCF's workflow.
|
122
111
|
test_files: []
|
data/lib/git_scf/logger.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
module GitScf
|
2
|
-
class Logger
|
3
|
-
|
4
|
-
LOG_PATH = '.gitscf'
|
5
|
-
|
6
|
-
def initialize(ticket)
|
7
|
-
`mkdir -p #{LOG_PATH}`
|
8
|
-
@filename = "#{ticket.id}"
|
9
|
-
end
|
10
|
-
|
11
|
-
def add(string)
|
12
|
-
`echo '#{string} #{`date`}' >> #{log_file}`
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def log_file
|
18
|
-
"#{LOG_PATH}/#{@filename}"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|