Permalink
Browse files

Adding a space after '#' so bayesian language identifiers see this as…

… Ruby.

It appears that Linguist identifies these files as Racket because of all the
-'s in the comment block delimiter lines. If there is a single space after the
'#' then it sees the line as a comment.

An attempt at debugging this issue in Linguist resulted in making '#import'
lines in C/C++/Obj-C being identified as comments. Therefore I made the decision
to just add a space here instead of further debugging in Linguist, even though
no spaces after single line comment delimitiers is completely valid syntax in
C++/Ruby/Perl/Python/Shell etc.
  • Loading branch information...
1 parent f57842d commit e7d809e7cd472b82b16421d529f5a4a74ff6c987 @copiousfreetime committed Jul 15, 2013
Showing with 22 additions and 22 deletions.
  1. +4 −4 bin/stickler
  2. +8 −8 bin/stickler-passenger-config
  3. +10 −10 bin/stickler-server
View
@@ -6,10 +6,10 @@ require 'stickler/client'
SUB_COMMANDS = %w[ push yank mirror config list delete unyank ].sort
exec_name = File.basename( $0 )
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# parse through the top level global options, this is intercept
# --version and --help
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
global_options = Trollop::options do
version "Stickler #{Stickler::VERSION}"
banner <<-_
@@ -33,9 +33,9 @@ _
stop_on SUB_COMMANDS
end
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# sub command processing
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
cmd = ARGV.shift
Trollop::die "No sub command given" unless cmd
Trollop::die "Unknown sub command #{cmd.inspect}" unless SUB_COMMANDS.include?( cmd )
@@ -7,10 +7,10 @@ require 'stickler'
SUB_COMMANDS = %w[ apache2 nginx ]
exec_name = File.basename( $0 )
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# parse through the top level global options, this is intercept
# --version and --help
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
global_options = Trollop::options do
version "Stickler #{::Stickler::VERSION}"
banner <<-_
@@ -27,15 +27,15 @@ _
stop_on SUB_COMMANDS
end
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# sub command processing
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
cmd = ARGV.shift
Trollop::die "unknown sub command #{cmd.inspect}" unless SUB_COMMANDS.include?( cmd )
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# validate the sole argument, the stickler root directory
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
stickler_root = ARGV.shift
Trollop::die "Stickler root argument required" unless stickler_root
stickler_root = File.expand_path( stickler_root )
@@ -55,9 +55,9 @@ begin
config_ru = File.join( stickler_root, "config.ru" )
File.open( config_ru, "w+" ) do |f|
f.puts <<-__config_ru__
-#-----------------------------------------------------------------------
+# ----------------------------------------------------------------------
# config.ru for use with passenger deployed Stickler
-#-----------------------------------------------------------------------
+# ----------------------------------------------------------------------
require 'rubygems' if RUBY_VERSION < "1.9"
require 'stickler'
run ::Stickler::Server.new( "#{stickler_root}" ).app
View
@@ -6,10 +6,10 @@ require 'trollop'
SUB_COMMANDS = %w[ start stop ]
exec_name = File.basename( $0 )
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# parse through the top level global options, this is intercept
# --version and --help
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
global_options = Trollop::options do
version "Stickler #{Stickler::VERSION}"
banner <<-_
@@ -26,15 +26,15 @@ _
stop_on SUB_COMMANDS
end
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# sub command processing
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
cmd = ARGV.shift
Trollop::die "unknown sub command #{cmd.inspect}" unless SUB_COMMANDS.include?( cmd )
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# All for the display of a default
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
DEFAULT_HANDLERS = %w[ thin mongrel webrick ]
def rack_handler( handlers = DEFAULT_HANDLERS )
handlers = Array( handlers )
@@ -49,10 +49,10 @@ def rack_handler( handlers = DEFAULT_HANDLERS )
Trollop::die "No Server handler (#{handlers.join(",")}) found."
end
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# option parsing of the sub command, all subcommands have the same
# options
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
rack_options = Trollop::options do
banner <<-_
Usage: #{exec_name} #{cmd} [options] /path/to/stickler/root
@@ -71,9 +71,9 @@ end
rack_options[:Host] = rack_options.delete(:host)
rack_options[:Port] = rack_options.delete(:port)
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
# validate the sole argument, the stickler root directory
-#----------------------------------------------------------------------
+# ---------------------------------------------------------------------
stickler_root = ARGV.shift
Trollop::die "Stickler root argument required" unless stickler_root

0 comments on commit e7d809e

Please sign in to comment.