Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix up paths, remove init

- Fixed 'require' statements to work for installed gem
- Fixed executable path in gemspec (apparently bin/ is implied)
- Removed unneeded init.rb
- Make it clearer that ARGV[0] is the port number
  • Loading branch information...
commit 17fb24636a7ed5147e3f1d01cb578c73dd1a6c4f 1 parent b7e8659
@wapcaplet wapcaplet authored
View
7 bin/rubyslim
@@ -1,11 +1,10 @@
#!/usr/bin/env ruby
-#require File.expand_path(File.dirname(__FILE__) + "/init")
-require 'rubyslim/init'
require 'rubyslim/ruby_slim'
-
require 'jcode'
$KCODE="UTF8"
+port = ARGV[0].to_i
rubySlim = RubySlim.new
-rubySlim.run(ARGV[0].to_i)
+rubySlim.run(port)
+
View
1  lib/rubyslim/init.rb
@@ -1 +0,0 @@
-$: << File.expand_path(File.dirname(__FILE__) + "/../lib")
View
4 lib/rubyslim/list_executor.rb
@@ -1,5 +1,5 @@
-require "statement"
-require "statement_executor"
+require "rubyslim/statement"
+require "rubyslim/statement_executor"
class ListExecutor
def initialize()
View
8 lib/rubyslim/ruby_slim.rb
@@ -1,7 +1,7 @@
-require "socket_service"
-require "list_deserializer"
-require "list_serializer"
-require "list_executor"
+require "rubyslim/socket_service"
+require "rubyslim/list_deserializer"
+require "rubyslim/list_serializer"
+require "rubyslim/list_executor"
class RubySlim
def run(port)
View
2  lib/rubyslim/statement.rb
@@ -1,4 +1,4 @@
-require "statement_executor"
+require "rubyslim/statement_executor"
class Statement
EXCEPTION_TAG = "__EXCEPTION__:"
View
10 lib/rubyslim/statement_executor.rb
@@ -1,7 +1,7 @@
-require "slim_error"
-require "statement"
-require "table_to_hash_converter"
-require "slim_helper_library"
+require "rubyslim/slim_error"
+require "rubyslim/statement"
+require "rubyslim/table_to_hash_converter"
+require "rubyslim/slim_helper_library"
class StatementExecutor
def initialize
@@ -171,4 +171,4 @@ def replace_symbols(list)
end
end
end
-end
+end
View
4 lib/rubyslim/table_to_hash_converter.rb
@@ -7,7 +7,7 @@ def self.convert(string)
return html_to_hash(doc)
rescue
return string
- end
+ end
end
def self.html_to_hash(doc)
@@ -29,4 +29,4 @@ def self.add_row_to_hash(hash, row)
raise ArgumentError if columns.size != 2
hash[columns[0].text.strip.to_sym] = columns[1].text.strip
end
-end
+end
View
2  rubyslim.gemspec
@@ -17,6 +17,6 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.require_path = 'lib'
- s.executables << 'bin/rubyslim'
+ s.executables = ['rubyslim']
end
Please sign in to comment.
Something went wrong with that request. Please try again.