Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions apps/api/app/models/achievement.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class Achievement < ApplicationRecord
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.

end
15 changes: 15 additions & 0 deletions apps/api/db/migrate/20210529201519_create_achievements.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class CreateAchievements < ActiveRecord::Migration[6.1]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.

def up
create_table :achievements do |t|
t.uuid :uuid, index: { unique: true }, default: 'gen_random_uuid()', null: false
t.string :code
t.string :name
t.text :description

t.timestamps
end
end
def down
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Layout/EmptyLineBetweenDefs: Expected 1 empty line between method definitions; found 0.

drop_table :achievements
end
end
11 changes: 11 additions & 0 deletions apps/api/test/fixtures/achievements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html

one:
code: MyString
name: MyString
description: MyText

two:
code: MyString
name: MyString
description: MyText
7 changes: 7 additions & 0 deletions apps/api/test/models/achievement_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require "test_helper"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.


class AchievementTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end