Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@

# Ignore master key for decrypting credentials and more.
/config/master.key

# Ignore vendor
/vendor
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15.14.0
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# This file overrides https://github.com/bbatsov/rubocop/blob/master/config/default.yml

require:
- rubocop-rails

AllCops:
NewCops: enable
Expand Down
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ruby '2.6.6'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.5'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'sqlite3', group: :development
gem 'pg', group: :production
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
Expand All @@ -18,8 +18,6 @@ gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
Expand All @@ -38,6 +36,7 @@ gem 'bootsnap', '>= 1.1.0', require: false

gem 'bootstrap', '~> 4.5.0'
gem 'font-awesome-sass', '~> 5.11.2'
gem 'sassc', '2.1.0'
gem 'jquery-rails'
gem 'sorcery', '0.15.0'

Expand Down
11 changes: 5 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ GEM
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
ffi (1.15.0)
ffi (1.15.5)
font-awesome-sass (5.11.2)
sassc (>= 1.11)
globalid (0.4.2)
Expand Down Expand Up @@ -140,6 +140,7 @@ GEM
parallel (1.20.1)
parser (3.0.1.0)
ast (~> 2.4.1)
pg (1.3.5)
popper_js (1.16.0)
pry (0.14.1)
coderay (~> 1.1)
Expand Down Expand Up @@ -240,7 +241,7 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.4.0)
sassc (2.1.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
Expand Down Expand Up @@ -270,9 +271,6 @@ GEM
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
Expand Down Expand Up @@ -308,6 +306,7 @@ DEPENDENCIES
font-awesome-sass (~> 5.11.2)
jquery-rails
listen (>= 3.0.5, < 3.2)
pg
pry
pry-byebug
pry-doc
Expand All @@ -320,11 +319,11 @@ DEPENDENCIES
rubocop-checkstyle_formatter
rubocop-rails
sass-rails (~> 5.0)
sassc (= 2.1.0)
sorcery (= 0.15.0)
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@

- Ruby 2.6.6 を設定
- プロジェクトで利用するgemをインストール
- `bundle config --local path 'vendor/bundle'`
- `bundle config --local build.sassc -- --disable-march-tune-native`
- `bundle install`
- データベース、テーブルを作成
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
//= require bootstrap-sprockets
//= require rails-ujs
//= require activestorage
//= require turbolinks
//= require_tree .
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_before_login_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto main-nav align-items-center">
<li class="nav-item">
<%= link_to 'ログイン', login_path, class: 'nav-link' %>
<%= link_to 'Login', login_path, class: 'nav-link' %>
</li>
</ul>
</div>
Expand Down
10 changes: 5 additions & 5 deletions app/views/shared/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
</a>

<div class="dropdown-menu dropdown-menu-right">
<%= link_to 'Post一覧', posts_path, class: 'dropdown-item' %>
<%= link_to 'Post作成', new_post_path, class: 'dropdown-item' %>
<%= link_to 'List of Posts', posts_path, class: 'dropdown-item' %>
<%= link_to 'New Post', new_post_path, class: 'dropdown-item' %>
</div>
</li>

<li class="nav-item">
<%= link_to 'Like一覧', '#', class: 'nav-link' %>
<%= link_to 'List of Likes', '#', class: 'nav-link' %>
</li>

<li class="nav-item dropdown dropdown-slide">
Expand All @@ -29,9 +29,9 @@
<div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-item"><%= "#{current_user.last_name} #{current_user.first_name}" %></div>
<div class="dropdown-divider"></div>
<%= link_to 'プロフィール', '#', class: 'dropdown-item' %>
<%= link_to 'Profile', '#', class: 'dropdown-item' %>

<%= link_to 'ログアウト', logout_path, method: :delete, class: 'dropdown-item' %>
<%= link_to 'Logout', logout_path, method: :delete, class: 'dropdown-item' %>
</div>
</li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ test:

production:
<<: *default
database: db/production.sqlite3
adapter: postgresql
encoding: unicode
pool: 5
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
config.assets.compile = true

# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb

Expand Down