Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2021-07-26 07:03:46 #2990

Merged
merged 108 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
e28b3bd
すべてのユーザーがQ&Aのタグを編集できるように変更
udaikue Jun 28, 2021
bd41a7a
タグ保存できていなかった部分を修正
udaikue Jul 10, 2021
a8c1488
テストを修正
udaikue Jul 10, 2021
27533eb
ユーザープロフィールページのSlack情報の表示を削除
fugakkbn Jul 10, 2021
ddc48ef
ユーザー登録情報変更ページの管理者のみ変更可能な部分からSlackの項目を削除
fugakkbn Jul 11, 2021
408055a
admin用ユーザー一覧ページのSlackの項目を削除
fugakkbn Jul 11, 2021
2c37205
Usersテーブルからslack_account,slack_participationカラムを削除するmigrationファイルを作成
fugakkbn Jul 11, 2021
e7e5ab2
bin/rails db:migrate
fugakkbn Jul 11, 2021
fa46ccc
user_paramsからslack_account,slack_participationを削除
fugakkbn Jul 11, 2021
9168b32
required_fieldからslack_accountを削除
fugakkbn Jul 11, 2021
cbfb9a0
user_paramsからslack_accountを削除
fugakkbn Jul 11, 2021
a2ee03d
条件式から@user.slack_participation?を削除
fugakkbn Jul 11, 2021
f949b34
fixtureからslack_accountを削除
fugakkbn Jul 11, 2021
909abff
翻訳ファイルからSlack関連の定義を削除
fugakkbn Jul 11, 2021
98c3064
マイグレーションファイルを削除
fugakkbn Jul 13, 2021
c7bb224
ignored_columnsにslack_account, slack_participationを追加
fugakkbn Jul 13, 2021
ba66d46
Q&Aブックマーク用テスト追加
kasai441 Jul 2, 2021
42059bf
Q&Aブックマークdb/fixtures追加
kasai441 Jul 2, 2021
1d6112c
Q&Aページにブックマークボタンを追加
kasai441 Jul 2, 2021
e38f493
ブックマークボタンスタイル追加
kasai441 Jul 2, 2021
5f12770
テスト誤記修正
kasai441 Jul 2, 2021
d250b6c
日付のパラメータを追加
kasai441 Jul 2, 2021
c9105f7
アイコンの色が種別ごとに変わるように
kasai441 Jul 2, 2021
fb4cfaa
記事内容のサマリーを追加
kasai441 Jul 2, 2021
317b44f
アイコンクラス旧メソッド削除
kasai441 Jul 2, 2021
9e59d89
日付フォーマット
kasai441 Jul 2, 2021
5a6844c
編集チェック時の削除ボタン実装
kasai441 Jul 5, 2021
fb96772
Q&Aのブックマークテストを1箇所にまとめた
kasai441 Jul 5, 2021
3f7a9f4
ブックマーク一覧からブックマークを削除するテスト追加
kasai441 Jul 5, 2021
e33b6fd
DBのfixturesで引数が渡せておらずdb:setupで失敗するのを修正
kasai441 Jul 5, 2021
b9dc676
questionモデルにBookmarkableを追加し忘れていたので追加
kasai441 Jul 5, 2021
d3d4f27
投稿のアクションボタン配置レイアウトルールの整理
machida Jul 13, 2021
6a58fdb
退会理由を追加
fugakkbn Jul 15, 2021
697612f
退会理由がすべて表示されているかのテストを追加
fugakkbn Jul 15, 2021
8698ac2
お知らせ個別ページ作成ボタンの色を変更
makiichikawa Jul 15, 2021
95eb35c
scopeを削除
gozasoro Jul 15, 2021
fa1816b
HTMLのclass名をダブルクオートで囲った
machida Jul 16, 2021
cbdfe88
ファンクションの書き方を揃えた
kasai441 Jul 16, 2021
b82c294
Merge pull request #2989 from fjordllc/html-mail
machida Jul 16, 2021
6f1a356
fixtureに作成日時と公開日時に開きのあるお知らせを追加
rikuba Jul 15, 2021
bded80c
ダッシュボードのお知らせ一覧の表示を公開日時順にする
rikuba Jul 15, 2021
696189b
お知らせのテストデータに公開日時を設定
rikuba Jul 16, 2021
75b80f3
ダッシュボードに最新のお知らせが表示されることをテストする
rikuba Jul 16, 2021
c35c574
Doc個別ページにある、新規作成ボタンのデザインを変更
makiichikawa Jul 17, 2021
ff32855
ルーティングを追加
udaikue Jul 6, 2021
075b23d
ルーティングをindexのみに修正
yana-gi Jul 6, 2021
5d42ecb
コントローラーとビューを作成
yana-gi Jul 6, 2021
f27ffc2
コントローラーとビューを仮実装
yana-gi Jul 6, 2021
fbbf09f
ビューを作成
udaikue Jul 15, 2021
c4a4b7d
ダッシュボードにタブを追加
udaikue Jul 15, 2021
ad5182e
タブを修正
udaikue Jul 15, 2021
fae0070
ルーティングを修正
udaikue Jul 17, 2021
66e7fd2
提出物一覧のヘッダーを修正
udaikue Jul 17, 2021
59bdd86
titleを変更
udaikue Jul 17, 2021
2c26aa0
テストを追加
udaikue Jul 17, 2021
21604c6
Merge pull request #2893 from fjordllc/feature/all-users-can-edit-que…
komagata Jul 19, 2021
6fd4691
Merge pull request #2957 from fjordllc/feature/delete-all-information…
komagata Jul 19, 2021
836692a
Merge pull request #2927 from fjordllc/feature/bookmark_on_question
komagata Jul 19, 2021
3c42088
Merge pull request #2984 from fjordllc/feature/add-end-of-training-pe…
komagata Jul 19, 2021
bde1370
Merge pull request #2988 from fjordllc/feature/github-scope
komagata Jul 19, 2021
2f27413
Merge pull request #2985 from fjordllc/feature/dashboard-announcement…
komagata Jul 19, 2021
67cba93
Merge pull request #2986 from fjordllc/feature/change-color-of-button…
komagata Jul 19, 2021
2e7c0dc
Merge pull request #2993 from fjordllc/feature/change-design-of-butto…
komagata Jul 19, 2021
56cb8fd
Merge pull request #2935 from fjordllc/feature/add_dashboard_and_my_p…
komagata Jul 20, 2021
67c4af2
ダッシュボードにニコニコカレンダーを追加
fugakkbn Jul 19, 2021
31b7e11
ダッシュボードでのニコニコカレンダー表示に関するテストを追加
fugakkbn Jul 19, 2021
3dc435f
テストの名称を英語に修正
fugakkbn Jul 20, 2021
45b73cc
ユーザー > 質問一覧 に質問がない場合の表示を変更
rjtt17 Jul 20, 2021
7fd9462
lintの指摘を修正
rjtt17 Jul 20, 2021
13dcffb
インデントの修正
rjtt17 Jul 20, 2021
42dab69
DocsにWatch機能を追加した
yana-gi Jul 20, 2021
73d446e
テストを追加した
yana-gi Jul 21, 2021
b50c789
productモデルにchecker_avatarメソッドを追加
Daichi831 Jul 14, 2021
d70666c
jbuilderにchecker_avatarを追加
Daichi831 Jul 14, 2021
ddefb0f
提出物担当者の横にアイコンが表示されるようにvueファイルを編集
Daichi831 Jul 14, 2021
175048e
空白があったため修正
Daichi831 Jul 14, 2021
98cac66
カンマが入っていたので修正
Daichi831 Jul 19, 2021
d64ddfd
担当メンターアイコンのサイズとレイアウト調整
machida Jul 20, 2021
24212cf
提出物個別ページでもアイコンが表示されるように実装
Daichi831 Jul 21, 2021
50a537b
Merge pull request #3003 from fjordllc/feature/add-nico2-cal-to-dashb…
komagata Jul 21, 2021
8913848
Merge pull request #3004 from fjordllc/feature/display-icon-if-no-que…
komagata Jul 21, 2021
1f90829
Merge pull request #2980 from fjordllc/feature/add_icon_with_person_i…
komagata Jul 21, 2021
fd62e33
ruby2.6.8にアップグレード
komagata Jul 21, 2021
6ea1e67
Merge pull request #3012 from fjordllc/chore/ruby2.6.8
komagata Jul 21, 2021
69409bb
Dockerfileのbundlerのバージョンを合わせた
komagata Jul 21, 2021
9ad9ae2
markdownでユーザーアイコンを表示できるように
gozasoro Jul 11, 2021
944c4d4
controllerとroutes.rbを修正
gozasoro Jul 11, 2021
94f0d94
補完機能を修正
gozasoro Jul 13, 2021
27d2a93
空白文字を削除
gozasoro Jul 14, 2021
3d898aa
補完機能でユーザー名を表示
gozasoro Jul 15, 2021
f56ac1c
url一覧をjbuilderで表示、テストを追加
gozasoro Jul 20, 2021
afa09e6
JWTでのログインになるようにsession_controllerを修正
gozasoro Jul 21, 2021
89a2a20
before_actionでのログイン認証をapi用に修正
gozasoro Jul 21, 2021
a89c6a4
token作成時に前回のログイン情報が残っている場合は破棄
gozasoro Jul 21, 2021
f542a88
assert_responseをapi用のログイン認証に合わせた
gozasoro Jul 21, 2021
8aa1847
Merge pull request #3013 from fjordllc/chore/update-bundler-version-o…
komagata Jul 22, 2021
eb266c5
Merge pull request #2958 from fjordllc/feature/markdown-user-icon
komagata Jul 22, 2021
697ae5c
サインアップ時にURLでコースを指定できるようにした
komagata Jul 23, 2021
aefef66
current_user/watchesのルーティング追加
rjtt17 Jul 23, 2021
9cdd169
ダッシュボード配下にWatch中のタブを追加
rjtt17 Jul 23, 2021
8bd1cc8
/current_user/watchesのcontrollerとviewを作成した
rjtt17 Jul 23, 2021
055231e
ユーザーメニューからWatch中一覧を削除
rjtt17 Jul 23, 2021
5bd1f1a
テストを追加
rjtt17 Jul 23, 2021
354e16c
Merge pull request #3018 from fjordllc/feature/select-course-in-signup
komagata Jul 23, 2021
96fb2ac
テキストエリアのイベントをinputに変更
gozasoro Jul 25, 2021
e915dfd
Merge pull request #3019 from fjordllc/feature/add_dashboard_and_my_w…
komagata Jul 26, 2021
d8e918c
Merge pull request #3008 from fjordllc/feature/add_watch_on_docs_page
komagata Jul 26, 2021
21ef509
Merge pull request #3026 from fjordllc/bug/markdown-user-icon-safari-…
komagata Jul 26, 2021
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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
uses: ruby/setup-ruby@0c7e9c4d53d534e2c72b5b06535a3817d6d39fe1
with:
ruby-version: 2.6.6
ruby-version: 2.6.8
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Cache node modules
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.6
2.6.8
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ruby:2.6.6-alpine
FROM ruby:2.6.8-alpine

ENV RAILS_ENV production
WORKDIR /app

# Update rubygems
RUN gem update --system
RUN printf "install: --no-rdoc --no-ri\nupdate: --no-rdoc --no-ri" > ~/.gemrc
RUN gem install --no-document --force bundler -v 2.1.4
RUN gem install --no-document --force bundler -v 2.2.24
RUN bundle config set without development:test

# Install packages
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ GEM
omniauth (>= 1.9, < 3)
os (1.1.1)
parallel (1.20.1)
parser (3.0.0.0)
parser (3.0.2.0)
ast (~> 2.4.1)
pastel (0.8.0)
tty-color (~> 0.5)
Expand Down Expand Up @@ -349,17 +349,17 @@ GEM
chunky_png (~> 1.0)
rqrcode_core (~> 0.2)
rqrcode_core (0.2.0)
rubocop (1.12.0)
rubocop (1.18.3)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
rubocop-ast (>= 1.7.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-ast (1.8.0)
parser (>= 3.0.1.1)
rubocop-fjord (0.1.4)
rubocop (>= 1.0)
rubocop-performance
Expand Down Expand Up @@ -557,7 +557,7 @@ DEPENDENCIES
webpacker (~> 5.0)

RUBY VERSION
ruby 2.6.6p146
ruby 2.6.8p205

BUNDLED WITH
2.2.19
2.2.24
9 changes: 9 additions & 0 deletions app/assets/stylesheets/atoms/_a-bookmark-button.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.a-bookmark-button
border: none
&:hover
border: none
&.is-inactive
color: $semi-muted-text
&:hover
color: $default-text
background-color: $background-shade
22 changes: 18 additions & 4 deletions app/assets/stylesheets/blocks/thread/_thread-header-actions.sass
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
.thread-header-actions
padding-top: .25rem
display: flex
justify-content: space-between
padding-top: .25rem

.thread-header-actions__start,
.thread-header-actions__end
display: flex
flex: 1
+media-breakpoint-up(md)
+margin(horizontal, -.25rem)
+media-breakpoint-down(sm)
+margin(horizontal, -.125rem)

.thread-header-actions__start
justify-content: flex-start

.thread-header-actions__end
justify-content: flex-end

.thread-header-actions__action
+media-breakpoint-up(md)
+padding(horizontal, .25rem)
min-width: 6rem
+media-breakpoint-down(sm)
+padding(horizontal, .125rem)
width: 50%
.a-button
min-width: 5.25rem
+padding(horizontal, 0)
&:not(:last-child)
margin-right: .5rem
18 changes: 13 additions & 5 deletions app/assets/stylesheets/blocks/thread/_thread-list-item.sass
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,23 @@
+media-breakpoint-down(sm)
margin-top: .75rem

.thread-list-item__assignee-name.a-button
.thread-list-item__assignee-button.a-button
border: dashed 1px $muted-text
pointer-events: none
color: $muted-text
background-color: #f6f6f6
span
display: block
overflow: hidden
text-overflow: ellipsis

.thread-list-item__assignee-image
flex: 0 0 1.25rem
.a-user-icon
+size(1.25rem)

.thread-list-item__assignee-name
display: block
overflow: hidden
text-overflow: ellipsis
flex: 1
text-align: center

.thread-list-item__label
+position(absolute, left 0, top 0)
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ def user_params
params.require(:user).permit(
:adviser, :login_name, :name,
:name_kana, :email, :course_id,
:description, :slack_account, :discord_account, :github_account,
:description, :discord_account, :github_account,
:twitter_account, :facebook_url, :blog_url,
:password, :password_confirmation, :job,
:organization, :os, :study_place,
:experience, :prefecture_code, :company_id,
:trainee, :job_seeking, :nda,
:graduated_on, :retired_on, :free,
:job_seeker, :slack_participation, :github_collaborator,
:job_seeker, :github_collaborator,
:officekey_permission, :tag_list
)
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/courses/practices_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Courses::PracticesController < API::BaseController
before_action :require_login
before_action :require_login_for_api

def index
@course = Course.find(params[:course_id])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/products/checker_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Products::CheckerController < API::BaseController
before_action :require_mentor_login
before_action :require_mentor_login_for_api
before_action :set_product, only: %i[update]

def update
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/products/not_responded_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Products::NotRespondedController < API::BaseController
before_action :require_staff_login
before_action :require_staff_login_for_api
def index
@products = Product
.not_responded_products
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/products/self_assigned_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Products::SelfAssignedController < API::BaseController
before_action :require_staff_login
before_action :require_staff_login_for_api
def index
@products = Product.self_assigned_product(current_user.id).unchecked.list.page(params[:page])
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/products/unchecked_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Products::UncheckedController < API::BaseController
before_action :require_staff_login
before_action :require_staff_login_for_api
def index
@products = Product.unchecked.not_wip.list.page(params[:page])
end
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/api/products_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true

class API::ProductsController < API::BaseController
before_action :require_login
before_action :require_staff_login, only: :index
before_action :require_staff_login_for_api, only: :index

def index
@products = Product
Expand Down
7 changes: 1 addition & 6 deletions app/controllers/api/questions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ def show
end

def update
question =
if current_user.admin? || current_user.mentor?
Question.find(params[:id])
else
current_user.questions.find_by(id: params[:id])
end
question = Question.find(params[:id])

if !question.nil? && question.update(question_params)
head :ok
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/reports/unchecked_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class API::Reports::UncheckedController < API::BaseController
before_action :require_staff_login
before_action :require_staff_login_for_api
def index
@reports = Report.unchecked.not_wip.list.page(params[:page])
end
Expand Down
6 changes: 4 additions & 2 deletions app/controllers/api/session_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ class API::SessionController < API::BaseController
skip_before_action :require_login_for_api, only: %i[create]

def create
token = login_and_issue_token(params[:login_name], params[:password])
if token
logout if current_user
user = User.authenticate(params[:login_name], params[:password])
if user
token = User.issue_token(id: user.id, email: user.email)
render json: { token: token }
else
head :bad_request
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/api/user_icon_urls_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class API::UserIconUrlsController < API::BaseController
def index
@users = User.with_attached_avatar
end
end
1 change: 0 additions & 1 deletion app/controllers/api/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

class API::UsersController < API::BaseController
before_action :require_login, only: %i[index]
before_action :set_user, only: %i[show update]
before_action :require_mentor_login_for_api, only: %i[update]
PAGER_NUMBER = 20
Expand Down
1 change: 0 additions & 1 deletion app/controllers/api/watches_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

class API::WatchesController < API::BaseController
before_action :require_login
include Rails.application.routes.url_helpers

def index
Expand Down
26 changes: 26 additions & 0 deletions app/controllers/current_user/products/index.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- title "#{@user.login_name}の提出物"
header.page-header
.container
.page-header__inner
h2.page-header__title
= title
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to users_path, class: 'a-button is-md is-secondary is-block is-back' do
| ユーザー一覧

.page-tools
= render 'home/page_tabs', user: @current_user

.page-body
.container
- if @products.present?
.thread-list.a-card
= render partial: 'products/product', collection: @products, as: :product
- else
.o-empty-message
.o-empty-message__icon
i.far.fa-sad-tear
p.o-empty-message__text
| 提出物はまだありません。
23 changes: 23 additions & 0 deletions app/controllers/current_user/products_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

class CurrentUser::ProductsController < ApplicationController
before_action :require_login
before_action :set_user
before_action :set_products

def index; end

private

def set_user
@user = current_user
end

def set_products
@products = user.products.list
end

def user
@user ||= current_user
end
end
23 changes: 23 additions & 0 deletions app/controllers/current_user/watches_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

class CurrentUser::WatchesController < ApplicationController
before_action :require_login
before_action :set_user
before_action :set_watches

def index; end

private

def set_user
@user = current_user
end

def set_watches
@watches = user.watches
end

def user
@user ||= current_user
end
end
2 changes: 1 addition & 1 deletion app/controllers/current_user_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def user_params
params.require(:user).permit(
:adviser, :login_name, :name,
:name_kana, :email, :course_id,
:description, :job_seeking, :slack_account, :discord_account,
:description, :job_seeking, :discord_account,
:github_account, :twitter_account, :facebook_url,
:blog_url, :password, :password_confirmation,
:job, :organization, :os,
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ def index
redirect_to retire_path
else
@announcements = Announcement.with_avatar
.where(wip: false)
.order(published_at: :desc)
.limit(5)
.order(created_at: :desc)
@completed_learnings = current_user.learnings.where(status: 3).order(updated_at: :desc)
@my_seat_today = current_user.reservations.find_by(date: Date.current)&.seat&.name
@reservations_for_today = Reservation.where(date: Date.current).to_a
Expand All @@ -31,7 +32,6 @@ def set_required_fields
@required_fields = RequiredField.new(
description: current_user.description,
github_account: current_user.github_account,
slack_account: current_user.slack_account,
discord_account: current_user.discord_account
)
end
Expand Down
Loading