From a1d1c122ed886f1eb0315d75105b205f944c6aae Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Mon, 6 Feb 2017 12:11:48 +1100 Subject: [PATCH] move into engine.rb --- lib/choice/engine.rb | 7 +++++++ plugin.rb | 9 ++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 lib/choice/engine.rb diff --git a/lib/choice/engine.rb b/lib/choice/engine.rb new file mode 100644 index 0000000..4b51f5b --- /dev/null +++ b/lib/choice/engine.rb @@ -0,0 +1,7 @@ + +module ::Choice + class Engine < ::Rails::Engine + engine_name 'choice' + isolate_namespace Choice + end +end diff --git a/plugin.rb b/plugin.rb index 35a292d..068d382 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,6 +1,6 @@ # name: choice-plugin # about: Integrating Discourse with Stripe -# version: 0.0.3 +# version: 0.1.0 # authors: Rimian Perkins gem 'stripe', '1.58.0' @@ -12,12 +12,7 @@ Rails.configuration.stripe = { Stripe.api_key = Rails.configuration.stripe[:secret_key] -module ::Choice - class Engine < ::Rails::Engine - engine_name 'choice' - isolate_namespace Choice - end -end +require File.expand_path('../lib/choice/engine', __FILE__) after_initialize do Discourse::Application.routes.prepend do