-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
367 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Redcar | ||
class Help | ||
class HelpTab < HtmlTab | ||
DEFAULT_ICON = HELP_ICON | ||
|
||
def icon | ||
DEFAULT_ICON | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module Redcar | ||
class Help | ||
class ViewController | ||
include HtmlController | ||
|
||
def title | ||
"Shortcuts" | ||
end | ||
|
||
def clean_name(command) | ||
name = command.to_s.sub("Command","") | ||
idx = name.rindex("::") | ||
unless idx.nil? | ||
name = name[idx+2,name.length] | ||
end | ||
name = name.split(/(?=[A-Z])/).map{|w| w}.join(" ").sub("R E P L","REPL") | ||
end | ||
|
||
def index | ||
rhtml = ERB.new(File.read(File.join(File.dirname(__FILE__), "..", "..", "views", "index.html.erb"))) | ||
rhtml.result(binding) | ||
end | ||
end | ||
end | ||
end |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
plugins/view_shortcuts/views/index.html.erb → plugins/help/views/index.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><b>Is today Tuesday?</b></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><b>Hello!!</b></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
def htmlview_fixtures_path | ||
File.expand_path(File.dirname(__FILE__) + "/../fixtures") | ||
end | ||
|
||
def htmlview_fixtures_redcar | ||
File.join(htmlview_fixtures_path,".redcar") | ||
end | ||
|
||
def reset_htmlview_fixtures | ||
FileUtils.rm_rf(htmlview_fixtures_redcar) if File.exists?(htmlview_fixtures_redcar) | ||
File.open(htmlview_fixtures_path + "/sample.html", "w") do |f| | ||
f.print "<html><b>Hello!!</b></html>" | ||
end | ||
File.open(htmlview_fixtures_path + "/other.html", "w") do |f| | ||
f.print "<html><b>Is today Tuesday?</b></html>" | ||
end | ||
end | ||
|
||
Before do | ||
reset_htmlview_fixtures | ||
end | ||
|
||
After do | ||
reset_htmlview_fixtures | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.