pixela 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bdf58874af8d488cace583d00efc11a2bda3e095fe5ee4b9f4afaf83bbaab00
4
- data.tar.gz: 44b273ab85f3761f72619b839785d95aa6b8d2b8945abef19ff2cdde24d887fc
3
+ metadata.gz: 0f3751766bfd2903143fe8f0e49836b3b040383dcbdd76271000b22c9771821e
4
+ data.tar.gz: 011a0100cc329b56e4e2049e6d65b8c17635b7497f96f919b0c3f272c97b4999
5
5
  SHA512:
6
- metadata.gz: adebc2de07fd39ada466ccf27edbbaed2ae47b5ec16b984265a5ffc91e2280a08807dfd0a279790a4a29a5c63c04598d0e1b5c714f69bbb8eafb80fbb32718e7
7
- data.tar.gz: 8c487b204b5e8a2d0417bc210c4c21a2f8812b6ff1e72159118b470464bbe8b4f409a1f85f60df0916945faba9f8b5dbd9cd9fa732c3380a20fa0f48093a540c
6
+ metadata.gz: 461873a36898a96e8698d3401a0c36d897e1dbbb96d38f9824cc40829ff79b0b152c2da391fb7b7b4b7afb892453437875a3b78649a9334e313b5ba132b9feeb
7
+ data.tar.gz: 8e5feab90d3e9827fa662d75b3d0351bb95db3299c7dd34cfe228a3e5eea46690d063eb11c6f92adf20f2eb9130eb946455302e1efc7e6a27beed6e681061cd6
@@ -1,5 +1,12 @@
1
1
  ## Unreleased
2
- [full changelog](http://github.com/sue445/pixela/compare/v0.4.0...master)
2
+ [full changelog](http://github.com/sue445/pixela/compare/v0.5.0...master)
3
+
4
+ ## v0.5.0
5
+ [full changelog](http://github.com/sue445/pixela/compare/v0.4.0...v0.5.0)
6
+
7
+ * Add mode to graph_url
8
+ * https://github.com/sue445/pixela/pull/25
9
+ * https://github.com/a-know/Pixela/releases/tag/v1.3.0
3
10
 
4
11
  ## v0.4.0
5
12
  [full changelog](http://github.com/sue445/pixela/compare/v0.3.0...v0.4.0)
@@ -7,6 +14,7 @@
7
14
  * Support webhook API
8
15
  * https://github.com/sue445/pixela/issues/23
9
16
  * https://github.com/sue445/pixela/pull/24
17
+ * https://github.com/a-know/Pixela/releases/tag/v1.2.0
10
18
 
11
19
  ## v0.3.0
12
20
  [full changelog](http://github.com/sue445/pixela/compare/v0.2.0...v0.3.0)
@@ -14,6 +22,7 @@
14
22
  * Support purgeCacheURLs
15
23
  * https://github.com/sue445/pixela/issues/20
16
24
  * https://github.com/sue445/pixela/pull/22
25
+ * https://github.com/a-know/Pixela/releases/tag/v1.1.0
17
26
 
18
27
  ## v0.2.0
19
28
  [full changelog](http://github.com/sue445/pixela/compare/v0.1.1...v0.2.0)
@@ -49,6 +49,7 @@ module Pixela::Client::GraphMethods
49
49
  #
50
50
  # @param graph_id [String]
51
51
  # @param date [Date,Time]
52
+ # @param mode [String] e.g) `short`
52
53
  #
53
54
  # @return [String]
54
55
  #
@@ -56,11 +57,15 @@ module Pixela::Client::GraphMethods
56
57
  #
57
58
  # @example
58
59
  # client.graph_url(graph_id: "test-graph")
59
- # client.graph_url(graph_id: "test-graph", date: Date.new(2018, 3, 31))
60
- def graph_url(graph_id:, date: nil)
60
+ # client.graph_url(graph_id: "test-graph", date: Date.new(2018, 3, 31), mode: "short")
61
+ def graph_url(graph_id:, date: nil, mode: nil)
61
62
  url = "#{Pixela::Client::API_ENDPOINT}/users/#{username}/graphs/#{graph_id}"
62
63
 
63
- url << "?date=#{to_ymd(date)}" if date
64
+ params = Faraday::Utils::ParamsHash.new
65
+ params[:date] = to_ymd(date) if date
66
+ params[:mode] = mode if mode
67
+
68
+ url << "?#{params.to_query}" unless params.empty?
64
69
 
65
70
  url
66
71
  end
@@ -44,6 +44,7 @@ module Pixela
44
44
  # Get graph url
45
45
  #
46
46
  # @param date [Date,Time]
47
+ # @param mode [String] e.g) `short`
47
48
  #
48
49
  # @return [String]
49
50
  #
@@ -51,9 +52,9 @@ module Pixela
51
52
  #
52
53
  # @example
53
54
  # client.graph("test-graph").url
54
- # client.graph("test-graph").url(date: Date.new(2018, 3, 31))
55
- def url(date: nil)
56
- client.graph_url(graph_id: graph_id, date: date)
55
+ # client.graph("test-graph").url(date: Date.new(2018, 3, 31), mode: "short")
56
+ def url(date: nil, mode: nil)
57
+ client.graph_url(graph_id: graph_id, date: date, mode: mode)
57
58
  end
58
59
 
59
60
  # Update predefined pixelation graph definitions.
@@ -1,3 +1,3 @@
1
1
  module Pixela
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -47,6 +47,7 @@ Gem::Specification.new do |spec|
47
47
  spec.add_development_dependency "rake", "~> 10.0"
48
48
  spec.add_development_dependency "rspec", "~> 3.0"
49
49
  spec.add_development_dependency "rspec-its"
50
+ spec.add_development_dependency "rspec-parameterized"
50
51
  spec.add_development_dependency "simplecov"
51
52
  spec.add_development_dependency "webmock"
52
53
  spec.add_development_dependency "yard"
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: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sue445
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-21 00:00:00.000000000 Z
11
+ date: 2018-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rspec-parameterized
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: simplecov
183
197
  requirement: !ruby/object:Gem::Requirement