The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { task, timeout, waitForProperty } from 'ember-concurrency'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
lol: false, | |
foo: task(function * () { | |
this.set('lol', false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint node: true */ | |
const EmberApp = require('ember-cli/lib/broccoli/ember-app'); | |
const generateWhitelabelIndexes = require('./generate-whitelabel-indexes'); | |
module.exports = function(defaults) { | |
const app = new EmberApp(defaults, { | |
// ...all sorts of config | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Evented from '@ember/object/evented'; | |
import Component from '@ember/component'; | |
import $ from 'jquery'; | |
import { task, timeout, waitForEvent, waitForProperty } from 'ember-concurrency'; | |
export default class EventsExampleComponent extends Component.extend(Evented) { | |
// BEGIN-SNIPPET waitForEvent | |
domEvent = null; | |
@task *domEventLoop() { | |
while(true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
export default class ApplicationController extends Controller { | |
@tracked decorator = '@safe' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/fpr_cron_parser.rb b/app/models/fpr_cron_parser.rb | |
new file mode 100644 | |
index 000000000..51954d9fa | |
--- /dev/null | |
+++ b/app/models/fpr_cron_parser.rb | |
@@ -0,0 +1,30 @@ | |
+# frozen_string_literal: true | |
+ | |
+class FprCronParser | |
+ attr_reader :cron_string, :cron_parser, :time_zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/checkout_location.rb b/app/models/checkout_location.rb | |
index 0a017d1ed..9b9fc0892 100644 | |
--- a/app/models/checkout_location.rb | |
+++ b/app/models/checkout_location.rb | |
@@ -156,7 +156,7 @@ class CheckoutLocation < ApplicationRecord | |
end | |
def alertable? | |
- shoppable? && !demo? | |
+ setup_statuses.none?(&:issue?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/models/checkout_location.rb b/app/models/checkout_location.rb | |
index 0a017d1ed..9b1e82deb 100644 | |
--- a/app/models/checkout_location.rb | |
+++ b/app/models/checkout_location.rb | |
@@ -196,11 +196,9 @@ class CheckoutLocation < ApplicationRecord | |
demo_reasons.present? | |
end | |
- SHOPPABLE_STATUSES = %i[ready demo].freeze | |
def ready_for_shopping? |
NewerOlder