@@ -14,10 +14,9 @@ def read_schema(schema)
1414branches = repo . branches . each_name ( :local ) . sort
1515
1616tokens = [ ]
17- branches . each . with_index do |branch , i |
17+ branches . each . with_index do |branch |
1818 `git checkout "#{ branch } " &> /dev/null`
1919 Dir . glob ( 'schema/*.xsd' ) . map do |schema |
20- filename = schema . split ( '/' ) . last
2120 data = read_schema ( schema )
2221 data . scan ( /<xs:\w +|\w +="\w +"|\w +="xs:\w +"/ ) . uniq do |x |
2322 tokens << x unless tokens . include? x
@@ -59,7 +58,8 @@ def escape(s)
5958end
6059
6160# common function for each chart
62- def draw_chart ( which_chart , data , chart_string , chart_values , chart_title , chart_div , width , height )
61+ def draw_chart ( which_chart , data , chart_string , chart_values ,
62+ chart_title , chart_div , width , height )
6363 %(
6464 function drawChart#{ which_chart } () {
6565 // Create the data table.
@@ -104,18 +104,15 @@ def clean_chart(chart)
104104# chart size variables
105105width = 400
106106height = 330
107-
108- # data variable
109- #structure = generate_data
110-
111107# start common page region
112108$page = %(<!DOCTYPE html>
113109<html lang="en">
114110 <head>
115111 <meta charset="UTF-8">
116112 <meta http-equiv="X-UA-Compatible" content="IE=edge">
117113 <meta name="viewport" content="width=device-width, initial-scale=1">
118- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
114+ <!-- The above 3 meta tags *must* come first in the head;
115+ any other head content must come *after* these tags -->
119116 <title>XML Schema Differencing Dashboard</title>
120117 <!-- Latest compiled and minified CSS -->
121118 <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
@@ -204,7 +201,7 @@ def clean_chart(chart)
204201page_build ( page_count )
205202# restart common page region
206203$page = %(
207- <li class="nuchecker"><a target="_blank" rel="noopener">Valid HTML</a>
204+ <li class="nuchecker"><a target="_blank" rel="noopener">Valid HTML</a></li>
208205 </ul>
209206 <a href="https://info.flagcounter.com/LJf1" target="_blank" rel="noopener">
210207 <img src="https://s04.flagcounter.com/countxl/LJf1/bg_FFFFFF/txt_000000/border_CCCCCC/columns_2/maxflags_250/viewers_0/labels_1/pageviews_0/flags_1/percent_0/" alt="Free counters!">
@@ -232,7 +229,7 @@ def clean_chart(chart)
232229 v = 'Values'
233230 i = ind / 50
234231 instance_variable_set ( "@page#{ i > 0 ? i : '' } " ,
235- instance_variable_get ( "@page#{ i > 0 ? i : '' } " ) + " google.charts.setOnLoadCallback(drawChart#{ data0 } );\n " + draw_chart ( data0 , data1 , chart [ 0 ] , v , chart_title ( chart [ 0 ] , ind * 3 + j , branches [ j - 1 ] ) , data0 , width , height ) )
232+ instance_variable_get ( "@page#{ i > 0 ? i : '' } " ) + " google.charts.setOnLoadCallback(drawChart#{ data0 } );\n " + draw_chart ( data0 , data1 , chart [ 0 ] , v , chart_title ( chart [ 0 ] , ind * 3 + j , branches [ j - 1 ] ) , data0 , width , height ) )
236233 end
237234end
238235
0 commit comments