gergich 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gergich.rb +2 -1
- data/spec/gergich_spec.rb +18 -0
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef81a3c65bdd0fc840a4d528f2e53226d53e92e
|
4
|
+
data.tar.gz: 40df25850f29562ad41d343634b14f57d400a9a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa63ad319d840a44e9fa108d613171584f155adffae2d3499401f18552f22cefdc8956a9e3e5934a4b0040f3440761eb5ef2cabe98341d3cdfb9a4aeb999a30f
|
7
|
+
data.tar.gz: d3b7c367fde6d1dab7214c373a11d167e81ea84c44291cb4899102a808a676262fac3cac3348725616770f2fc9e7fe03b32ccf99ed995ec3afa25d36fbc4a4ca
|
data/lib/gergich.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "erb"
|
1
2
|
require "sqlite3"
|
2
3
|
require "json"
|
3
4
|
require "fileutils"
|
@@ -80,7 +81,7 @@ module Gergich
|
|
80
81
|
|
81
82
|
def change_id
|
82
83
|
if info[:project] && info[:branch]
|
83
|
-
"#{info[:project]}~#{info[:branch]}~#{info[:change_id]}"
|
84
|
+
ERB::Util.url_encode "#{info[:project]}~#{info[:branch]}~#{info[:change_id]}"
|
84
85
|
else
|
85
86
|
info[:change_id]
|
86
87
|
end
|
data/spec/gergich_spec.rb
CHANGED
@@ -52,6 +52,24 @@ RSpec.describe Gergich::API do
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
RSpec.describe Gergich::Commit do
|
56
|
+
before :each do
|
57
|
+
allow(Gergich).to receive(:use_git?).and_return(false)
|
58
|
+
end
|
59
|
+
|
60
|
+
context "change_id works" do
|
61
|
+
it "supports branches with slashes" do
|
62
|
+
allow(ENV).to receive(:[]).with("GERRIT_PATCHSET_REVISION").and_return("commit-ish")
|
63
|
+
allow(ENV).to receive(:[]).with("GERRIT_PROJECT").and_return("spec-project")
|
64
|
+
allow(ENV).to receive(:[]).with("GERRIT_BRANCH").and_return("releases/2017.11.17")
|
65
|
+
allow(ENV).to receive(:[]).with("GERRIT_CHANGE_ID").and_return("dummychangeset")
|
66
|
+
|
67
|
+
expect(described_class.new.change_id) # %2F = / and %7E = ~
|
68
|
+
.to match("spec-project%7Ereleases%2F2017.11.17%7Edummychangeset")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
55
73
|
RSpec.describe Gergich::Draft do
|
56
74
|
let!(:draft) do
|
57
75
|
commit = double(
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gergich
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
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
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: httparty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.6'
|
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
40
|
version: '0.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '12.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '12.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.5'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.5'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.47.1
|
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.47.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.13.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.13.0
|
97
97
|
description: Gergich is a little command-line tool for wiring up linters to Gerrit
|
@@ -105,12 +105,6 @@ extra_rdoc_files: []
|
|
105
105
|
files:
|
106
106
|
- LICENSE
|
107
107
|
- README.md
|
108
|
-
- bin/check_coverage
|
109
|
-
- bin/gergich
|
110
|
-
- bin/master_bouncer
|
111
|
-
- bin/run_tests.sh
|
112
|
-
- lib/gergich.rb
|
113
|
-
- lib/gergich/capture.rb
|
114
108
|
- lib/gergich/capture/androidlint_capture.rb
|
115
109
|
- lib/gergich/capture/brakeman_capture.rb
|
116
110
|
- lib/gergich/capture/eslint_capture.rb
|
@@ -120,9 +114,11 @@ files:
|
|
120
114
|
- lib/gergich/capture/shellcheck_capture.rb
|
121
115
|
- lib/gergich/capture/stylelint_capture.rb
|
122
116
|
- lib/gergich/capture/swiftlint_capture.rb
|
123
|
-
- lib/gergich/
|
117
|
+
- lib/gergich/capture.rb
|
124
118
|
- lib/gergich/cli/gergich.rb
|
125
119
|
- lib/gergich/cli/master_bouncer.rb
|
120
|
+
- lib/gergich/cli.rb
|
121
|
+
- lib/gergich.rb
|
126
122
|
- spec/gergich/capture/androidlint_capture_spec.rb
|
127
123
|
- spec/gergich/capture/brakeman_capture_spec.rb
|
128
124
|
- spec/gergich/capture/custom_capture_spec.rb
|
@@ -137,6 +133,10 @@ files:
|
|
137
133
|
- spec/gergich_spec.rb
|
138
134
|
- spec/spec_helper.rb
|
139
135
|
- spec/support/capture_shared_examples.rb
|
136
|
+
- bin/check_coverage
|
137
|
+
- bin/gergich
|
138
|
+
- bin/master_bouncer
|
139
|
+
- bin/run_tests.sh
|
140
140
|
homepage: https://github.com/instructure/gergich
|
141
141
|
licenses:
|
142
142
|
- MIT
|
@@ -147,17 +147,17 @@ require_paths:
|
|
147
147
|
- lib
|
148
148
|
required_ruby_version: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 1.9.3
|
153
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
159
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.0.14.1
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Command-line tool for adding Gerrit comments
|