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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b03d46db4534888cef8809d5f99dc1f03ab2814
4
- data.tar.gz: ebdd38802971de35e23c6da1e5cc1098da96aab6
3
+ metadata.gz: 565fb3fa5434a00c8fd782ecaad2b942585ea99a
4
+ data.tar.gz: e3fc63c14e87ff2990890f00099d96447c43d156
5
5
  SHA512:
6
- metadata.gz: b6dd5fa3d422702e4a7c55259b85ed21ad2fbec4f940d64476fc446e8be859f5467b5c33c45b32d6d03675325aaae3a5ff404776700798f9a89fbe5219f8c1af
7
- data.tar.gz: 9b3197d928b56d8f86dcdf9e8eff1ba0586dbf0819a63262dbce98a98012a5272fc9c8cb0454bef85d0c1b0a71c957be2143acf61a176db430a65776fe265e5c
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("#{artifacts_uri}?#{query}")
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 artifacts_uri
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
 
@@ -1,5 +1,5 @@
1
1
  module Accesslint
2
2
  module Ci
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  end
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.5
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-16 00:00:00.000000000 Z
11
+ date: 2016-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler