No description, website, or topics provided.
JavaScript HTML
bors[bot] and greenkeeper[bot] Merge #34
34: Update ember-try to the latest version 🚀 r=danmcclain a=greenkeeper[bot]


## Version **1.0.0-beta.2** of [ember-try](https://github.com/ember-cli/ember-try) was just published.

<table>
  <tr>
    <th align=left>
      Dependency
    </th>
    <td>
      <code>ember-try</code>
    </td>
  </tr>
  <tr>
    <th align=left>
      Current Version
    </th>
    <td>
      0.2.23
    </td>
  </tr>
  <tr>
    <th align=left>
      Type
    </th>
    <td>
      devDependency
    </td>
  </tr>
</table>

The version **1.0.0-beta.2** is **not covered** by your **current version range**.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of ember-try.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


---


<details>
<summary>Commits</summary>
<p>The new version differs by 56 commits.</p>
<ul>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/74969a441fbe6ccf0406a78e0dc6a8b9c762d54f"><code>74969a4</code></a> <code>release v1.0.0-beta.2 🎉</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/1de3a5d56a5139d0854cc25fdecc689ce8181b98"><code>1de3a5d</code></a> <code>Merge pull request #195 from ember-cli/execa</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/1ccfa156d9b4b1f060f1190ea54af2074fa4cc18"><code>1ccfa15</code></a> <code>Merge pull request #194 from ember-cli/const</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/2c97e302c2869034d042e0eea80a7509524993c4"><code>2c97e30</code></a> <code>Use execa for subprocess support.</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/3f9bd75d62ab6c35e08661e70079c5bcd9601c53"><code>3f9bd75</code></a> <code>Merge pull request #193 from ember-cli/let-mocha-handle-rejections</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/c5fe3fb3902d2a4a1cbcd1a296b10230584608f1"><code>c5fe3fb</code></a> <code>move requires from let -&gt; const</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/55d357e3ef0816c9ec8a5deb8bcf11c3d0088cab"><code>55d357e</code></a> <code>Let mocha handle rejected promises.</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/fd7b663d7d64aba72046afd52a327b96c9c3f6b3"><code>fd7b663</code></a> <code>Fixup lint</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/57870a4158ff9d9560a4e7f6c9b8983c8a6b8392"><code>57870a4</code></a> <code>Merge pull request #171 from xcambar/no-shrinkwrap</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/f4c528779d9f9f6e8f6673ca603c85b7c24954d1"><code>f4c5287</code></a> <code>Merge branch 'master' into no-shrinkwrap</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/1520550b5626382640146797e67261289374f642"><code>1520550</code></a> <code>1.0.0-beta.1</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/f2b36535bc266e46abe4ac360f373f9560d0b20e"><code>f2b3653</code></a> <code>Add v1.0.0-beta.1 to CHANGELOG</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/6836181187b9868c49b28b684465782748dc051f"><code>6836181</code></a> <code>Merge pull request #185 from ember-cli/kg-upgrade-ember-try-config</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/ff8dd36c0a8e8893da4a18cbc48721da7c0f3ac3"><code>ff8dd36</code></a> <code>Upgrade ember-try-config to 3.0</code></li>
<li><a href="https://urls.greenkeeper.io/ember-cli/ember-try/commit/cc44a103d61396f50ce14f93a36ea5f40e555d4e"><code>cc44a10</code></a> <code>1.0.0-beta.0</code></li>
</ul>
<p>There are 56 commits in total.</p>
<p>See the <a href="https://urls.greenkeeper.io/ember-cli/ember-try/compare/d9324544462e29564b98a35b029276b023d9dce8...74969a441fbe6ccf0406a78e0dc6a8b9c762d54f">full diff</a></p>
</details>

<details>
  <summary>FAQ and help</summary>

  There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>

---


Your [Greenkeeper](https://greenkeeper.io) bot 🌴



Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
Latest commit eb1c90d May 19, 2018

README.md

ember-deferred-content

Fancy pants handling of async content

Greenkeeper badge Build Status npm version

ember install ember-deferred-content

Usage

  {{! This assumes that post has an async relationship called comments}}
  {{#deferred-content post.comments as |d|}}
    {{#d.settled}}
      <h2>Comments</h2>
    {{/d.settled}}
    {{#d.pending}}
      <img src="spinner.gif">
    {{/d.pending}}
    {{#d.fulfilled as |comments|}}
      <ul>
        {{#each comments as |comment|}}
          <li>{{comment.author}} said: {{comment.body}}
        {{/each}}
      </ul>
    {{/d.fulfilled}}
    {{#d.rejected as |reason|}}
      Could not load comments: {{reason}}
    {{/d.rejected}}
  {{/deferred-content}}

  {{! or using ifs}}
  {{#deferred-content promise=post.comments as |d|}}
    {{#if d.isSettled}}
      <h2>Comments</h2>
    {{/if}}
    {{#if d.isPending}}
      <img src="spinner.gif">
    {{/if}}
    {{#if d.isFulfilled}}
      <ul>
        {{#each d.content as |comment|}}
          <li>{{comment.author}} said: {{comment.body}}
        {{/each}}
      </ul>
    {{/if}}
    {{#if d.isRejected}}
      Could not load comments: {{d.content}}
    {{/if}}
  {{/deferred-content}}

ember-deferred-content takes the promise you need to resolve to show your content, and yields 4 subcomponents that you can use to show content during the different states of your promise

  • d.settled: displays the content when the promise is resolved or rejected
  • d.pending: displays the content before the promise is resolved or rejected
  • d.fulfilled: displays the content only when the promise is resolved; yields the result of the promise
  • d.rejected: displays the content only when the promise is rejected; yields the result of the promise

It also sets a series of flags:

  • d.isSettled: true if the promise is resolved or rejected
  • d.isPending: true until the promise is resolved or rejected
  • d.isFulfilled: true if the promise is resolved
  • d.isRejected: true if the promise is rejected
  • d.content: the return value of the resolved/rejected state

Compatibility

This addon will work on Ember versions 2.3.x and up only, due to use of contextual components and the (hash helper.

Developing

  • git clone this repository
  • npm install
  • bower install

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server