look_out 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: ac1e77af80f13271809ab4951a7c9646b9645c3c410cb25a0d942f21b2756fa6
4
- data.tar.gz: 362d2c197826632e0d6543a94f5dd37855765e5270cc390de683cc3452ca4399
3
+ metadata.gz: 5d5e0aeae1fa523953e835c9ecb3d054c7bdef51da0cf9464f118f13954674a4
4
+ data.tar.gz: 29a4f225e094daaffc931e6f6873484666a38224cf6b00f746af4e9e43200be5
5
5
  SHA512:
6
- metadata.gz: 1b42e1d13e94e85ac1976055a214890df49a35b2859900cfb8c48b42d67f16bc0fcac53f668793a5933c000edf0db1719351690520cc8179c7c4d61fef7ef595
7
- data.tar.gz: c31831731e6cbba6caa1ffe0fa6b4ea3d87807a1a36157c65d69e1658b59f17d1e18da010ff7e2eb471f13b0dfe93b6199caed57d4c04e16c2b13c964d156e38
6
+ metadata.gz: 39fd7d6c0189e881e1f35cd43db11de6ba0e20d335e66cdba41575f72cc24194c6f99f971f57f01b4e17b64c34262afdb52fa159e890e2cca49e2e625ff9b9d0
7
+ data.tar.gz: 92d8f4a0f83eb0d8bf9c5f976a98b1182c8784b45f0fe346ef5b974c9de4b2c8de89a2e9c8c025eef92f970dce1d541086252b3c890bb9a1484f20faeaf078f8
data/History.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ 0.1.3 / 2019-01-13
3
+ ==================
4
+
5
+ * Use a special env var for commit if set
6
+
2
7
  0.1.2 / 2019-01-13
3
8
  ==================
4
9
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Add this line to your application's Gemfile:
9
9
  ```ruby
10
10
 
11
11
  group :development, :test do
12
- gem 'look-out'
12
+ gem 'look-out', require: false
13
13
  end
14
14
 
15
15
  ```
@@ -17,9 +17,9 @@ end
17
17
  And then initialize:
18
18
 
19
19
  ```ruby
20
+ # spec/spec_helper.rb
20
21
 
21
- # In rails this would be config/initializers/look_out.rb
22
-
22
+ require 'look_out'
23
23
  LookOut.configure do |config|
24
24
  config.api_key = '123'
25
25
  config.user = `git config user.name`.chomp
@@ -34,12 +34,44 @@ Add to your `.rspec`
34
34
  --require 'look_out/rspec/look_out_formatter'
35
35
  --format LookOut::RSpec::LookOutFormatter
36
36
 
37
+ # Make sure you have a formatter after this one in your .rspec or there will
38
+ # be no output from your spec suite. For example:
39
+
40
+ --format doc
41
+
42
+ # or
43
+
44
+ --format progress
45
+
46
+ ```
47
+
48
+ #### VCR
49
+
50
+ If you're using VCR it may raise an exception for an unexpected HTTP request. If
51
+ so you can ignore it with:
52
+
37
53
  ```
38
54
 
55
+ VCR.configure do |config|
56
+ ...
57
+ config.ignore_hosts 'api.sea-aye.com'
58
+ ...
59
+ end
60
+
61
+ ```
62
+
63
+
39
64
  ## Usage
40
65
 
41
66
  Run specs just like normal!
42
67
 
68
+ If you're running your specs against merged code you can force reporting for the
69
+ correct sha by setting a special environment variable.
70
+
71
+ ```
72
+ export GIT_COMMIT_SHA='the-real-sha-aavvcc'
73
+ ```
74
+
43
75
  ## Contributing
44
76
 
45
77
  Bug reports and pull requests are welcome!
@@ -15,13 +15,17 @@ module LookOut
15
15
  user: LookOut.config.user,
16
16
  data: output_hash,
17
17
  repo: LookOut.config.repo,
18
- sha: `git log -1 --format=%H`.chomp,
18
+ sha: sha,
19
19
  env: env
20
20
  )
21
21
  end
22
22
 
23
23
  private
24
24
 
25
+ def sha
26
+ ENV['GIT_COMMIT_SHA'] || `git log -1 --format=%H`.chomp
27
+ end
28
+
25
29
  def env
26
30
  if ENV['JENKINS'] || ENV['CI']
27
31
  :integration
@@ -1,3 +1,3 @@
1
1
  module LookOut
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: look_out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Hood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-13 00:00:00.000000000 Z
11
+ date: 2019-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty