New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-route-action-helper

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-route-action-helper - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

8

addon/helpers/route-action.js

@@ -16,4 +16,10 @@ import Ember from 'ember';

function getCurrentHandlerInfos(router) {
let routerLib = router._routerMicrolib || router.router;
return routerLib.currentHandlerInfos;
}
function getRoutes(router) {
return emberArray(router.router.currentHandlerInfos)
return emberArray(getCurrentHandlerInfos(router))
.mapBy('handler')

@@ -20,0 +26,0 @@ .reverse();

2

package.json
{
"name": "ember-route-action-helper",
"version": "2.0.2",
"version": "2.0.3",
"description": "Bubble closure actions in routes",

@@ -5,0 +5,0 @@ "directories": {

@@ -87,2 +87,31 @@ # ember-route-action-helper ![Download count all time](https://img.shields.io/npm/dt/ember-route-action-helper.svg) [![CircleCI](https://circleci.com/gh/DockYard/ember-route-action-helper.svg?style=shield)](https://circleci.com/gh/DockYard/ember-route-action-helper) [![npm version](https://badge.fury.io/js/ember-route-action-helper.svg)](https://badge.fury.io/js/ember-route-action-helper)

## Overriding route-action for integration tests
This helper is designed for use in controller templates, not in
components. It will not, therefore, resolve route action references
in an integration test. If you are using this helper in your components,
you can override the helper using a pattern similar to the following:
```
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import Ember from 'ember';
moduleForComponent('uses-route-action', 'Integration | Component | uses route action', {
integration: true,
beforeEach(assert) {
this.container
.registry
.registrations['helper:route-action'] = Ember.Helper.helper((arg) => {
return this.routeActions[arg];
});
this.routeActions = {
doSomething(arg) {
return Ember.RSVP.resolve({arg});
},
};
},
});
```
## Building

@@ -89,0 +118,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc