Skip to content

Commit

Permalink
intial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lodewiges committed Nov 13, 2024
1 parent fbf1070 commit 6dcd7ad
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 148 deletions.
2 changes: 0 additions & 2 deletions app/controllers/v1/quickpost_messages_controller.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/jobs/user_archive_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def keep_entities # rubocop:disable Metrics/MethodLength
PhotoAlbum,
PhotoTag,
Poll,
QuickpostMessage,
Form::Form,
Form::Response,
Forum::Post,
Expand Down
14 changes: 0 additions & 14 deletions app/models/quickpost_message.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/policies/quickpost_message_policy.rb

This file was deleted.

17 changes: 0 additions & 17 deletions app/resources/v1/quickpost_message_resource.rb

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
end
get 'users/me/nextcloud', to: 'users#nextcloud'

jsonapi_resources :quickpost_messages
jsonapi_resources :vacancies

namespace :debit do
Expand Down
11 changes: 11 additions & 0 deletions db/migrate/20241113091607_remove_quickpost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class RemoveQuickpost < ActiveRecord::Migration[7.0]
def change
def up

Check warning on line 3 in db/migrate/20241113091607_remove_quickpost.rb

View workflow job for this annotation

GitHub Actions / Lint

Lint/NestedMethodDefinition: Method definitions must not be nested. Use lambda instead. (https://rubystyle.guide#no-nested-methods)
drop_table :quickpost_messages
end

Check failure on line 6 in db/migrate/20241113091607_remove_quickpost.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/TrailingWhitespace: Trailing whitespace detected. (https://rubystyle.guide#no-trailing-whitespace)
def down

Check warning on line 7 in db/migrate/20241113091607_remove_quickpost.rb

View workflow job for this annotation

GitHub Actions / Lint

Lint/NestedMethodDefinition: Method definitions must not be nested. Use lambda instead. (https://rubystyle.guide#no-nested-methods)
raise ActiveRecord::IrreversibleMigration, "This migration cannot be reverted because it destroys data."

Check failure on line 8 in db/migrate/20241113091607_remove_quickpost.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. (https://rubystyle.guide#consistent-string-literals)

Check failure on line 8 in db/migrate/20241113091607_remove_quickpost.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/LineLength: Line is too long. [110/100] (https://rubystyle.guide#max-line-length)
end
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_10_27_103012) do

ActiveRecord::Schema[7.0].define(version: 2024_11_13_091607) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down
4 changes: 0 additions & 4 deletions db/seeds/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
end
end

members.sample(80).each { |user| FactoryBot.create(:quickpost_message, author: user) }
# To ensure at least one user creating (more than) two quickpost messages
members.sample(30).each { |user| FactoryBot.create(:quickpost_message, author: user) }

members.sample(4).each do |user|
FactoryBot.create(:activity, author: user)
end
Expand Down
3 changes: 0 additions & 3 deletions db/seeds/permissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def create_permissions(permission_map)
'photo' => %i[create read update destroy],
'photo_comment' => %i[create read update destroy],
'photo_tag' => %i[create read update destroy],
'quickpost_message' => %i[create read update destroy],
'room_advert' => %i[create read update destroy],
'stored_mail' => %i[read destroy],
'forum/category' => %i[create read update destroy],
Expand Down Expand Up @@ -76,7 +75,6 @@ def create_permissions(permission_map)
'photo' => %i[create read],
'photo_comment' => %i[create read],
'photo_tag' => %i[create read],
'quickpost_message' => %i[create read],
'room_advert' => %i[create read],
'forum/category' => %i[read],
'forum/thread' => %i[create read],
Expand Down Expand Up @@ -111,7 +109,6 @@ def create_permissions(permission_map)
'photo' => %i[read],
'photo_comment' => %i[create read],
'photo_tag' => %i[create read],
'quickpost_message' => %i[create read],
'room_advert' => %i[],
'forum/category' => %i[read],
'forum/thread' => %i[create read],
Expand Down
6 changes: 0 additions & 6 deletions spec/factories/quickpost_messages.rb

This file was deleted.

2 changes: 0 additions & 2 deletions spec/jobs/user_archive_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
create(:photo, uploader: user)
create(:photo_album, author: user)
create(:poll, author: user)
create(:quickpost_message, author: user)
create(:response, user:)
create(:form, author: user)
create(:post, author: user)
Expand All @@ -33,7 +32,6 @@
it { expect { job }.to change { Photo.last.uploader }.from(user).to(archive_user) }
it { expect { job }.to change { PhotoAlbum.last.author }.from(user).to(archive_user) }
it { expect { job }.to change { Poll.last.author }.from(user).to(archive_user) }
it { expect { job }.to change { QuickpostMessage.last.author }.from(user).to(archive_user) }
it { expect { job }.to change { Form::Response.last.user }.from(user).to(archive_user) }
it { expect { job }.to change { Form::Form.last.author }.from(user).to(archive_user) }
it { expect { job }.to change { Forum::Post.last.author }.from(user).to(archive_user) }
Expand Down
43 changes: 0 additions & 43 deletions spec/models/quickpost_message_spec.rb

This file was deleted.

15 changes: 0 additions & 15 deletions spec/requests/v1/quickpost_messages_controller/create_spec.rb

This file was deleted.

11 changes: 0 additions & 11 deletions spec/requests/v1/quickpost_messages_controller/destroy_spec.rb

This file was deleted.

15 changes: 0 additions & 15 deletions spec/requests/v1/quickpost_messages_controller/index_spec.rb

This file was deleted.

11 changes: 0 additions & 11 deletions spec/requests/v1/quickpost_messages_controller/show_spec.rb

This file was deleted.

0 comments on commit 6dcd7ad

Please sign in to comment.