Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dschmidt/ember-cli-deploy-sentry
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.0
Choose a base ref
...
head repository: dschmidt/ember-cli-deploy-sentry
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 1, 2015

  1. Copy the full SHA
    fc83673 View commit details
  2. moved editing of index.html from willUpload to didBuild, which makes …

    …more sense conceptually. Ensuring it does run after revision data is available is by requesting the ordering in ember-cli-deploy-revision-data.
    duizendnegen committed Nov 1, 2015
    Copy the full SHA
    42641e2 View commit details

Commits on Nov 3, 2015

  1. Fix logging

    dschmidt committed Nov 3, 2015
    Copy the full SHA
    26826d5 View commit details

Commits on Nov 11, 2015

  1. Released v0.2.1

    dschmidt committed Nov 11, 2015
    Copy the full SHA
    db20f2e View commit details
  2. Released v0.2.2

    dschmidt committed Nov 11, 2015
    Copy the full SHA
    69fd8ad View commit details
  3. Merge pull request #5 from duizendnegen/master

    moved editing of index.html from willUpload to didBuild
    dschmidt committed Nov 11, 2015
    Copy the full SHA
    163521d View commit details

Commits on Nov 25, 2015

  1. use form-data directly

    duizendnegen committed Nov 25, 2015
    Copy the full SHA
    6078e79 View commit details
  2. Merge pull request #6 from duizendnegen/feature/ic-ajax

    Use form-data directly for uploading files
    dschmidt committed Nov 25, 2015
    Copy the full SHA
    94e68ea View commit details

Commits on Dec 3, 2015

  1. add version badge

    ghedamat committed Dec 3, 2015
    Copy the full SHA
    2b931fb View commit details
  2. Merge pull request #7 from ghedamat/patch-1

    add version badge
    dschmidt committed Dec 3, 2015
    Copy the full SHA
    5d4236f View commit details

Commits on Dec 10, 2015

  1. Copy the full SHA
    ace200f View commit details

Commits on Feb 14, 2016

  1. Copy the full SHA
    ba6c445 View commit details
  2. Copy the full SHA
    cc88384 View commit details
  3. Merge pull request #11 from duizendnegen/master

    Use prepare hook instead of didBuild hook to catch revision data
    dschmidt committed Feb 14, 2016
    Copy the full SHA
    56a1cf6 View commit details
  4. Merge pull request #12 from duizendnegen/feature/update-mock-fs

    Update mock-fs dependency to support newer versions of node
    dschmidt committed Feb 14, 2016
    Copy the full SHA
    68160a2 View commit details

Commits on Mar 24, 2016

  1. Copy the full SHA
    481397c View commit details
  2. Merge pull request #14 from orf/master

    Rate limit uploaded sourcemaps
    dschmidt committed Mar 24, 2016
    Copy the full SHA
    6f7a610 View commit details

Commits on Apr 6, 2016

  1. Released v0.3.0

    dschmidt committed Apr 6, 2016
    Copy the full SHA
    086fb74 View commit details
  2. Add 0.3.1 changelog

    dschmidt committed Apr 6, 2016
    Copy the full SHA
    29eb05a View commit details
  3. Released v0.3.1

    dschmidt committed Apr 6, 2016
    Copy the full SHA
    7c4e39e View commit details

Commits on Apr 8, 2016

  1. Copy the full SHA
    81c0b56 View commit details

Commits on Apr 11, 2016

  1. Let jQuery find the correct meta tag in raven service

    Use releaseMetaName when finding release in raven service
    
    Update with dependent key
    oscarni committed Apr 11, 2016
    Copy the full SHA
    2a561ff View commit details
  2. Merge pull request #16 from oscarni/master

    Make sure Raven service finds the embedded revision
    dschmidt committed Apr 11, 2016
    Copy the full SHA
    6b19ffa View commit details

Commits on May 12, 2016

  1. Make logging consistent with other plugins, fix indentation.

    Yoran Brondsema committed May 12, 2016
    Copy the full SHA
    f66d0c6 View commit details
  2. Fix typo.

    Yoran Brondsema committed May 12, 2016
    Copy the full SHA
    c37b64c View commit details

Commits on May 13, 2016

  1. Clarify README

    Yoran Brondsema committed May 13, 2016
    Copy the full SHA
    f1d0fcb View commit details

Commits on May 18, 2016

  1. Merge pull request #19 from Hstry/yb-clarify-readme

    Clarify `publicUrl` in README
    dschmidt committed May 18, 2016
    Copy the full SHA
    79854e0 View commit details
  2. Merge pull request #18 from Hstry/yb-small-fixes

    Small fixes regarding logging, indentation and typo
    dschmidt committed May 18, 2016
    Copy the full SHA
    558d8b6 View commit details

Commits on Jun 22, 2016

  1. reorganizes index.js with more promises and error handling

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    632c426 View commit details
  2. wraps upload functions so it's a single call

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    479bdec View commit details
  3. abstracts final output into a separate function

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    c2e00f7 View commit details
  4. adds separate code path for replaceFiles option

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    14e9818 View commit details
  5. adds final logFiles step

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    a70279d View commit details
  6. adds some logging output

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    fd7c834 View commit details
  7. adds replaceFiles documentation

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    4a6622e View commit details
  8. adds replaceFiles to default config

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    01a00bf View commit details
  9. logFiles isn't private

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    819cf96 View commit details
  10. jshint fixes

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    c79a867 View commit details
  11. Copy the full SHA
    a56c9b7 View commit details
  12. return promise in handleExistingRelease

    so output to cli-deploy is in the correct order
    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    75a9534 View commit details
  13. updates tests for new relaceFiles config

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    462e6de View commit details
  14. only log info during verbose mode

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    3fcf1be View commit details
  15. Update README.md

    Brian Whitton authored Jun 22, 2016
    Copy the full SHA
    03b1e1c View commit details
  16. mark nested functions as private

    Brian Whitton authored Jun 22, 2016
    Copy the full SHA
    216cdf6 View commit details
  17. Sets replaceFiles to true by default.

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    3a3bba9 View commit details
  18. Updates README.md with new default value for replaceFiles

    Brian Whitton committed Jun 22, 2016
    Copy the full SHA
    884f6b3 View commit details
  19. Merge pull request #20 from nypublicradio/master

    reorganizes index.js with more promises and error handling
    dschmidt authored Jun 22, 2016
    Copy the full SHA
    c7d9cc9 View commit details

Commits on Jun 23, 2016

  1. Released v0.4.0

    dschmidt committed Jun 23, 2016
    Copy the full SHA
    98a78e7 View commit details

Commits on Aug 4, 2016

  1. Copy the full SHA
    45ef3f6 View commit details

Commits on Aug 5, 2016

  1. Copy the full SHA
    7f254bd View commit details
Showing with 12,473 additions and 156 deletions.
  1. +51 −0 CHANGELOG.md
  2. +44 −30 README.md
  3. +3 −2 addon/services/raven.js
  4. +3 −0 app/services/raven.js
  5. +166 −103 index.js
  6. +12,168 −0 package-lock.json
  7. +23 −11 package.json
  8. +15 −10 tests/unit/index-nodetest.js
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# ember-cli-deploy-sentry Changelog

### 0.7.0
- Add ability to associate a commit with a release [#62]
- Make it obvious where to get the keys for hosted accounts [#59]
- Update mock-fs to use more recent versions of Node.js [#55]
- Upload on didPrepare hook to fix gzip issues [#52]

### 0.5.5
- Remove jQuery usages [#45]

### 0.5.4
- Remove sentryApiKey from required config params [#43]
- Add strictSSL option for request [#43]

### 0.5.3
- Remove </meta> to prevent IE10 from breaking [#40]

### 0.5.2
- Fix deprecation warning for ember-cli/lib/ext/promise [#35]
- Add config documentation [#33]

### 0.5.1
- Remove documentation for `didDeployMessage` config option as its gone

### 0.5.0
Thanks to @kmiyashiro, @Turbo87 and especially @duizendnegen for making this release happen!

- Add bearer token authentication [#21]
- Support ember-cli-deploy-plugin 0.2.9 [#27]

### 0.4.0

- Gracefully handle reuploading sourcemaps for releases with assigned issues
- Several logging improvements
- Fix releaseMetaName not being respected by raven service
- Several Documentation fixes

### 0.3.1

- Fix possibly broken tarball

### 0.3.0

- Rate limit uploaded sourcemaps
- Update mock-fs dependency to support newer versions of node
- Use prepare hook instead of didBuild hook to catch revision data
- Fix windows issues by using form-data library directly

### 0.2.1

- Fix logging

### 0.2.0

- Add service for usage with ember-cli-sentry
74 changes: 44 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,9 +2,7 @@

> An ember-cli-deploy-plugin to upload javascript sourcemaps to [Sentry][1].
<hr/>
**WARNING: This plugin is only compatible with ember-cli-deploy versions >= 0.5.0**
<hr/>
[![](https://ember-cli-deploy.github.io/ember-cli-deploy-version-badges/plugins/ember-cli-deploy-sentry.svg)](http://ember-cli-deploy.github.io/ember-cli-deploy-version-badges/)

## What is an ember-cli-deploy plugin?

@@ -23,20 +21,27 @@ To get up and running quickly, do the following:
$ ember install ember-cli-deploy-sentry
```

- For hosted accounts, generate your bearer/api key here: https://sentry.io/api/
- Place the following configuration into `config/deploy.js`

```javascript
ENV.sentry {
ENV.sentry = {
// the URL or CDN your js assets are served from
publicUrl: 'https://your.awesome.site',
// the sentry install you're using, https://sentry.io for hosted accounts
sentryUrl: 'https://sentry.your.awesome.site',
sentryOrganizationSlug: 'AwesomeOrg',
sentryProjectSlug: 'AwesomeProject',
sentryApiKey: 'awesomeApiKey'

// One of:
sentryApiKey: 'awesomeApiKey',
// or
sentryBearerApiKey: 'awesomeApiKey'
}
```
- Integrate [raven-js][2] in your page

Install [ember-cli-sentry](https://github.com/damiencaselli/ember-cli-sentry) but import the raven service from `ember-cli-deploy-sentry/service/raven`,
Install [ember-cli-sentry](https://github.com/damiencaselli/ember-cli-sentry) but import the raven service from `ember-cli-deploy-sentry/services/raven`,
which will automatically handle setting up the release version for you. Sentry needs this to find the correct sourcemap for an error that occurs.

If you don't want to use `ember-cli-sentry` but set [raven-js][2] up manually see [Manual integration with raven-js](#manual-integration-with-raven-js).
@@ -85,7 +90,7 @@ For detailed information on how configuration of plugins works, please refer to

### publicUrl

The public url to the root of your website.
The public url to the root of where your assets are stored. For instance, if your assets are stored on Cloudfront, it would be `https://xxxx.cloudfront.net`.

*Required*

@@ -110,9 +115,11 @@ You can specify this in project settings in sentry.

*Required*

### sentryApiKey
### sentryApiKey _or_ sentryBearerApiKey

An api key you can create in your organization settings. Make sure it has the `project:write` privilege.
Either an HTTP Basic Auth username, or a bearer token. If you are uploading to the current Sentry API, use the latter. Use the former if you are using an older API.

You can create the api key in your organization settings. Make sure it has the `project:write` privilege.

*Required*

@@ -122,26 +129,6 @@ The root directory that all files matching the `filePattern` will be uploaded fr

*Default:* `context.distDir`

### didDeployMessage

A message that will be displayed after the distDir has been copied to destDir.

*Default:*

```javascript
didDeployMessage: function(context){
return "Uploaded sourcemaps to sentry release: "
+ this.readConfig('sentryUrl')
+ '/'
+ this.readConfig('sentryOrganizationSlug')
+ '/'
+ this.readConfig('sentryProjectSlug')
+ '/releases/'
+ this.readConfig('revisionKey')
+ '/';
}
```

### filePattern

`minimatch` expression that is used to determine which files should be uploaded from the `distDir`.
@@ -151,18 +138,45 @@ A message that will be displayed after the distDir has been copied to destDir.
### revisionKey

The revision string that is used to create releases in sentry.

*Default:*
```javascript
revisionKey: function(context) {
return context.revisionData && context.revisionData.revisionKey;
}
```

### revisionCommits

An array of revision commits allows us to associate commits with this Sentry release. See the [Sentry docs here](https://docs.sentry.io/workflow/releases/?platform=browser#using-the-api).

*Default:*
```javascript
revisionCommits: undefined
```

*Examples:*
```javascript
revisionCommits: function(context) {
return [{
repository:"owner-name/repo-name", // required
id:"2da95dfb052f477380608d59d32b4ab9" // required
}]
}
```

### enableRevisionTagging

Enable adding a meta tag with the current revisionKey into the head of your `index.html`.

*Default* true

### replaceFiles

At deploy-time, the plugin will check your Sentry instance for an existing release under the current `revisionKey`. If a release is found and this is set to `true`, all existing files for the matching release will be deleted before the current build's files are uploaded to Sentry. If this is set to `false`, the files on Sentry will remain untouched and the just-built files will not be uploaded.

*Default* true

## Prerequisites

The following properties are expected to be present on the deployment `context` object:
@@ -183,7 +197,7 @@ When you setup [raven-js][2] you can retrieve it like this:

```javascript
Raven.config({
release: $("meta[name='sentry:revision']").attr('content')
release: document.querySelector("meta[name='sentry:revision']").content
});
```

5 changes: 3 additions & 2 deletions addon/services/raven.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import Ember from 'ember';
import RavenService from 'ember-cli-sentry/services/raven';

export default RavenService.extend({
releaseMetaName: 'sentry:revision',
release: Ember.computed({
release: Ember.computed('releaseMetaName', {
get: function() {
return $("meta[name='revision']").attr('content');
return document.querySelector(`meta[name='${this.get('releaseMetaName')}']`).content;
}
})
});
3 changes: 3 additions & 0 deletions app/services/raven.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import RavenService from 'ember-cli-deply-sentry/services/raven';

export default RavenService;
Loading