go_static 0.0.5 → 0.1.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.
Files changed (3) hide show
  1. data/lib/go_static.rb +1 -1
  2. data/lib/static_helper.rb +3 -0
  3. metadata +3 -3
data/lib/go_static.rb CHANGED
@@ -106,6 +106,7 @@ class GoStatic
106
106
  :minimum_font_size,
107
107
  :quality,
108
108
  :width,
109
+ :height,
109
110
  :javascript_delay,
110
111
  :zoom], "", :numeric)
111
112
 
@@ -138,7 +139,6 @@ class GoStatic
138
139
  :cookie_jar,
139
140
  :encoding,
140
141
  :format,
141
- :height,
142
142
  :load_error_handling,
143
143
  :password,
144
144
  :proxy,
data/lib/static_helper.rb CHANGED
@@ -11,6 +11,7 @@ module StaticHelper
11
11
  end
12
12
 
13
13
  def render_with_go_static(options = nil, *args, &block)
14
+ options[:format] ||= "png"
14
15
  if options.is_a?(Hash) && options.has_key?(:png)
15
16
  log_png_creation
16
17
  options[:basic_auth] = set_basic_auth(options)
@@ -21,6 +22,7 @@ module StaticHelper
21
22
  end
22
23
 
23
24
  def render_to_string_with_go_static(options = nil, *args, &block)
25
+ options[:format] ||= "png"
24
26
  if options.is_a?(Hash) && options.has_key?(:png)
25
27
  log_png_creation
26
28
  options[:basic_auth] = set_basic_auth(options)
@@ -61,6 +63,7 @@ module StaticHelper
61
63
  options[:layout] ||= false
62
64
  options[:template] ||= File.join(controller_path, action_name)
63
65
  options[:disposition] ||= "inline"
66
+ options[:format] ||= "png"
64
67
  if options[:show_as_html]
65
68
  render :template => options[:template], :layout => options[:layout], :formats => options[:formats], :handlers => options[:handlers], :content_type => "text/html"
66
69
  else
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: go_static
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 5
10
- version: 0.0.5
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Lle\xC3\xAFr Borr\xC3\xA0s Metje"