Skip to content

Commit b31da8c

Browse files
author
elliotlarson
committed
fixing changelog conflict
2 parents aeb3228 + e23218f commit b31da8c

14 files changed

+432
-306
lines changed

.rubocop_todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Metrics/BlockNesting:
1616
# Offense count: 4
1717
# Configuration parameters: CountComments.
1818
Metrics/ClassLength:
19-
Max: 246
19+
Max: 252
2020

2121
# Offense count: 23
2222
Metrics/CyclomaticComplexity:

CHANGELOG.md

Lines changed: 235 additions & 228 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
Contributing to Grape
22
=====================
33

4-
Grape is work of [hundreds of contributors](https://github.com/intridea/grape/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/intridea/grape/pulls), [propose features and discuss issues](https://github.com/intridea/grape/issues). When in doubt, ask a question in the [Grape Google Group](http://groups.google.com/group/ruby-grape).
4+
Grape is work of [hundreds of contributors](https://github.com/ruby-grape/grape/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/ruby-grape/grape/pulls), [propose features and discuss issues](https://github.com/ruby-grape/grape/issues). When in doubt, ask a question in the [Grape Google Group](http://groups.google.com/group/ruby-grape).
55

66
#### Fork the Project
77

8-
Fork the [project on Github](https://github.com/intridea/grape) and check out your copy.
8+
Fork the [project on Github](https://github.com/ruby-grape/grape) and check out your copy.
99

1010
```
1111
git clone https://github.com/contributor/grape.git
1212
cd grape
13-
git remote add upstream https://github.com/intridea/grape.git
13+
git remote add upstream https://github.com/ruby-grape/grape.git
1414
```
1515

1616
#### Create a Topic Branch
@@ -102,7 +102,7 @@ git push origin my-feature-branch -f
102102
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
103103

104104
```
105-
* [#123](https://github.com/intridea/grape/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
105+
* [#123](https://github.com/ruby-grape/grape/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
106106
```
107107

108108
Amend your previous commit and force push the changes.

README.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
![grape logo](grape.png)
22

33
[![Gem Version](http://img.shields.io/gem/v/grape.svg)](http://badge.fury.io/rb/grape)
4-
[![Build Status](http://img.shields.io/travis/intridea/grape.svg)](https://travis-ci.org/intridea/grape)
5-
[![Dependency Status](https://gemnasium.com/intridea/grape.svg)](https://gemnasium.com/intridea/grape)
6-
[![Code Climate](https://codeclimate.com/github/intridea/grape.svg)](https://codeclimate.com/github/intridea/grape)
7-
[![Inline docs](http://inch-ci.org/github/intridea/grape.svg)](http://inch-ci.org/github/intridea/grape)
4+
[![Build Status](http://img.shields.io/travis/ruby-grape/grape.svg)](https://travis-ci.org/ruby-grape/grape)
5+
[![Dependency Status](https://gemnasium.com/ruby-grape/grape.svg)](https://gemnasium.com/ruby-grape/grape)
6+
[![Code Climate](https://codeclimate.com/github/ruby-grape/grape.svg)](https://codeclimate.com/github/ruby-grape/grape)
7+
[![Inline docs](http://inch-ci.org/github/ruby-grape/grape.svg)](http://inch-ci.org/github/ruby-grape/grape)
88

99
## Table of Contents
1010

@@ -79,6 +79,8 @@
7979
- [Reloading in Rack Applications](#reloading-in-rack-applications)
8080
- [Reloading in Rails Applications](#reloading-in-rails-applications)
8181
- [Performance Monitoring](#performance-monitoring)
82+
- [Active Support Instrumentation](#active-support-instrumentation)
83+
- [Monitoring Products](#monitoring-products)
8284
- [Contributing to Grape](#contributing-to-grape)
8385
- [Hacking on Grape](#hacking-on-grape)
8486
- [License](#license)
@@ -94,14 +96,14 @@ content negotiation, versioning and much more.
9496

9597
## Stable Release
9698

97-
You're reading the documentation for the next release of Grape, which should be 0.12.1.
99+
You're reading the documentation for the next release of Grape, which should be 0.13.1.
98100
Please read [UPGRADING](UPGRADING.md) when upgrading from a previous version.
99-
The current stable release is [0.12.0](https://github.com/intridea/grape/blob/v0.12.0/README.md).
101+
The current stable release is [0.13.0](https://github.com/ruby-grape/grape/blob/v0.13.0/README.md).
100102

101103
## Project Resources
102104

105+
* [Grape Website](http://www.ruby-grape.org)
103106
* Need help? [Grape Google Group](http://groups.google.com/group/ruby-grape)
104-
* [Grape Wiki](https://github.com/intridea/grape/wiki)
105107

106108
## Installation
107109

@@ -1421,7 +1423,7 @@ instead of a message.
14211423
error!({ error: "unexpected error", detail: "missing widget" }, 500)
14221424
```
14231425

1424-
You can present documented errors with a Grape entity using the the [grape-entity](https://github.com/intridea/grape-entity) gem.
1426+
You can present documented errors with a Grape entity using the the [grape-entity](https://github.com/ruby-grape/grape-entity) gem.
14251427

14261428
```ruby
14271429
module API
@@ -1942,8 +1944,8 @@ hash may include `:with`, which defines the entity to expose.
19421944

19431945
### Grape Entities
19441946

1945-
Add the [grape-entity](https://github.com/intridea/grape-entity) gem to your Gemfile.
1946-
Please refer to the [grape-entity documentation](https://github.com/intridea/grape-entity/blob/master/README.md)
1947+
Add the [grape-entity](https://github.com/ruby-grape/grape-entity) gem to your Gemfile.
1948+
Please refer to the [grape-entity documentation](https://github.com/ruby-grape/grape-entity/blob/master/README.md)
19471949
for more details.
19481950

19491951
The following example exposes statuses.
@@ -2628,6 +2630,34 @@ See [StackOverflow #3282655](http://stackoverflow.com/questions/3282655/ruby-on-
26282630

26292631
## Performance Monitoring
26302632

2633+
### Active Support Instrumentation
2634+
2635+
Grape has built-in support for [ActiveSupport::Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) which provides simple hook points to instrument key parts of your application.
2636+
2637+
The following are currently supported:
2638+
2639+
#### endpoint_run.grape
2640+
2641+
The main execution of an endpoint, includes filters and rendering.
2642+
2643+
* *endpoint* - The endpoint instance
2644+
2645+
#### endpoint_render.grape
2646+
2647+
The execution of the main content block of the endpoint.
2648+
2649+
* *endpoint* - The endpoint instance
2650+
2651+
#### endpoint_run_filters.grape
2652+
2653+
* *endpoint* - The endpoint instance
2654+
* *filters* - The filters being executed
2655+
* *type* - The type of filters (before, before_validation, after_validation, after)
2656+
2657+
See the [ActiveSupport::Notifications documentation](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html] for information on how to subscribe to these events.
2658+
2659+
### Monitoring Products
2660+
26312661
Grape integrates with NewRelic via the
26322662
[newrelic-grape](https://github.com/flyerhzm/newrelic-grape) gem, and
26332663
with Librato Metrics with the [grape-librato](https://github.com/seanmoon/grape-librato) gem.
@@ -2644,7 +2674,7 @@ See [CONTRIBUTING](CONTRIBUTING.md).
26442674
You can start hacking on Grape on
26452675
[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=grape&utm_medium=hackonnitrous) in a matter of seconds:
26462676

2647-
[![Hack intridea/grape on Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=rails&repo=intridea%2Fgrape&file_to_open=README.md)
2677+
[![Hack ruby-grape/grape on Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=rails&repo=intridea%2Fgrape&file_to_open=README.md)
26482678

26492679
## License
26502680

RELEASING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ bundle install
1212
rake
1313
```
1414

15-
Check that the last build succeeded in [Travis CI](https://travis-ci.org/intridea/grape) for all supported platforms.
15+
Check that the last build succeeded in [Travis CI](https://travis-ci.org/ruby-grape/grape) for all supported platforms.
1616

17-
Those with r/w permissions to the [master Intridea repository](https://github.com/intridea/grape) generally have large Grape-based projects. Point one to Grape HEAD and run all your API tests to catch any obvious regressions.
17+
Those with r/w permissions to the [master Grape repository](https://github.com/ruby-grape/grape) generally have large Grape-based projects. Point one to Grape HEAD and run all your API tests to catch any obvious regressions.
1818

1919
```
20-
gem grape, github: 'intridea/grape'
20+
gem grape, github: 'ruby-grape/grape'
2121
```
2222

2323
Increment the version, modify [lib/grape/version.rb](lib/grape/version.rb).
@@ -69,7 +69,7 @@ Modify the "Stable Release" section in [README.md](README.md). Change the text t
6969
## Stable Release
7070
7171
You're reading the documentation for the next release of Grape, which should be 0.6.1.
72-
The current stable release is [0.6.0](https://github.com/intridea/grape/blob/v0.6.0/README.md).
72+
The current stable release is [0.6.0](https://github.com/ruby-grape/grape/blob/v0.6.0/README.md).
7373
```
7474

7575
Add the next release to [CHANGELOG.md](CHANGELOG.md).

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ begin
4444
Dir.mkdir(dir)
4545
Dir.chdir(dir) do
4646
system('git init')
47-
system('git remote add origin [email protected]:intridea/grape.git')
47+
system('git remote add origin [email protected]:ruby-grape/grape.git')
4848
system('git pull')
4949
system('git checkout gh-pages')
5050
end

UPGRADING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class CacheBusterMiddleware < Grape::Middleware::Base
2929
end
3030
```
3131

32-
See [#1029](https://github.com/intridea/grape/pull/1029) for more information.
32+
See [#1029](https://github.com/ruby-grape/grape/pull/1029) for more information.
3333

3434
#### Changes in present
3535

3636
Using `present` with objects that responded to `merge` would cause early evaluation of the represented object, with unexpected side-effects, such as missing parameters or environment within rendering code. Grape now only merges represented objects with a previously rendered body, usually when multiple `present` calls are made in the same route.
3737

38-
See [grape-with-roar#5](https://github.com/dblock/grape-with-roar/issues/5) and [#1023](https://github.com/intridea/grape/issues/1023).
38+
See [grape-with-roar#5](https://github.com/dblock/grape-with-roar/issues/5) and [#1023](https://github.com/ruby-grape/grape/issues/1023).
3939

4040
#### Changes to regexp validator
4141

@@ -47,7 +47,7 @@ params do
4747
end
4848
```
4949

50-
See [#957](https://github.com/intridea/grape/pull/957) for more information.
50+
See [#957](https://github.com/ruby-grape/grape/pull/957) for more information.
5151

5252
#### Replace error_response with error! in rescue_from blocks
5353

@@ -88,11 +88,11 @@ Rack::Response.new([ e.message ], 500, { "Content-type" => "text/error" }).finis
8888
error!(e)
8989
```
9090

91-
See [#889](https://github.com/intridea/grape/issues/889) for more information.
91+
See [#889](https://github.com/ruby-grape/grape/issues/889) for more information.
9292

9393
#### Changes to routes when using `format`
9494

95-
Version 0.10.0 has introduced a change via [#809](https://github.com/intridea/grape/pull/809) whereas routes no longer got file-type suffixes added if you declared a single API `format`. This has been reverted, it's now again possible to call API with proper suffix when single `format` is defined:
95+
Version 0.10.0 has introduced a change via [#809](https://github.com/ruby-grape/grape/pull/809) whereas routes no longer got file-type suffixes added if you declared a single API `format`. This has been reverted, it's now again possible to call API with proper suffix when single `format` is defined:
9696

9797
```ruby
9898
class API < Grape::API
@@ -108,7 +108,7 @@ Will respond with JSON to `/hello` **and** `/hello.json`.
108108

109109
Will respond with 404 to `/hello.xml`, `/hello.txt` etc.
110110

111-
See the [#1001](https://github.com/intridea/grape/pull/1001) and [#914](https://github.com/intridea/grape/issues/914) for more info.
111+
See the [#1001](https://github.com/ruby-grape/grape/pull/1001) and [#914](https://github.com/ruby-grape/grape/issues/914) for more info.
112112

113113
### Upgrading to >= 0.11.0
114114

@@ -120,36 +120,36 @@ Grape now supports, but doesn't require Rack 1.6.0. If you encounter an issue wi
120120
gem 'rack', '~> 1.6.0'
121121
```
122122

123-
See [#559](https://github.com/intridea/grape/issues/559) for more information.
123+
See [#559](https://github.com/ruby-grape/grape/issues/559) for more information.
124124

125125
#### Removed route_info
126126

127127
Key route_info is excluded from params.
128128

129-
See [#879](https://github.com/intridea/grape/pull/879) for more information.
129+
See [#879](https://github.com/ruby-grape/grape/pull/879) for more information.
130130

131131

132132
#### Fix callbacks within a version block
133133

134134
Callbacks defined in a version block are only called for the routes defined in that block. This was a regression introduced in Grape 0.10.0, and is fixed in this version.
135135

136-
See [#901](https://github.com/intridea/grape/pull/901) for more information.
136+
See [#901](https://github.com/ruby-grape/grape/pull/901) for more information.
137137

138138

139139
#### Make type of group of parameters required
140140

141141
Groups of parameters now require their type to be set explicitly as Array or Hash.
142142
Not setting the type now results in MissingGroupTypeError, unsupported type will raise UnsupportedTypeError.
143143

144-
See [#886](https://github.com/intridea/grape/pull/886) for more information.
144+
See [#886](https://github.com/ruby-grape/grape/pull/886) for more information.
145145

146146
### Upgrading to >= 0.10.1
147147

148148
#### Changes to `declared(params, include_missing: false)`
149149

150150
Attributes with `nil` values or with values that evaluate to `false` are no longer considered *missing* and will be returned when `include_missing` is set to `false`.
151151

152-
See [#864](https://github.com/intridea/grape/pull/864) for more information.
152+
See [#864](https://github.com/ruby-grape/grape/pull/864) for more information.
153153

154154
### Upgrading to >= 0.10.0
155155

@@ -284,13 +284,13 @@ get do
284284
end
285285
```
286286

287-
For more information see [#836](https://github.com/intridea/grape/issues/836).
287+
For more information see [#836](https://github.com/ruby-grape/grape/issues/836).
288288

289289
#### Changes to Custom Validators
290290

291291
To implement a custom validator, you need to inherit from `Grape::Validations::Base` instead of `Grape::Validations::Validator`.
292292

293-
For more information see [Custom Validators](https://github.com/intridea/grape#custom-validators) in the documentation.
293+
For more information see [Custom Validators](https://github.com/ruby-grape/grape#custom-validators) in the documentation.
294294

295295
#### Changes to Raising Grape::Exceptions::Validation
296296

@@ -337,7 +337,7 @@ class API < Grape::API
337337
end
338338
```
339339

340-
See the [the updated API Formats documentation](https://github.com/intridea/grape#api-formats) and [#809](https://github.com/intridea/grape/pull/809) for more info.
340+
See the [the updated API Formats documentation](https://github.com/ruby-grape/grape#api-formats) and [#809](https://github.com/ruby-grape/grape/pull/809) for more info.
341341

342342
#### Changes to Evaluation of Permitted Parameter Values
343343

@@ -357,7 +357,7 @@ params do
357357
end
358358
```
359359

360-
See [#801](https://github.com/intridea/grape/issues/801) for more information.
360+
See [#801](https://github.com/ruby-grape/grape/issues/801) for more information.
361361

362362
#### Changes to version
363363

@@ -389,7 +389,7 @@ end
389389

390390
when making a API call `GET /foo/v2/1`, the API would set instance variable `@output` to `hello1-v2`
391391

392-
See [#898](https://github.com/intridea/grape/issues/898) for more information.
392+
See [#898](https://github.com/ruby-grape/grape/issues/898) for more information.
393393

394394

395395
### Upgrading to >= 0.9.0
@@ -422,10 +422,10 @@ As replacement can be used
422422
* `Grape::Middleware::Auth::Digest` => [`Rack::Auth::Digest::MD5`](https://github.com/rack/rack/blob/master/lib/rack/auth/digest/md5.rb)
423423
* `Grape::Middleware::Auth::OAuth2` => [warden-oauth2](https://github.com/opperator/warden-oauth2) or [rack-oauth2](https://github.com/nov/rack-oauth2)
424424

425-
If this is not possible you can extract the middleware files from [grape v0.7.0](https://github.com/intridea/grape/tree/v0.7.0/lib/grape/middleware/auth)
425+
If this is not possible you can extract the middleware files from [grape v0.7.0](https://github.com/ruby-grape/grape/tree/v0.7.0/lib/grape/middleware/auth)
426426
and host these files within your application
427427

428-
See [#703](https://github.com/intridea/Grape/pull/703) for more information.
428+
See [#703](https://github.com/ruby-grape/Grape/pull/703) for more information.
429429

430430
### Upgrading to >= 0.7.0
431431

@@ -462,7 +462,7 @@ rescue_from ParentError, rescue_subclasses: false do |e|
462462
end
463463
```
464464

465-
See [#544](https://github.com/intridea/grape/pull/544) for more information.
465+
See [#544](https://github.com/ruby-grape/grape/pull/544) for more information.
466466

467467

468468
#### Changes in the Default HTTP Status Code
@@ -485,7 +485,7 @@ You may also use `default_error_status` to change the global default.
485485
default_error_status 400
486486
```
487487

488-
See [#525](https://github.com/intridea/Grape/pull/525) for more information.
488+
See [#525](https://github.com/ruby-grape/Grape/pull/525) for more information.
489489

490490

491491
#### Changes in Parameter Declaration and Validation
@@ -502,7 +502,7 @@ params do
502502
end
503503
```
504504

505-
This caused the ambiguity and unexpected errors described in [#543](https://github.com/intridea/Grape/issues/543).
505+
This caused the ambiguity and unexpected errors described in [#543](https://github.com/ruby-grape/Grape/issues/543).
506506

507507
In Grape 0.7.0, the `group`, `optional` and `requires` keywords take an additional `type` attribute which defaults to `Array`. This means that without a `type` attribute, these nested parameters will no longer accept a single hash, only an array (of hashes).
508508

@@ -530,7 +530,7 @@ params do
530530
end
531531
```
532532

533-
See [#545](https://github.com/intridea/Grape/pull/545) for more information.
533+
See [#545](https://github.com/ruby-grape/Grape/pull/545) for more information.
534534

535535

536536
### Upgrading to 0.6.0
@@ -547,4 +547,4 @@ rescue_from Grape::Exceptions::Validations do |e|
547547
end
548548
```
549549

550-
For more information see [#462](https://github.com/intridea/grape/issues/462).
550+
For more information see [#462](https://github.com/ruby-grape/grape/issues/462).

grape.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
77
s.platform = Gem::Platform::RUBY
88
s.authors = ['Michael Bleigh']
99
s.email = ['[email protected]']
10-
s.homepage = 'https://github.com/intridea/grape'
10+
s.homepage = 'https://github.com/ruby-grape/grape'
1111
s.summary = 'A simple Ruby framework for building REST-like APIs.'
1212
s.description = 'A Ruby framework for rapid API development with great conventions.'
1313
s.license = 'MIT'

lib/grape.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
require 'active_support/core_ext/object/conversions'
1414
require 'active_support/core_ext/array/extract_options'
1515
require 'active_support/core_ext/hash/deep_merge'
16+
require 'active_support/core_ext/hash/except'
1617
require 'active_support/dependencies/autoload'
18+
require 'active_support/notifications'
1719
require 'multi_json'
1820
require 'multi_xml'
1921
require 'virtus'

0 commit comments

Comments
 (0)