diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bc854320 --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +*.gem +*.rbc +*.log +/.idea +/.config +/coverage/ +/InstalledFiles +/pkg/ +/spec/reports/ +/spec/examples.txt +/test/tmp/ +/test/version_tmp/ +/tmp/ + +# Used by dotenv library to load environment variables. +# .env + +# Ignore Byebug command history file. +.byebug_history + +## Specific to RubyMotion: +.dat* +.repl_history +build/ +*.bridgesupport +build-iPhoneOS/ +build-iPhoneSimulator/ + +## Specific to RubyMotion (use of CocoaPods): +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# vendor/Pods/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalization: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc + +# Used by RuboCop. Remote config files pulled in from inherit_from directive. +# .rubocop-https?--* diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..1f670a23 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,16 @@ +AllCops: + NewCops: enable + Exclude: + - 'vendor/**/*' + - 'spec/fixtures/**/*' + - 'tmp/**/*' + - '.git/**/*' + - 'bin/*' + TargetRubyVersion: 3.0 + SuggestExtensions: false + +Metrics/AbcSize: + Max: 17 + +Style/Documentation: + Enabled: false diff --git a/app/controllers/tests_controller.rb b/app/controllers/tests_controller.rb index 1526a689..ed7e9732 100644 --- a/app/controllers/tests_controller.rb +++ b/app/controllers/tests_controller.rb @@ -1,11 +1,14 @@ -class TestsController < Simpler::Controller +# frozen_string_literal: true +class TestsController < Simpler::Controller def index @time = Time.now + @tests = Test.all end - def create + def create; end + def show + @params = params end - end diff --git a/app/models/test.rb b/app/models/test.rb index 86376668..db135e04 100644 --- a/app/models/test.rb +++ b/app/models/test.rb @@ -1,8 +1,9 @@ +# frozen_string_literal: true + # Simpler.application.db.create_table(:tests) do # primary_key :id # String :title, null: false # Integer :level, default: 0 # end class Test < Sequel::Model - end diff --git a/app/views/tests/index.html.erb b/app/views/tests/index.html.erb index 39fce580..6bf643d0 100644 --- a/app/views/tests/index.html.erb +++ b/app/views/tests/index.html.erb @@ -8,5 +8,11 @@
<%= @time %>
+ +