Skip to content

Commit

Permalink
CiviCRM API v4 compatibility (#112)
Browse files Browse the repository at this point in the history
* Use CiviCRM API v4

* Fix secrets.yml

* Take back omniauht-decidim gem

* Fix CI

* Use previous version of some gems

* Bump decidim-civicrm version

* Bump decidim-civicrm version

* Bump decidim-civicrm version
  • Loading branch information
fblupi authored Jan 10, 2025
1 parent 21d6c3d commit 81cb058
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ jobs:
with:
chromedriver-version: 119.0.6045.105

- name: List Chrome
shell: "bash"
run: apt list --installed | grep chrome

- name: Remove Chrome
shell: "bash"
run: sudo apt remove google-chrome-stable

- uses: browser-actions/setup-chrome@v1
with:
chrome-version: 119.0.6045.105

- name: Setup & create Database
run: |
bundle exec rails db:create db:schema:load
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/Platoniq/decidim-module-civicrm
revision: 81b091723bf7c2afebb1beb9f9239cbd18324ba6
revision: a62627b3658cf8adb2cb100041520731a6f672a1
branch: main
specs:
decidim-civicrm (0.27.3)
Expand Down
3 changes: 2 additions & 1 deletion config/initializers/civicrm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
config.api = {
key: Rails.application.secrets.dig(:civicrm, :api, :key),
secret: Rails.application.secrets.dig(:civicrm, :api, :secret),
url: Rails.application.secrets.dig(:civicrm, :api, :url)
url: Rails.application.secrets.dig(:civicrm, :api, :url),
version: Rails.application.secrets.dig(:civicrm, :api, :version)
}

# Configure omniauth secrets
Expand Down
6 changes: 4 additions & 2 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ default: &default
site_url: <%= ENV["DECIDIM_SITE_URL"] %>
icon_path: media/images/icon-bcnencomu.png
civicrm:
enabled: false
enabled: <%= Decidim::Env.new("CIVICRM_CLIENT_ID").to_boolean_string %>
client_id: <%= ENV["CIVICRM_CLIENT_ID"] %>
client_secret: <%= ENV["CIVICRM_CLIENT_SECRET"] %>
site: <%= ENV["CIVICRM_SITE"] %>
Expand All @@ -176,6 +176,7 @@ default: &default
url: <%= ENV["CIVICRM_API_URL"] %>
key: <%= ENV["CIVICRM_API_API_KEY"] %>
secret: <%= ENV["CIVICRM_API_SECRET"] %>
version: <%= ENV["CIVICRM_API_VERSION"] %>
elections:
<<: *elections_default
storage:
Expand All @@ -193,7 +194,7 @@ development:
enabled: true
icon: phone
civicrm:
enabled: false
enabled: <%= Decidim::Env.new("CIVICRM_CLIENT_ID").to_boolean_string %>
client_id: <%= ENV["CIVICRM_CLIENT_ID"] %>
client_secret: <%= ENV["CIVICRM_CLIENT_SECRET"] %>
site: <%= ENV["CIVICRM_SITE"] %>
Expand All @@ -203,6 +204,7 @@ development:
url: <%= ENV["CIVICRM_API_URL"] %>
key: <%= ENV["CIVICRM_API_API_KEY"] %>
secret: <%= ENV["CIVICRM_API_SECRET"] %>
version: <%= ENV["CIVICRM_API_VERSION"] %>

test:
<<: *default
Expand Down

0 comments on commit 81cb058

Please sign in to comment.