This file contains hidden or 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'; | |
| export default Ember.Service.extend({ | |
| redirectTo(href) { | |
| window.location.href = href; | |
| }, | |
| replace(href) { | |
| window.location.replace(href); | |
| }, | |
| reload() { |
This file contains hidden or 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
| # load into test setup after `require 'capybara/rails'` | |
| # some sources for below flags and profile settings | |
| # https://stackoverflow.com/questions/43143014/chrome-is-being-controlled-by-automated-test-software/43145088 | |
| # https://sqa.stackexchange.com/questions/26051/chrome-driver-2-28-chrome-is-being-controlled-by-automated-test-software-notif | |
| # http://stackoverflow.com/questions/12211781/how-to-maximize-window-in-chrome-using-webdriver-python | |
| # update sources for new Options object | |
| # https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings | |
| # https://github.com/teamcapybara/capybara/blob/master/lib/capybara/selenium/driver.rb | |
| begin |
This file contains hidden or 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 config from 'medify-bmat-grader/config/environment'; | |
| export function prefixRootUrl([href]) { | |
| if (config.environment !== 'production') { | |
| return `${config.rootURL}${href}`; | |
| } else { | |
| return href; | |
| } | |
| } |
This file contains hidden or 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'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
This file contains hidden or 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
| TracePoint.trace(:c_call) do |tp| | |
| # the various methods on tp tell you where warn is defined, but we want to know about the call stack, | |
| # in particular the test code that the test library didn't like and decided to warn us about, | |
| # so let's Array#grep the caller strings, filtering out the rspec library lines | |
| if tp.method_id == :warn | |
| app_lines = caller(0).grep(%r{enough-of-your-app-code-path-to-match/}) | |
| app_lines_without_reporter = app_lines.grep_v(/name-of-your-rspec-support-file-holding-this-code/) | |
| p app_lines_without_reporter.join("\n") | |
| p | |
| end |
This file contains hidden or 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
| # pods aren't really a thing going forward, and come up as a problem during paid code reivews | |
| # there is/was an alternative in the works to do with modules, but it's best to be on the old | |
| # default ember-cli directory structure so that any new codemods can work | |
| require 'fileutils' | |
| app_pods = "app/pods" | |
| puts "Shucking Routes" | |
| routes = Dir.glob(File.join(app_pods, "**", "route.js")) |
OlderNewer