Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Code fixes for ruby 1.9 #8

Merged
merged 1 commit into from almost 2 years ago

2 participants

David Paleino Jochen Topf
David Paleino

Hello Jochen,

I made a commit fixing errors with ruby 1.9. There, in fact, map() changed meaning, and it returned a list of strings (instead of a "pure" string). Adding a join() fixes it.

One more fix was needed to correct the import path, since it seems like the current directory isn't added anymore.

Kindly,
David

Jochen Topf joto merged commit 6e7eac0 into from
Jochen Topf joto closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 04, 2012
David Paleino Fix code for ruby 1.9 3fd9102
This page is out of date. Refresh to see the latest.
6  web/lib/javascript.rb
@@ -6,7 +6,7 @@ def javascript(url=nil, &block)
6 6
 end
7 7
 
8 8
 def javascript_tags
9  
-    @javascript.map{ |js| js.to_html }
  9
+    @javascript.map{ |js| js.to_html }.join("\n")
10 10
 end
11 11
 
12 12
 class Javascript
@@ -23,9 +23,9 @@ def initialize(file)
23 23
 
24 24
     def to_html
25 25
         if @file.nil?
26  
-            %Q{    <script type="text/javascript">//<![CDATA[\n#{ @content }//]]></script>\n}
  26
+            %Q{    <script type="text/javascript">//<![CDATA[\n#{ @content }//]]></script>}
27 27
         else
28  
-            %Q{    <script type="text/javascript" src="/js/#{ @file }.js"></script>\n}
  28
+            %Q{    <script type="text/javascript" src="/js/#{ @file }.js"></script>}
29 29
         end
30 30
     end
31 31
 
2  web/taginfo.rb
@@ -27,6 +27,8 @@
27 27
 #
28 28
 #------------------------------------------------------------------------------
29 29
 
  30
+$LOAD_PATH.unshift(File.dirname(__FILE__))
  31
+
30 32
 require 'rubygems'
31 33
 require 'json'
32 34
 require 'sqlite3'
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.