spage 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +25 -0
- data/.github/workflows/reusable-test.yml +23 -0
- data/.github/workflows/test.yml +13 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +32 -0
- data/README.md +9 -8
- data/Rakefile +10 -3
- data/lib/spage/api/component.rb +73 -0
- data/lib/spage/api/incident.rb +32 -4
- data/lib/spage/client.rb +12 -8
- data/lib/spage/resources/component.rb +42 -0
- data/lib/spage/serializers/component.rb +57 -0
- data/lib/spage/serializers/incident.rb +2 -1
- data/lib/spage/version.rb +1 -1
- data/lib/spage.rb +3 -0
- data/spage.gemspec +23 -23
- metadata +28 -9
- data/.travis.yml +0 -6
- data/Gemfile.lock +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5421a83cd6c6b4c844246c6b8c6bf02508bbef9c076bcf01cd1f7cfd84ca5c22
|
4
|
+
data.tar.gz: 90e6b9d8a6c2edad29db9629448b591a5c29557745edaece8ccc974992783fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 828fe255b3d0296cf3d1a2e9e6aaeff4fa197c853dc01dc220898c3fb0985a2bcc3e0fa1a637acc705621a3df3ef02fef6baf6412c93eb3416f2f8bc6afa4f7b
|
7
|
+
data.tar.gz: 12ea7d1c3e3c65b8eaad820fbc003bb812af4db3d566d25f4918a7d2a4ccfd85455e882f66ecd49ad68de415b7da4e3e7fa2ad5e21c9e79820b78b721b3f9f6a
|
@@ -0,0 +1,25 @@
|
|
1
|
+
name: Publish Ruby Gem
|
2
|
+
|
3
|
+
# Publish the gem to RubyGems when the git tag is pushed
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
tags: 'v*'
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
uses: ./.github/workflows/reusable-test.yml
|
10
|
+
publish:
|
11
|
+
name: Publish to RubyGems
|
12
|
+
needs: test
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- run: |
|
17
|
+
mkdir -p $HOME/.gem
|
18
|
+
touch $HOME/.gem/credentials
|
19
|
+
chmod 0600 $HOME/.gem/credentials
|
20
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
21
|
+
echo "Running Successfully"
|
22
|
+
gem build *.gemspec
|
23
|
+
gem push *.gem
|
24
|
+
env:
|
25
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Reusable Test Workflow
|
2
|
+
|
3
|
+
# This workflow runs when the branch is pushed/merged to master
|
4
|
+
# and when a PR is opened against master
|
5
|
+
on:
|
6
|
+
workflow_call:
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
name: Test
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
strategy:
|
12
|
+
matrix:
|
13
|
+
ruby: [2.6, 2.7, 3.0, 3.1, 3.2]
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
- name: Set up Ruby
|
17
|
+
uses: ruby/setup-ruby@v1
|
18
|
+
with:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
20
|
+
- run: bundle install
|
21
|
+
name: Bundle
|
22
|
+
- run: bundle exec rspec
|
23
|
+
name: RSpec
|
@@ -0,0 +1,13 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
# This workflow runs when the branch is pushed/merged to master
|
4
|
+
# and when a PR is opened against master
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
branches: [ master ]
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test:
|
13
|
+
uses: './.github/workflows/reusable-test.yml'
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [Unreleased](https://github.com/nulty/spage/tree/HEAD)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/nulty/spage/compare/v0.2.0...v0.3.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Add gem publish workflow for GitHub Actions [\#6](https://github.com/nulty/spage/pull/6) ([nulty](https://github.com/nulty))
|
10
|
+
- Build against latest rubies [\#5](https://github.com/nulty/spage/pull/5) ([nulty](https://github.com/nulty))
|
11
|
+
- Add pagination to Incident and Component clients [\#4](https://github.com/nulty/spage/pull/4) ([nulty](https://github.com/nulty))
|
12
|
+
- Change ruby binary workflow [\#3](https://github.com/nulty/spage/pull/3) ([nulty](https://github.com/nulty))
|
13
|
+
|
14
|
+
## [v0.2.0](https://github.com/nulty/spage/tree/v0.2.0) (2020-11-02)
|
15
|
+
|
16
|
+
[Full Changelog](https://github.com/nulty/spage/compare/v0.1.0...v0.2.0)
|
17
|
+
|
18
|
+
## [v0.1.0](https://github.com/nulty/spage/tree/v0.1.0) (2020-10-20)
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/nulty/spage/compare/0.0.1...v0.1.0)
|
21
|
+
|
22
|
+
**Merged pull requests:**
|
23
|
+
|
24
|
+
- Rename project to Spage [\#1](https://github.com/nulty/spage/pull/1) ([nulty](https://github.com/nulty))
|
25
|
+
|
26
|
+
## [0.0.1](https://github.com/nulty/spage/tree/0.0.1) (2020-10-20)
|
27
|
+
|
28
|
+
[Full Changelog](https://github.com/nulty/spage/compare/a0bab1b42c6762ceaaa448a100763ca57d5f3449...0.0.1)
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Spage
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/spage.svg)](https://badge.fury.io/rb/spage)
|
4
4
|
|
5
|
-
|
5
|
+
Spage is a Ruby client for integrating Statuspage.io into your ruby app. The idea is for it to be more than just a set of http requests to the server. It tries to model the data on the server for you so you don't have to.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -38,12 +38,11 @@ Spage.configure do |config|
|
|
38
38
|
end
|
39
39
|
```
|
40
40
|
|
41
|
-
|
42
41
|
### Client
|
43
42
|
|
44
|
-
`Spage::Api::Page.all` returns all the pages for your account
|
45
|
-
`Spage::Api::Page.find(id)` returns a single page
|
46
|
-
`Spage::Api::Page.update(id, page)` updates the page
|
43
|
+
`Spage::Api::Page.new.all` returns all the pages for your account \
|
44
|
+
`Spage::Api::Page.new.find(id)` returns a single page \
|
45
|
+
`Spage::Api::Page.new.update(id, page)` updates the page
|
47
46
|
|
48
47
|
|
49
48
|
## Development
|
@@ -58,14 +57,16 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/nulty/
|
|
58
57
|
|
59
58
|
### Testing
|
60
59
|
|
61
|
-
The test suite should run normally. If the recorded API requests need to be updated, set an environment variable for the API key
|
60
|
+
The test suite should run normally. If the recorded API requests need to be updated, set an environment variable for the API key and pass the `record: :all` to the use_cassette function you want to re-record.
|
62
61
|
|
63
|
-
`STATUSPAGE_API_KEY=your-api-key bundle exec rspec`
|
62
|
+
`VCR=1 STATUSPAGE_API_KEY=your-api-key bundle exec rspec`
|
64
63
|
|
65
64
|
## Roadmap
|
66
65
|
|
67
66
|
- Add a logger with null logging
|
68
67
|
- Add url_encoded body option to configuration
|
68
|
+
- Validations on the resources
|
69
|
+
- Respect HTTP caching like [`faraday/http_cache`](https://github.com/sourcelevel/faraday-http-cache)
|
69
70
|
|
70
71
|
## License
|
71
72
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'github_changelog_generator/task'
|
3
4
|
|
4
5
|
RSpec::Core::RakeTask.new(:spec)
|
5
6
|
|
6
|
-
task :
|
7
|
+
task default: :spec
|
8
|
+
|
9
|
+
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
|
10
|
+
config.user = 'nulty'
|
11
|
+
config.project = 'spage'
|
12
|
+
config.exclude_labels = %w[duplicate question invalid wontfix weekly-digest]
|
13
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spage
|
4
|
+
# Api Module
|
5
|
+
#
|
6
|
+
module Api
|
7
|
+
# Component resources in the statuspage.io API
|
8
|
+
#
|
9
|
+
class Component
|
10
|
+
include Api
|
11
|
+
|
12
|
+
def all(page_id:, per_page: 100, page: 1)
|
13
|
+
response = client.get("pages/#{page_id}/components", query: "per_page=#{per_page}&page=#{page}")
|
14
|
+
|
15
|
+
handle_response(response) do
|
16
|
+
response.body.map do |component|
|
17
|
+
Spage::Component.new(component)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def find(page_id:, id:)
|
23
|
+
response = client.get("pages/#{page_id}/components", id)
|
24
|
+
|
25
|
+
handle_response(response) do
|
26
|
+
Spage::Component.new(response.body)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def create(component, page_id:)
|
31
|
+
json = Spage::Serializers::Component.new(component,
|
32
|
+
update: true).to_json
|
33
|
+
response = client.post("pages/#{page_id}/components", json)
|
34
|
+
|
35
|
+
handle_response(response) do
|
36
|
+
Spage::Component.new(response.body)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def update(component, page_id:, id:)
|
41
|
+
json = Spage::Serializers::Component.new(component,
|
42
|
+
update: true).to_json
|
43
|
+
response = client.put("pages/#{page_id}/components", id, json)
|
44
|
+
|
45
|
+
handle_response(response) do
|
46
|
+
Spage::Component.new(response.body)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def delete(page_id:, id:)
|
51
|
+
response = client.delete("pages/#{page_id}/components", id)
|
52
|
+
|
53
|
+
handle_response(response) do
|
54
|
+
true
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def handle_response(response)
|
62
|
+
case response
|
63
|
+
when Net::HTTPSuccess
|
64
|
+
yield
|
65
|
+
when Net::HTTPUnauthorized
|
66
|
+
raise(Error, 'Unauthorized: wrong API Key')
|
67
|
+
else
|
68
|
+
# Net::HTTPBadRequest, Net::HTTPUnprocessableEntity, Net::HTTPForbidden
|
69
|
+
raise(Error, response.body)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
data/lib/spage/api/incident.rb
CHANGED
@@ -9,8 +9,8 @@ module Spage
|
|
9
9
|
class Incident
|
10
10
|
include Api
|
11
11
|
|
12
|
-
def all(page_id:)
|
13
|
-
response = client.get("pages/#{page_id}/incidents")
|
12
|
+
def all(page_id:, per_page: 100, page: 1)
|
13
|
+
response = client.get("pages/#{page_id}/incidents", query: "per_page=#{per_page}&page=#{page}")
|
14
14
|
|
15
15
|
handle_response(response) do
|
16
16
|
response.body.map do |incident|
|
@@ -29,6 +29,26 @@ module Spage
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
def scheduled(page_id:)
|
33
|
+
response = client.get("pages/#{page_id}/incidents/scheduled")
|
34
|
+
|
35
|
+
handle_response(response) do
|
36
|
+
response.body.map do |incident|
|
37
|
+
Spage::Incident.new(incident)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def active_maintenance(page_id:)
|
43
|
+
response = client.get("pages/#{page_id}/incidents/active_maintenance")
|
44
|
+
|
45
|
+
handle_response(response) do
|
46
|
+
response.body.map do |incident|
|
47
|
+
Spage::Incident.new(incident)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
32
52
|
def find(page_id:, id:)
|
33
53
|
response = client.get("pages/#{page_id}/incidents", id)
|
34
54
|
|
@@ -39,7 +59,7 @@ module Spage
|
|
39
59
|
|
40
60
|
def create(incident, page_id:)
|
41
61
|
json = Spage::Serializers::Incident.new(incident,
|
42
|
-
|
62
|
+
update: true).to_json
|
43
63
|
|
44
64
|
response = client.post("pages/#{page_id}/incidents", json)
|
45
65
|
|
@@ -50,13 +70,21 @@ module Spage
|
|
50
70
|
|
51
71
|
def update(incident, page_id:, id:)
|
52
72
|
json = Spage::Serializers::Incident.new(incident,
|
53
|
-
|
73
|
+
update: true).to_json
|
54
74
|
response = client.put("pages/#{page_id}/incidents", id, json)
|
55
75
|
|
56
76
|
handle_response(response) do
|
57
77
|
Spage::Incident.new(response.body)
|
58
78
|
end
|
59
79
|
end
|
80
|
+
|
81
|
+
def delete(page_id:, id:)
|
82
|
+
response = client.delete("pages/#{page_id}/incidents", id)
|
83
|
+
|
84
|
+
handle_response(response) do
|
85
|
+
Spage::Incident.new(response.body)
|
86
|
+
end
|
87
|
+
end
|
60
88
|
end
|
61
89
|
|
62
90
|
private
|
data/lib/spage/client.rb
CHANGED
@@ -14,8 +14,8 @@ module Spage
|
|
14
14
|
@api_version = Spage.config.api_version
|
15
15
|
end
|
16
16
|
|
17
|
-
def get(resource, id = nil)
|
18
|
-
make_request(Net::HTTP::Get, resource, id)
|
17
|
+
def get(resource, id = nil, query: nil)
|
18
|
+
make_request(Net::HTTP::Get, resource, id, query: query)
|
19
19
|
end
|
20
20
|
|
21
21
|
def put(resource, id, body)
|
@@ -23,13 +23,17 @@ module Spage
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def post(resource, body)
|
26
|
-
make_request(Net::HTTP::Post, resource,
|
26
|
+
make_request(Net::HTTP::Post, resource, nil, body)
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
def delete(resource, id)
|
30
|
+
make_request(Net::HTTP::Delete, resource, id)
|
31
|
+
end
|
32
|
+
|
33
|
+
# rubocop: disable Metrics/MethodLength, Metrics/AbcSize
|
34
|
+
def make_request(http_method, resource, id, body = nil, query: nil)
|
31
35
|
path = [@api_version, resource, id].compact.join('/')
|
32
|
-
uri = URI::HTTP.build(host: BASE_URL, path: "/#{path}")
|
36
|
+
uri = URI::HTTP.build(host: BASE_URL, path: "/#{path}", query: query)
|
33
37
|
|
34
38
|
request = http_method.new(uri)
|
35
39
|
request.add_field('Authorization', "OAuth #{@api_key}")
|
@@ -40,13 +44,13 @@ module Spage
|
|
40
44
|
res = Net::HTTP.start(uri.hostname, use_ssl: true) do |http|
|
41
45
|
response = http.request(request)
|
42
46
|
|
43
|
-
response.body = JSON.parse(response.body)
|
47
|
+
response.body = JSON.parse(response.body) if response.body
|
44
48
|
response
|
45
49
|
end
|
46
50
|
|
47
51
|
yield(res) if block_given?
|
48
52
|
res
|
49
53
|
end
|
50
|
-
# rubocop: enable Metrics/MethodLength
|
54
|
+
# rubocop: enable Metrics/MethodLength, Metrics/AbcSize
|
51
55
|
end
|
52
56
|
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spage
|
4
|
+
# Page resource in statuspage.io
|
5
|
+
#
|
6
|
+
class Component
|
7
|
+
# rubocop: disable Metrics/MethodLength, Metrics/AbcSize
|
8
|
+
def initialize(attrs)
|
9
|
+
@id = attrs['id']
|
10
|
+
@page_id = attrs['page_id']
|
11
|
+
@created_at = attrs['created_at']
|
12
|
+
@updated_at = attrs['updated_at']
|
13
|
+
@group = attrs['group']
|
14
|
+
@position = attrs['position']
|
15
|
+
@automation_email = attrs['automation_email']
|
16
|
+
|
17
|
+
# Updatable properties
|
18
|
+
@description = attrs['description']
|
19
|
+
@status = attrs['status']
|
20
|
+
@name = attrs['name']
|
21
|
+
@only_show_if_degraded = attrs['only_show_if_degraded']
|
22
|
+
@group_id = attrs['group_id']
|
23
|
+
@showcase = attrs['showcase']
|
24
|
+
end
|
25
|
+
# rubocop: enable Metrics/MethodLength, Metrics/AbcSize
|
26
|
+
|
27
|
+
# rubocop: disable Layout/LineLength
|
28
|
+
attr_reader :id, :page_id, :created_at, :updated_at, :group, :position, :automation_email
|
29
|
+
|
30
|
+
attr_accessor :description, :status, :name, :only_show_if_degraded, :group_id, :showcase
|
31
|
+
# rubocop: enable Layout/LineLength
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def date_parse(str)
|
36
|
+
return str if str.nil?
|
37
|
+
return str if str.is_a?(DateTime)
|
38
|
+
|
39
|
+
DateTime.parse(str)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spage
|
4
|
+
module Serializers
|
5
|
+
# Serializer for the Component resource
|
6
|
+
#
|
7
|
+
class Component
|
8
|
+
def initialize(component, update: false)
|
9
|
+
@component = component
|
10
|
+
@ivars = ivars(update)
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_json(obj = nil)
|
14
|
+
as_json.to_json(obj)
|
15
|
+
end
|
16
|
+
|
17
|
+
def as_json
|
18
|
+
to_hash
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_hash
|
22
|
+
{
|
23
|
+
'component' => Hash[
|
24
|
+
@ivars.map do |name|
|
25
|
+
[name[1..-1], @component.instance_variable_get(name)]
|
26
|
+
end
|
27
|
+
]
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def ivars(update)
|
34
|
+
if update
|
35
|
+
@component.instance_variables.select do |name|
|
36
|
+
processed_name = name[1..-1]
|
37
|
+
update_attrs.include?(processed_name) &&
|
38
|
+
!@component.send(processed_name).nil?
|
39
|
+
end
|
40
|
+
else
|
41
|
+
@component.instance_variables
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def update_attrs
|
46
|
+
%w[
|
47
|
+
description
|
48
|
+
status
|
49
|
+
name
|
50
|
+
only_show_if_degraded
|
51
|
+
group_id
|
52
|
+
showcase
|
53
|
+
]
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -34,7 +34,8 @@ module Spage
|
|
34
34
|
if update
|
35
35
|
@incident.instance_variables.select do |name|
|
36
36
|
processed_name = name[1..-1]
|
37
|
-
update_attrs.include?(processed_name) &&
|
37
|
+
update_attrs.include?(processed_name) &&
|
38
|
+
!@incident.send(processed_name).nil?
|
38
39
|
end
|
39
40
|
else
|
40
41
|
@incident.instance_variables
|
data/lib/spage/version.rb
CHANGED
data/lib/spage.rb
CHANGED
@@ -16,15 +16,18 @@ module Spage
|
|
16
16
|
autoload :Api, 'spage/api'
|
17
17
|
autoload :Page, 'spage/resources/page'
|
18
18
|
autoload :Incident, 'spage/resources/incident'
|
19
|
+
autoload :Component, 'spage/resources/component'
|
19
20
|
|
20
21
|
module Api
|
21
22
|
autoload :Page, 'spage/api/page'
|
22
23
|
autoload :Incident, 'spage/api/incident'
|
24
|
+
autoload :Component, 'spage/api/component'
|
23
25
|
end
|
24
26
|
|
25
27
|
module Serializers
|
26
28
|
autoload :Page, 'spage/serializers/page'
|
27
29
|
autoload :Incident, 'spage/serializers/incident'
|
30
|
+
autoload :Component, 'spage/serializers/component'
|
28
31
|
end
|
29
32
|
|
30
33
|
def self.config
|
data/spage.gemspec
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'lib/spage/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |spec|
|
4
|
-
spec.name =
|
6
|
+
spec.name = 'spage'
|
5
7
|
spec.version = Spage::VERSION
|
6
|
-
spec.authors = [
|
7
|
-
spec.email = [
|
8
|
-
|
9
|
-
spec.summary = %q{Ruby Client for using the Spage API}
|
10
|
-
spec.description = %q{Ruby client for making requests the Spage API}
|
11
|
-
spec.homepage = "https://github.com/nulty/spage"
|
12
|
-
spec.license = "MIT"
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
8
|
+
spec.authors = ['Iain McNulty']
|
9
|
+
spec.email = ['iain@inulty.com']
|
14
10
|
|
15
|
-
|
11
|
+
spec.summary = 'Ruby client for using the statuspage.io API'
|
12
|
+
spec.description = 'Ruby client for making requests the statuspage.io API'
|
13
|
+
spec.homepage = 'https://github.com/nulty/spage'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
16
16
|
|
17
|
-
spec.metadata[
|
18
|
-
spec.metadata[
|
19
|
-
spec.metadata[
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/nulty/spage'
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/nulty/spage/CHANGELOG.md'
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
23
|
+
f.match(%r{^(test|spec|features)/})
|
24
|
+
end
|
25
25
|
end
|
26
|
-
spec.require_paths = [
|
27
|
-
|
28
|
-
spec.add_development_dependency "pry"
|
29
|
-
spec.add_development_dependency "vcr"
|
30
|
-
spec.add_development_dependency "webmock"
|
31
|
-
spec.add_development_dependency "simplecov"
|
26
|
+
spec.require_paths = ['lib']
|
32
27
|
|
28
|
+
spec.add_development_dependency 'pry'
|
29
|
+
spec.add_development_dependency 'simplecov'
|
30
|
+
spec.add_development_dependency 'vcr'
|
31
|
+
spec.add_development_dependency 'webmock'
|
32
|
+
spec.add_development_dependency 'github_changelog_generator'
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Iain McNulty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: simplecov
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: vcr
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +67,7 @@ dependencies:
|
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: github_changelog_generator
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
@@ -66,19 +80,21 @@ dependencies:
|
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
|
-
description: Ruby client for making requests the
|
83
|
+
description: Ruby client for making requests the statuspage.io API
|
70
84
|
email:
|
71
85
|
- iain@inulty.com
|
72
86
|
executables: []
|
73
87
|
extensions: []
|
74
88
|
extra_rdoc_files: []
|
75
89
|
files:
|
90
|
+
- ".github/workflows/gem-push.yml"
|
91
|
+
- ".github/workflows/reusable-test.yml"
|
92
|
+
- ".github/workflows/test.yml"
|
76
93
|
- ".gitignore"
|
77
94
|
- ".rspec"
|
78
95
|
- ".rubocop.yml"
|
79
|
-
-
|
96
|
+
- CHANGELOG.md
|
80
97
|
- Gemfile
|
81
|
-
- Gemfile.lock
|
82
98
|
- LICENSE.txt
|
83
99
|
- README.md
|
84
100
|
- Rakefile
|
@@ -86,12 +102,15 @@ files:
|
|
86
102
|
- bin/setup
|
87
103
|
- lib/spage.rb
|
88
104
|
- lib/spage/api.rb
|
105
|
+
- lib/spage/api/component.rb
|
89
106
|
- lib/spage/api/incident.rb
|
90
107
|
- lib/spage/api/page.rb
|
91
108
|
- lib/spage/client.rb
|
92
109
|
- lib/spage/config.rb
|
110
|
+
- lib/spage/resources/component.rb
|
93
111
|
- lib/spage/resources/incident.rb
|
94
112
|
- lib/spage/resources/page.rb
|
113
|
+
- lib/spage/serializers/component.rb
|
95
114
|
- lib/spage/serializers/incident.rb
|
96
115
|
- lib/spage/serializers/page.rb
|
97
116
|
- lib/spage/version.rb
|
@@ -111,15 +130,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
130
|
requirements:
|
112
131
|
- - ">="
|
113
132
|
- !ruby/object:Gem::Version
|
114
|
-
version: 2.
|
133
|
+
version: 2.6.0
|
115
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
135
|
requirements:
|
117
136
|
- - ">="
|
118
137
|
- !ruby/object:Gem::Version
|
119
138
|
version: '0'
|
120
139
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
140
|
+
rubygems_version: 3.3.5
|
122
141
|
signing_key:
|
123
142
|
specification_version: 4
|
124
|
-
summary: Ruby
|
143
|
+
summary: Ruby client for using the statuspage.io API
|
125
144
|
test_files: []
|
data/.travis.yml
DELETED
data/Gemfile.lock
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
spage (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
addressable (2.7.0)
|
10
|
-
public_suffix (>= 2.0.2, < 5.0)
|
11
|
-
coderay (1.1.3)
|
12
|
-
crack (0.4.4)
|
13
|
-
diff-lcs (1.4.4)
|
14
|
-
docile (1.3.2)
|
15
|
-
hashdiff (1.0.1)
|
16
|
-
method_source (1.0.0)
|
17
|
-
pry (0.13.1)
|
18
|
-
coderay (~> 1.1)
|
19
|
-
method_source (~> 1.0)
|
20
|
-
public_suffix (4.0.6)
|
21
|
-
rake (12.3.3)
|
22
|
-
rspec (3.8.0)
|
23
|
-
rspec-core (~> 3.8.0)
|
24
|
-
rspec-expectations (~> 3.8.0)
|
25
|
-
rspec-mocks (~> 3.8.0)
|
26
|
-
rspec-core (3.8.2)
|
27
|
-
rspec-support (~> 3.8.0)
|
28
|
-
rspec-expectations (3.8.6)
|
29
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
-
rspec-support (~> 3.8.0)
|
31
|
-
rspec-mocks (3.8.2)
|
32
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
-
rspec-support (~> 3.8.0)
|
34
|
-
rspec-support (3.8.3)
|
35
|
-
simplecov (0.19.0)
|
36
|
-
docile (~> 1.1)
|
37
|
-
simplecov-html (~> 0.11)
|
38
|
-
simplecov-html (0.12.3)
|
39
|
-
vcr (6.0.0)
|
40
|
-
webmock (3.9.2)
|
41
|
-
addressable (>= 2.3.6)
|
42
|
-
crack (>= 0.3.2)
|
43
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
44
|
-
|
45
|
-
PLATFORMS
|
46
|
-
ruby
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
pry
|
50
|
-
rake (~> 12.0)
|
51
|
-
rspec (~> 3.0)
|
52
|
-
simplecov
|
53
|
-
spage!
|
54
|
-
vcr
|
55
|
-
webmock
|
56
|
-
|
57
|
-
BUNDLED WITH
|
58
|
-
2.1.4
|