pixela 1.0.0 → 1.0.1
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/CHANGELOG.md +9 -1
- data/lib/pixela/client/graph_methods.rb +24 -20
- data/lib/pixela/graph.rb +12 -10
- 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: '07816d9da5bb534af1596f797a7cb5a82fd3b635c0fbe4c1b42c94266a89868d'
|
4
|
+
data.tar.gz: 540f47348bba2f20b471b39a04ab4e9ff07c59fb5c983edc0ec6e9cd5dc72706
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ca1181768bf1e080bf5747145c0a8990a2d251c30ffcc7519dd35f745f60c77aa0e1549b68238613ff7df36542474891b319e9a87d8e8478908211d05dadf38
|
7
|
+
data.tar.gz: 18ce471b6e4de30147bc919b21595e70f9178eec342cfaeff89546d0a2a802f0ea805847c76216575189755600b039d84556ae13184937587ed2ecdeabc13ef0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## Unreleased
|
2
|
-
[full changelog](http://github.com/sue445/pixela/compare/v1.0.
|
2
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.0.1...master)
|
3
|
+
|
4
|
+
## v1.0.1
|
5
|
+
[full changelog](http://github.com/sue445/pixela/compare/v1.0.0...v1.0.1)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
* Add `self_sufficient` arg to `create_graph` and `update_graph`
|
9
|
+
* https://github.com/sue445/pixela/pull/45
|
10
|
+
* https://github.com/a-know/Pixela/releases/tag/v1.7.0
|
3
11
|
|
4
12
|
## v1.0.0
|
5
13
|
[full changelog](http://github.com/sue445/pixela/compare/v0.5.2...v1.0.0)
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module Pixela::Client::GraphMethods
|
2
2
|
# Create a new pixelation graph definition.
|
3
3
|
#
|
4
|
-
# @param graph_id
|
5
|
-
# @param name
|
6
|
-
# @param unit
|
7
|
-
# @param type
|
8
|
-
# @param color
|
9
|
-
# @param timezone
|
4
|
+
# @param graph_id [String]
|
5
|
+
# @param name [String]
|
6
|
+
# @param unit [String]
|
7
|
+
# @param type [String]
|
8
|
+
# @param color [String]
|
9
|
+
# @param timezone [String]
|
10
|
+
# @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
|
10
11
|
#
|
11
12
|
# @return [Pixela::Response]
|
12
13
|
#
|
@@ -15,15 +16,16 @@ module Pixela::Client::GraphMethods
|
|
15
16
|
# @see https://docs.pixe.la/#/post-graph
|
16
17
|
#
|
17
18
|
# @example
|
18
|
-
# client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo")
|
19
|
-
def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil)
|
19
|
+
# client.create_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment")
|
20
|
+
def create_graph(graph_id:, name:, unit:, type:, color:, timezone: nil, self_sufficient: nil)
|
20
21
|
params = {
|
21
|
-
id:
|
22
|
-
name:
|
23
|
-
unit:
|
24
|
-
type:
|
25
|
-
color:
|
26
|
-
timezone:
|
22
|
+
id: graph_id,
|
23
|
+
name: name,
|
24
|
+
unit: unit,
|
25
|
+
type: type,
|
26
|
+
color: color,
|
27
|
+
timezone: timezone,
|
28
|
+
selfSufficient: self_sufficient,
|
27
29
|
}
|
28
30
|
|
29
31
|
with_error_handling do
|
@@ -79,6 +81,7 @@ module Pixela::Client::GraphMethods
|
|
79
81
|
# @param unit [String]
|
80
82
|
# @param color [String]
|
81
83
|
# @param timezone [String]
|
84
|
+
# @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
|
82
85
|
# @param purge_cache_urls [String,Array<String>]
|
83
86
|
#
|
84
87
|
# @return [Pixela::Response]
|
@@ -88,13 +91,14 @@ module Pixela::Client::GraphMethods
|
|
88
91
|
# @see https://docs.pixe.la/#/put-graph
|
89
92
|
#
|
90
93
|
# @example
|
91
|
-
# client.update_graph(graph_id: "test-graph", name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
|
92
|
-
def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil)
|
94
|
+
# 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"])
|
95
|
+
def update_graph(graph_id:, name: nil, unit: nil, color: nil, timezone: nil, self_sufficient: nil, purge_cache_urls: nil)
|
93
96
|
params = {
|
94
|
-
name:
|
95
|
-
unit:
|
96
|
-
color:
|
97
|
-
timezone:
|
97
|
+
name: name,
|
98
|
+
unit: unit,
|
99
|
+
color: color,
|
100
|
+
timezone: timezone,
|
101
|
+
selfSufficient: self_sufficient,
|
98
102
|
}
|
99
103
|
|
100
104
|
if purge_cache_urls
|
data/lib/pixela/graph.rb
CHANGED
@@ -24,11 +24,12 @@ module Pixela
|
|
24
24
|
|
25
25
|
# Create a new pixelation graph definition.
|
26
26
|
#
|
27
|
-
# @param name
|
28
|
-
# @param unit
|
29
|
-
# @param type
|
30
|
-
# @param color
|
31
|
-
# @param timezone
|
27
|
+
# @param name [String]
|
28
|
+
# @param unit [String]
|
29
|
+
# @param type [String]
|
30
|
+
# @param color [String]
|
31
|
+
# @param timezone [String]
|
32
|
+
# @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
|
32
33
|
#
|
33
34
|
# @return [Pixela::Response]
|
34
35
|
#
|
@@ -37,9 +38,9 @@ module Pixela
|
|
37
38
|
# @see https://docs.pixe.la/#/post-graph
|
38
39
|
#
|
39
40
|
# @example
|
40
|
-
# client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo")
|
41
|
-
def create(name:, unit:, type:, color:, timezone: nil)
|
42
|
-
client.create_graph(graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone)
|
41
|
+
# client.graph("test-graph").create(name: "graph-name", unit: "commit", type: "int", color: "shibafu", timezone: "Asia/Tokyo", self_sufficient: "increment")
|
42
|
+
def create(name:, unit:, type:, color:, timezone: nil, self_sufficient: nil)
|
43
|
+
client.create_graph(graph_id: graph_id, name: name, unit: unit, type: type, color: color, timezone: timezone, self_sufficient: self_sufficient)
|
43
44
|
end
|
44
45
|
|
45
46
|
# Get graph url
|
@@ -64,6 +65,7 @@ module Pixela
|
|
64
65
|
# @param unit [String]
|
65
66
|
# @param color [String]
|
66
67
|
# @param timezone [String]
|
68
|
+
# @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
|
67
69
|
# @param purge_cache_urls [String,Array<String>]
|
68
70
|
#
|
69
71
|
# @return [Pixela::Response]
|
@@ -74,8 +76,8 @@ module Pixela
|
|
74
76
|
#
|
75
77
|
# @example
|
76
78
|
# client.graph("test-graph").update(name: "graph-name", unit: "commit", color: "shibafu", timezone: "Asia/Tokyo", purge_cache_urls: ["https://camo.githubusercontent.com/xxx/xxxx"])
|
77
|
-
def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil)
|
78
|
-
client.update_graph(graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone, purge_cache_urls: purge_cache_urls)
|
79
|
+
def update(name: nil, unit: nil, color: nil, timezone: nil, purge_cache_urls: nil, self_sufficient: nil)
|
80
|
+
client.update_graph(graph_id: graph_id, name: name, unit: unit, color: color, timezone: timezone, self_sufficient: self_sufficient, purge_cache_urls: purge_cache_urls)
|
79
81
|
end
|
80
82
|
|
81
83
|
# Delete the predefined pixelation graph definition.
|
data/lib/pixela/version.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sue445
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|