accesslint-ci 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/accesslint/ci/log_manager.rb +10 -9
- data/lib/accesslint/ci/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 565fb3fa5434a00c8fd782ecaad2b942585ea99a
|
4
|
+
data.tar.gz: e3fc63c14e87ff2990890f00099d96447c43d156
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19276e6b8cf86afed90730c109336b8edbdfef7fd0b4bdeb86ee64cf057ee20191a631c34d137077259ad006be2f097cf13e14c1e314f0d89d176244917a072a
|
7
|
+
data.tar.gz: 4a1e6ec812ca9084a59bf49a9df56bac633bbfc7ba655b5a6f1410259d7985b7e7503309dd20c224d4f2eda72984764e8ab51ad48ec04331d6cf1b3b74314e74
|
data/README.md
CHANGED
@@ -29,7 +29,6 @@ general:
|
|
29
29
|
|
30
30
|
machine:
|
31
31
|
environment:
|
32
|
-
CIRCLE_TOKEN: <CircleCI API token>
|
33
32
|
ACCESSLINT_API_TOKEN: <API token from https://accesslint.com>
|
34
33
|
ACCESSLINT_GITHUB_USER: <GitHub user authenticated at https://accesslint.com>
|
35
34
|
node:
|
@@ -46,6 +45,12 @@ test:
|
|
46
45
|
- accesslint-ci scan http://localhost:3000
|
47
46
|
```
|
48
47
|
|
48
|
+
### Private Repo Support
|
49
|
+
|
50
|
+
AccessLint *does not* support commenting on private repos right now. Follow the
|
51
|
+
[project backlog](https://github.com/accesslint/accesslint-ci/projects/1) for
|
52
|
+
plans.
|
53
|
+
|
49
54
|
### TravisCI, Jenkins, etc.
|
50
55
|
|
51
56
|
AccessLint CI only works in CircleCI right now. See https://github.com/accesslint/accesslint-ci/issues/15
|
@@ -10,9 +10,7 @@ module Accesslint
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def get
|
13
|
-
RestClient.get(
|
14
|
-
"#{artifact_url}?circle-token=#{ENV.fetch('CIRCLE_TOKEN')}"
|
15
|
-
)
|
13
|
+
RestClient.get(artifact_url)
|
16
14
|
rescue MissingArtifactError => e
|
17
15
|
puts e.message
|
18
16
|
"\n"
|
@@ -34,19 +32,23 @@ module Accesslint
|
|
34
32
|
|
35
33
|
def artifacts
|
36
34
|
@artifacts ||= JSON.parse(
|
37
|
-
RestClient.get(
|
35
|
+
RestClient.get(artifacts_url)
|
36
|
+
)
|
37
|
+
rescue RestClient::NotFound => e
|
38
|
+
raise MissingArtifactError.new(
|
39
|
+
"No existing artifacts at #{artifacts_url}: #{e.message}"
|
38
40
|
)
|
39
|
-
rescue RestClient::NotFound
|
40
|
-
raise MissingArtifactError.new("No existing artifacts.")
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
44
|
-
URI.join(
|
43
|
+
def artifacts_url
|
44
|
+
uri = URI.join(
|
45
45
|
"https://circleci.com/",
|
46
46
|
"api/v1/project/",
|
47
47
|
project_path,
|
48
48
|
"latest/artifacts",
|
49
49
|
)
|
50
|
+
|
51
|
+
"#{uri}?#{query}"
|
50
52
|
end
|
51
53
|
|
52
54
|
def project_path
|
@@ -60,7 +62,6 @@ module Accesslint
|
|
60
62
|
URI.encode_www_form([
|
61
63
|
["branch", branch],
|
62
64
|
["filter", "successful"],
|
63
|
-
["circle-token", ENV.fetch("CIRCLE_TOKEN")],
|
64
65
|
])
|
65
66
|
end
|
66
67
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: accesslint-ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Cundiff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|