pixela 3.2.0 → 3.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a336057a8b3d607b5bdce6259191278d1338995b5a68f3d44551bba1c3918fa
4
- data.tar.gz: c63183b4a8484f6ac55841ef1362d103ab1e1aeeece0714f364c299239bd3872
3
+ metadata.gz: 70ad266dd772aa47bb3201ceeb05f8f68c5ec6aac5f9f42f6955065d36459214
4
+ data.tar.gz: 4d5431713d481a5115eedd74ec96507217420d260407d44576179b436df873ca
5
5
  SHA512:
6
- metadata.gz: b3c14c121dd2df7e48f7f40d9639387685aca2e9925bf88af1803caf7941ce17ca89861615221b55ad7caed22cefe5eec908d953a0542988c814c6e8d50ef3f3
7
- data.tar.gz: 80967736967c85edb89f6acfb41a713bd594e93f01874a1ddd9e7980ee6726e787297c7b0aa41944602b078227e5cfc5aa303137f12027944ff7c4c42bed05fb
6
+ metadata.gz: ce88158d30ec96dbe366f37a944bd2227a816666459fcac18b36a975e8ff135995a7db4ddc25ad6b45dd802c6591cac54d0d2b07d5ea7accfa2ee7f018889f96
7
+ data.tar.gz: a93bf0966fbd6fefb7f8fe8101e20b30e951ff2ea2b9c55d61de8a434ad436bd96cb1a0904f7ebf79cbe4bfbe6b35eb2de142d9b561e8a4eec3aa98ce7ad75fa
@@ -40,9 +40,9 @@ jobs:
40
40
  - run: bundle exec yard
41
41
 
42
42
  - name: Setup Pages
43
- uses: actions/configure-pages@v4
43
+ uses: actions/configure-pages@v5
44
44
  - name: Upload artifact
45
- uses: actions/upload-pages-artifact@v2
45
+ uses: actions/upload-pages-artifact@v3
46
46
  with:
47
47
  # Upload entire repository
48
48
  path: './doc'
@@ -51,12 +51,9 @@ jobs:
51
51
  uses: actions/deploy-pages@main
52
52
 
53
53
  - name: Slack Notification (not success)
54
- uses: lazy-actions/slatify@master
54
+ uses: act10ns/slack@v2
55
55
  if: "! success()"
56
56
  continue-on-error: true
57
57
  with:
58
- job_name: "*pages*"
59
- type: ${{ job.status }}
60
- icon_emoji: ":octocat:"
61
- url: ${{ secrets.SLACK_WEBHOOK }}
62
- token: ${{ secrets.GITHUB_TOKEN }}
58
+ status: ${{ job.status }}
59
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
@@ -29,6 +29,7 @@ jobs:
29
29
  - "3.0"
30
30
  - "3.1"
31
31
  - "3.2"
32
+ - "3.3"
32
33
  gemfile:
33
34
  - faraday_2
34
35
 
@@ -70,15 +71,13 @@ jobs:
70
71
  continue-on-error: true
71
72
 
72
73
  - name: Slack Notification (not success)
73
- uses: lazy-actions/slatify@master
74
+ uses: act10ns/slack@v2
74
75
  if: "! success()"
75
76
  continue-on-error: true
76
77
  with:
77
- job_name: ${{ format('*build* ({0}, {1})', matrix.ruby, matrix.gemfile) }}
78
- type: ${{ job.status }}
79
- icon_emoji: ":octocat:"
80
- url: ${{ secrets.SLACK_WEBHOOK }}
81
- token: ${{ secrets.GITHUB_TOKEN }}
78
+ status: ${{ job.status }}
79
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
80
+ matrix: ${{ toJson(matrix) }}
82
81
 
83
82
  notify:
84
83
  needs:
@@ -88,12 +87,9 @@ jobs:
88
87
 
89
88
  steps:
90
89
  - name: Slack Notification (success)
91
- uses: lazy-actions/slatify@master
90
+ uses: act10ns/slack@v2
92
91
  if: always()
93
92
  continue-on-error: true
94
93
  with:
95
- job_name: '*build*'
96
- type: ${{ job.status }}
97
- icon_emoji: ":octocat:"
98
- url: ${{ secrets.SLACK_WEBHOOK }}
99
- token: ${{ secrets.GITHUB_TOKEN }}
94
+ status: ${{ job.status }}
95
+ webhook-url: ${{ secrets.SLACK_WEBHOOK }}
data/CHANGELOG.md CHANGED
@@ -1,10 +1,17 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v3.2.0...master)
2
+ [full changelog](http://github.com/sue445/pixela/compare/v3.3.0...master)
3
+
4
+ ## v3.3.0
5
+ [full changelog](http://github.com/sue445/pixela/compare/v3.2.0...v3.3.0)
6
+
7
+ * Add `Pixela::Client::GraphMethods#get_graph_latest` and `Pixela::Graph#latest`
8
+ * https://github.com/sue445/pixela/pull/110
9
+ * https://github.com/a-know/Pixela/releases/tag/v1.29.0
3
10
 
4
11
  ## v3.2.0
5
12
  [full changelog](http://github.com/sue445/pixela/compare/v3.1.0...v3.2.0)
6
13
 
7
- * Add Impl `Pixela::Client::PixelMethods#create_pixels` and `Pixela::Pixel#create_multi`
14
+ * Add `Pixela::Client::PixelMethods#create_pixels` and `Pixela::Pixel#create_multi`
8
15
  * https://github.com/sue445/pixela/pull/105
9
16
  * https://github.com/a-know/Pixela/releases/tag/v1.28.0
10
17
 
@@ -258,4 +258,22 @@ module Pixela::Client::GraphMethods
258
258
  connection.get("users/#{username}/graphs/#{graph_id}/graph-def").body
259
259
  end
260
260
  end
261
+
262
+ # This API is used to get latest Pixel of the graph which specified by <graphID> .
263
+ #
264
+ # @param graph_id [String]
265
+ #
266
+ # @return [Pixela::Response]
267
+ #
268
+ # @raise [Pixela::PixelaError] API is failed
269
+ #
270
+ # @see https://docs.pixe.la/entry/get-latest-pixel
271
+ #
272
+ # @example
273
+ # client.get_graph_latest(graph_id: "test-graph")
274
+ def get_graph_latest(graph_id:)
275
+ with_error_handling do
276
+ connection.get("users/#{username}/graphs/#{graph_id}/latest").body
277
+ end
278
+ end
261
279
  end
data/lib/pixela/graph.rb CHANGED
@@ -244,5 +244,19 @@ module Pixela
244
244
  end
245
245
 
246
246
  alias_method :definition, :def
247
+
248
+ # This API is used to get latest Pixel of the graph which specified by <graphID> .
249
+ #
250
+ # @return [Pixela::Response]
251
+ #
252
+ # @raise [Pixela::PixelaError] API is failed
253
+ #
254
+ # @see https://docs.pixe.la/entry/get-latest-pixel
255
+ #
256
+ # @example
257
+ # client.graph("test-graph").latest
258
+ def latest
259
+ client.get_graph_latest(graph_id: graph_id)
260
+ end
247
261
  end
248
262
  end
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "3.2.0"
2
+ VERSION = "3.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixela
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-24 00:00:00.000000000 Z
11
+ date: 2024-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
270
  requirements: []
271
- rubygems_version: 3.4.10
271
+ rubygems_version: 3.5.3
272
272
  signing_key:
273
273
  specification_version: 4
274
274
  summary: Pixela API client for Ruby