grape-route-helpers 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ac7c28ada79f5622bae6ba7893bb199e7b33fcb
4
- data.tar.gz: 06ef83ad1b9cf2cb508f5fe113295cbb20673992
3
+ metadata.gz: a436c5306eca86f756921e38c26141ad09b9ab2d
4
+ data.tar.gz: 69dd431b336b391cb402bc14775027e69cc6e2c8
5
5
  SHA512:
6
- metadata.gz: 3be39b62345e43228f2088b6b9728c14e709b8a0aca5a8e5d5b794b69a8fe02301266790a7cda1670fd90f820e205064401d0906cfe1d706425c76f07785e3d4
7
- data.tar.gz: a91eb07644365db63eafbd180f13dedf13c76e2e18750ed5deb9b827891748f2d4ba012631aef99fb9180a2440c9361201ebbc6febb130df64f7a96eb86a98f9
6
+ metadata.gz: c60ff91c855a14e6102130b36872503dbe03846eedff32e4814116f7a766afca8ad0bf0e79bd66ea964d3f2442c1069e4a41133b7cdeebc525fcd5793db47895
7
+ data.tar.gz: 8f0066969692d5b96fde60b43eaf39665473bfc6af49ac43d3be0d9506cfe8f00eea3f0115f1a3efd41dfe61202b6213034db98da7c2451edcb49610ae7986c0
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  *.swp
2
2
  *.gem
3
+ .ruby-version
data/.travis.yml ADDED
@@ -0,0 +1,18 @@
1
+ language: ruby
2
+
3
+ cache: bundler
4
+
5
+ rvm:
6
+ - ruby-head
7
+ - 2.3.0
8
+ - 2.2.0
9
+ - 2.1.0
10
+ - 2.0.0
11
+ - 1.9.3
12
+ - jruby-19mode
13
+ - jruby-head
14
+
15
+ matrix:
16
+ allow_failures:
17
+ - rvm: ruby-head
18
+ - rvm: jruby-head
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## April 11 2016
4
+
5
+ * Release 1.2.2
6
+ * Fixed incompatibility between grape-route-helpers and Ruby 2.3 by merging PR #8 from phallguy
7
+
3
8
  ## October 11 2015
4
9
 
5
10
  * Release 1.2.1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-route-helpers (1.2.1)
4
+ grape-route-helpers (1.2.2)
5
5
  activesupport
6
6
  grape
7
7
  rake
@@ -45,7 +45,7 @@ GEM
45
45
  ice_nine (0.11.1)
46
46
  json (1.8.3)
47
47
  method_source (0.8.2)
48
- minitest (5.7.0)
48
+ minitest (5.8.3)
49
49
  multi_json (1.11.2)
50
50
  multi_xml (0.5.5)
51
51
  parser (2.3.0.pre.2)
@@ -102,4 +102,4 @@ DEPENDENCIES
102
102
  rubocop
103
103
 
104
104
  BUNDLED WITH
105
- 1.10.6
105
+ 1.11.2
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # grape-route-helpers
2
2
 
3
+ [![Build Status](https://travis-ci.org/reprah/grape-route-helpers.svg)](https://travis-ci.org/reprah/grape-route-helpers)
4
+
3
5
  Provides named route helpers for Grape APIs, similar to [Rails' route helpers](http://edgeguides.rubyonrails.org/routing.html#path-and-url-helpers).
4
6
 
5
7
  ### Installation
data/Rakefile ADDED
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.setup :default, :test, :development
5
+
6
+ Bundler::GemHelper.install_tasks
7
+
8
+ require 'rspec/core/rake_task'
9
+ RSpec::Core::RakeTask.new(:spec) do |spec|
10
+ spec.pattern = 'spec/**/*_spec.rb'
11
+ end
12
+
13
+ task :spec
14
+
15
+ require 'rainbow/ext/string' unless String.respond_to?(:color)
16
+
17
+ task default: [:spec]
@@ -11,9 +11,8 @@ module GrapeRouteHelpers
11
11
  def all_routes
12
12
  routes = subclasses.flat_map { |s| s.send(:prepare_routes) }
13
13
  # delete duplicate routes
14
- routes.delete_if do |route|
15
- all_options = routes.map { |r| r.instance_variable_get(:@options) }
16
- all_options.count(route.instance_variable_get(:@options)) > 1
14
+ routes.uniq do |route|
15
+ route.instance_variable_get( :@options )
17
16
  end
18
17
  end
19
18
  end
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module GrapeRouteHelpers
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
4
4
  end
@@ -20,7 +20,8 @@ describe GrapeRouteHelpers::AllRoutes do
20
20
  end
21
21
 
22
22
  expect(duplicates).to be_empty
23
- expect(all_route_options.size).to eq(6)
23
+ expect(all_route_options.size).to eq(7)
24
+
24
25
  end
25
26
  end
26
27
  end
data/spec/support/api.rb CHANGED
@@ -43,6 +43,7 @@ module Spec
43
43
  # API with another API mounted inside it
44
44
  class MountedAPI < Grape::API
45
45
  mount Spec::Support::API
46
+ mount Spec::Support::APIWithMultipleVersions
46
47
  end
47
48
 
48
49
  # API with a version that would be illegal as a method name
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-route-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harper Henn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2016-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: Route helpers for Grape
@@ -100,13 +100,15 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
- - .gitignore
104
- - .rubocop.yml
103
+ - ".gitignore"
104
+ - ".rubocop.yml"
105
+ - ".travis.yml"
105
106
  - CHANGELOG.md
106
107
  - Gemfile
107
108
  - Gemfile.lock
108
109
  - LICENSE.txt
109
110
  - README.md
111
+ - Rakefile
110
112
  - grape-route-helpers.gemspec
111
113
  - lib/grape-route-helpers.rb
112
114
  - lib/grape-route-helpers/all_routes.rb
@@ -118,7 +120,7 @@ files:
118
120
  - lib/grape-route-helpers/version.rb
119
121
  - lib/grape/route_helpers.rb
120
122
  - lib/tasks/grape_route_helpers.rake
121
- - spec/grape_route_helpers/all_routes.rb
123
+ - spec/grape_route_helpers/all_routes_spec.rb
122
124
  - spec/grape_route_helpers/decorated_route_spec.rb
123
125
  - spec/grape_route_helpers/named_route_matcher_spec.rb
124
126
  - spec/spec_helper.rb
@@ -133,19 +135,18 @@ require_paths:
133
135
  - lib
134
136
  required_ruby_version: !ruby/object:Gem::Requirement
135
137
  requirements:
136
- - - '>='
138
+ - - ">="
137
139
  - !ruby/object:Gem::Version
138
140
  version: '0'
139
141
  required_rubygems_version: !ruby/object:Gem::Requirement
140
142
  requirements:
141
- - - '>='
143
+ - - ">="
142
144
  - !ruby/object:Gem::Version
143
145
  version: '0'
144
146
  requirements: []
145
147
  rubyforge_project:
146
- rubygems_version: 2.0.14
148
+ rubygems_version: 2.5.1
147
149
  signing_key:
148
150
  specification_version: 4
149
151
  summary: Route helpers for Grape
150
152
  test_files: []
151
- has_rdoc: