accesslint-ci 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d7594a4e164b36baaf9dec0dae54d7b3dbc299bf
4
- data.tar.gz: 1a4af08acc7685739f5703c0aa5ce81a8f7f8b58
3
+ metadata.gz: 0b03d46db4534888cef8809d5f99dc1f03ab2814
4
+ data.tar.gz: ebdd38802971de35e23c6da1e5cc1098da96aab6
5
5
  SHA512:
6
- metadata.gz: 810f775e6267732b3fe79c9f124104b009eada2b84d40e0f70178d95a646e0781d54c0ba2d8506c0f1d063c2a4eed690115427b5afb636688492476f4cf4e7d3
7
- data.tar.gz: 44a36a50948929bdc015f98f160ae96a5324f88d90610ed2cc122dbf96d7d7c9a66baf78cbdf8485c9bbacc87b378d448625db87e4f92a8eec2ad196a7c973a7
6
+ metadata.gz: b6dd5fa3d422702e4a7c55259b85ed21ad2fbec4f940d64476fc446e8be859f5467b5c33c45b32d6d03675325aaae3a5ff404776700798f9a89fbe5219f8c1af
7
+ data.tar.gz: 9b3197d928b56d8f86dcdf9e8eff1ba0586dbf0819a63262dbce98a98012a5272fc9c8cb0454bef85d0c1b0a71c957be2143acf61a176db430a65776fe265e5c
data/README.md CHANGED
@@ -30,7 +30,7 @@ general:
30
30
  machine:
31
31
  environment:
32
32
  CIRCLE_TOKEN: <CircleCI API token>
33
- ACCESSLINT_TOKEN: <API token from https://accesslint.com>
33
+ ACCESSLINT_API_TOKEN: <API token from https://accesslint.com>
34
34
  ACCESSLINT_GITHUB_USER: <GitHub user authenticated at https://accesslint.com>
35
35
  node:
36
36
  version: 6.1.0
@@ -36,14 +36,16 @@ module Accesslint
36
36
  end
37
37
 
38
38
  def authentication
39
- "#{ENV.fetch('ACCESSLINT_GITHUB_USER')}:#{ENV.fetch('ACCESSLINT_API_TOKEN')}"
39
+ "#{github_user}:#{ENV.fetch('ACCESSLINT_API_TOKEN')}"
40
40
  end
41
41
 
42
42
  def pull_request_number
43
- if !ENV.fetch("CI_PULL_REQUESTS", "").empty?
44
- ENV.fetch("CI_PULL_REQUESTS").match(/(\d+)/)[0]
43
+ if !ENV.fetch("CI_PULL_REQUEST", "").empty?
44
+ ENV.fetch("CI_PULL_REQUEST").split("/").last
45
45
  else
46
- raise CommenterError.new("Failed to comment: missing CI_PULL_REQUESTS.")
46
+ raise CommenterError.new(
47
+ "Failed to comment: CI_PULL_REQUEST is missing."
48
+ )
47
49
  end
48
50
  end
49
51
 
@@ -52,12 +54,12 @@ module Accesslint
52
54
  end
53
55
 
54
56
  def github_user
55
- ENV.fetch("CIRCLE_PROJECT_USERNAME")
57
+ ENV.fetch("ACCESSLINT_GITHUB_USER")
56
58
  end
57
59
 
58
60
  def project_path
59
61
  [
60
- github_user,
62
+ ENV.fetch("CIRCLE_PROJECT_USERNAME"),
61
63
  ENV.fetch("CIRCLE_PROJECT_REPONAME"),
62
64
  ].join("/")
63
65
  end
@@ -1,5 +1,5 @@
1
1
  module Accesslint
2
2
  module Ci
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
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.4
4
+ version: 0.2.5
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-09 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler