graphite_graph 0.0.4 → 0.0.5

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.
@@ -1,4 +1,5 @@
1
1
  require 'uri'
2
+ require 'cgi'
2
3
  require "graphite_graph/version"
3
4
  # A small DSL to assist in the creation of Graphite graphs
4
5
  # see https://github.com/ripienaar/graphite-graph-dsl/wiki
@@ -39,6 +40,7 @@ class GraphiteGraph
39
40
  :fontbold => false,
40
41
  :fontname => nil,
41
42
  :timezone => nil,
43
+ :xformat => nil,
42
44
  :background_color => nil,
43
45
  :foreground_color => nil,
44
46
  :draw_null_as_zero => false,
@@ -275,6 +277,7 @@ class GraphiteGraph
275
277
  url_parts << "fontName=#{properties[:fontname]}" if properties[:fontname]
276
278
  url_parts << "drawNullAsZero=#{properties[:draw_null_as_zero]}" if properties[:draw_null_as_zero]
277
279
  url_parts << "tz=#{properties[:timezone]}" if properties[:timezone]
280
+ url_parts << "xFormat=#{properties[:xformat]}" if properties[:xformat]
278
281
  url_parts << "majorGridLineColor=#{properties[:major_grid_line_color]}" if properties[:major_grid_line_color]
279
282
  url_parts << "minorGridLineColor=#{properties[:minor_grid_line_color]}" if properties[:minor_grid_line_color]
280
283
  url_parts << "bgcolor=#{properties[:background_color]}" if properties[:background_color]
@@ -339,7 +342,7 @@ class GraphiteGraph
339
342
  url_str = url_parts.join("&")
340
343
  properties[:placeholders].each { |k,v| url_str.gsub!("%{#{k}}", v.to_s) } if properties[:placeholders].is_a?(Hash)
341
344
 
342
- URI.encode(url_str, Regexp.union(URI::REGEXP::UNSAFE, /[+]/))
345
+ CGI.escape(url_str)
343
346
  else
344
347
  url_parts
345
348
  end
@@ -1,3 +1,3 @@
1
1
  class GraphiteGraph
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphite_graph
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - R.I.Pienaar
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-07-04 00:00:00 +01:00
19
+ date: 2012-07-16 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies: []
22
22