diff --git a/app/controllers/discourse_payments/charges_controller.rb b/app/controllers/discourse_donations/charges_controller.rb similarity index 95% rename from app/controllers/discourse_payments/charges_controller.rb rename to app/controllers/discourse_donations/charges_controller.rb index 4bf4d85..0fe7688 100644 --- a/app/controllers/discourse_payments/charges_controller.rb +++ b/app/controllers/discourse_donations/charges_controller.rb @@ -1,6 +1,6 @@ require_dependency 'discourse' -module DiscoursePayments +module DiscourseDonations class ChargesController < ActionController::Base include CurrentUser diff --git a/app/controllers/discourse_payments/payments_controller.rb b/app/controllers/discourse_donations/payments_controller.rb similarity index 85% rename from app/controllers/discourse_payments/payments_controller.rb rename to app/controllers/discourse_donations/payments_controller.rb index 9dd2621..e4a6c27 100644 --- a/app/controllers/discourse_payments/payments_controller.rb +++ b/app/controllers/discourse_donations/payments_controller.rb @@ -1,4 +1,4 @@ -module DiscoursePayments +module DiscourseDonations class PaymentsController < ApplicationController def index render json: {} diff --git a/app/helpers/discourse_payments/application_helper.rb b/app/helpers/discourse_donations/application_helper.rb similarity index 59% rename from app/helpers/discourse_payments/application_helper.rb rename to app/helpers/discourse_donations/application_helper.rb index 012d848..9009142 100644 --- a/app/helpers/discourse_payments/application_helper.rb +++ b/app/helpers/discourse_donations/application_helper.rb @@ -1,5 +1,5 @@ -module DiscoursePayments +module DiscourseDonations module ApplicationHelper end end diff --git a/config/routes.rb b/config/routes.rb index cf8481a..519853a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,4 @@ -DiscoursePayments::Engine.routes.draw do +DiscourseDonations::Engine.routes.draw do resources :charges, only: [:create] get 'users/:username/payments' => 'payments#show' end diff --git a/lib/discourse_donations/engine.rb b/lib/discourse_donations/engine.rb new file mode 100644 index 0000000..d92e065 --- /dev/null +++ b/lib/discourse_donations/engine.rb @@ -0,0 +1,6 @@ +module ::DiscourseDonations + class Engine < ::Rails::Engine + engine_name 'discourse-donations' + isolate_namespace DiscourseDonations + end +end diff --git a/lib/discourse_payments/engine.rb b/lib/discourse_payments/engine.rb deleted file mode 100644 index 2770737..0000000 --- a/lib/discourse_payments/engine.rb +++ /dev/null @@ -1,6 +0,0 @@ -module ::DiscoursePayments - class Engine < ::Rails::Engine - engine_name 'discourse-payments' - isolate_namespace DiscoursePayments - end -end diff --git a/plugin.rb b/plugin.rb index 1386dab..a3282f0 100644 --- a/plugin.rb +++ b/plugin.rb @@ -6,7 +6,7 @@ gem 'stripe', '2.0.1' -load File.expand_path('../lib/discourse_payments/engine.rb', __FILE__) +load File.expand_path('../lib/discourse_donations/engine.rb', __FILE__) load File.expand_path('../config/stripe.rb', __FILE__) after_initialize do @@ -26,5 +26,5 @@ after_initialize do end Discourse::Application.routes.prepend do - mount ::DiscoursePayments::Engine, at: '/' + mount ::DiscourseDonations::Engine, at: '/' end diff --git a/spec/controllers/discourse_payments/charges_controller_spec.rb b/spec/controllers/discourse_donations/charges_controller_spec.rb similarity index 75% rename from spec/controllers/discourse_payments/charges_controller_spec.rb rename to spec/controllers/discourse_donations/charges_controller_spec.rb index ca9b7fa..eef34d2 100644 --- a/spec/controllers/discourse_payments/charges_controller_spec.rb +++ b/spec/controllers/discourse_donations/charges_controller_spec.rb @@ -1,8 +1,8 @@ require 'rails_helper' -module DiscoursePayments +module DiscourseDonations RSpec.describe ChargesController, type: :controller do - routes { DiscoursePayments::Engine.routes } + routes { DiscourseDonations::Engine.routes } # it 'responds with ok' do skip 'need to get fixtures' diff --git a/spec/controllers/discourse_payments/payments_controller_spec.rb b/spec/controllers/discourse_donations/payments_controller_spec.rb similarity index 55% rename from spec/controllers/discourse_payments/payments_controller_spec.rb rename to spec/controllers/discourse_donations/payments_controller_spec.rb index 6a369dc..0922802 100644 --- a/spec/controllers/discourse_payments/payments_controller_spec.rb +++ b/spec/controllers/discourse_donations/payments_controller_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' -module DiscoursePayments +module DiscourseDonations RSpec.describe PaymentsController, type: :controller do - routes { DiscoursePayments::Engine.routes } + routes { DiscourseDonations::Engine.routes } end end