name space plugin and travis
This commit is contained in:
parent
7e54647cd0
commit
8802539575
|
@ -29,7 +29,7 @@ before_install:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- touch config/stripe.yml
|
- 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:
|
before_script:
|
||||||
- gem install bundler
|
- gem install bundler
|
||||||
|
@ -37,4 +37,4 @@ before_script:
|
||||||
- bundle exec rake db:create db:migrate
|
- bundle exec rake db:create db:migrate
|
||||||
|
|
||||||
script:
|
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
|
## 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]`.
|
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
|
# name: discourse-donations
|
||||||
# about: Integrating Discourse with Stripe
|
# about: Integrating Discourse with Stripe for donations
|
||||||
# version: 1.5.0
|
# version: 1.6.0
|
||||||
# url: https://github.com/choiceaustralia/discourse-payments
|
# url: https://github.com/choiceaustralia/discourse-donations
|
||||||
# authors: Rimian Perkins
|
# authors: Rimian Perkins
|
||||||
|
|
||||||
gem 'stripe', '2.0.1'
|
gem 'stripe', '2.0.1'
|
||||||
|
@ -13,13 +13,15 @@ after_initialize do
|
||||||
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
||||||
|
|
||||||
discourse_payments_customization = SiteCustomization.find_or_create_by({
|
discourse_payments_customization = SiteCustomization.find_or_create_by({
|
||||||
name: 'Discourse Payments Header',
|
name: 'Discourse Donations Header',
|
||||||
header: header_script,
|
header: header_script,
|
||||||
mobile_header: header_script,
|
mobile_header: header_script,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
user_id: -1
|
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
|
SiteCustomization.where(name: discourse_payments_customization.name).where.not(id: discourse_payments_customization.id).delete_all
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue