Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename plugin to redmine_3cx #3

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
11 changes: 0 additions & 11 deletions .semaphore/bin/setup_hermes_link

This file was deleted.

2 changes: 1 addition & 1 deletion .semaphore/bin/setup_redmine
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cache restore redmine-$REDMINE_VERSION
if [ ! -d ~/redmine ]; then git clone -b $REDMINE_VERSION-stable [email protected]:redmine/redmine.git; fi
cache store redmine-$REDMINE_VERSION ~/redmine
cd ~/redmine
cp ~/hermes_link/.semaphore/database_$SEMAPHORE_DATABASE_ADAPTER.yml config/database.yml
cp ~/redmine_3cx/.semaphore/database_$SEMAPHORE_DATABASE_ADAPTER.yml config/database.yml
echo 'gem "loofah", "< 2.21.0"' >Gemfile.local
cache restore gems-redmine-$SEMAPHORE_DATABASE_ADAPTER-$REDMINE_VERSION-$RUBY_VERSION
bundle install --path ~/vendor/redmine-bundle
Expand Down
11 changes: 11 additions & 0 deletions .semaphore/bin/setup_redmine_3cx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e

mv ~/redmine-3cx ~/redmine/plugins
cd ~/redmine/plugins/redmine-3cx
rm PluginGemfile.lock
cache restore gems-redmine-3cx-$SEMAPHORE_DATABASE_ADAPTER-$REDMINE_VERSION-$RUBY_VERSION-$(checksum PluginGemfile)
BUNDLE_GEMFILE=PluginGemfile bundle install --path ~/vendor/redmine-bundle
cache store gems-redmine-3cx-$SEMAPHORE_DATABASE_ADAPTER-$REDMINE_VERSION-$RUBY_VERSION-$(checksum PluginGemfile) ~/vendor/redmine-bundle
bundle exec rake redmine:plugins:migrate
20 changes: 10 additions & 10 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
version: v1.0
name: hermes_link
name: redmine_3cx
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004

global_job_config:
secrets:
- name: hermes_link
- name: redmine_3cx
env_vars:
- name: RAILS_ENV
value: test
Expand Down Expand Up @@ -47,12 +47,12 @@ blocks:
- sem-version ruby $RUBY_VERSION -f
- sem-service start $SEMAPHORE_DATABASE_ADAPTER
- checkout --use-cache && cd ~
- ~/hermes_link/.semaphore/bin/setup_redmine
- ~/redmine_3cx/.semaphore/bin/setup_redmine
- cd ~/redmine/plugins
- ~/hermes_link/.semaphore/bin/setup_redmine_contacts
- ~/redmine_3cx/.semaphore/bin/setup_redmine_contacts
- cd ~/redmine/plugins
- ~/hermes_link/.semaphore/bin/setup_hermes_link
- bundle exec rake hermes_link:check
- ~/redmine_3cx/.semaphore/bin/setup_redmine_3cx
- bundle exec rake redmine_3cx:check
matrix:
- env_var: REDMINE_VERSION
values: ["5.1", "5.0"]
Expand All @@ -73,12 +73,12 @@ blocks:
- sem-version ruby $RUBY_VERSION -f
- sem-service start $SEMAPHORE_DATABASE_ADAPTER
- checkout --use-cache && cd ~
- ~/hermes_link/.semaphore/bin/setup_redmine
- ~/redmine_3cx/.semaphore/bin/setup_redmine
- cd ~/redmine/plugins
- ~/hermes_link/.semaphore/bin/setup_redmine_contacts
- ~/redmine_3cx/.semaphore/bin/setup_redmine_contacts
- cd ~/redmine/plugins
- ~/hermes_link/.semaphore/bin/setup_hermes_link
- bundle exec rake hermes_link:check
- ~/redmine_3cx/.semaphore/bin/setup_redmine_3cx
- bundle exec rake redmine_3cx:check
matrix:
- env_var: REDMINE_VERSION
values: ["4.2", "4.1", "4.0"]
Expand Down
6 changes: 3 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
= hermes_link
= redmine_3cx

== Development Setup

$ git clone -b 5.1-stable https://github.com/redmine/redmine
$ git clone https://github.com/renuo/hermes_link redmine/plugins/hermes_link
$ cd redmine/plugins/hermes_link
$ git clone https://github.com/renuo/redmine_3cx redmine/plugins/redmine_3cx
$ cd redmine/plugins/redmine_3cx

$ bin/setup
$ bin/run
2 changes: 1 addition & 1 deletion bin/check
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

bundle exec rake hermes_link:check
bundle exec rake redmine_3cx:check
2 changes: 1 addition & 1 deletion bin/run
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

bundle exec rake hermes_link:run
bundle exec rake redmine_3cx:run
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ cd ../..

cp -n config/database.example.yml config/database.yml

bundle exec rake db:create db:migrate db:seed hermes_link:seed
bundle exec rake db:create db:migrate db:seed redmine_3cx:seed
bundle exec rake redmine:plugins:migrate
6 changes: 3 additions & 3 deletions init.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# require_dependency File.expand_path("lib/polls_hook_listener", __dir__)

Redmine::Plugin.register :hermes_link do
name "3CX Plugin Redmine"
Redmine::Plugin.register :redmine_3cx do
name "Redmine 3CX Plugin"
author "Daniel Bengl"
description "A simple 3CX integration plugin."
version "0.0.1"
url "https://github.com/renuo/hermes_link"
url "https://github.com/renuo/redmine_3cx"
author_url "http://example.com/about"
menu :application_menu, :polls, {controller: "polls", action: "index"}, caption: "Polls"
permission :polls, {polls: [:index, :vote]}, public: true
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/run.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace :hermes_link do
namespace :redmine_3cx do
desc "Run 3CX plugin"
task run: :environment do
sh "cd ../.. && rails s"
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/seed.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace :hermes_link do
namespace :redmine_3cx do
desc "Seed database"
task seed: :environment do
# TODO: implement
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/test.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :hermes_link do
namespace :redmine_3cx do
desc "Run 3CX plugin checks"
task check: :environment do
sh "rake redmine:plugins:test NAME=hermes_link"
sh "rake redmine:plugins:test NAME=redmine_3cx"
end
end