Skip to content

Commit

Permalink
Version 1.0.2 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRiv committed Apr 18, 2015
1 parent 2804870 commit 1b2b753
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<a name="1.0.2"></a>
### 1.0.2

#### Features

* More precise handling of durations between navigationStart & a user mark ([6e814f5](https://github.com/Comcast/Surf-N-Perf/commit/6e814f5db1bc650d2ab487c45fea61986fca4000))
* Available now as a [Ruby Gem](https://rubygems.org/gems/surfnperf)

<a name="1.0.1"></a>
### 1.0.1

Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,48 @@ That provides support for the following:

Details in the [JavaScript API](https://github.com/Comcast/Surf-N-Perf/wiki/JavaScript-API) page in the wiki

## Ruby Project Integration

### Using within a Rails project

The [surfnperf Ruby Gem](https://rubygems.org/gems/surfnperf) allows you to quickly & easily integrate Surf-N-Perf into your Rails projects. To include the necessary files, add `surfnperf` to your `Gemfile`:

```ruby
gem 'surfnperf'
```

After a `$ bundle install`, you'll be able to include the [main JavaScript file](https://github.com/Comcast/Surf-N-Perf/blob/master/surfnperf.js) in your JavaScript manifest by simply adding:

```
//= require surfnperf
```

The necessary script for the ```<head>``` of your HTML document is also available to you via a [partial template](http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials) that you can include in the appropriate layout file for your page, such as `app/views/layouts/application.html.erb` by simply adding this line:

```erb
<%= render "surfnperf/head" %>
```

Those 3 lines of code are all your need to get started using Surf-N-Perf in Rails!

### Using within other Ruby projects that integrate with Sprockets

[Sprockets](https://github.com/sstephenson/sprockets) is what powers the [Asset Pipeline](http://guides.rubyonrails.org/asset_pipeline.html) in Rails, as well as other Ruby website tools such as [Middleman](https://middlemanapp.com/). For these other Ruby projects that use [Sprockets](https://middlemanapp.com/advanced/asset_pipeline/), integration is similar to the Rails instructions above, with one extra step:

Add `surfnperf` to your `Gemfile`:

```ruby
gem 'surfnperf'
```

After a `$ bundle install`, include [surfnperf.js](https://github.com/Comcast/Surf-N-Perf/blob/master/surfnperf.js) in your JavaScript manifest by adding:

```
//= require surfnperf
```

For now, you'll have to manually include the [necessary script](#including-the-code-in-your-project) for the ```<head>``` of your HTML document. If someone would like to update the Ruby Gem to work as a proper [Middleman Extension](https://middlemanapp.com/advanced/custom_extensions/), we'd happily accept a [pull request](https://github.com/Comcast/Surf-N-Perf/issues/35).

## Running Tests & Other Development Tools

Tests are written in [Jasmine](http://jasmine.github.io/) and run with [Karma](http://karma-runner.github.io/)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "surfnperf",
"version": "1.0.1",
"version": "1.0.2",
"description": "Micro-library for gathering frontend web page performance data",
"main": "surfnperf.min",
"engines": {
Expand Down

0 comments on commit 1b2b753

Please sign in to comment.