Skip to content

Commit

Permalink
update annotate
Browse files Browse the repository at this point in the history
  • Loading branch information
JensRavens committed Nov 23, 2024
1 parent 7ee7cae commit 54d81b0
Show file tree
Hide file tree
Showing 27 changed files with 198 additions and 122 deletions.
58 changes: 58 additions & 0 deletions .annotaterb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
:position: before
:position_in_additional_file_patterns: before
:position_in_class: before
:position_in_factory: before
:position_in_fixture: before
:position_in_routes: before
:position_in_serializer: before
:position_in_test: before
:classified_sort: true
:exclude_controllers: true
:exclude_factories: false
:exclude_fixtures: false
:exclude_helpers: true
:exclude_scaffolds: true
:exclude_serializers: false
:exclude_sti_subclasses: false
:exclude_tests: false
:force: false
:format_markdown: false
:format_rdoc: false
:format_yard: false
:frozen: false
:ignore_model_sub_dir: false
:ignore_unknown_models: false
:include_version: false
:show_check_constraints: false
:show_complete_foreign_keys: false
:show_foreign_keys: false
:show_indexes: false
:simple_indexes: false
:sort: true
:timestamp: false
:trace: false
:with_comment: true
:with_column_comments: true
:with_table_comments: true
:active_admin: false
:command:
:debug: false
:hide_default_column_types: ''
:hide_limit_column_types: ''
:ignore_columns:
:ignore_routes:
:models: true
:routes: false
:skip_on_db_migrate: false
:target_action: :do_annotations
:wrapper:
:wrapper_close:
:wrapper_open:
:classes_default_to_s: []
:additional_file_patterns: []
:model_dir:
- app/models
:require: []
:root_dir:
- ''
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ group :development, :test do
end

group :development do
gem "annotate"
gem "annotaterb"
gem "letter_opener"
gem "listen"
gem "rb-fsevent"
Expand Down
6 changes: 2 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ GEM
uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
annotate (2.6.5)
activerecord (>= 2.3.0)
rake (>= 0.8.7)
annotaterb (4.13.0)
ast (2.4.2)
aws-eventstream (1.3.0)
aws-partitions (1.1013.0)
Expand Down Expand Up @@ -559,7 +557,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
annotate
annotaterb
aws-sdk-s3
barnes
bcrypt
Expand Down
4 changes: 2 additions & 2 deletions app/models/daily_nerd_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# Table name: daily_nerd_messages
#
# id :uuid not null, primary key
# sprint_feedback_id :uuid not null
# message :string
# message :string not null
# created_at :datetime not null
# updated_at :datetime not null
# sprint_feedback_id :uuid not null
#
class DailyNerdMessage < ApplicationRecord
belongs_to :sprint_feedback
Expand Down
6 changes: 3 additions & 3 deletions app/models/inventory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# Table name: inventories
#
# id :uuid not null, primary key
# user_id :uuid not null
# details :string
# name :string not null
# received_at :datetime not null
# returned_at :datetime
# name :string not null
# details :string
# created_at :datetime not null
# updated_at :datetime not null
# user_id :uuid not null
#
class Inventory < ApplicationRecord
belongs_to :user
Expand Down
10 changes: 5 additions & 5 deletions app/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
# Table name: invoices
#
# id :uuid not null, primary key
# project_id :uuid not null
# harvest_id :bigint not null
# reference :string not null
# amount :decimal(, ) not null
# state :string not null
# sent_at :datetime
# paid_at :datetime
# reference :string not null
# sent_at :datetime
# state :string not null
# created_at :datetime not null
# updated_at :datetime not null
# harvest_id :bigint not null
# project_id :uuid not null
#
class Invoice < ApplicationRecord
belongs_to :project
Expand Down
6 changes: 3 additions & 3 deletions app/models/leave.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# Table name: leaves
#
# id :uuid not null, primary key
# days :date default([]), not null, is an Array
# leave_during :daterange not null
# status :string default("pending_approval"), not null
# title :string not null
# type :string default("paid"), not null
# status :string default("pending_approval"), not null
# days :date default([]), not null, is an Array
# user_id :uuid not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :uuid not null
#

class Leave < ApplicationRecord
Expand Down
2 changes: 1 addition & 1 deletion app/models/payslip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#
# id :uuid not null, primary key
# month :date not null
# user_id :uuid not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :uuid not null
#

class Payslip < ApplicationRecord
Expand Down
6 changes: 3 additions & 3 deletions app/models/salary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
# Table name: salaries
#
# id :uuid not null, primary key
# user_id :uuid not null
# brut :decimal(, ) not null
# net :decimal(, ) not null
# hgf_hash :string
# net :decimal(, ) not null
# valid_from :date not null
# created_at :datetime not null
# updated_at :datetime not null
# valid_from :date not null
# user_id :uuid not null
#
class Salary < ApplicationRecord
belongs_to :user
Expand Down
19 changes: 10 additions & 9 deletions app/models/sprint_feedback.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
# Table name: sprint_feedbacks
#
# id :uuid not null, primary key
# sprint_id :uuid not null
# user_id :uuid not null
# daily_nerd_count :integer
# tracked_hours :decimal(, )
# billable_hours :decimal(, )
# created_at :datetime not null
# updated_at :datetime not null
# review_notes :string
# costs :decimal(, )
# daily_nerd_count :integer
# daily_nerd_entry_dates :datetime default([]), not null, is an Array
# finished_storypoints :integer default(0), not null
# retro_rating :integer
# retro_text :string
# finished_storypoints :integer default(0), not null
# review_notes :string
# skip_retro :boolean default(FALSE)
# tracked_hours :decimal(, )
# turnover :decimal(, )
# costs :decimal(, )
# created_at :datetime not null
# updated_at :datetime not null
# sprint_id :uuid not null
# user_id :uuid not null
#

class SprintFeedback < ApplicationRecord
Expand Down
10 changes: 5 additions & 5 deletions app/models/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# Table name: tasks
#
# id :uuid not null, primary key
# sprint_id :uuid
# title :string not null
# status :citext
# github_id :string
# repository :string
# issue_number :bigint
# repository :string
# status :citext
# story_points :integer
# title :string not null
# created_at :datetime not null
# updated_at :datetime not null
# github_id :string
# project_id :uuid
# sprint_id :uuid
#
class Task < ApplicationRecord
belongs_to :sprint
Expand Down
4 changes: 2 additions & 2 deletions app/models/task_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# Table name: task_users
#
# id :uuid not null, primary key
# task_id :uuid not null
# user_id :uuid not null
# created_at :datetime not null
# updated_at :datetime not null
# task_id :uuid not null
# user_id :uuid not null
#
class TaskUser < ApplicationRecord
belongs_to :task
Expand Down
18 changes: 9 additions & 9 deletions app/models/time_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
# Table name: time_entries
#
# id :uuid not null, primary key
# external_id :string
# hours :decimal(, ) not null
# rounded_hours :decimal(, ) not null
# billable :string not null
# project_name :string not null
# client_name :string not null
# task :string not null
# billable_rate :decimal(, )
# client_name :string not null
# cost_rate :decimal(, )
# hours :decimal(, ) not null
# notes :string
# user_id :uuid not null
# sprint_id :uuid not null
# project_name :string not null
# rounded_hours :decimal(, ) not null
# task :string not null
# created_at :datetime not null
# updated_at :datetime not null
# external_id :string
# invoice_id :uuid
# project_id :uuid
# sprint_id :uuid not null
# task_id :uuid
# invoice_id :uuid
# user_id :uuid not null
#

class TimeEntry < ApplicationRecord
Expand Down
19 changes: 10 additions & 9 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
# Table name: users
#
# id :uuid not null, primary key
# born_on :date
# email :string default(""), not null
# roles :string default([]), not null, is an Array
# encrypted_password :string default(""), not null
# reset_password_token :string
# reset_password_sent_at :datetime
# first_name :string
# github_handle :string
# hired_on :date
# last_name :string
# nick_name :string
# remember_created_at :datetime
# reset_password_sent_at :datetime
# reset_password_token :string
# roles :string default([]), not null, is an Array
# yearly_holidays :integer default(30), not null
# created_at :datetime not null
# updated_at :datetime not null
# first_name :string
# last_name :string
# slack_id :string
# born_on :date
# hired_on :date
# github_handle :string
# nick_name :string
#

class User < ApplicationRecord
Expand Down
4 changes: 2 additions & 2 deletions bin/annotate → bin/annotaterb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Expand All @@ -26,4 +26,4 @@ end
require "rubygems"
require "bundler/setup"

load Gem.bin_path("annotate", "annotate")
load Gem.bin_path("annotaterb", "annotaterb")
6 changes: 3 additions & 3 deletions spec/fixtures/leaves.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Table name: leaves
#
# id :uuid not null, primary key
# days :date default([]), not null, is an Array
# leave_during :daterange not null
# status :string default("pending_approval"), not null
# title :string not null
# type :string default("paid"), not null
# status :string default("pending_approval"), not null
# days :date default([]), not null, is an Array
# user_id :uuid not null
# created_at :datetime not null
# updated_at :datetime not null
# user_id :uuid not null
#
john_sick_leave:
title: Having the Flu
Expand Down
6 changes: 3 additions & 3 deletions spec/fixtures/salaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# Table name: salaries
#
# id :uuid not null, primary key
# user_id :uuid not null
# brut :decimal(, ) not null
# net :decimal(, ) not null
# hgf_hash :string
# net :decimal(, ) not null
# valid_from :date not null
# created_at :datetime not null
# updated_at :datetime not null
# valid_from :date not null
# user_id :uuid not null
#

john_old:
Expand Down
19 changes: 11 additions & 8 deletions spec/fixtures/sprint_feedbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
# Table name: sprint_feedbacks
#
# id :uuid not null, primary key
# sprint_id :uuid not null
# user_id :uuid not null
# daily_nerd_count :integer
# tracked_hours :decimal(, )
# billable_hours :decimal(, )
# created_at :datetime not null
# updated_at :datetime not null
# review_notes :string
# costs :decimal(, )
# daily_nerd_count :integer
# daily_nerd_entry_dates :datetime default([]), not null, is an Array
# finished_storypoints :integer default(0), not null
# retro_rating :integer
# retro_text :string
# review_notes :string
# skip_retro :boolean default(FALSE)
# tracked_hours :decimal(, )
# turnover :decimal(, )
# costs :decimal(, )
# created_at :datetime not null
# updated_at :datetime not null
# sprint_id :uuid not null
# user_id :uuid not null
#
sprint_feedback_john:
sprint: empty
Expand Down
Loading

0 comments on commit 54d81b0

Please sign in to comment.