pager_judy 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pager_judy/cli/main_command.rb +0 -17
- data/lib/pager_judy/version.rb +1 -1
- metadata +184 -20
- data/.buildkite/pipeline.yml +0 -17
- data/.buildkite/upload-pipeline +0 -3
- data/.dockerignore +0 -3
- data/.gitignore +0 -53
- data/.rspec +0 -2
- data/.rubocop.yml +0 -49
- data/Dockerfile +0 -22
- data/Gemfile +0 -20
- data/Gemfile.lock +0 -109
- data/Rakefile +0 -9
- data/auto/build +0 -7
- data/auto/dev-environment +0 -11
- data/auto/test +0 -3
- data/docker-compose.yml +0 -16
- data/lib/pager_judy/sync/config.rb +0 -69
- data/lib/pager_judy/sync/syncer.rb +0 -23
- data/lib/pager_judy/sync.rb +0 -12
- data/pager_judy.gemspec +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b648199a7a825271e111d4648bfaac509d2cfadf48f407bbc1ec1f9881d79b9d
|
4
|
+
data.tar.gz: 471f4ed13b11cd30304cb5dc5cfb8953574bb926b64ad0c6e5e5f57aef8feb62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7aa402999e338dbdb8b6e4810f957d6a1bdbc30a97de4f691687bb7c7092b43831b1fa0beaa2ecfb98d3bfe9fc85f556613dfad0d51ce450218daed4b2bd8b7
|
7
|
+
data.tar.gz: 1400529af5831bc3c97ad015b7504ca1157f15d6cfba64268e1e63887748bc19a515bfdd13a6d9d813cc2a55ef498777f897ae094520698e538012b64b09a5fb
|
@@ -4,7 +4,6 @@ require "pager_judy/api/client"
|
|
4
4
|
require "pager_judy/cli/collection_behaviour"
|
5
5
|
require "pager_judy/cli/item_behaviour"
|
6
6
|
require "pager_judy/cli/time_filtering"
|
7
|
-
require "pager_judy/sync"
|
8
7
|
require "pager_judy/version"
|
9
8
|
|
10
9
|
module PagerJudy
|
@@ -280,27 +279,11 @@ module PagerJudy
|
|
280
279
|
|
281
280
|
end
|
282
281
|
|
283
|
-
subcommand "configure", "Apply config" do
|
284
|
-
|
285
|
-
option "--check", :flag, "just validate the config"
|
286
|
-
|
287
|
-
parameter "SOURCE", "config file"
|
288
|
-
|
289
|
-
def execute
|
290
|
-
config = PagerJudy::Sync::Config.from(source)
|
291
|
-
return if check?
|
292
|
-
PagerJudy::Sync.sync(client: client, config: config)
|
293
|
-
end
|
294
|
-
|
295
|
-
end
|
296
|
-
|
297
282
|
def run(*args)
|
298
283
|
super(*args)
|
299
284
|
rescue PagerJudy::API::HttpError => e
|
300
285
|
$stderr.puts e.response.body
|
301
286
|
signal_error e.message
|
302
|
-
rescue ConfigMapper::MappingError => e
|
303
|
-
signal_error e.message
|
304
287
|
end
|
305
288
|
|
306
289
|
private
|
data/lib/pager_judy/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pager_judy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: clamp
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: console_logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: httpi
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jmespath
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: multi_json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
13
83
|
- !ruby/object:Gem::Dependency
|
14
84
|
name: bundler
|
15
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -24,6 +94,118 @@ dependencies:
|
|
24
94
|
- - "~>"
|
25
95
|
- !ruby/object:Gem::Version
|
26
96
|
version: '1.16'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rack-test
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '12.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '12.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec-pact-matchers
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.1'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.5'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.5'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0.49'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0.49'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: sham_rack
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: sinatra
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
27
209
|
description:
|
28
210
|
email:
|
29
211
|
- mdub@dogbiscuit.org
|
@@ -32,22 +214,8 @@ executables:
|
|
32
214
|
extensions: []
|
33
215
|
extra_rdoc_files: []
|
34
216
|
files:
|
35
|
-
- ".buildkite/pipeline.yml"
|
36
|
-
- ".buildkite/upload-pipeline"
|
37
|
-
- ".dockerignore"
|
38
|
-
- ".gitignore"
|
39
|
-
- ".rspec"
|
40
|
-
- ".rubocop.yml"
|
41
217
|
- CHANGES.md
|
42
|
-
- Dockerfile
|
43
|
-
- Gemfile
|
44
|
-
- Gemfile.lock
|
45
218
|
- README.md
|
46
|
-
- Rakefile
|
47
|
-
- auto/build
|
48
|
-
- auto/dev-environment
|
49
|
-
- auto/test
|
50
|
-
- docker-compose.yml
|
51
219
|
- exe/pagerjudy
|
52
220
|
- lib/pager_judy/api/client.rb
|
53
221
|
- lib/pager_judy/api/collection.rb
|
@@ -61,11 +229,7 @@ files:
|
|
61
229
|
- lib/pager_judy/cli/item_behaviour.rb
|
62
230
|
- lib/pager_judy/cli/main_command.rb
|
63
231
|
- lib/pager_judy/cli/time_filtering.rb
|
64
|
-
- lib/pager_judy/sync.rb
|
65
|
-
- lib/pager_judy/sync/config.rb
|
66
|
-
- lib/pager_judy/sync/syncer.rb
|
67
232
|
- lib/pager_judy/version.rb
|
68
|
-
- pager_judy.gemspec
|
69
233
|
homepage: https://github.com/mdub/pager_judy
|
70
234
|
licenses:
|
71
235
|
- MIT
|
data/.buildkite/pipeline.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
steps:
|
2
|
-
|
3
|
-
- name: Test
|
4
|
-
command: ./auto/test
|
5
|
-
|
6
|
-
- name: Build
|
7
|
-
command: ./auto/build
|
8
|
-
|
9
|
-
- block: OK release
|
10
|
-
branches: master
|
11
|
-
|
12
|
-
- name: Release
|
13
|
-
command: ./auto/release
|
14
|
-
branches: master
|
15
|
-
artifact_paths: target/docker-image.txt
|
16
|
-
agents:
|
17
|
-
queue: cpdev:build
|
data/.buildkite/upload-pipeline
DELETED
data/.dockerignore
DELETED
data/.gitignore
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/spec/examples.txt
|
9
|
-
/test/tmp/
|
10
|
-
/test/version_tmp/
|
11
|
-
/tmp/
|
12
|
-
smoke-tests/tmp/
|
13
|
-
.DS_STORE
|
14
|
-
|
15
|
-
# Used by dotenv library to load environment variables.
|
16
|
-
# .env
|
17
|
-
|
18
|
-
## Specific to RubyMotion:
|
19
|
-
.dat*
|
20
|
-
.repl_history
|
21
|
-
build/
|
22
|
-
*.bridgesupport
|
23
|
-
build-iPhoneOS/
|
24
|
-
build-iPhoneSimulator/
|
25
|
-
|
26
|
-
## Specific to RubyMotion (use of CocoaPods):
|
27
|
-
#
|
28
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
29
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
30
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
31
|
-
#
|
32
|
-
# vendor/Pods/
|
33
|
-
|
34
|
-
## Documentation cache and generated files:
|
35
|
-
/.yardoc/
|
36
|
-
/_yardoc/
|
37
|
-
/doc/
|
38
|
-
/rdoc/
|
39
|
-
|
40
|
-
## Environment normalization:
|
41
|
-
/.bundle/
|
42
|
-
/vendor/bundle
|
43
|
-
/lib/bundler/man/
|
44
|
-
|
45
|
-
# for a library or gem, you might want to ignore these files since the code is
|
46
|
-
# intended to run in multiple environments; otherwise, check them in:
|
47
|
-
# Gemfile.lock
|
48
|
-
# .ruby-version
|
49
|
-
# .ruby-gemset
|
50
|
-
|
51
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
52
|
-
.rvmrc
|
53
|
-
test*
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
Eval:
|
2
|
-
Exclude:
|
3
|
-
- "Rakefile"
|
4
|
-
|
5
|
-
Layout/EmptyLinesAroundBlockBody:
|
6
|
-
Enabled: false
|
7
|
-
|
8
|
-
Layout/EmptyLinesAroundClassBody:
|
9
|
-
EnforcedStyle: empty_lines
|
10
|
-
|
11
|
-
Layout/EmptyLinesAroundModuleBody:
|
12
|
-
Enabled: false
|
13
|
-
|
14
|
-
Metrics/AbcSize:
|
15
|
-
Enabled: false
|
16
|
-
|
17
|
-
Metrics/LineLength:
|
18
|
-
Max: 120
|
19
|
-
|
20
|
-
Metrics/MethodLength:
|
21
|
-
Max: 30
|
22
|
-
|
23
|
-
Style/ClassAndModuleChildren:
|
24
|
-
EnforcedStyle: nested
|
25
|
-
Exclude:
|
26
|
-
- "spec/**/*"
|
27
|
-
|
28
|
-
Style/ConditionalAssignment:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Style/Documentation:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
Style/Encoding:
|
35
|
-
EnforcedStyle: when_needed
|
36
|
-
Enabled: true
|
37
|
-
|
38
|
-
Style/FileName:
|
39
|
-
Exclude:
|
40
|
-
- "bin/*"
|
41
|
-
|
42
|
-
Style/HashSyntax:
|
43
|
-
EnforcedStyle: ruby19
|
44
|
-
|
45
|
-
Style/StringLiterals:
|
46
|
-
EnforcedStyle: double_quotes
|
47
|
-
|
48
|
-
Style/WordArray:
|
49
|
-
Enabled: false
|
data/Dockerfile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
FROM ruby:2.5-alpine
|
2
|
-
|
3
|
-
RUN { echo 'install: --no-document'; echo 'update: --no-document'; } >> /etc/gemrc
|
4
|
-
|
5
|
-
MAINTAINER Mike Williams <mdub@dogbiscuit.org>
|
6
|
-
|
7
|
-
RUN apk --no-cache add \
|
8
|
-
ca-certificates
|
9
|
-
|
10
|
-
WORKDIR /app
|
11
|
-
|
12
|
-
COPY Gemfile /app/Gemfile
|
13
|
-
COPY Gemfile.lock /app/Gemfile.lock
|
14
|
-
RUN bundle install --without development test
|
15
|
-
|
16
|
-
COPY bin /app/bin
|
17
|
-
COPY lib /app/lib
|
18
|
-
COPY README.md /app/
|
19
|
-
|
20
|
-
WORKDIR /cwd
|
21
|
-
|
22
|
-
ENTRYPOINT ["/app/bin/pagerjudy"]
|
data/Gemfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "clamp", "~> 1.3.0"
|
4
|
-
gem "config_hound", "~> 1.4", ">= 1.4.1"
|
5
|
-
gem "config_mapper", "~> 1.6"
|
6
|
-
gem "console_logger", "~> 1.0"
|
7
|
-
gem "httpi"
|
8
|
-
gem "jmespath"
|
9
|
-
gem "multi_json"
|
10
|
-
|
11
|
-
group "development" do
|
12
|
-
gem "pry"
|
13
|
-
gem "rack-test"
|
14
|
-
gem "rake", "~> 12.0"
|
15
|
-
gem "rspec", "~> 3.5"
|
16
|
-
gem "rspec-pact-matchers", "~> 0.1"
|
17
|
-
gem "rubocop", "~> 0.49"
|
18
|
-
gem "sham_rack"
|
19
|
-
gem "sinatra"
|
20
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
ast (2.4.0)
|
5
|
-
awesome_print (1.8.0)
|
6
|
-
clamp (1.3.0)
|
7
|
-
coderay (1.1.2)
|
8
|
-
config_hound (1.4.3)
|
9
|
-
dig_rb
|
10
|
-
config_mapper (1.7.0)
|
11
|
-
console_logger (1.0.0)
|
12
|
-
diff-lcs (1.3)
|
13
|
-
dig_rb (1.0.1)
|
14
|
-
find_a_port (1.0.1)
|
15
|
-
httpi (2.4.4)
|
16
|
-
rack
|
17
|
-
socksify
|
18
|
-
jaro_winkler (1.5.1)
|
19
|
-
jmespath (1.4.0)
|
20
|
-
json (2.1.0)
|
21
|
-
method_source (0.9.2)
|
22
|
-
multi_json (1.13.1)
|
23
|
-
mustermann (1.0.3)
|
24
|
-
pact-support (1.8.1)
|
25
|
-
awesome_print (~> 1.1)
|
26
|
-
find_a_port (~> 1.0.1)
|
27
|
-
json
|
28
|
-
randexp (~> 0.1.7)
|
29
|
-
rspec (>= 2.14)
|
30
|
-
term-ansicolor (~> 1.0)
|
31
|
-
thor
|
32
|
-
parallel (1.12.1)
|
33
|
-
parser (2.5.3.0)
|
34
|
-
ast (~> 2.4.0)
|
35
|
-
powerpack (0.1.2)
|
36
|
-
pry (0.12.2)
|
37
|
-
coderay (~> 1.1.0)
|
38
|
-
method_source (~> 0.9.0)
|
39
|
-
rack (2.0.6)
|
40
|
-
rack-protection (2.0.5)
|
41
|
-
rack
|
42
|
-
rack-test (1.1.0)
|
43
|
-
rack (>= 1.0, < 3)
|
44
|
-
rainbow (3.0.0)
|
45
|
-
rake (12.3.2)
|
46
|
-
randexp (0.1.7)
|
47
|
-
rspec (3.8.0)
|
48
|
-
rspec-core (~> 3.8.0)
|
49
|
-
rspec-expectations (~> 3.8.0)
|
50
|
-
rspec-mocks (~> 3.8.0)
|
51
|
-
rspec-core (3.8.0)
|
52
|
-
rspec-support (~> 3.8.0)
|
53
|
-
rspec-expectations (3.8.2)
|
54
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
55
|
-
rspec-support (~> 3.8.0)
|
56
|
-
rspec-mocks (3.8.0)
|
57
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
58
|
-
rspec-support (~> 3.8.0)
|
59
|
-
rspec-pact-matchers (0.1.0)
|
60
|
-
pact-support (>= 1.1.2, < 2.0)
|
61
|
-
rspec (~> 3.0)
|
62
|
-
term-ansicolor (~> 1.0)
|
63
|
-
rspec-support (3.8.0)
|
64
|
-
rubocop (0.61.1)
|
65
|
-
jaro_winkler (~> 1.5.1)
|
66
|
-
parallel (~> 1.10)
|
67
|
-
parser (>= 2.5, != 2.5.1.1)
|
68
|
-
powerpack (~> 0.1)
|
69
|
-
rainbow (>= 2.2.2, < 4.0)
|
70
|
-
ruby-progressbar (~> 1.7)
|
71
|
-
unicode-display_width (~> 1.4.0)
|
72
|
-
ruby-progressbar (1.10.0)
|
73
|
-
sham_rack (1.4.1)
|
74
|
-
rack
|
75
|
-
sinatra (2.0.5)
|
76
|
-
mustermann (~> 1.0)
|
77
|
-
rack (~> 2.0)
|
78
|
-
rack-protection (= 2.0.5)
|
79
|
-
tilt (~> 2.0)
|
80
|
-
socksify (1.7.1)
|
81
|
-
term-ansicolor (1.7.0)
|
82
|
-
tins (~> 1.0)
|
83
|
-
thor (0.20.3)
|
84
|
-
tilt (2.0.9)
|
85
|
-
tins (1.20.2)
|
86
|
-
unicode-display_width (1.4.1)
|
87
|
-
|
88
|
-
PLATFORMS
|
89
|
-
ruby
|
90
|
-
|
91
|
-
DEPENDENCIES
|
92
|
-
clamp (~> 1.3.0)
|
93
|
-
config_hound (~> 1.4, >= 1.4.1)
|
94
|
-
config_mapper (~> 1.6)
|
95
|
-
console_logger (~> 1.0)
|
96
|
-
httpi
|
97
|
-
jmespath
|
98
|
-
multi_json
|
99
|
-
pry
|
100
|
-
rack-test
|
101
|
-
rake (~> 12.0)
|
102
|
-
rspec (~> 3.5)
|
103
|
-
rspec-pact-matchers (~> 0.1)
|
104
|
-
rubocop (~> 0.49)
|
105
|
-
sham_rack
|
106
|
-
sinatra
|
107
|
-
|
108
|
-
BUNDLED WITH
|
109
|
-
1.16.2
|
data/Rakefile
DELETED
data/auto/build
DELETED
data/auto/dev-environment
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#! /bin/bash -e
|
2
|
-
#
|
3
|
-
# Dev environment in a Docker container for local and CI use
|
4
|
-
|
5
|
-
cd $(dirname $0)/..
|
6
|
-
|
7
|
-
trap "docker-compose down --volumes" 0
|
8
|
-
|
9
|
-
docker volume create --name ruby2.4-bundle-cache > /dev/null
|
10
|
-
docker-compose run --rm dev sh -c 'bundle check > /dev/null || bundle install'
|
11
|
-
docker-compose run --rm dev bundle exec "${@-bash}"
|
data/auto/test
DELETED
data/docker-compose.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
version: "2"
|
2
|
-
|
3
|
-
services:
|
4
|
-
dev:
|
5
|
-
image: ruby:2.4
|
6
|
-
volumes:
|
7
|
-
- .:/work
|
8
|
-
- ruby2.4-bundle-cache:/usr/local/bundle
|
9
|
-
working_dir: /work
|
10
|
-
command: ["bash"]
|
11
|
-
environment:
|
12
|
-
PAGER_DUTY_API_KEY:
|
13
|
-
|
14
|
-
volumes:
|
15
|
-
ruby2.4-bundle-cache:
|
16
|
-
external: true
|
@@ -1,69 +0,0 @@
|
|
1
|
-
require "config_hound"
|
2
|
-
require "config_mapper"
|
3
|
-
require "config_mapper/config_struct"
|
4
|
-
|
5
|
-
module PagerJudy
|
6
|
-
module Sync
|
7
|
-
|
8
|
-
# load and validate our configuration
|
9
|
-
class Config < ConfigMapper::ConfigStruct
|
10
|
-
|
11
|
-
class << self
|
12
|
-
|
13
|
-
# Load configuration.
|
14
|
-
#
|
15
|
-
# Multiple "sources" can be specified. First one wins.
|
16
|
-
# Sources may be a file-name, a URI, or a raw Ruby Hash.
|
17
|
-
#
|
18
|
-
def from(*config_sources)
|
19
|
-
config_data = data_from(*config_sources)
|
20
|
-
config_data.delete("var")
|
21
|
-
from_data(config_data)
|
22
|
-
end
|
23
|
-
|
24
|
-
# Load configuration data.
|
25
|
-
#
|
26
|
-
# Includes are processed; defaults are included, references are expanded.
|
27
|
-
#
|
28
|
-
def data_from(*sources)
|
29
|
-
ConfigHound.load(sources, expand_refs: true, include_key: "include")
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
component_dict :escalation_policies do
|
35
|
-
|
36
|
-
attribute :description
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
component_dict :services do
|
41
|
-
|
42
|
-
attribute :description
|
43
|
-
|
44
|
-
attribute :acknowledgement_timeout, default: 1800
|
45
|
-
|
46
|
-
attribute :auto_resolve_timeout, default: 14400
|
47
|
-
|
48
|
-
component :escalation_policy do
|
49
|
-
|
50
|
-
attribute :id
|
51
|
-
|
52
|
-
def to_h
|
53
|
-
super.merge("type" => "escalation_policy_reference")
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
57
|
-
|
58
|
-
component_dict :integrations do
|
59
|
-
|
60
|
-
attribute :type
|
61
|
-
|
62
|
-
end
|
63
|
-
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module PagerJudy
|
2
|
-
module Sync
|
3
|
-
|
4
|
-
class Syncer
|
5
|
-
|
6
|
-
def initialize(client:, config:)
|
7
|
-
@client = client
|
8
|
-
@config = config
|
9
|
-
end
|
10
|
-
|
11
|
-
attr_reader :client
|
12
|
-
attr_reader :config
|
13
|
-
|
14
|
-
def sync
|
15
|
-
config.services.each do |name, detail|
|
16
|
-
client.services.create_or_update_by_name(name, detail.to_h)
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
data/lib/pager_judy/sync.rb
DELETED
data/pager_judy.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require "pager_judy/version"
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "pager_judy"
|
8
|
-
spec.version = PagerJudy::VERSION
|
9
|
-
spec.authors = ["Mike Williams"]
|
10
|
-
spec.email = ["mdub@dogbiscuit.org"]
|
11
|
-
|
12
|
-
spec.summary = %q{a Ruby client and CLI for PagerDuty}
|
13
|
-
spec.homepage = "https://github.com/mdub/pager_judy"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
# Specify which files should be added to the gem when it is released.
|
17
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
end
|
21
|
-
spec.bindir = "exe"
|
22
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = ["lib"]
|
24
|
-
|
25
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
26
|
-
end
|