disco_app 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/disco_app/components/custom/rules-editor.es6.jsx +77 -20
  3. data/app/assets/javascripts/disco_app/components/ui-kit/ui-layout/ui-empty-state.es6.jsx +3 -3
  4. data/app/assets/javascripts/disco_app/disco_app.js +0 -1
  5. data/app/assets/stylesheets/disco_app/admin/_header.scss +16 -7
  6. data/app/assets/stylesheets/disco_app/admin/_layout.scss +1 -9
  7. data/app/assets/stylesheets/disco_app/admin/_nav.scss +15 -3
  8. data/app/assets/stylesheets/disco_app/disco_app.scss +3 -0
  9. data/app/assets/stylesheets/disco_app/frame/_buttons.scss +1 -1
  10. data/app/assets/stylesheets/disco_app/frame/_forms.scss +1 -1
  11. data/app/assets/stylesheets/disco_app/frame/_type.scss +2 -9
  12. data/app/assets/stylesheets/disco_app/frame.scss +1 -0
  13. data/app/assets/stylesheets/disco_app/ui-kit/_ui-empty-state.scss +27 -0
  14. data/app/assets/stylesheets/disco_app/ui-kit/_ui-footer-help.scss +13 -10
  15. data/app/assets/stylesheets/disco_app/ui-kit/_ui-kit.scss +94 -67
  16. data/app/assets/stylesheets/disco_app/ui-kit/_ui-tabs.scss +15 -3
  17. data/app/jobs/disco_app/concerns/shop_update_job.rb +2 -5
  18. data/app/models/disco_app/concerns/shop.rb +0 -13
  19. data/app/resources/disco_app/admin/resources/concerns/shop_resource.rb +18 -2
  20. data/db/migrate/20160521135510_move_shop_to_synchronises.rb +61 -0
  21. data/lib/disco_app/engine.rb +0 -1
  22. data/lib/disco_app/version.rb +1 -1
  23. data/lib/generators/disco_app/disco_app_generator.rb +42 -3
  24. data/lib/generators/disco_app/{monitorify/templates → templates}/config/newrelic.yml +0 -0
  25. data/lib/generators/disco_app/{monitorify/templates → templates}/initializers/rollbar.rb +0 -0
  26. data/lib/generators/disco_app/templates/root/CHECKS +4 -0
  27. data/lib/tasks/shops.rake +10 -0
  28. data/test/dummy/app/jobs/disco_app/app_uninstalled_job.rb +1 -1
  29. data/test/dummy/app/models/disco_app/shop.rb +1 -1
  30. data/test/dummy/config/database.gitlab-ci.yml +24 -0
  31. data/test/dummy/db/schema.rb +7 -22
  32. data/test/fixtures/disco_app/shops.yml +2 -2
  33. data/test/jobs/disco_app/app_installed_job_test.rb +1 -1
  34. data/test/jobs/disco_app/app_uninstalled_job_test.rb +1 -1
  35. metadata +8 -5
  36. data/lib/generators/disco_app/mailify/mailify_generator.rb +0 -54
  37. data/lib/generators/disco_app/monitorify/monitorify_generator.rb +0 -28
@@ -25,7 +25,7 @@ class DiscoApp::AppInstalledJobTest < ActionController::TestCase
25
25
 
26
26
  # Assert the update shop job was performed.
27
27
  @shop.reload
28
- assert_equal 'United States', @shop.country_name
28
+ assert_equal 'United States', @shop.data['country_name']
29
29
  end
30
30
 
31
31
  test 'app installed job automatically subscribes stores to the correct default plan' do
@@ -24,7 +24,7 @@ class DiscoApp::AppUninstalledJobTest < ActionController::TestCase
24
24
  test 'app uninstalled job can be extended using concerns' do
25
25
  assert_performed_jobs 1
26
26
  @shop.reload
27
- assert_equal 'Nowhere', @shop.country_name # Assert extended method called.
27
+ assert_equal 'Nowhere', @shop.data['country_name'] # Assert extended method called.
28
28
  end
29
29
 
30
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disco_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Ballard
@@ -468,6 +468,7 @@ files:
468
468
  - db/migrate/20160425205211_add_source_to_disco_app_subscriptions.rb
469
469
  - db/migrate/20160426033520_add_trial_period_days_to_disco_app_subscriptions.rb
470
470
  - db/migrate/20160513140727_add_name_to_disco_app_shops.rb
471
+ - db/migrate/20160521135510_move_shop_to_synchronises.rb
471
472
  - lib/disco_app.rb
472
473
  - lib/disco_app/configuration.rb
473
474
  - lib/disco_app/constants.rb
@@ -478,25 +479,25 @@ files:
478
479
  - lib/disco_app/version.rb
479
480
  - lib/generators/disco_app/USAGE
480
481
  - lib/generators/disco_app/disco_app_generator.rb
481
- - lib/generators/disco_app/mailify/mailify_generator.rb
482
- - lib/generators/disco_app/monitorify/monitorify_generator.rb
483
- - lib/generators/disco_app/monitorify/templates/config/newrelic.yml
484
- - lib/generators/disco_app/monitorify/templates/initializers/rollbar.rb
485
482
  - lib/generators/disco_app/templates/assets/javascripts/application.js
486
483
  - lib/generators/disco_app/templates/assets/javascripts/components.js
487
484
  - lib/generators/disco_app/templates/assets/stylesheets/application.scss
488
485
  - lib/generators/disco_app/templates/config/database.yml.tt
486
+ - lib/generators/disco_app/templates/config/newrelic.yml
489
487
  - lib/generators/disco_app/templates/config/puma.rb
490
488
  - lib/generators/disco_app/templates/controllers/home_controller.rb
491
489
  - lib/generators/disco_app/templates/initializers/disco_app.rb
490
+ - lib/generators/disco_app/templates/initializers/rollbar.rb
492
491
  - lib/generators/disco_app/templates/initializers/session_store.rb
493
492
  - lib/generators/disco_app/templates/initializers/shopify_app.rb
494
493
  - lib/generators/disco_app/templates/initializers/shopify_session_repository.rb
494
+ - lib/generators/disco_app/templates/root/CHECKS
495
495
  - lib/generators/disco_app/templates/root/Procfile
496
496
  - lib/generators/disco_app/templates/views/home/index.html.erb
497
497
  - lib/tasks/carrier_service.rake
498
498
  - lib/tasks/database.rake
499
499
  - lib/tasks/sessions.rake
500
+ - lib/tasks/shops.rake
500
501
  - lib/tasks/start.rake
501
502
  - lib/tasks/webhooks.rake
502
503
  - test/controllers/disco_app/admin/shops_controller_test.rb
@@ -531,6 +532,7 @@ files:
531
532
  - test/dummy/config/application.rb
532
533
  - test/dummy/config/boot.rb
533
534
  - test/dummy/config/database.codeship.yml
535
+ - test/dummy/config/database.gitlab-ci.yml
534
536
  - test/dummy/config/database.yml
535
537
  - test/dummy/config/environment.rb
536
538
  - test/dummy/config/environments/development.rb
@@ -672,6 +674,7 @@ test_files:
672
674
  - test/dummy/config/environment.rb
673
675
  - test/dummy/config/boot.rb
674
676
  - test/dummy/config/database.yml
677
+ - test/dummy/config/database.gitlab-ci.yml
675
678
  - test/dummy/config/application.rb
676
679
  - test/fixtures/api/widget_store/webhooks.json
677
680
  - test/fixtures/api/widget_store/charges/create_application_charge_response.json
@@ -1,54 +0,0 @@
1
- module DiscoApp
2
- module Generators
3
- class MailifyGenerator < Rails::Generators::Base
4
-
5
- source_root File.expand_path('../templates', __FILE__)
6
-
7
- def install_gem
8
- # Add premailer gem to Gemfile.
9
- gem 'premailer-rails', '~> 1.8.2'
10
-
11
- # Add explicit dependency on Nokogiri
12
- gem 'nokogiri', '~> 1.6.6.1'
13
-
14
- # Add the Mailgun rails gem (production only)
15
- gem_group :production do
16
- gem 'mailgun_rails', '~> 0.7.0'
17
- end
18
-
19
- # Install gem.
20
- Bundler.with_clean_env do
21
- run 'bundle install'
22
- end
23
- end
24
-
25
- # Set application configuration
26
- def configure_application
27
- configuration = <<-CONFIG.strip_heredoc
28
-
29
- # Configure ActionMailer to use MailGun
30
- if ENV['MAILGUN_API_KEY']
31
- config.action_mailer.delivery_method = :mailgun
32
- config.action_mailer.mailgun_settings = {
33
- api_key: ENV['MAILGUN_API_KEY'],
34
- domain: ENV['MAILGUN_API_DOMAIN']
35
- }
36
- end
37
- CONFIG
38
- application configuration, env: :production
39
- end
40
-
41
- # Add entries to .env and .env.local
42
- def add_env_variables
43
- configuration = <<-CONFIG.strip_heredoc
44
-
45
- MAILGUN_API_KEY=
46
- MAILGUN_API_DOMAIN=
47
- CONFIG
48
- append_to_file '.env', configuration
49
- append_to_file '.env.local', configuration
50
- end
51
-
52
- end
53
- end
54
- end
@@ -1,28 +0,0 @@
1
- module DiscoApp
2
- module Generators
3
- class MonitorifyGenerator < Rails::Generators::Base
4
-
5
- source_root File.expand_path('../templates', __FILE__)
6
-
7
- # Install the Rollbar, OJ and New Relic gems.
8
- def install_gems
9
- # Add gem to Gemfile
10
- gem 'rollbar', '~> 2.8.0'
11
- gem 'oj', '~> 2.14.5'
12
- gem 'newrelic_rpm', '~> 3.14.1.314'
13
-
14
- # Install gem.
15
- Bundler.with_clean_env do
16
- run 'bundle install'
17
- end
18
- end
19
-
20
- # Copy Rollbar initializer and New Relic config file.
21
- def configure
22
- copy_file 'initializers/rollbar.rb', 'config/initializers/rollbar.rb'
23
- copy_file 'config/newrelic.yml', 'config/newrelic.yml'
24
- end
25
-
26
- end
27
- end
28
- end