Skip to content

Commit 38e36d0

Browse files
authored
Added Danger, PR linter. (#237)
1 parent bf2cf7b commit 38e36d0

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,24 @@ sudo: false
33
language: ruby
44

55
cache: bundler
6+
67
bundler_args: --without development
78

89
rvm:
9-
- ruby-head
10+
- 2.3.1
1011
- 2.3.0
1112
- 2.2
1213
- 2.1
1314
- 2.0.0
14-
- 1.9.3
15-
- jruby-19mode
15+
- ruby-head
1616
- jruby-head
1717
- rbx-2
1818

1919
matrix:
20+
include:
21+
- rvm: 2.3.1
22+
script:
23+
- bundle exec danger
2024
allow_failures:
2125
- rvm: ruby-head
2226
- rvm: jruby-head

CHANGELOG.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* [#226](https://github.com/ruby-grape/grape-entity/pull/226): Added fetch method to fetch from opts_hash - [@alanjcfs](https://github.com/alanjcfs).
77
* [#232](https://github.com/ruby-grape/grape-entity/pull/232), [#213](https://github.com/ruby-grape/grape-entity/issues/213): Added `#kind_of?` and `#is_a?` to `OutputBuilder` to get an exact class of an `output` object - [@avyy](https://github.com/avyy).
88
* [#234](https://github.com/ruby-grape/grape-entity/pull/234), [#233](https://github.com/ruby-grape/grape-entity/issues/233): Added ruby version checking in `Gemfile` to install needed gems versions for supporting old rubies too - [@avyy](https://github.com/avyy).
9+
* [#237](https://github.com/ruby-grape/grape-entity/pull/237): Added Danger, PR linter - [@dblock](https://github.com/dblock).
910
* Your contribution here.
1011

1112
0.5.1 (2016-4-4)
@@ -34,12 +35,12 @@
3435
0.4.8 (2015-08-10)
3536
==================
3637

37-
* [#167](https://github.com/ruby-grape/grape-entity/pull/167): Regression: global settings (exposures, formatters) on `Grape::Entity` should work: [#166](https://github.com/ruby-grape/grape-entity/issues/166) - [@marshall-lee](http://github.com/marshall-lee).
38+
* [#167](https://github.com/ruby-grape/grape-entity/pull/167), [#166](https://github.com/ruby-grape/grape-entity/issues/166): Regression with global settings (exposures, formatters) on `Grape::Entity` - [@marshall-lee](https://github.com/marshall-lee).
3839

3940
0.4.7 (2015-08-03)
4041
==================
4142

42-
* [#164](https://github.com/ruby-grape/grape-entity/pull/164): Regression: entity instance methods were exposed with `NoMethodError`: [#163](https://github.com/ruby-grape/grape-entity/issues/163) - [@marshall-lee](http://github.com/marshall-lee).
43+
* [#164](https://github.com/ruby-grape/grape-entity/pull/164): Regression: entity instance methods were exposed with `NoMethodError`: [#163](https://github.com/ruby-grape/grape-entity/issues/163) - [@marshall-lee](https://github.com/marshall-lee).
4344

4445
0.4.6 (2015-07-27)
4546
==================
@@ -50,10 +51,10 @@
5051
* [#134](https://github.com/ruby-grape/grape-entity/pull/134): Subclasses no longer affected in all cases by `unexpose` in parent - [@etehtsea](https://github.com/etehtsea).
5152
* [#135](https://github.com/ruby-grape/grape-entity/pull/135): Added `except` option - [@dan-corneanu](https://github.com/dan-corneanu).
5253
* [#136](https://github.com/ruby-grape/grape-entity/pull/136): Allow for strings in `only` and `except` options - [@bswinnerton](https://github.com/bswinnerton).
53-
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): Expose `safe` attributes as `nil` if they cannot be evaluated: [#140](https://github.com/ruby-grape/grape-entity/issues/140) - [@marshall-lee](http://github.com/marshall-lee).
54-
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): Fix: private method values were not exposed with `safe` option: [#142](https://github.com/ruby-grape/grape-entity/pull/142) - [@marshall-lee](http://github.com/marshall-lee).
55-
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): Remove catching of `NoMethodError` because it can occur deep inside in a method call so this exception does not mean that attribute not exist - [@marshall-lee](http://github.com/marshall-lee).
56-
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): `valid_exposures` is removed - [@marshall-lee](http://github.com/marshall-lee).
54+
* [#147](https://github.com/ruby-grape/grape-entity/pull/147), [#140](https://github.com/ruby-grape/grape-entity/issues/140): Expose `safe` attributes as `nil` if they cannot be evaluated - [@marshall-lee](https://github.com/marshall-lee).
55+
* [#147](https://github.com/ruby-grape/grape-entity/pull/147), [#142](https://github.com/ruby-grape/grape-entity/pull/142): Fix: private method values were not exposed with `safe` option - [@marshall-lee](https://github.com/marshall-lee).
56+
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): Remove catching of `NoMethodError` because it can occur deep inside in a method call so this exception does not mean that attribute not exist - [@marshall-lee](https://github.com/marshall-lee).
57+
* [#147](https://github.com/ruby-grape/grape-entity/pull/147): The `valid_exposures` method was removed - [@marshall-lee](https://github.com/marshall-lee).
5758

5859
0.4.5 (2015-03-10)
5960
==================
@@ -69,13 +70,13 @@
6970
==================
7071

7172
* [#85](https://github.com/ruby-grape/grape-entity/pull/85): Added `present_collection` to indicate that an `Entity` presents an entire Collection - [@dspaeth-faber](https://github.com/dspaeth-faber).
72-
* [#85](https://guthub.com/ruby-grape/grape-entity/pull/85): Hashes can now be passed as object to be presented and the `Hash` keys can be referenced by expose - [@dspaeth-faber](https://github.com/dspaeth-faber).
73+
* [#85](https://github.com/ruby-grape/grape-entity/pull/85): Hashes can now be passed as object to be presented and the `Hash` keys can be referenced by expose - [@dspaeth-faber](https://github.com/dspaeth-faber).
7374

7475
0.4.3 (2014-06-12)
7576
==================
7677

7778
* [#77](https://github.com/ruby-grape/grape-entity/pull/77): Fix: compatibility with Rspec 3 - [@justfalter](https://github.com/justfalter).
78-
* [#76](https://github.com/ruby-grape/grape-entity/pull/76): Improve performance of entity serialization - [@justfalter](https://github.com/justfalter)
79+
* [#76](https://github.com/ruby-grape/grape-entity/pull/76): Improve performance of entity serialization - [@justfalter](https://github.com/justfalter).
7980

8081
0.4.2 (2014-04-03)
8182
==================

Dangerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
danger.import_dangerfile(gem: 'ruby-grape-danger')

Gemfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ else
1212
gem 'rack', '< 2', group: [:development, :test]
1313
end
1414

15-
if Gem::Requirement.new('~> 2.0').satisfied_by? current_ruby_version
16-
gem 'json', '~> 2.0', group: [:development, :test]
17-
else
18-
gem 'json', '< 2', group: [:development, :test]
19-
end
15+
gem 'json', '< 2', group: [:development, :test]
2016

2117
group :development do
2218
gem 'pry'
@@ -33,3 +29,7 @@ group :development, :test do
3329
gem 'rack-test', '~> 0.6.2', require: 'rack/test'
3430
gem 'rubocop', '0.31.0'
3531
end
32+
33+
group :test do
34+
gem 'ruby-grape-danger', '~> 0.1.0', require: false
35+
end

0 commit comments

Comments
 (0)