fastlane-plugin-mackerel_api 0.1.1 → 0.1.2
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d2373d09622a90b9126c700080178b55d435c664c15ba15f5402d4fd6331af3e
|
|
4
|
+
data.tar.gz: 6bb0027e03db17e63a45ec01f22ac4925e8806fed9533f5c038d5c7efa1af5af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12017b633e11bd7eebce4be3137d90eced2b919f2bcc2d41f44c685ddc7da34b6ea514673787c14f2f494ece05b5502b051e7bd283507ead1d9fb8ee743f4da4
|
|
7
|
+
data.tar.gz: 212a6982b74dd28bb96b6dc6f6f2083726e4e69d1efb3b7764287e4e400fb955e8d6e48fd65eaba52fb2d581eb16f2b491d7b133ed3aa06e96fd86d2e3feea38
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# mackerel_api plugin
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/fastlane-plugin-mackerel_api)
|
|
4
|
-

|
|
4
|
+
[](https://github.com/yutailang0119/fastlane-plugin-mackerel_api/actions?query=branch%3Amaster+workflow%3ATest)
|
|
5
5
|
|
|
6
6
|
## Getting Started
|
|
7
7
|
|
|
@@ -21,39 +21,7 @@ Documentation: [Mackerel API Documents](https://mackerel.io/api-docs).
|
|
|
21
21
|
|
|
22
22
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
### Usage
|
|
26
|
-
|
|
27
|
-
```ruby
|
|
28
|
-
result = mackerel_api(
|
|
29
|
-
server_url: "https://api.mackerelio.com",
|
|
30
|
-
api_key: ENV["MACKEREL_API_KEY"],
|
|
31
|
-
http_method: "POST",
|
|
32
|
-
path: "api/v0/services",
|
|
33
|
-
body: { "name": "ExampleService", "memo": "This is an example." }
|
|
34
|
-
)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
```ruby
|
|
38
|
-
# Alternatively call directly with optional error handling or block usage
|
|
39
|
-
MackerelApiAction.run(
|
|
40
|
-
server_url: "https://api.mackerelio.com",
|
|
41
|
-
api_key: ENV["MACKEREL_API_KEY"],
|
|
42
|
-
http_method: "POST",
|
|
43
|
-
path: "api/v0/services",
|
|
44
|
-
body: { "name": "ExampleService", "memo": "This is an example." },
|
|
45
|
-
error_handlers: {
|
|
46
|
-
404 => proc do |result|
|
|
47
|
-
UI.message("Something went wrong - I couldn\'t find it...")
|
|
48
|
-
end,
|
|
49
|
-
'*' => proc do |result|
|
|
50
|
-
UI.message("Handle all error codes other than 404")
|
|
51
|
-
end
|
|
52
|
-
}
|
|
53
|
-
) do |result|
|
|
54
|
-
UI.message("JSON returned: #{result[:json]}")
|
|
55
|
-
end
|
|
56
|
-
```
|
|
24
|
+
See [MackerelApiAction](lib/fastlane/plugin/mackerel_api/actions/mackerel_api_action.rb).example_code for more usage.
|
|
57
25
|
|
|
58
26
|
## Run tests for this plugin
|
|
59
27
|
|
|
@@ -159,12 +159,12 @@ module Fastlane
|
|
|
159
159
|
def example_code
|
|
160
160
|
[
|
|
161
161
|
'result = mackerel_api(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
server_url: "https://api.mackerelio.com",
|
|
163
|
+
api_key: ENV["MACKEREL_API_KEY"],
|
|
164
|
+
http_method: "POST",
|
|
165
|
+
path: "api/v0/services",
|
|
166
|
+
body: { "name": "ExampleService", "memo": "This is an example." }
|
|
167
|
+
)',
|
|
168
168
|
'# Alternatively call directly with optional error handling or block usage
|
|
169
169
|
MackerelApiAction.run(
|
|
170
170
|
server_url: "https://api.mackerelio.com",
|
|
@@ -182,7 +182,7 @@ module Fastlane
|
|
|
182
182
|
) do |result|
|
|
183
183
|
UI.message("JSON returned: #{result[:json]}")
|
|
184
184
|
end
|
|
185
|
-
|
|
185
|
+
'
|
|
186
186
|
]
|
|
187
187
|
end
|
|
188
188
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-mackerel_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- yutailang0119
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pry
|