look_out 0.1.0
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 +7 -0
- data/.env.sample +1 -0
- data/.gitignore +15 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +13 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/look_out/cast.rb +10 -0
- data/lib/look_out/client.rb +12 -0
- data/lib/look_out/rspec/look_out_formatter.rb +23 -0
- data/lib/look_out/version.rb +3 -0
- data/lib/look_out.rb +23 -0
- data/lib/utils/compact.rb +7 -0
- data/look_out.gemspec +33 -0
- metadata +216 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 547556844e16539ebb481fcf776c64189e9bbeff45256f80a442db05537c7093
|
4
|
+
data.tar.gz: d528ad2344493dcf1cc03223102fcec1f7f5fe48efaf9987a9e097929ba1e6b1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fdeb33ff4798ac72b99461accf4246e8d124cd782aa170fa6ad00d2e458f9cc1ebbed47addc80f3c4f981c8ad10f2f7321baa7ddf6b1d1b658a4435901b96f03
|
7
|
+
data.tar.gz: 5ef6894de43e6f347183a6703a9e2826af80dced93b7a9723a969a50f506eb387abfe9be0882580ec3c77d0ca8f1ad4e5cb880ce2083ed3eee54464471d220ea
|
data/.env.sample
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
API_KEY='first-mate-api-key'
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.1
|
data/.travis.yml
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.4
|
4
|
+
- 2.5
|
5
|
+
- 2.3
|
6
|
+
|
7
|
+
before_script:
|
8
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
9
|
+
- chmod +x ./cc-test-reporter
|
10
|
+
- ./cc-test-reporter before-build
|
11
|
+
|
12
|
+
after_script:
|
13
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 sea-aye
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Look Out
|
2
|
+
|
3
|
+
In charge of the observation of the code for hazards.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
|
11
|
+
gem 'look-out'
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
And then initialize:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
|
19
|
+
LookOut.configure do |config|
|
20
|
+
config.api_key = '123'
|
21
|
+
config.env = Rails.env
|
22
|
+
config.repo = 'sea-aye/pirate'
|
23
|
+
config.user = `git config user.name`.chomp
|
24
|
+
end
|
25
|
+
|
26
|
+
```
|
27
|
+
|
28
|
+
Add to your 'spec_helper.rb`
|
29
|
+
|
30
|
+
```
|
31
|
+
|
32
|
+
require 'look_out/rspec/look_out_formatter'
|
33
|
+
|
34
|
+
```
|
35
|
+
|
36
|
+
Add to your `.rspec`
|
37
|
+
|
38
|
+
```
|
39
|
+
|
40
|
+
--format LookOut::RSpec::LookOutFormatter
|
41
|
+
|
42
|
+
```
|
43
|
+
|
44
|
+
## Usage
|
45
|
+
|
46
|
+
Run specs just like normal!
|
47
|
+
|
48
|
+
## Contributing
|
49
|
+
|
50
|
+
Bug reports and pull requests are welcome!
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'dotenv/load'
|
5
|
+
require 'look_out'
|
6
|
+
|
7
|
+
LookOut.configure do |config|
|
8
|
+
config.api_key = ENV['API_KEY']
|
9
|
+
config.env = :development
|
10
|
+
config.repo = 'sea-aye/look-out'
|
11
|
+
config.user = `git config user.name`
|
12
|
+
end
|
13
|
+
|
14
|
+
require 'pry'
|
15
|
+
Pry.start
|
data/bin/setup
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
module LookOut
|
2
|
+
# Encapsulates the configuration of each client before JIT before requests
|
3
|
+
# are made. This allows us to use our configuration which won't have been
|
4
|
+
# available until runtime, not load time.
|
5
|
+
module Client
|
6
|
+
def client
|
7
|
+
base_uri 'https://api.sea-aye.com/v1'
|
8
|
+
headers('Content-Type' => 'application/json')
|
9
|
+
self
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module LookOut
|
2
|
+
module RSpec
|
3
|
+
class LookOutFormatter < ::RSpec::Core::Formatters::JsonFormatter
|
4
|
+
::RSpec::Core::Formatters.register self, :close
|
5
|
+
|
6
|
+
def close(_notification)
|
7
|
+
output_hash[:examples].each do |example|
|
8
|
+
%i(description full_description line_number pending_message file_path).each do |key|
|
9
|
+
example.delete(key)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
LookOut::Cast.create(
|
14
|
+
user: LookOut.config.user,
|
15
|
+
data: output_hash,
|
16
|
+
repo: LookOut.config.repo,
|
17
|
+
sha: `git log -1 --format=%H`.chomp,
|
18
|
+
env: LookOut.config.env
|
19
|
+
)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/look_out.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'hashie'
|
2
|
+
require 'httparty'
|
3
|
+
require 'utils/compact'
|
4
|
+
|
5
|
+
require 'look_out/version'
|
6
|
+
require 'look_out/client'
|
7
|
+
|
8
|
+
require 'look_out/cast'
|
9
|
+
|
10
|
+
module LookOut
|
11
|
+
class << self
|
12
|
+
attr_accessor :config
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.configure
|
16
|
+
self.config ||= Configuration.new
|
17
|
+
yield(config)
|
18
|
+
end
|
19
|
+
|
20
|
+
class Configuration
|
21
|
+
attr_accessor :api_key, :env, :repo, :user
|
22
|
+
end
|
23
|
+
end
|
data/look_out.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'look_out/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'look_out'
|
7
|
+
spec.version = LookOut::VERSION
|
8
|
+
spec.authors = ['Andrew Hood']
|
9
|
+
spec.email = ['andrewhood125@gmail.com']
|
10
|
+
|
11
|
+
spec.summary = 'In charge of the observation of the code for hazards.'
|
12
|
+
spec.description = 'In charge of the observation of the code for hazards.'
|
13
|
+
spec.homepage = 'https://github.com/sea-aye/look-out'
|
14
|
+
|
15
|
+
spec.license = 'MIT'
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'httparty', '~> 0.16'
|
22
|
+
spec.add_dependency 'hashie', '~> 3.5'
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
25
|
+
spec.add_development_dependency 'dotenv', '~> 2.4'
|
26
|
+
spec.add_development_dependency 'pry', '~> 0.11'
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.59'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.16'
|
31
|
+
spec.add_development_dependency 'vcr', '~> 4.0'
|
32
|
+
spec.add_development_dependency 'webmock', '~> 3.4.0'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,216 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: look_out
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Hood
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-12-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.16'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.5'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.15'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.15'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dotenv
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.4'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.11'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.11'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '12.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '12.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.59'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.59'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.16'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.16'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: vcr
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '4.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '4.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 3.4.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 3.4.0
|
167
|
+
description: In charge of the observation of the code for hazards.
|
168
|
+
email:
|
169
|
+
- andrewhood125@gmail.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".env.sample"
|
175
|
+
- ".gitignore"
|
176
|
+
- ".rspec"
|
177
|
+
- ".ruby-version"
|
178
|
+
- ".travis.yml"
|
179
|
+
- Gemfile
|
180
|
+
- LICENSE
|
181
|
+
- README.md
|
182
|
+
- Rakefile
|
183
|
+
- bin/console
|
184
|
+
- bin/setup
|
185
|
+
- lib/look_out.rb
|
186
|
+
- lib/look_out/cast.rb
|
187
|
+
- lib/look_out/client.rb
|
188
|
+
- lib/look_out/rspec/look_out_formatter.rb
|
189
|
+
- lib/look_out/version.rb
|
190
|
+
- lib/utils/compact.rb
|
191
|
+
- look_out.gemspec
|
192
|
+
homepage: https://github.com/sea-aye/look-out
|
193
|
+
licenses:
|
194
|
+
- MIT
|
195
|
+
metadata: {}
|
196
|
+
post_install_message:
|
197
|
+
rdoc_options: []
|
198
|
+
require_paths:
|
199
|
+
- lib
|
200
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
201
|
+
requirements:
|
202
|
+
- - ">="
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
version: '0'
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
requirements: []
|
211
|
+
rubyforge_project:
|
212
|
+
rubygems_version: 2.7.6
|
213
|
+
signing_key:
|
214
|
+
specification_version: 4
|
215
|
+
summary: In charge of the observation of the code for hazards.
|
216
|
+
test_files: []
|