pixela 3.6.0 → 3.8.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 +4 -4
- data/.github/workflows/dependabot-manager.yml +4 -0
- data/.github/workflows/release_gem.yml +4 -4
- data/.github/workflows/test.yml +6 -6
- data/CHANGELOG.md +15 -1
- data/lib/pixela/client/graph_methods.rb +30 -4
- data/lib/pixela/graph.rb +24 -4
- data/lib/pixela/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 770ad35f9e91fc900f018bb36b0e2235bd08a9eaea9f5200d2ef68ef4700c302
|
|
4
|
+
data.tar.gz: b6b960288c77250ef66f911c993dafc97cf7d3bbe27bff76b7ec9713ad1d258c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ee2906c08ff6fad04fcc83f4b2de533a74172c56d521412cbbff4c0b5e0f6787bd45a20b3671bf032e51b40af1ff0e42be98eb3041c03ac6363b9257d93d09b
|
|
7
|
+
data.tar.gz: d7f82a4229ae458befa442ba89322e9765f0592890188de39f249fb8ea951fba894c9d72ca539b7da5dabd0f6486967a4b4855ca0306b70acabd058f77eaefa7
|
|
@@ -9,6 +9,8 @@ on:
|
|
|
9
9
|
jobs:
|
|
10
10
|
dependabot-auto-merge:
|
|
11
11
|
uses: sue445/workflows/.github/workflows/dependabot-auto-merge.yml@main
|
|
12
|
+
with:
|
|
13
|
+
repo-name: sue445/pixela
|
|
12
14
|
secrets:
|
|
13
15
|
# TODO: Set secrets to Dependabot secrets
|
|
14
16
|
app-id: ${{ secrets.GH_APP_ID }}
|
|
@@ -17,6 +19,8 @@ jobs:
|
|
|
17
19
|
|
|
18
20
|
dependabot-security-alert:
|
|
19
21
|
uses: sue445/workflows/.github/workflows/dependabot-security-alert.yml@main
|
|
22
|
+
with:
|
|
23
|
+
repo-name: sue445/pixela
|
|
20
24
|
secrets:
|
|
21
25
|
# TODO: Set secrets to Dependabot secrets
|
|
22
26
|
app-id: ${{ secrets.GH_APP_ID }}
|
|
@@ -18,20 +18,20 @@ jobs:
|
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
20
|
- name: Harden Runner
|
|
21
|
-
uses: step-security/harden-runner@
|
|
21
|
+
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
|
|
22
22
|
with:
|
|
23
23
|
egress-policy: audit
|
|
24
24
|
|
|
25
|
-
- uses: actions/checkout@
|
|
25
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
26
26
|
|
|
27
27
|
- name: Set up Ruby
|
|
28
|
-
uses: ruby/setup-ruby@
|
|
28
|
+
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
|
29
29
|
with:
|
|
30
30
|
bundler-cache: true
|
|
31
31
|
ruby-version: ruby
|
|
32
32
|
|
|
33
33
|
- name: Publish to RubyGems
|
|
34
|
-
uses: rubygems/release-gem@
|
|
34
|
+
uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0
|
|
35
35
|
|
|
36
36
|
- name: Create GitHub release
|
|
37
37
|
run: |
|
data/.github/workflows/test.yml
CHANGED
|
@@ -36,9 +36,9 @@ jobs:
|
|
|
36
36
|
- faraday_2
|
|
37
37
|
|
|
38
38
|
steps:
|
|
39
|
-
- uses: actions/checkout@
|
|
39
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
40
40
|
|
|
41
|
-
- uses: ruby/setup-ruby@
|
|
41
|
+
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
|
42
42
|
with:
|
|
43
43
|
ruby-version: ${{ matrix.ruby }}
|
|
44
44
|
bundler-cache: true
|
|
@@ -59,7 +59,7 @@ jobs:
|
|
|
59
59
|
continue-on-error: true
|
|
60
60
|
|
|
61
61
|
- name: Slack Notification (not success)
|
|
62
|
-
uses: act10ns/slack@
|
|
62
|
+
uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
|
|
63
63
|
if: "! success()"
|
|
64
64
|
continue-on-error: true
|
|
65
65
|
with:
|
|
@@ -71,9 +71,9 @@ jobs:
|
|
|
71
71
|
runs-on: ubuntu-latest
|
|
72
72
|
|
|
73
73
|
steps:
|
|
74
|
-
- uses: actions/checkout@
|
|
74
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
75
75
|
|
|
76
|
-
- uses: ruby/setup-ruby@
|
|
76
|
+
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
|
77
77
|
with:
|
|
78
78
|
ruby-version: ruby
|
|
79
79
|
bundler-cache: true
|
|
@@ -91,7 +91,7 @@ jobs:
|
|
|
91
91
|
ls -ld doc/
|
|
92
92
|
|
|
93
93
|
- name: Slack Notification (not success)
|
|
94
|
-
uses: act10ns/slack@
|
|
94
|
+
uses: act10ns/slack@d96404edccc6d6467fc7f8134a420c851b1e9054 # v2.2.0
|
|
95
95
|
if: "! success()"
|
|
96
96
|
continue-on-error: true
|
|
97
97
|
with:
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
## Unreleased
|
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v3.
|
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v3.8.0...master)
|
|
3
|
+
|
|
4
|
+
## [v3.8.0](https://github.com/sue445/pixela/releases/tag/v3.8.0)
|
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v3.7.0...v3.8.0)
|
|
6
|
+
|
|
7
|
+
* Add `Pixela::Client::GraphMethods#get_graph_analyze` and `Pixela::Graph#analyze`
|
|
8
|
+
* https://github.com/sue445/pixela/pull/157
|
|
9
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.35.0
|
|
10
|
+
|
|
11
|
+
## [v3.7.0](https://github.com/sue445/pixela/releases/tag/v3.7.0)
|
|
12
|
+
[full changelog](http://github.com/sue445/pixela/compare/v3.6.0...v3.7.0)
|
|
13
|
+
|
|
14
|
+
* Add `description` and `start_on_monday` to `create_graph` and `update_graph`
|
|
15
|
+
* https://github.com/sue445/pixela/pull/148
|
|
16
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.34.0
|
|
3
17
|
|
|
4
18
|
## [v3.6.0](https://github.com/sue445/pixela/releases/tag/v3.6.0)
|
|
5
19
|
[full changelog](http://github.com/sue445/pixela/compare/v3.5.1...v3.6.0)
|
|
@@ -7,6 +7,8 @@ module Pixela::Client::GraphMethods
|
|
|
7
7
|
# @param type [String]
|
|
8
8
|
# @param color [String]
|
|
9
9
|
# @param timezone [String]
|
|
10
|
+
# @param description [String]
|
|
11
|
+
# @param start_on_monday [Boolean]
|
|
10
12
|
# @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
|
|
11
13
|
# @param is_secret [Boolean]
|
|
12
14
|
# @param publish_optional_data [Boolean]
|
|
@@ -18,8 +20,8 @@ module Pixela::Client::GraphMethods
|
|
|
18
20
|
# @see https://docs.pixe.la/entry/post-graph
|
|
19
21
|
#
|
|
20
22
|
# @example
|
|
21
|
-
# client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", is_secret: true, publish_optional_data: true)
|
|
22
|
-
def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
23
|
+
# client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo","description":"This is a graph for test.", start_on_monday: true, self_sufficient: "increment", is_secret: true, publish_optional_data: true)
|
|
24
|
+
def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil, description: nil, start_on_monday: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
23
25
|
params = {
|
|
24
26
|
id: graph_id,
|
|
25
27
|
name: name,
|
|
@@ -27,6 +29,8 @@ module Pixela::Client::GraphMethods
|
|
|
27
29
|
type: type,
|
|
28
30
|
color: color,
|
|
29
31
|
timezone: timezone,
|
|
32
|
+
description: description,
|
|
33
|
+
startOnMonday: start_on_monday,
|
|
30
34
|
selfSufficient: self_sufficient,
|
|
31
35
|
isSecret: is_secret,
|
|
32
36
|
publishOptionalData: publish_optional_data
|
|
@@ -103,6 +107,8 @@ module Pixela::Client::GraphMethods
|
|
|
103
107
|
# @param unit [String]
|
|
104
108
|
# @param color [String]
|
|
105
109
|
# @param timezone [String]
|
|
110
|
+
# @param description [String]
|
|
111
|
+
# @param start_on_monday [Boolean]
|
|
106
112
|
# @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
|
|
107
113
|
# @param purge_cache_urls [String,Array<String>]
|
|
108
114
|
# @param is_secret [Boolean]
|
|
@@ -115,13 +121,15 @@ module Pixela::Client::GraphMethods
|
|
|
115
121
|
# @see https://docs.pixe.la/entry/put-graph
|
|
116
122
|
#
|
|
117
123
|
# @example
|
|
118
|
-
# client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
|
|
119
|
-
def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, self_sufficient: nil, purge_cache_urls: nil, is_secret: nil, publish_optional_data: nil)
|
|
124
|
+
# client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", "description":"This is a graph for test.", start_on_monday: true, self_sufficient: "increment", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
|
|
125
|
+
def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, description: nil, start_on_monday: nil, self_sufficient: nil, purge_cache_urls: nil, is_secret: nil, publish_optional_data: nil)
|
|
120
126
|
params = {
|
|
121
127
|
name: name,
|
|
122
128
|
unit: unit,
|
|
123
129
|
color: color,
|
|
124
130
|
timezone: timezone,
|
|
131
|
+
description: description,
|
|
132
|
+
startOnMonday: start_on_monday,
|
|
125
133
|
selfSufficient: self_sufficient,
|
|
126
134
|
isSecret: is_secret,
|
|
127
135
|
publishOptionalData: publish_optional_data
|
|
@@ -306,4 +314,22 @@ module Pixela::Client::GraphMethods
|
|
|
306
314
|
connection.get("users/#{username}/graphs/#{graph_id}/today", params.compact).body
|
|
307
315
|
end
|
|
308
316
|
end
|
|
317
|
+
|
|
318
|
+
# The AI analyzes the Pixel posted to the graph specified by <graphID> and responds with the results in a string of up to approximately 1000 characters.
|
|
319
|
+
#
|
|
320
|
+
# @param graph_id [String]
|
|
321
|
+
#
|
|
322
|
+
# @return [Pixela::Response]
|
|
323
|
+
#
|
|
324
|
+
# @raise [Pixela::PixelaError] API is failed
|
|
325
|
+
#
|
|
326
|
+
# @see https://docs.pixe.la/entry/get-ai-analysis
|
|
327
|
+
#
|
|
328
|
+
# @example
|
|
329
|
+
# client.get_graph_analyze(graph_id: "test-graph")
|
|
330
|
+
def get_graph_analyze(graph_id:)
|
|
331
|
+
with_error_handling do
|
|
332
|
+
connection.get("users/#{username}/graphs/#{graph_id}/analyze").body
|
|
333
|
+
end
|
|
334
|
+
end
|
|
309
335
|
end
|
data/lib/pixela/graph.rb
CHANGED
|
@@ -29,6 +29,8 @@ module Pixela
|
|
|
29
29
|
# @param type [String]
|
|
30
30
|
# @param color [String]
|
|
31
31
|
# @param timezone [String]
|
|
32
|
+
# @param description [String]
|
|
33
|
+
# @param start_on_monday [Boolean]
|
|
32
34
|
# @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
|
|
33
35
|
# @param is_secret [Boolean]
|
|
34
36
|
# @param publish_optional_data [Boolean]
|
|
@@ -41,9 +43,10 @@ module Pixela
|
|
|
41
43
|
#
|
|
42
44
|
# @example
|
|
43
45
|
# client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment", is_secret: true, publish_optional_data: true)
|
|
44
|
-
def create(name:, unit:, type:, color:, timezone: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
46
|
+
def create(name:, unit:, type:, color:, timezone: nil, description: nil, start_on_monday: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
45
47
|
client.create_graph(
|
|
46
|
-
graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone,
|
|
48
|
+
graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone,
|
|
49
|
+
description: description, start_on_monday: start_on_monday, self_sufficient: self_sufficient,
|
|
47
50
|
is_secret: is_secret, publish_optional_data: publish_optional_data,
|
|
48
51
|
)
|
|
49
52
|
end
|
|
@@ -73,6 +76,8 @@ module Pixela
|
|
|
73
76
|
# @param unit [String]
|
|
74
77
|
# @param color [String]
|
|
75
78
|
# @param timezone [String]
|
|
79
|
+
# @param description [String]
|
|
80
|
+
# @param start_on_monday [Boolean]
|
|
76
81
|
# @param self_sufficient [String] If SVG graph with this field `increment` or `decrement` is referenced, Pixel of this graph itself will be incremented or decremented
|
|
77
82
|
# @param purge_cache_urls [String,Array<String>]
|
|
78
83
|
# @param is_secret [Boolean]
|
|
@@ -86,9 +91,10 @@ module Pixela
|
|
|
86
91
|
#
|
|
87
92
|
# @example
|
|
88
93
|
# client.graph("test-graph").update(name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
|
|
89
|
-
def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
94
|
+
def update(name: nil, unit: nil, color: nil, timezone: nil, description: nil, start_on_monday: nil, purge_cache_urls: nil, self_sufficient: nil, is_secret: nil, publish_optional_data: nil)
|
|
90
95
|
client.update_graph(
|
|
91
|
-
graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone,
|
|
96
|
+
graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone,
|
|
97
|
+
description: description, start_on_monday: start_on_monday, self_sufficient: self_sufficient,
|
|
92
98
|
purge_cache_urls: purge_cache_urls, is_secret: is_secret, publish_optional_data: publish_optional_data,
|
|
93
99
|
)
|
|
94
100
|
end
|
|
@@ -311,5 +317,19 @@ module Pixela
|
|
|
311
317
|
def subtract_specific(quantity:, date:)
|
|
312
318
|
client.subtract_specific_pixel(graph_id: graph_id, date: date, quantity: quantity)
|
|
313
319
|
end
|
|
320
|
+
|
|
321
|
+
# The AI analyzes the Pixel posted to the graph specified by <graphID> and responds with the results in a string of up to approximately 1000 characters.
|
|
322
|
+
#
|
|
323
|
+
# @return [Pixela::Response]
|
|
324
|
+
#
|
|
325
|
+
# @raise [Pixela::PixelaError] API is failed
|
|
326
|
+
#
|
|
327
|
+
# @see https://docs.pixe.la/entry/get-ai-analysis
|
|
328
|
+
#
|
|
329
|
+
# @example
|
|
330
|
+
# client.get_graph_analyze(graph_id: "test-graph")
|
|
331
|
+
def analyze
|
|
332
|
+
client.get_graph_analyze(graph_id: graph_id)
|
|
333
|
+
end
|
|
314
334
|
end
|
|
315
335
|
end
|
data/lib/pixela/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pixela
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sue445
|
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
311
311
|
- !ruby/object:Gem::Version
|
|
312
312
|
version: '0'
|
|
313
313
|
requirements: []
|
|
314
|
-
rubygems_version: 4.0.
|
|
314
|
+
rubygems_version: 4.0.6
|
|
315
315
|
specification_version: 4
|
|
316
316
|
summary: Pixela API client for Ruby
|
|
317
317
|
test_files: []
|