diff --git a/Gemfile b/Gemfile index 3faf69f..92ca8a1 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,7 @@ source 'https://rubygems.org' gem 'rack' gem 'thin' +gem 'mustache' group :test do gem 'rspec' diff --git a/Gemfile.lock b/Gemfile.lock index e80faf2..8115495 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,6 +17,7 @@ GEM domain_name (~> 0.5) json (1.8.3) mime-types (2.6.1) + mustache (1.0.1) netrc (0.10.3) rack (1.6.4) rack-test (0.6.3) @@ -61,6 +62,7 @@ PLATFORMS DEPENDENCIES coveralls + mustache rack rack-test rake diff --git a/app/controller/home.rb b/app/controller/home.rb index 593ec34..5b13355 100644 --- a/app/controller/home.rb +++ b/app/controller/home.rb @@ -1,5 +1,7 @@ +require './app/view/views' + class Home def call(env) - [200, {"Content-Type" => "text/html"}, ["Hello Yose", "Source"]] + [200, {"Content-Type" => "text/html"}, View::Home.render] end end \ No newline at end of file diff --git a/app/view/home.mustache b/app/view/home.mustache new file mode 100644 index 0000000..88a3717 --- /dev/null +++ b/app/view/home.mustache @@ -0,0 +1,26 @@ + + +
+