ziya 2.1.7 → 2.1.8

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 (54) hide show
  1. data/Gemfile +10 -0
  2. data/Gemfile.lock +29 -0
  3. data/History.txt +34 -4
  4. data/{README.txt → README.rdoc} +1 -36
  5. data/README.txt1 +310 -0
  6. data/Rakefile +17 -43
  7. data/examples/charts/public/charts/.DS_Store +0 -0
  8. data/lib/ziya.rb +129 -104
  9. data/lib/ziya/charts/base.rb +17 -9
  10. data/lib/ziya/gauges/base.rb +4 -2
  11. data/lib/ziya/gauges/signal.rb +4 -4
  12. data/lib/ziya/gauges/support/base.rb +3 -3
  13. data/lib/ziya/maps/base.rb +4 -2
  14. data/lib/ziya/maps/support/base.rb +1 -1
  15. data/lib/ziya/maps/support/range.rb +1 -1
  16. data/lib/ziya/yaml_helpers/charts.rb +1 -1
  17. data/resources/charts/.DS_Store +0 -0
  18. data/resources/charts/charts_library/.DS_Store +0 -0
  19. data/resources/charts/sliders/.DS_Store +0 -0
  20. data/resources/gauges/.DS_Store +0 -0
  21. data/resources/maps/.DS_Store +0 -0
  22. data/spec/charts/support/chart_pref_spec.rb +1 -1
  23. data/spec/gauges/signal_spec.rb +2 -2
  24. data/spec/gauges/support/area_spec.rb +5 -5
  25. data/spec/gauges/support/image_spec.rb +2 -2
  26. data/spec/gauges/support/line_spec.rb +2 -2
  27. data/spec/gauges/support/link_spec.rb +2 -2
  28. data/spec/gauges/support/move_spec.rb +2 -2
  29. data/spec/gauges/support/polygon_spec.rb +2 -2
  30. data/spec/gauges/support/radial_numbers_spec.rb +4 -5
  31. data/spec/gauges/support/radial_ticks_spec.rb +2 -2
  32. data/spec/gauges/support/rotate_spec.rb +2 -2
  33. data/spec/gauges/support/scale_spec.rb +2 -2
  34. data/spec/gauges/support/text_spec.rb +2 -2
  35. data/spec/maps/base_spec.rb +1 -1
  36. data/spec/maps/support/default_color_spec.rb +2 -2
  37. data/spec/maps/support/heat_range_spec.rb +3 -2
  38. data/spec/ziya_spec.rb +1 -5
  39. data/version.txt +1 -0
  40. data/{ziya.gemspec → ziya.gemspec1} +0 -0
  41. metadata +54 -41
  42. data/Manifest.txt +0 -343
  43. data/lib/ziya/version.rb +0 -14
  44. data/tasks/ann.rake +0 -76
  45. data/tasks/annotations.rake +0 -22
  46. data/tasks/doc.rake +0 -53
  47. data/tasks/gem.rake +0 -110
  48. data/tasks/manifest.rake +0 -49
  49. data/tasks/post_load.rake +0 -26
  50. data/tasks/rubyforge.rake +0 -57
  51. data/tasks/setup.rb +0 -227
  52. data/tasks/spec.rake +0 -61
  53. data/tasks/svn.rake +0 -44
  54. data/tasks/test.rake +0 -38
@@ -1,121 +1,146 @@
1
- # Initializes the ziya framework. Call Ziya.initialize(...) somewhere in your
2
- # framework initialization routine
3
- unless defined? Ziya
4
- module Ziya
5
- # :stopdoc:
6
- LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
7
- PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
8
-
9
- def self.default_configuration
10
- {
11
- :themes_dir => File.join( File.dirname(__FILE__), %w[.. charts themes] ),
12
- :log_file => $stdout,
13
- :log_level => :info
14
- }
15
- end
16
-
17
- def self.initialize( opts={} )
18
- if opts[:log_level] == :debug
19
- puts ">>> No logger specified. Using ZiYa default logger" unless opts[:logger]
20
- puts ">>> No themes_dir specified. Using ZiYa default themes" unless opts[:themes_dir]
21
- end
22
- @config = default_configuration.merge( opts )
23
- @logger = opts[:logger] if opts[:logger]
24
-
25
- # Verify existence of themes, designs and helper dirs if any
26
- if themes_dir
27
- raise "Unable to find themes directory `#{themes_dir}" unless File.exists?( themes_dir )
28
- end
29
-
30
- if map_themes_dir
31
- raise "Unable to find map themes directory `#{map_themes_dir}" unless File.exists?( map_themes_dir )
32
- end
1
+ module Ziya
2
+ # :stopdoc:
3
+ LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
4
+ PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
5
+ # :startdoc:
33
6
 
34
- if designs_dir
35
- raise "Unable to find designs directory `#{designs_dir}" unless File.exists?( designs_dir )
36
- end
37
-
38
- if helpers_dir
39
- raise "Unable to find helper directory `#{helpers_dir}" unless File.exists?( helpers_dir )
40
- end
41
-
42
- # Add the ziya/lib to the ruby path...
43
- $: << libpath
44
- Ziya.require_all_libs_relative_to __FILE__
45
-
46
- dump if config[:log_level] == :debug
7
+ def self.initialize( opts={} )
8
+ if opts[:log_level] == :debug
9
+ puts ">>> No logger specified. Using ZiYa default logger" unless opts[:logger]
10
+ puts ">>> No themes_dir specified. Using ZiYa default themes" unless opts[:themes_dir]
47
11
  end
12
+ @config = default_configuration.merge( opts )
13
+ @logger = opts[:logger] if opts[:logger]
48
14
 
49
- # ZiYa configuration
50
- def self.config
51
- @config
52
- end
53
-
54
- # directory location for ziya stylesheet custom helpers
55
- def self.helpers_dir
56
- config[:helpers_dir]
57
- end
58
-
59
- # the themes root directory location
60
- def self.themes_dir
61
- config[:themes_dir]
15
+ # Verify existence of themes, designs and helper dirs if any
16
+ if themes_dir
17
+ raise "Unable to find themes directory `#{themes_dir}" unless File.exists?( themes_dir )
62
18
  end
63
19
 
64
- # the map themes root directory location
65
- def self.map_themes_dir
66
- config[:map_themes_dir]
20
+ if map_themes_dir
21
+ raise "Unable to find map themes directory `#{map_themes_dir}" unless File.exists?( map_themes_dir )
67
22
  end
68
23
 
69
- # the gauges designs root directory location
70
- def self.designs_dir
71
- config[:designs_dir]
24
+ if designs_dir
25
+ raise "Unable to find designs directory `#{designs_dir}" unless File.exists?( designs_dir )
72
26
  end
73
27
 
74
- # Debug
75
- def self.dump #:nodoc:
76
- puts ""
77
- puts "ZiYa Configuration Landscape"
78
- config.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |k|
79
- key = k.to_s.rjust(20)
80
- value = config[k].to_s.rjust(97,".")
81
- puts "#{key} : #{value}"
82
- end
28
+ if helpers_dir
29
+ raise "Unable to find helper directory `#{helpers_dir}" unless File.exists?( helpers_dir )
83
30
  end
84
31
 
85
- # fetch the framework logger
86
- def self.logger
87
- # get a hold of a logger.
88
- @logger ||= ::Ziya::Logger.new( { :log_file => config[:log_file],
89
- :logger_name => "ZiYa",
90
- :log_level => config[:log_level],
91
- :additive => false } )
32
+ # Add the ziya/lib to the ruby path...
33
+ $: << libpath
34
+ Ziya.require_all_libs_relative_to __FILE__
35
+
36
+ dump if config[:log_level] == :debug
37
+ end
38
+
39
+ def self.default_configuration
40
+ {
41
+ :themes_dir => File.join( File.dirname(__FILE__), %w[.. charts themes] ),
42
+ :log_file => $stdout,
43
+ :log_level => :info
44
+ }
45
+ end
46
+
47
+ # ZiYa configuration
48
+ def self.config
49
+ @config
50
+ end
51
+
52
+ # directory location for ziya stylesheet custom helpers
53
+ def self.helpers_dir
54
+ config[:helpers_dir]
55
+ end
56
+
57
+ # the themes root directory location
58
+ def self.themes_dir
59
+ config[:themes_dir]
60
+ end
61
+
62
+ # the map themes root directory location
63
+ def self.map_themes_dir
64
+ config[:map_themes_dir]
65
+ end
66
+
67
+ # the gauges designs root directory location
68
+ def self.designs_dir
69
+ config[:designs_dir]
70
+ end
71
+
72
+ # Debug
73
+ def self.dump #:nodoc:
74
+ puts ""
75
+ puts "ZiYa Configuration Landscape"
76
+ config.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |k|
77
+ key = k.to_s.rjust(20)
78
+ value = config[k].to_s.rjust(97,".")
79
+ puts "#{key} : #{value}"
92
80
  end
93
-
94
- # Returns the library path for the module. If any arguments are given,
95
- # they will be joined to the end of the libray path using
96
- # <tt>File.join</tt>.
97
- #
98
- def self.libpath( *args ) #:nodoc:
99
- args.empty? ? LIBPATH : ::File.join(LIBPATH, *args)
81
+ end
82
+
83
+ # fetch the framework logger
84
+ def self.logger
85
+ # get a hold of a logger.
86
+ @logger ||= ::Ziya::Logger.new( { :log_file => config[:log_file],
87
+ :logger_name => "ZiYa",
88
+ :log_level => config[:log_level],
89
+ :additive => false } )
90
+ end
91
+
92
+ # Returns the version string for the library.
93
+ #
94
+ def self.version
95
+ @version ||= File.read(path('version.txt')).strip
96
+ end
97
+
98
+ # Returns the library path for the module. If any arguments are given,
99
+ # they will be joined to the end of the libray path using
100
+ # <tt>File.join</tt>.
101
+ #
102
+ def self.libpath( *args, &block )
103
+ rv = args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
104
+ if block
105
+ begin
106
+ $LOAD_PATH.unshift LIBPATH
107
+ rv = block.call
108
+ ensure
109
+ $LOAD_PATH.shift
110
+ end
100
111
  end
112
+ return rv
113
+ end
101
114
 
102
- # Returns the lpath for the module. If any arguments are given,
103
- # they will be joined to the end of the path using
104
- # <tt>File.join</tt>.
105
- #
106
- def self.path( *args ) #:nodoc:
107
- args.empty? ? PATH : ::File.join(PATH, *args)
115
+ # Returns the lpath for the module. If any arguments are given,
116
+ # they will be joined to the end of the path using
117
+ # <tt>File.join</tt>.
118
+ #
119
+ def self.path( *args, &block )
120
+ rv = args.empty? ? PATH : ::File.join(PATH, args.flatten)
121
+ if block
122
+ begin
123
+ $LOAD_PATH.unshift PATH
124
+ rv = block.call
125
+ ensure
126
+ $LOAD_PATH.shift
127
+ end
108
128
  end
129
+ return rv
130
+ end
109
131
 
110
- # Utility method used to require all files ending in .rb that lie in the
111
- # directory below this file that has the same name as the filename passed
112
- # in. Optionally, a specific _directory_ name can be passed in such that
113
- # the _filename_ does not have to be equivalent to the directory.
114
- #
115
- def self.require_all_libs_relative_to( fname, dir = nil ) #:nodoc:
116
- dir ||= ::File.basename(fname, '.*')
117
- search_me = ::File.expand_path( ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
118
- Dir.glob(search_me).sort.each {|rb| require rb}
119
- end
132
+ # Utility method used to require all files ending in .rb that lie in the
133
+ # directory below this file that has the same name as the filename passed
134
+ # in. Optionally, a specific _directory_ name can be passed in such that
135
+ # the _filename_ does not have to be equivalent to the directory.
136
+ #
137
+ def self.require_all_libs_relative_to( fname, dir = nil )
138
+ dir ||= ::File.basename(fname, '.*')
139
+ search_me = ::File.expand_path(
140
+ ::File.join(::File.dirname(fname), dir, '**', '*.rb'))
141
+
142
+ Dir.glob(search_me).sort.each {|rb| require rb}
120
143
  end
121
- end
144
+ end
145
+
146
+ Ziya.require_all_libs_relative_to(__FILE__)
@@ -217,7 +217,7 @@ module Ziya::Charts
217
217
  @options[directive] = styles
218
218
  when :chart_types
219
219
  types = args.first.is_a?(Array) ? args.shift : []
220
- raise ArgumentError, "Must specify a set of chart types" if types.to_s.empty?
220
+ raise ArgumentError, "Must specify a set of chart types" if types.empty?
221
221
  @options[directive] = types
222
222
  when :theme
223
223
  theme = args.first.is_a?(String) ? args.shift : ""
@@ -237,7 +237,8 @@ module Ziya::Charts
237
237
  # link update where you may not need to redraw the whole chart.
238
238
  def to_s( options={} )
239
239
  @partial = options[:partial] || false
240
- @xml = Builder::XmlMarkup.new
240
+ out = ""
241
+ @xml = Builder::XmlMarkup.new( :target => out )
241
242
  # Forces utf8 encoding on xml stream
242
243
  @xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8"
243
244
  @xml.chart do
@@ -255,6 +256,7 @@ module Ziya::Charts
255
256
  setup_series
256
257
  end
257
258
  @xml.to_s.gsub( /<to_s\/>/, '' )
259
+ out
258
260
  end
259
261
  # dumps the chart design to xml for client side consumption
260
262
  alias to_xml to_s
@@ -303,12 +305,18 @@ module Ziya::Charts
303
305
  @xml.row do
304
306
  categories.each do |category|
305
307
  case
306
- when category.nil? : @xml.null
307
- when category.instance_of?(Symbol) : @xml.string( category.to_s )
308
- when category.instance_of?(String) : @xml.string( category )
309
- when category.respond_to?(:zero?) : @xml.number( category )
310
- when category.is_a?(Hash) : categ = category.clone;gen_row_data( categ.delete( :value ), categ, @xml )
311
- else puts "No match"
308
+ when category.nil?
309
+ @xml.null
310
+ when category.instance_of?(Symbol)
311
+ @xml.string( category.to_s )
312
+ when category.instance_of?(String)
313
+ @xml.string( category )
314
+ when category.respond_to?(:zero?)
315
+ @xml.number( category )
316
+ when category.is_a?(Hash)
317
+ categ = category.clone;gen_row_data( categ.delete( :value ), categ, @xml )
318
+ else
319
+ puts "No match"
312
320
  end
313
321
  end
314
322
  end
@@ -339,7 +347,7 @@ module Ziya::Charts
339
347
  # generates chart data points
340
348
  # BOZO !! Check args on hash
341
349
  def gen_chart_data( series )
342
- block = lambda {
350
+ block = proc {
343
351
  series[:points].each do |row|
344
352
  if !row
345
353
  @xml.null
@@ -134,13 +134,15 @@ module Ziya::Gauges
134
134
  # -----------------------------------------------------------------------
135
135
  # renders chart to xml
136
136
  def render_xml
137
- @xml = Builder::XmlMarkup.new
137
+ out = ''
138
+ @xml = Builder::XmlMarkup.new( :target => out )
138
139
  @xml.gauge do
139
140
  @xml.license( @license ) unless @license.nil?
140
141
  render_extra_components
141
142
  render_components
142
143
  end
143
- @xml.to_s.gsub( /<to_s\/>/, '' )
144
+ @xml.to_s.gsub( /<to_s\/>/, '' )
145
+ out
144
146
  end
145
147
 
146
148
  # -----------------------------------------------------------------------
@@ -79,7 +79,7 @@ module Ziya::Gauges
79
79
  count += 1
80
80
  end
81
81
  buff.join( "\n" )
82
- end
82
+ end
83
83
 
84
84
  # -----------------------------------------------------------------------
85
85
  # draws signal change indicator
@@ -122,9 +122,9 @@ module Ziya::Gauges
122
122
  def calc_change_alpha( change )
123
123
  alphas = []
124
124
  indexes = case change.abs
125
- when 0..1 : change >= 0 ? [2] : [3]
126
- when 1..5 : change >= 0 ? [1, 2] : [3,4]
127
- when 5...10 : change >= 0 ? [0, 1, 2] : [3,4,5]
125
+ when 0..1 then change >= 0 ? [2] : [3]
126
+ when 1..5 then change >= 0 ? [1, 2] : [3,4]
127
+ when 5...10 then change >= 0 ? [0, 1, 2] : [3,4,5]
128
128
  end
129
129
  6.times { |i| alphas[i] = indexes.include?(i) ? 100 : 10 }
130
130
  alphas
@@ -11,9 +11,9 @@ module Ziya::Gauges::Support
11
11
  options.each_pair do |k,v|
12
12
  if v.is_a? YAML::Omap
13
13
  buff << "#{tab}#{indent}#{dials}"
14
- v.each do |name, comp|
15
- buff << "#{tab}#{indent(2)}#{dial( comp.class.name.ziya_demodulize, name )}"
16
- comp.options.each_pair { |k,v| buff << "#{tab}#{indent(4)}#{k}: #{v}"}
14
+ v.each do |comp_name, comp|
15
+ buff << "#{tab}#{indent(2)}#{dial( comp.class.name.ziya_demodulize, comp_name )}"
16
+ comp.options.each_pair { |key,val| buff << "#{tab}#{indent(4)}#{key}: #{val}"}
17
17
  end
18
18
  else
19
19
  buff << "#{tab}#{indent(1)}#{k}: #{v}" if options[k] and !options[k].to_s.empty?
@@ -108,7 +108,7 @@ module Ziya::Maps
108
108
  if defined?(RAILS_ROOT)
109
109
  require_dependency File.join(helper_dir, $1)
110
110
  else
111
- require File.join(helper_dir, $1)
111
+ require File.expand_path( File.join(helper_dir, $1) )
112
112
  end
113
113
  helper_module_name = "Ziya::" + $1.gsub(/(^|_)(.)/) { $2.upcase }
114
114
  # helper_module_name = $1.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
@@ -208,7 +208,8 @@ module Ziya::Maps
208
208
 
209
209
  # spews the map specification to a string
210
210
  def to_s
211
- @xml = Builder::XmlMarkup.new
211
+ out = ''
212
+ @xml = Builder::XmlMarkup.new( :target => out )
212
213
  # Forces utf8 encoding on xml stream
213
214
  @xml.instruct! :xml, :version => "1.0", :encoding => "UTF-8"
214
215
  if map_type == :us
@@ -223,6 +224,7 @@ module Ziya::Maps
223
224
  end
224
225
  end
225
226
  @xml.to_s.gsub( /<to_s\/>/, '' )
227
+ out
226
228
  end
227
229
  # dumps the map design to xml for client side consumption
228
230
  alias to_xml to_s
@@ -6,7 +6,7 @@ module Ziya::Maps::Support
6
6
 
7
7
  # flatten component to xml
8
8
  def flatten( xml )
9
- xml.state( :id => to_component_id ) do |b|
9
+ xml.state( :id => to_component_id ) do |state|
10
10
  options.keys.sort { |a,b| a.to_s <=> b.to_s }.each{ |k| self.class.module_eval "xml.#{k}( '#{options[k]}' )" }
11
11
  end
12
12
  end
@@ -16,7 +16,7 @@ module Ziya::Maps::Support
16
16
  define_mappings :level => :data
17
17
 
18
18
  def flatten( xml )
19
- xml.state( :id => to_component_id ) do |b|
19
+ xml.state( :id => to_component_id ) do
20
20
  options.keys.sort { |a,b| a.to_s <=> b.to_s }.each { |k| self.class.module_eval "xml.#{find_key_for_attr(k)}( '#{options[k]}' )" }
21
21
  end
22
22
  end
@@ -43,7 +43,7 @@ module Ziya
43
43
  # => --- !ruby/object:Ziya::Charts::Bar
44
44
  def chart( class_name )
45
45
  "--- #{clazz( class_name, :Charts )}"
46
- end
46
+ end
47
47
  end
48
48
  end
49
49
  end
Binary file
@@ -23,7 +23,7 @@ describe Ziya::Charts::Support::ChartPref do
23
23
  it "should flatten line connect correctly" do
24
24
  @comp.connect = true
25
25
  @comp.point_shape = 'square'
26
- @comp.flatten( @xml ).should == '<chart_pref point_shape="square" connect="true"/>'
26
+ @comp.flatten( @xml ).should == '<chart_pref connect="true" point_shape="square"/>'
27
27
  end
28
28
 
29
29
  it "should flatten zero line correctly" do
@@ -21,8 +21,8 @@ describe Ziya::Gauges::Signal do
21
21
  buff.scan( /<license/ ).size.should == 1
22
22
  buff.scan( /<polygon/ ).size.should == 16
23
23
  buff.scan( /<point/ ).size.should == 58
24
- buff.scan( /x=\"(.*?\d+)\"/ ).should == [["20"], ["20.0"], ["20.0"], ["35.0"], ["30.0"], ["31.7557050458495"], ["37.6335575687742"], ["47.406363729278"], ["38.270909152852"], ["39.0211303259031"], ["48.5316954888546"], ["49.3444280220142"], ["39.5629520146761"], ["39.0211303259031"], ["48.5316954888546"], ["40.0739181907658"], ["33.3826121271772"], ["31.7557050458495"], ["37.6335575687742"], ["23.1358538980296"], ["22.0905692653531"], ["20.0"], ["20.0"], ["5.0"], ["10.0"], ["8.24429495415054"], ["2.36644243122581"], ["-7.40636372927803"], ["1.72909084714798"], ["0.978869674096931"], ["-8.53169548885461"], ["-9.34442802201417"], ["0.437047985323883"], ["0.978869674096927"], ["-8.53169548885461"], ["-0.0739181907657454"], ["6.61738787282284"], ["8.24429495415053"], ["2.3664424312258"], ["16.8641461019704"], ["17.9094307346469"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"]]
25
- buff.scan( /y=\"(.*?\d+)\"/ ).should == [["30"], ["0.0"], ["-10.0"], ["-5.98076211353316"], ["2.67949192431123"], ["3.81966011250105"], ["-4.27050983124843"], ["7.797900707726"], ["11.865267138484"], ["13.8196601125011"], ["10.7294901687516"], ["26.2373507245328"], ["24.1582338163552"], ["26.1803398874989"], ["29.2705098312484"], ["42.2943447643218"], ["34.8628965095479"], ["36.1803398874989"], ["44.2705098312484"], ["49.8356568610482"], ["39.8904379073655"], ["40.0"], ["50.0"], ["45.9807621135332"], ["37.3205080756888"], ["36.1803398874989"], ["44.2705098312484"], ["32.202099292274"], ["28.134732861516"], ["26.180339887499"], ["29.2705098312484"], ["13.7626492754672"], ["15.8417661836448"], ["13.8196601125011"], ["10.7294901687516"], ["-2.29434476432183"], ["5.13710349045212"], ["3.81966011250105"], ["-4.27050983124842"], ["-9.8356568610482"], ["0.109562092634533"], ["-2"], ["-9.0"], ["-2"], ["8.0"], ["1.0"], ["8.0"], ["18.0"], ["11.0"], ["18.0"], ["23.0"], ["30.0"], ["23.0"], ["33.0"], ["40.0"], ["33.0"], ["43.0"], ["50.0"], ["43.0"]]
24
+ buff.scan( /x=\"(.*?\d+)\"/ ).should == [["20"], ["20.0"], ["20.0"], ["35.0"], ["30.0"], ["31.755705045849464"], ["37.633557568774194"], ["47.40636372927803"], ["38.27090915285201"], ["39.02113032590307"], ["48.53169548885461"], ["49.34442802201417"], ["39.562952014676114"], ["39.02113032590307"], ["48.53169548885461"], ["40.07391819076575"], ["33.38261212717717"], ["31.755705045849467"], ["37.633557568774194"], ["23.135853898029612"], ["22.090569265353075"], ["20.000000000000004"], ["20.000000000000004"], ["4.9999999999999964"], ["9.999999999999998"], ["8.24429495415054"], ["2.36644243122581"], ["-7.406363729278031"], ["1.7290908471479796"], ["0.9788696740969307"], ["-8.531695488854606"], ["-9.344428022014174"], ["0.43704798532388267"], ["0.9788696740969272"], ["-8.53169548885461"], ["-0.07391819076574535"], ["6.617387872822837"], ["8.244294954150535"], ["2.366442431225803"], ["16.864146101970398"], ["17.909430734646932"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"], ["55"], ["58.5"], ["62.0"]]
25
+ buff.scan( /y=\"(.*?\d+)\"/ ).should == [["30"], ["0.0"], ["-10.0"], ["-5.98076211353316"], ["2.6794919243112254"], ["3.819660112501051"], ["-4.270509831248425"], ["7.797900707725995"], ["11.865267138483997"], ["13.819660112501051"], ["10.729490168751576"], ["26.237350724532774"], ["24.15823381635518"], ["26.180339887498945"], ["29.270509831248418"], ["42.29434476432182"], ["34.86289650954788"], ["36.180339887498945"], ["44.27050983124842"], ["49.8356568610482"], ["39.89043790736547"], ["40.0"], ["50.0"], ["45.98076211353316"], ["37.32050807568877"], ["36.180339887498945"], ["44.270509831248425"], ["32.202099292274"], ["28.134732861516"], ["26.180339887498953"], ["29.270509831248425"], ["13.762649275467243"], ["15.841766183644829"], ["13.819660112501055"], ["10.729490168751584"], ["-2.2943447643218278"], ["5.137103490452116"], ["3.8196601125010545"], ["-4.270509831248422"], ["-9.8356568610482"], ["0.10956209263453331"], ["-2"], ["-9.0"], ["-2"], ["8.0"], ["1.0"], ["8.0"], ["18.0"], ["11.0"], ["18.0"], ["23.0"], ["30.0"], ["23.0"], ["33.0"], ["40.0"], ["33.0"], ["43.0"], ["50.0"], ["43.0"]]
26
26
  end
27
27
 
28
28
  it "user can override signal" do