From 10c4ce20be37daa7b58c9c0998c27cb6f3b757cc Mon Sep 17 00:00:00 2001 From: unicornah Date: Tue, 14 May 2019 16:15:05 +0300 Subject: [PATCH 1/3] Upgarde bootstrap to v4.3.1 & others updated gemfile add thin fix readme.md by markdownlint/doc/Rules.md updated config.ru app.rb fix connected to layout.rb updated layout.rb --- Gemfile | 1 + Gemfile.lock | 9 ++++++++- README.md | 17 +++++++++++------ app.rb | 3 +-- config.ru | 5 +++++ views/layout.erb | 36 ++++++++++++++++++------------------ 6 files changed, 44 insertions(+), 27 deletions(-) diff --git a/Gemfile b/Gemfile index c10abd7..e03a992 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ source 'https://rubygems.org' gem 'sinatra' +gem 'thin' diff --git a/Gemfile.lock b/Gemfile.lock index fef086a..0a7ea0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,8 @@ GEM remote: https://rubygems.org/ specs: + daemons (1.3.1) + eventmachine (1.2.7) mustermann (1.0.1) rack (2.0.3) rack-protection (2.0.0) @@ -10,6 +12,10 @@ GEM rack (~> 2.0) rack-protection (= 2.0.0) tilt (~> 2.0) + thin (1.7.2) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) tilt (2.0.8) PLATFORMS @@ -17,6 +23,7 @@ PLATFORMS DEPENDENCIES sinatra + thin BUNDLED WITH - 1.16.0 + 1.17.2 diff --git a/README.md b/README.md index a04e146..b818189 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -Hello! +# Hello + ==== -This is a demonstrator for [Sinatra](http://www.sinatrarb.com/) and [Twitter Bootstrap](http://getbootstrap.com/). +This is a demonstrator for [Sinatra](http://www.sinatrarb.com/) and [Bootstrap](http://getbootstrap.com/). Use it as a boilerplate to start your own apps. Go! + === Download and run sinatra-bootstrap: @@ -13,12 +15,15 @@ Download and run sinatra-bootstrap: git clone https://github.com/bootstrap-ruby/sinatra-bootstrap cd sinatra-bootstrap - bundle install # To install sinatra - bundle exec ruby app.rb # To run the sample + bundle install # To install sinatra + + bundle exec rackup # To run the sample -Then open [http://localhost:4567/](http://localhost:4567/) +Then open [http://localhost:9292/](http://localhost:9292/) What's next? + ============ -- Try the rerun gem to restart Sinatra automatically when you change source files: https://github.com/alexch/rerun + +- Try the rerun gem to restart Sinatra automatically when you change source files: diff --git a/app.rb b/app.rb index 2d3d144..346b403 100644 --- a/app.rb +++ b/app.rb @@ -1,4 +1,3 @@ -require 'rubygems' require 'sinatra' configure do @@ -24,7 +23,7 @@ def username end get '/login/form' do - erb :login_form + erb :login_form, :layout => :layout end post '/login/attempt' do diff --git a/config.ru b/config.ru index 76a6edf..61d7143 100644 --- a/config.ru +++ b/config.ru @@ -1,2 +1,7 @@ +require 'rubygems' +require 'bundler' require './app' + +Bundler.require + run Sinatra::Application diff --git a/views/layout.erb b/views/layout.erb index 59f0699..2fd01d8 100644 --- a/views/layout.erb +++ b/views/layout.erb @@ -7,36 +7,36 @@ - - + + +
- - +
<%if @error then %>
<%=@error%>
@@ -47,9 +47,9 @@
- - - + + + From cdb413bf2e11f55892c43ed457bc56985875ab04 Mon Sep 17 00:00:00 2001 From: unicornah Date: Tue, 14 May 2019 16:21:15 +0300 Subject: [PATCH 2/3] fix readme.md --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b818189..9ef9ca5 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,10 @@ # Hello -==== - This is a demonstrator for [Sinatra](http://www.sinatrarb.com/) and [Bootstrap](http://getbootstrap.com/). Use it as a boilerplate to start your own apps. -Go! - -=== +## Go Download and run sinatra-bootstrap: @@ -22,8 +18,6 @@ Download and run sinatra-bootstrap: Then open [http://localhost:9292/](http://localhost:9292/) -What's next? - -============ +## What's next - Try the rerun gem to restart Sinatra automatically when you change source files: From dc337f73bde51a646b429c519d4285e25aa79de1 Mon Sep 17 00:00:00 2001 From: unicornah Date: Tue, 14 May 2019 16:52:46 +0300 Subject: [PATCH 3/3] fix button --- views/login_form.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/login_form.erb b/views/login_form.erb index a765bd0..12abd91 100644 --- a/views/login_form.erb +++ b/views/login_form.erb @@ -1,4 +1,4 @@
- +