name space plugin and travis
This commit is contained in:
parent
7e54647cd0
commit
8802539575
|
@ -29,7 +29,7 @@ before_install:
|
|||
|
||||
install:
|
||||
- touch config/stripe.yml
|
||||
- git clone https://github.com/choiceaustralia/discourse-payments.git plugins/discourse-payments --depth=1
|
||||
- git clone https://github.com/choiceaustralia/discourse-donations.git plugins/discourse-donations --depth=1
|
||||
|
||||
before_script:
|
||||
- gem install bundler
|
||||
|
@ -37,4 +37,4 @@ before_script:
|
|||
- bundle exec rake db:create db:migrate
|
||||
|
||||
script:
|
||||
- "bundle exec rake plugin:spec[discourse-payments] && bundle exec rake qunit:test['200000']"
|
||||
- "bundle exec rake plugin:spec[discourse-donations] && bundle exec rake qunit:test['200000']"
|
||||
|
|
|
@ -32,7 +32,7 @@ STRIPE_PUBLISHABLE_KEY: 'my_publishable_key'
|
|||
|
||||
## Testing
|
||||
|
||||
To run the rails specs, install the plugin and run `bundle exec rake plugin:spec[discourse-payments]` in the discourse root directory.
|
||||
To run the rails specs, install the plugin and run `bundle exec rake plugin:spec[discourse-donations]` in the discourse root directory.
|
||||
|
||||
To run qunit tests: `MODULE='Acceptance: Discourse Payments' rake qunit:test[20000]`.
|
||||
|
||||
|
|
12
plugin.rb
12
plugin.rb
|
@ -1,7 +1,7 @@
|
|||
# name: discourse-payments
|
||||
# about: Integrating Discourse with Stripe
|
||||
# version: 1.5.0
|
||||
# url: https://github.com/choiceaustralia/discourse-payments
|
||||
# name: discourse-donations
|
||||
# about: Integrating Discourse with Stripe for donations
|
||||
# version: 1.6.0
|
||||
# url: https://github.com/choiceaustralia/discourse-donations
|
||||
# authors: Rimian Perkins
|
||||
|
||||
gem 'stripe', '2.0.1'
|
||||
|
@ -13,13 +13,15 @@ after_initialize do
|
|||
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
||||
|
||||
discourse_payments_customization = SiteCustomization.find_or_create_by({
|
||||
name: 'Discourse Payments Header',
|
||||
name: 'Discourse Donations Header',
|
||||
header: header_script,
|
||||
mobile_header: header_script,
|
||||
enabled: true,
|
||||
user_id: -1
|
||||
})
|
||||
|
||||
# Delete the old header (1.5.0)
|
||||
SiteCustomization.where(name: 'Discourse Payments Header').delete_all
|
||||
SiteCustomization.where(name: discourse_payments_customization.name).where.not(id: discourse_payments_customization.id).delete_all
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue