Skip to content

Commit

Permalink
Merge pull request #458 from alecslupu-pfa/feature/add-guest-registra…
Browse files Browse the repository at this point in the history
…tion

Install decidim-guest_meeting_registration
  • Loading branch information
Robin481 authored Sep 17, 2024
2 parents 6db85cf + c14a039 commit 0b781ac
Show file tree
Hide file tree
Showing 13 changed files with 305 additions and 675 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ gem 'decidim-participatory_documents', github: 'openpoke/decidim-module-particip
gem 'decidim-question_captcha', github: 'OpenSourcePolitics/decidim-module-question_captcha', branch: 'release/0.27-stable'
gem 'decidim-survey_multiple_answers', '~> 0.26.2'

gem 'decidim-guest_meeting_registration', github: 'alecslupu-pfa/guest-meeting-registration', branch: 'release/0.27-stable'

# Had to be set to 0.27-stable because the master reference doesn't exist anymore and the main branch now requires ruby =< 3.1
gem 'decidim-term_customizer', github: 'mainio/decidim-module-term_customizer', branch: 'release/0.27-stable'

Expand Down
11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ GIT
decidim-core (~> 0.27.0)
deface (~> 1.6)

GIT
remote: https://github.com/alecslupu-pfa/guest-meeting-registration.git
revision: 9610e6da08535083e4abb3db185a834aba9d3456
branch: release/0.27-stable
specs:
decidim-guest_meeting_registration (0.27.7)
decidim-core (~> 0.27)
decidim-meetings (~> 0.27)
deface (>= 1.9)

GIT
remote: https://github.com/decidim-ice/decidim-module-decidim_awesome.git
revision: 161e41933910cd7e14b60e3acb2f704305863d30
Expand Down Expand Up @@ -1064,6 +1074,7 @@ DEPENDENCIES
decidim-decidim_awesome!
decidim-decidim_geo!
decidim-dev (= 0.27.8)
decidim-guest_meeting_registration!
decidim-participatory_documents!
decidim-proposals (= 0.27.8)
decidim-question_captcha!
Expand Down
17 changes: 6 additions & 11 deletions bin/bundle-binstub
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ m = Module.new do
bundler_version = nil
update_index = nil
ARGV.each_with_index do |a, i|
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
bundler_version = a
end
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
Expand All @@ -47,7 +47,7 @@ m = Module.new do
def lockfile
lockfile =
case File.basename(gemfile)
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
when "gems.rb" then gemfile.sub(/\.rb$/, ".locked")
else "#{gemfile}.lock"
end
File.expand_path(lockfile)
Expand All @@ -62,22 +62,17 @@ m = Module.new do

def bundler_requirement
@bundler_requirement ||=
env_var_version || cli_arg_version ||
bundler_requirement_for(lockfile_version)
env_var_version ||
cli_arg_version ||
bundler_requirement_for(lockfile_version)
end

def bundler_requirement_for(version)
return "#{Gem::Requirement.default}.a" unless version

bundler_gem_version = Gem::Version.new(version)

requirement = bundler_gem_version.approximate_recommendation

return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0")

requirement += ".a" if bundler_gem_version.prerelease?

requirement
bundler_gem_version.approximate_recommendation
end

def load_bundler!
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021907)

class CreateGuestMeetingRegistrationSettings < ActiveRecord::Migration[6.0]
def change
create_table :decidim_guest_meeting_registration_settings do |t|
t.boolean :enable_guest_registration, default: false
t.references :decidim_organization, foreign_key: true, index: { name: :index_guest_meeting_registration_settings_on_organization_id }

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021908)

class AddConfirmationSettings < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_settings, :enable_registration_confirmation, :boolean, default: false, after: :enable_guest_registration
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021909)

class CreateGuestMeetingRegistrationRegistrationRequests < ActiveRecord::Migration[6.0]
def change
create_table :decidim_guest_meeting_registration_registration_requests do |t|
t.references :decidim_organization, foreign_key: true, index: { name: :index_guest_meeting_registration_rr_on_organization_id }
t.references :decidim_meetings_meetings, foreign_key: true, index: { name: :index_guest_meeting_registration_mm_on_organization_id }
t.integer :decidim_user_id, index: { name: :index_guest_meeting_registration_uid_on_organization_id }

t.jsonb :form_data
t.string :email, null: false
t.string :name

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021910)

class AddConfirmationToRegisterRequests < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_registration_requests, :confirmation_token, :string, after: :name
add_column :decidim_guest_meeting_registration_registration_requests, :confirmed_at, :datetime, after: :confirmation_token
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021911)

class AddCancellationSettings < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_settings, :enable_cancellation, :boolean, default: false, after: :enable_guest_registration
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021912)

class AddCancellationToRegisterRequests < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_registration_requests, :cancellation_token, :string, after: :name
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021913)

class AddSessionTokenToRegisterRequests < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_registration_requests, :session_token, :string, after: :name, unique: true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_guest_meeting_registration (originally 20240820021914)

class AddDisableNormalAccountToRegisterSettings < ActiveRecord::Migration[6.0]
def change
add_column :decidim_guest_meeting_registration_settings, :disable_account_confirmation, :boolean, default: false
end
end
37 changes: 36 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_05_23_084602) do
ActiveRecord::Schema.define(version: 2024_09_17_075030) do

# These are extensions that must be enabled in order to support this database
enable_extension "fuzzystrmatch"
enable_extension "ltree"
enable_extension "pg_trgm"
enable_extension "plpgsql"
enable_extension "postgis"
enable_extension "postgis_tiger_geocoder"
enable_extension "postgis_topology"

create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
Expand Down Expand Up @@ -903,6 +906,35 @@
t.index ["decidim_geo_space_type", "decidim_geo_space_id"], name: "decidim_geo_space_poly_idx", unique: true
end

create_table "decidim_guest_meeting_registration_registration_requests", force: :cascade do |t|
t.bigint "decidim_organization_id"
t.bigint "decidim_meetings_meetings_id"
t.integer "decidim_user_id"
t.jsonb "form_data"
t.string "email", null: false
t.string "name"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "confirmation_token"
t.datetime "confirmed_at"
t.string "cancellation_token"
t.string "session_token"
t.index ["decidim_meetings_meetings_id"], name: "index_guest_meeting_registration_mm_on_organization_id"
t.index ["decidim_organization_id"], name: "index_guest_meeting_registration_rr_on_organization_id"
t.index ["decidim_user_id"], name: "index_guest_meeting_registration_uid_on_organization_id"
end

create_table "decidim_guest_meeting_registration_settings", force: :cascade do |t|
t.boolean "enable_guest_registration", default: false
t.bigint "decidim_organization_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.boolean "enable_registration_confirmation", default: false
t.boolean "enable_cancellation", default: false
t.boolean "disable_account_confirmation", default: false
t.index ["decidim_organization_id"], name: "index_guest_meeting_registration_settings_on_organization_id"
end

create_table "decidim_hashtags", force: :cascade do |t|
t.bigint "decidim_organization_id"
t.string "name"
Expand Down Expand Up @@ -2132,6 +2164,9 @@
add_foreign_key "decidim_geo_shapefile_datas", "decidim_scopes", column: "decidim_scopes_id"
add_foreign_key "decidim_geo_shapefiles", "decidim_organizations"
add_foreign_key "decidim_geo_shapefiles", "decidim_scope_types", column: "decidim_scope_types_id"
add_foreign_key "decidim_guest_meeting_registration_registration_requests", "decidim_meetings_meetings", column: "decidim_meetings_meetings_id"
add_foreign_key "decidim_guest_meeting_registration_registration_requests", "decidim_organizations"
add_foreign_key "decidim_guest_meeting_registration_settings", "decidim_organizations"
add_foreign_key "decidim_identities", "decidim_organizations"
add_foreign_key "decidim_navigation_maps_blueprint_areas", "decidim_navigation_maps_blueprints"
add_foreign_key "decidim_navigation_maps_blueprints", "decidim_content_blocks"
Expand Down
Loading

0 comments on commit 0b781ac

Please sign in to comment.