lois 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: 3f79eb9eda935317987cf10f4f2764f8b49ad64aa1ed8dc737b024b84bb14c25
4
- data.tar.gz: 479ee22c745b518135891079fd6e9f175c2acc88c010219ffd9da0fecc4c62ef
3
+ metadata.gz: 26a511a29de650f2b7f4f1702ebb97b87d33eb6a63eaa4ba1795e484620cc256
4
+ data.tar.gz: e77ebe025688dfba3691057db51b78946528339a178978577e614a57e9618c8c
5
5
  SHA512:
6
- metadata.gz: b7682b40b34dcf740b763f21b0d6a924a5e84818b6c5d4656c552ebab50603396efccb050aabd69a114d36811df5fb1517fcaa14e0838eff4c2fcd75614bb1e9
7
- data.tar.gz: 54ba375143873a35fcd203ccb16f54a06a9ec5748494b2ae9a586fb843cbd659ef9b11855627c1ad4ead9e05ee1e2cac6845f5f844b8871b45ecc597813d7d2a
6
+ metadata.gz: 1e4942eee17b46dc8f75966ad122e65539f1a33e17b8a8fc5bec684449fd14ba640f3802746ff0ea988afedf29f25aad01dc3f44bed047c9d79abbf2884efee9
7
+ data.tar.gz: 7ccbc69cf43d037c894288f0cbcf70c013db43dda4cfa893a8adaba3bd926658ff5de3fe1e9905b98c8c27dedf25f14cc78a7035cf54cc575289391a196df47a
data/README.md CHANGED
@@ -39,7 +39,7 @@ PR status updates.
39
39
  See [https://developer.github.com/v3/auth/#basic-authentication](https://developer.github.com/v3/auth/#basic-authentication).
40
40
  We recommend using oauth tokens and not your password.
41
41
 
42
- Currently we only support reporting through [CircleCI](https://circleci.com/), but PRs for additional continuous integration systems are welcome.
42
+ Currently we support reporting through [CircleCI](https://circleci.com/) and [Travis](https://travis-ci.org), but PRs for additional continuous integration systems are welcome.
43
43
 
44
44
  Lois will output all the results of the checks to a `lois` directory. You can add this to your artifact path to view the html representation of the results later.
45
45
 
@@ -49,19 +49,19 @@ A sample `.circleci/config.yml` would look like:
49
49
  ```
50
50
  - run:
51
51
  name: Bundler-Audit
52
- command: bundle exec lois bundler-audit -g $GITHUB_CREDENTIALS
52
+ command: bundle exec lois bundler-audit -c circleci -g $GITHUB_CREDENTIALS
53
53
 
54
54
  - run:
55
55
  name: Brakeman
56
- command: bundle exec lois brakeman -g $GITHUB_CREDENTIALS
56
+ command: bundle exec lois brakeman -c circleci -g $GITHUB_CREDENTIALS
57
57
 
58
58
  - run:
59
59
  name: Rubocop
60
- command: bundle exec lois rubocop -g $GITHUB_CREDENTIALS
60
+ command: bundle exec lois rubocop -c circleci -g $GITHUB_CREDENTIALS
61
61
 
62
62
  - run:
63
63
  name: Reek
64
- command: bundle exec lois reek -g $GITHUB_CREDENTIALS
64
+ command: bundle exec lois reek -c circleci -g $GITHUB_CREDENTIALS
65
65
 
66
66
  - store_artifacts:
67
67
  path: lois
@@ -73,14 +73,23 @@ A sample `circle.yml` would look like:
73
73
  ```
74
74
  test:
75
75
  pre:
76
- - bundle exec lois bundler-audit -g $GITHUB_CREDENTIALS
77
- - bundle exec lois brakeman -g $GITHUB_CREDENTIALS
78
- - bundle exec lois rubocop -g $GITHUB_CREDENTIALS
79
- - bundle exec lois reek -g $GITHUB_CREDENTIALS
76
+ - bundle exec lois bundler-audit -c circleci -g $GITHUB_CREDENTIALS
77
+ - bundle exec lois brakeman -c circleci -g $GITHUB_CREDENTIALS
78
+ - bundle exec lois rubocop -c circleci -g $GITHUB_CREDENTIALS
79
+ - bundle exec lois reek -c circleci -g $GITHUB_CREDENTIALS
80
80
  post:
81
81
  - cp -r lois $CIRCLE_ARTIFACTS/
82
82
  ```
83
83
 
84
+ ##### Travis
85
+ A sample `.travis.yml` would look like:
86
+ ```
87
+ script:
88
+ - bin/lois bundler-audit -c travis -g $GITHUB_CREDENTIALS
89
+ - bin/lois rubocop -c travis -g $GITHUB_CREDENTIALS
90
+ - bin/lois reek -c travis -g $GITHUB_CREDENTIALS
91
+ ```
92
+
84
93
  ### SimpleCov
85
94
 
86
95
  To get SimpleCov output you must have an `at_exit` hook. A sample SimpleCov setup looks like:
@@ -10,7 +10,8 @@ module Lois
10
10
  end
11
11
 
12
12
  def commit_sha
13
- ENV.fetch('TRAVIS_COMMIT')
13
+ sha = ENV.fetch['TRAVIS_PULL_REQUEST_SHA']
14
+ sha.length == 0 ? ENV.fetch('TRAVIS_COMMIT') : sha
14
15
  end
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module Lois
2
- VERSION = '0.1.4'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lois
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hansen