refactor module name space
This commit is contained in:
parent
1a20224481
commit
0c6b77b93a
|
@ -1,4 +1,4 @@
|
||||||
module Choice
|
module DiscoursePayments
|
||||||
class ChoiceController < ApplicationController
|
class ChoiceController < ApplicationController
|
||||||
def index
|
def index
|
||||||
render json: {}
|
render json: {}
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
module Choice
|
module DiscoursePayments
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Choice::Engine.routes.draw do
|
DiscoursePayments::Engine.routes.draw do
|
||||||
resources :choice, only: [:create]
|
resources :choice, only: [:create]
|
||||||
get 'users/:username/payments' => 'choice#show'
|
get 'users/:username/payments' => 'choice#show'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require 'choice/engine'
|
require 'discourse-payments/engine'
|
||||||
|
|
||||||
byebug
|
byebug
|
||||||
|
|
||||||
module Choice
|
module DiscoursePayments
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
|
|
||||||
module ::Choice
|
|
||||||
class Engine < ::Rails::Engine
|
|
||||||
engine_name 'choice'
|
|
||||||
isolate_namespace Choice
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,6 +0,0 @@
|
||||||
module ::Choice
|
|
||||||
class Engine < ::Rails::Engine
|
|
||||||
engine_name 'choice'
|
|
||||||
isolate_namespace Choice
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
module ::DiscoursePayments
|
||||||
|
class Engine < ::Rails::Engine
|
||||||
|
engine_name 'discourse-payments'
|
||||||
|
isolate_namespace DiscoursePayments
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,12 +1,12 @@
|
||||||
# name: discourse-payments
|
# name: discourse-payments
|
||||||
# about: Integrating Discourse with Stripe
|
# about: Integrating Discourse with Stripe
|
||||||
# version: 1.0.1
|
# version: 1.1.0
|
||||||
# url: https://github.com/choiceaustralia/discourse-payments
|
# url: https://github.com/choiceaustralia/discourse-payments
|
||||||
|
|
||||||
gem 'stripe', '1.58.0'
|
gem 'stripe', '1.58.0'
|
||||||
|
|
||||||
load File.expand_path('../lib/discourse-payments/engine.rb', __FILE__)
|
load File.expand_path('../lib/discourse_payments/engine.rb', __FILE__)
|
||||||
|
|
||||||
Discourse::Application.routes.prepend do
|
Discourse::Application.routes.prepend do
|
||||||
mount ::Choice::Engine, at: '/'
|
mount ::DiscoursePayments::Engine, at: '/'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
module Choice
|
module DiscoursePayments
|
||||||
RSpec.describe ChoiceController, type: :controller do
|
RSpec.describe ChoiceController, type: :controller do
|
||||||
routes { Choice::Engine.routes }
|
routes { DiscoursePayments::Engine.routes }
|
||||||
|
#
|
||||||
it 'responds with ok' do
|
it 'responds with ok' do
|
||||||
post :create
|
post :create
|
||||||
expect(response).to have_http_status(200)
|
expect(response).to have_http_status(200)
|
Loading…
Reference in New Issue