danger-xcode_summary 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/Gemfile.lock +23 -23
- data/lib/xcode_summary/gem_version.rb +1 -1
- data/lib/xcode_summary/plugin.rb +6 -1
- data/spec/fixtures/bitbucket_pr.json +14 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/xcode_summary_spec.rb +21 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b206c998ed6da63ed6db8f95fba23cd5462bf647
|
4
|
+
data.tar.gz: 53c168e9094af71f1ffc4f56bdfb6884e9c09b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca7b8d6828da186b54c5d23d91af79a6022c08fc1e5b9f7854cc3ea1f71a7976c8b83af9dcfd98c6ee7ed1c8b2ed503d9099eafb193836b1b12cbcdea3c57bb0
|
7
|
+
data.tar.gz: 54bc8cee7c7e293a29e167ec8c875cd2b86b6a0c2f02f72236f57d880ecba354347d9cf72d10c4093cbae2ce9cab451d0a874b7f4a7c38690eb5618ca463f1fc
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
danger-xcode_summary (0.1.
|
4
|
+
danger-xcode_summary (0.1.4)
|
5
5
|
danger-plugin-api (~> 1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.5.
|
10
|
+
addressable (2.5.1)
|
11
11
|
public_suffix (~> 2.0, >= 2.0.2)
|
12
12
|
ast (2.3.0)
|
13
13
|
claide (1.0.1)
|
@@ -20,7 +20,7 @@ GEM
|
|
20
20
|
colored2 (3.1.2)
|
21
21
|
cork (0.2.0)
|
22
22
|
colored (~> 1.2)
|
23
|
-
danger (4.3.
|
23
|
+
danger (4.3.3)
|
24
24
|
claide (~> 1.0)
|
25
25
|
claide-plugins (>= 0.9.2)
|
26
26
|
colored2 (~> 3.1)
|
@@ -33,15 +33,15 @@ GEM
|
|
33
33
|
terminal-table (~> 1)
|
34
34
|
danger-plugin-api (1.0.0)
|
35
35
|
danger (> 2.0)
|
36
|
-
diff-lcs (1.
|
37
|
-
faraday (0.
|
36
|
+
diff-lcs (1.3)
|
37
|
+
faraday (0.12.0.1)
|
38
38
|
multipart-post (>= 1.2, < 3)
|
39
39
|
faraday-http-cache (1.3.1)
|
40
40
|
faraday (~> 0.8)
|
41
|
-
ffi (1.9.
|
41
|
+
ffi (1.9.18)
|
42
42
|
formatador (0.2.5)
|
43
43
|
git (1.3.0)
|
44
|
-
guard (2.14.
|
44
|
+
guard (2.14.1)
|
45
45
|
formatador (>= 0.2.4)
|
46
46
|
listen (>= 2.7, < 4.0)
|
47
47
|
lumberjack (~> 1.0)
|
@@ -51,7 +51,7 @@ GEM
|
|
51
51
|
shellany (~> 0.0)
|
52
52
|
thor (>= 0.18.1)
|
53
53
|
guard-compat (1.2.1)
|
54
|
-
guard-rspec (4.7.
|
54
|
+
guard-rspec (4.7.3)
|
55
55
|
guard (~> 2.1)
|
56
56
|
guard-compat (~> 1.1)
|
57
57
|
rspec (>= 2.99.0, < 4.0)
|
@@ -59,18 +59,18 @@ GEM
|
|
59
59
|
listen (3.0.7)
|
60
60
|
rb-fsevent (>= 0.9.3)
|
61
61
|
rb-inotify (>= 0.9.7)
|
62
|
-
lumberjack (1.0.
|
62
|
+
lumberjack (1.0.11)
|
63
63
|
method_source (0.8.2)
|
64
64
|
multipart-post (2.0.0)
|
65
65
|
nap (1.1.0)
|
66
66
|
nenv (0.3.0)
|
67
|
-
notiffany (0.1.
|
67
|
+
notiffany (0.1.1)
|
68
68
|
nenv (~> 0.1)
|
69
69
|
shellany (~> 0.0)
|
70
|
-
octokit (4.
|
70
|
+
octokit (4.7.0)
|
71
71
|
sawyer (~> 0.8.0, >= 0.5.3)
|
72
72
|
open4 (1.3.4)
|
73
|
-
parser (2.
|
73
|
+
parser (2.4.0.0)
|
74
74
|
ast (~> 2.2)
|
75
75
|
powerpack (0.1.1)
|
76
76
|
pry (0.10.4)
|
@@ -78,16 +78,16 @@ GEM
|
|
78
78
|
method_source (~> 0.8.1)
|
79
79
|
slop (~> 3.4)
|
80
80
|
public_suffix (2.0.5)
|
81
|
-
rainbow (2.1
|
81
|
+
rainbow (2.2.1)
|
82
82
|
rake (10.5.0)
|
83
|
-
rb-fsevent (0.9.
|
84
|
-
rb-inotify (0.9.
|
83
|
+
rb-fsevent (0.9.8)
|
84
|
+
rb-inotify (0.9.8)
|
85
85
|
ffi (>= 0.5.0)
|
86
86
|
rspec (3.5.0)
|
87
87
|
rspec-core (~> 3.5.0)
|
88
88
|
rspec-expectations (~> 3.5.0)
|
89
89
|
rspec-mocks (~> 3.5.0)
|
90
|
-
rspec-core (3.5.
|
90
|
+
rspec-core (3.5.4)
|
91
91
|
rspec-support (~> 3.5.0)
|
92
92
|
rspec-expectations (3.5.0)
|
93
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -96,8 +96,8 @@ GEM
|
|
96
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
97
|
rspec-support (~> 3.5.0)
|
98
98
|
rspec-support (3.5.0)
|
99
|
-
rubocop (0.
|
100
|
-
parser (>= 2.3.
|
99
|
+
rubocop (0.48.1)
|
100
|
+
parser (>= 2.3.3.1, < 3.0)
|
101
101
|
powerpack (~> 0.1)
|
102
102
|
rainbow (>= 1.99.1, < 3.0)
|
103
103
|
ruby-progressbar (~> 1.7)
|
@@ -108,11 +108,11 @@ GEM
|
|
108
108
|
faraday (~> 0.8, < 1.0)
|
109
109
|
shellany (0.0.1)
|
110
110
|
slop (3.6.0)
|
111
|
-
terminal-table (1.7.
|
112
|
-
unicode-display_width (~> 1.1)
|
113
|
-
thor (0.19.
|
114
|
-
unicode-display_width (1.1.
|
115
|
-
yard (0.9.
|
111
|
+
terminal-table (1.7.3)
|
112
|
+
unicode-display_width (~> 1.1.1)
|
113
|
+
thor (0.19.4)
|
114
|
+
unicode-display_width (1.1.3)
|
115
|
+
yard (0.9.8)
|
116
116
|
|
117
117
|
PLATFORMS
|
118
118
|
ruby
|
data/lib/xcode_summary/plugin.rb
CHANGED
@@ -116,7 +116,12 @@ module Danger
|
|
116
116
|
clean_path, line = parse_filename(path)
|
117
117
|
path = clean_path + '#L' + line if clean_path && line
|
118
118
|
|
119
|
-
|
119
|
+
# Pick a Dangerfile plugin for a chosen request_source
|
120
|
+
# based on https://github.com/danger/danger/blob/master/lib/danger/plugin_support/plugin.rb#L31
|
121
|
+
plugins = Plugin.all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
|
122
|
+
plugin = plugins.select { |p| p.method_defined? :html_link }.map { |p| p.new(@dangerfile) }.compact.first
|
123
|
+
|
124
|
+
plugin.html_link(path)
|
120
125
|
end
|
121
126
|
|
122
127
|
def parse_filename(path)
|
data/spec/spec_helper.rb
CHANGED
@@ -52,8 +52,23 @@ def testing_env
|
|
52
52
|
}
|
53
53
|
end
|
54
54
|
|
55
|
+
def testing_bitbucket_env
|
56
|
+
{
|
57
|
+
'GIT_URL' => 'https://github.com/diogot/danger-xcode_summary.git',
|
58
|
+
'JENKINS_URL' => 'http://jenkins.server.com/',
|
59
|
+
'DANGER_BITBUCKETCLOUD_USERNAME' => 'username',
|
60
|
+
'DANGER_BITBUCKETCLOUD_PASSWORD' => 'password'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
55
64
|
# A stubbed out Dangerfile for use in tests
|
56
65
|
def testing_dangerfile
|
57
66
|
env = Danger::EnvironmentManager.new(testing_env)
|
58
67
|
Danger::Dangerfile.new(env, testing_ui)
|
59
68
|
end
|
69
|
+
|
70
|
+
# A stubbed out Dangerfile with Bitbucket as a request_source for use in tests
|
71
|
+
def testing_bitbucket_dangerfile
|
72
|
+
env = Danger::EnvironmentManager.new(testing_bitbucket_env)
|
73
|
+
Danger::Dangerfile.new(env, testing_ui)
|
74
|
+
end
|
data/spec/xcode_summary_spec.rb
CHANGED
@@ -95,5 +95,26 @@ module Danger
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
end
|
98
|
+
|
99
|
+
# Second environment with different request_source
|
100
|
+
describe 'with bitbucket request_source' do
|
101
|
+
before do
|
102
|
+
@dangerfile = testing_bitbucket_dangerfile
|
103
|
+
@xcode_summary = @dangerfile.xcode_summary
|
104
|
+
# rubocop:disable LineLength
|
105
|
+
@xcode_summary.env.request_source.pr_json = JSON.parse(IO.read('spec/fixtures/bitbucket_pr.json'), symbolize_names: true)
|
106
|
+
# rubocop:enable LineLength
|
107
|
+
@xcode_summary.project_root = '/Users/diogo/src/danger-xcode_summary'
|
108
|
+
end
|
109
|
+
|
110
|
+
describe 'where request source' do
|
111
|
+
it 'should be bitbucket' do
|
112
|
+
path = @xcode_summary.send(:format_path, 'lib/xcode_summary/plugin.rb#L3')
|
113
|
+
# rubocop:disable LineLength
|
114
|
+
expect(path).to eq "<a href='https://github.com/diogot/danger-xcode_summary/lib/xcode_summary/plugin.rb?at=4d4c0f31857e3185b51b6865a0700525bc0cb2bb#L3'>lib/xcode_summary/plugin.rb</a>"
|
115
|
+
# rubocop:enable LineLength
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
98
119
|
end
|
99
120
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-xcode_summary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diogo Tridapalli
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: danger-plugin-api
|
@@ -145,6 +145,7 @@ files:
|
|
145
145
|
- lib/danger_xcode_summary.rb
|
146
146
|
- lib/xcode_summary/gem_version.rb
|
147
147
|
- lib/xcode_summary/plugin.rb
|
148
|
+
- spec/fixtures/bitbucket_pr.json
|
148
149
|
- spec/fixtures/pr_json.json
|
149
150
|
- spec/fixtures/summary.json
|
150
151
|
- spec/fixtures/summary_messages.json
|
@@ -178,6 +179,7 @@ specification_version: 4
|
|
178
179
|
summary: A [Danger](http://danger.systems) plugin that shows all build errors, warnings
|
179
180
|
and unit tests results generated from `xcodebuild`.
|
180
181
|
test_files:
|
182
|
+
- spec/fixtures/bitbucket_pr.json
|
181
183
|
- spec/fixtures/pr_json.json
|
182
184
|
- spec/fixtures/summary.json
|
183
185
|
- spec/fixtures/summary_messages.json
|