From 6ec409bfcb7bc67e6243749a9636b59703d6c668 Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Sat, 17 Jan 2015 15:03:00 +1100 Subject: [PATCH] Remove haml --- Gemfile.lock | 3 -- lib/mail_catcher/web/application.rb | 5 +-- mailcatcher.gemspec | 1 - views/404.erb | 6 +++ views/404.haml | 4 -- views/index.erb | 62 +++++++++++++++++++++++++++++ views/index.haml | 56 -------------------------- 7 files changed, 70 insertions(+), 67 deletions(-) create mode 100644 views/404.erb delete mode 100644 views/404.haml create mode 100644 views/index.erb delete mode 100644 views/index.haml diff --git a/Gemfile.lock b/Gemfile.lock index 07531b3..a847365 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,6 @@ PATH mailcatcher (0.6.0) activesupport (>= 4.0.0, < 5) eventmachine (~> 1.0.0) - haml (>= 3.1, < 4.1) mail (~> 2.3) sinatra (~> 1.2) skinny (~> 0.2.3) @@ -36,8 +35,6 @@ GEM execjs (2.1.0) ffi (1.9.3) fssm (0.2.10) - haml (4.0.5) - tilt hike (1.2.3) i18n (0.6.9) json (1.8.1) diff --git a/lib/mail_catcher/web/application.rb b/lib/mail_catcher/web/application.rb index 60ec93a..2a8ce51 100644 --- a/lib/mail_catcher/web/application.rb +++ b/lib/mail_catcher/web/application.rb @@ -17,7 +17,6 @@ module MailCatcher class Application < Sinatra::Base set :development, ENV["MAILCATCHER_ENV"] == "development" set :root, File.expand_path("#{__FILE__}/../../../..") - set :haml, :format => :html5 if development? require "sprockets-helpers" @@ -49,7 +48,7 @@ module MailCatcher end get "/" do - haml :index + erb :index end delete "/" do @@ -179,7 +178,7 @@ module MailCatcher end not_found do - haml :"404" + erb :"404" end end end diff --git a/mailcatcher.gemspec b/mailcatcher.gemspec index 18eed30..fa9acbc 100644 --- a/mailcatcher.gemspec +++ b/mailcatcher.gemspec @@ -32,7 +32,6 @@ Gem::Specification.new do |s| s.add_dependency "activesupport", ">= 4.0.0", "< 5" s.add_dependency "eventmachine", "~> 1.0.0" - s.add_dependency "haml", ">= 3.1", "< 4.1" s.add_dependency "mail", "~> 2.3" s.add_dependency "sinatra", "~> 1.2" s.add_dependency "sqlite3", "~> 1.3" diff --git a/views/404.erb b/views/404.erb new file mode 100644 index 0000000..c50f024 --- /dev/null +++ b/views/404.erb @@ -0,0 +1,6 @@ + + +

No Dice

+

The message you were looking for does not exist, or doesn't have content of this type.

+ + diff --git a/views/404.haml b/views/404.haml deleted file mode 100644 index eb690f8..0000000 --- a/views/404.haml +++ /dev/null @@ -1,4 +0,0 @@ -%html - %body - %h1 No Dice - %p The message you were looking for does not exist, or doesn't have content of this type. diff --git a/views/index.erb b/views/index.erb new file mode 100644 index 0000000..b02e73c --- /dev/null +++ b/views/index.erb @@ -0,0 +1,62 @@ + + + + MailCatcher + + <%= stylesheet_tag "mailcatcher" %> + <%= javascript_tag "mailcatcher" %> + + +
+

MailCatcher

+ +
+ +
+
+
+ + +
+ +
+ + diff --git a/views/index.haml b/views/index.haml deleted file mode 100644 index f10055b..0000000 --- a/views/index.haml +++ /dev/null @@ -1,56 +0,0 @@ -!!! -%html.mailcatcher - %head - %title MailCatcher - %link{:href => "/favicon.ico", :rel => "icon"} - = stylesheet_tag "mailcatcher" - = javascript_tag "mailcatcher" - %body - %header - %h1 - %a{:href => "http://mailcatcher.me", :target => "_blank"} MailCatcher - %nav.app - %ul - %li.search - %input{:type => "search", :name => "search", :placeholder => "Search messages...", :incremental => true} - %li.clear - %a{:href => "#", :title => "Clear all messages"} Clear - - unless MailCatcher.options[:no_exit] - %li.quit - %a{:href => "#", :title => "Quit MailCatcher"} Quit - %nav#messages - %table - %thead - %tr - %th From - %th To - %th Subject - %th Received - %tbody - #resizer - .ruler - %article#message - %header - %dl.metadata - %dt.created_at Received - %dd.created_at - %dt.from From - %dd.from - %dt.to To - %dd.to - %dt.subject Subject - %dd.subject - %dt.attachments Attachments - %dd.attachments - %nav.views - %ul - %li.format.tab.html.selected{"data-message-format" => "html"} - %a{:href => "#"} HTML - %li.format.tab.plain{"data-message-format" => "plain"} - %a{:href => "#"} Plain Text - %li.format.tab.source{"data-message-format" => "source"} - %a{:href => "#"} Source - %li.action.download - %a.button{:href => "#"} - %span Download - %iframe.body