From 17b3646f93c6b52fa51291030c1fd7fe306eef88 Mon Sep 17 00:00:00 2001 From: Rikuoh Date: Sun, 4 Aug 2024 23:11:19 +0900 Subject: [PATCH] erblint --- memoapp/.erb-lint.yml | 5 +++ memoapp/Gemfile | 8 ++-- memoapp/Gemfile.lock | 89 ++++++++++++++++++++++++++++++++++++++++++- memoapp/README.md | 11 +++++- memoapp/app.rb | 2 +- 5 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 memoapp/.erb-lint.yml diff --git a/memoapp/.erb-lint.yml b/memoapp/.erb-lint.yml new file mode 100644 index 0000000..dee1bef --- /dev/null +++ b/memoapp/.erb-lint.yml @@ -0,0 +1,5 @@ +--- +glob: "**/*.erb" +linters: + RequireInputAutocomplete: + enabled: false diff --git a/memoapp/Gemfile b/memoapp/Gemfile index de9ea2b..8491c89 100644 --- a/memoapp/Gemfile +++ b/memoapp/Gemfile @@ -1,4 +1,6 @@ -source "https://rubygems.org" +source 'https://rubygems.org' -gem "sinatra" -gem "sinatra-contrib" +gem 'erb_lint', require: false +gem 'sinatra' +gem 'sinatra-contrib' +gem 'webrick' diff --git a/memoapp/Gemfile.lock b/memoapp/Gemfile.lock index 8c0dd3f..4ed4084 100644 --- a/memoapp/Gemfile.lock +++ b/memoapp/Gemfile.lock @@ -1,16 +1,95 @@ GEM remote: https://rubygems.org/ specs: + actionview (7.1.3.4) + activesupport (= 7.1.3.4) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activesupport (7.1.3.4) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + ast (2.4.2) base64 (0.2.0) + better_html (2.1.1) + actionview (>= 6.0) + activesupport (>= 6.0) + ast (~> 2.0) + erubi (~> 1.4) + parser (>= 2.4) + smart_properties + bigdecimal (3.1.8) + builder (3.3.0) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + crass (1.0.6) + drb (2.2.1) + erb_lint (0.6.0) + activesupport + better_html (>= 2.0.1) + parser (>= 2.7.1.4) + rainbow + rubocop (>= 1) + smart_properties + erubi (1.13.0) + i18n (1.14.5) + concurrent-ruby (~> 1.0) + json (2.7.2) + language_server-protocol (3.17.0.3) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + minitest (5.23.1) multi_json (1.15.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) + mutex_m (0.2.0) + nokogiri (1.16.7-x86_64-linux) + racc (~> 1.4) + parallel (1.24.0) + parser (3.3.2.0) + ast (~> 2.4.1) + racc + racc (1.8.0) rack (3.1.7) rack-protection (4.0.0) base64 (>= 0.1.0) rack (>= 3.0.0, < 4) rack-session (2.0.0) rack (>= 3.0.0) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + rainbow (3.1.1) + regexp_parser (2.9.2) + rexml (3.2.8) + strscan (>= 3.0.9) + rubocop (1.64.1) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) + ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) sinatra (4.0.0) mustermann (~> 3.0) @@ -24,15 +103,23 @@ GEM rack-protection (= 4.0.0) sinatra (= 4.0.0) tilt (~> 2.0) + smart_properties (1.17.0) + strscan (3.1.0) tilt (2.4.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + unicode-display_width (2.5.0) + webrick (1.8.1) PLATFORMS ruby x86_64-linux DEPENDENCIES + erb_lint sinatra sinatra-contrib + webrick BUNDLED WITH - 2.5.11 + 2.5.17 diff --git a/memoapp/README.md b/memoapp/README.md index e4e9544..e267617 100644 --- a/memoapp/README.md +++ b/memoapp/README.md @@ -1,2 +1,9 @@ -# memoapp -Sinatraでシンプルなメモアプリを作る +## Usage + +`git clone https://github.com/riq0h/memoapp.git` + +`cd memoapp` + +`bundle install` + +`ruby app.rb` diff --git a/memoapp/app.rb b/memoapp/app.rb index ceda607..4f59076 100644 --- a/memoapp/app.rb +++ b/memoapp/app.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'sinatra' -require 'sinatra/reloader' if development? +require 'sinatra/reloader' require 'json' FILE_PATH = 'public/memos.json'