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 +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +3 -3
- data/README.md +2 -0
- data/Rakefile +17 -0
- data/lib/grape-route-helpers/all_routes.rb +2 -3
- data/lib/grape-route-helpers/version.rb +1 -1
- data/spec/grape_route_helpers/{all_routes.rb → all_routes_spec.rb} +2 -1
- data/spec/support/api.rb +1 -0
- metadata +22 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a436c5306eca86f756921e38c26141ad09b9ab2d
|
4
|
+
data.tar.gz: 69dd431b336b391cb402bc14775027e69cc6e2c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c60ff91c855a14e6102130b36872503dbe03846eedff32e4814116f7a766afca8ad0bf0e79bd66ea964d3f2442c1069e4a41133b7cdeebc525fcd5793db47895
|
7
|
+
data.tar.gz: 8f0066969692d5b96fde60b43eaf39665473bfc6af49ac43d3be0d9506cfe8f00eea3f0115f1a3efd41dfe61202b6213034db98da7c2451edcb49610ae7986c0
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
grape-route-helpers (1.2.
|
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.
|
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.
|
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.
|
15
|
-
|
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
|
data/spec/support/api.rb
CHANGED
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.
|
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:
|
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/
|
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.
|
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:
|