versioned-routes-rails 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.byebug_history +13 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +52 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +126 -0
- data/README.md +80 -0
- data/Rakefile +4 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/config.ru +9 -0
- data/lib/versioned_routes.rb +11 -0
- data/lib/versioned_routes/route_version_info.rb +33 -0
- data/lib/versioned_routes/route_versions.rb +27 -0
- data/lib/versioned_routes/version.rb +5 -0
- data/lib/versioned_routes/versioned_routes_info.rb +21 -0
- data/versioned-routes-rails.gemspec +36 -0
- metadata +159 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 63e9e22cc102712233d0ebc24b54dcea25d5e0879b55455d41675956063439b2
|
|
4
|
+
data.tar.gz: cf42d4dd12c33f109891cf9defb68b2afc0f1527fd9159f4a06ec3b56f546621
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: cdaf2619c06eeeddf0219b3c11d294fbbb978f4d6b691fe462179305748f4dfed5e71d4c682210e58cd01db389d1865f619b482888d8807944ffd7f87b5fa902
|
|
7
|
+
data.tar.gz: 786729d9a02996b1060d00bb5a5397d84b91a4f0de41e7038cb72978c1882cf2fedffa6a8296e22c58fa9a996e0c3d5f303bdddc48203bfe808e68de6b199be8
|
data/.byebug_history
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
c
|
|
2
|
+
Rails.application.routes.recognize_path '/api/v1/messages'
|
|
3
|
+
c
|
|
4
|
+
Rails.application.routes.routes.first.path.spec.to_s
|
|
5
|
+
Rails.application.routes.routes.first.path.spec
|
|
6
|
+
Rails.application.routes.routes.first.path
|
|
7
|
+
Rails.application.routes.routes.first.to_s
|
|
8
|
+
Rails.application.routes.routes.first
|
|
9
|
+
c
|
|
10
|
+
Rails.application.routes.routes.first
|
|
11
|
+
Rails.application.routes.routes
|
|
12
|
+
Rails.application.routes.first
|
|
13
|
+
Rails.application.routes
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 2.7.1
|
|
3
|
+
NewCops: enable
|
|
4
|
+
|
|
5
|
+
Metrics/ClassLength:
|
|
6
|
+
Max: 1500
|
|
7
|
+
|
|
8
|
+
Metrics/AbcSize:
|
|
9
|
+
Enabled: false
|
|
10
|
+
|
|
11
|
+
Metrics/CyclomaticComplexity:
|
|
12
|
+
Enabled: false
|
|
13
|
+
|
|
14
|
+
Style/AsciiComments:
|
|
15
|
+
Enabled: false
|
|
16
|
+
|
|
17
|
+
Style/Documentation:
|
|
18
|
+
Enabled: false
|
|
19
|
+
|
|
20
|
+
Style/TrailingCommaInHashLiteral:
|
|
21
|
+
EnforcedStyleForMultiline: comma
|
|
22
|
+
|
|
23
|
+
Style/TrailingCommaInArguments:
|
|
24
|
+
EnforcedStyleForMultiline: comma
|
|
25
|
+
|
|
26
|
+
Style/TrailingCommaInArrayLiteral:
|
|
27
|
+
EnforcedStyleForMultiline: comma
|
|
28
|
+
|
|
29
|
+
Layout/DotPosition:
|
|
30
|
+
EnforcedStyle: leading
|
|
31
|
+
|
|
32
|
+
Layout/EmptyLineAfterGuardClause:
|
|
33
|
+
Enabled: false
|
|
34
|
+
|
|
35
|
+
Layout/EndOfLine:
|
|
36
|
+
EnforcedStyle: lf
|
|
37
|
+
|
|
38
|
+
Layout/MultilineOperationIndentation:
|
|
39
|
+
EnforcedStyle: indented
|
|
40
|
+
|
|
41
|
+
Layout/MultilineAssignmentLayout:
|
|
42
|
+
EnforcedStyle: same_line
|
|
43
|
+
|
|
44
|
+
Layout/CaseIndentation:
|
|
45
|
+
EnforcedStyle: end
|
|
46
|
+
|
|
47
|
+
Layout/EndAlignment:
|
|
48
|
+
EnforcedStyleAlignWith: variable
|
|
49
|
+
|
|
50
|
+
Metrics/BlockLength:
|
|
51
|
+
ExcludedMethods:
|
|
52
|
+
- class_methods
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
versioned-routes-rails (0.1.0)
|
|
5
|
+
actionpack
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actionpack (6.0.3.2)
|
|
11
|
+
actionview (= 6.0.3.2)
|
|
12
|
+
activesupport (= 6.0.3.2)
|
|
13
|
+
rack (~> 2.0, >= 2.0.8)
|
|
14
|
+
rack-test (>= 0.6.3)
|
|
15
|
+
rails-dom-testing (~> 2.0)
|
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
17
|
+
actionview (6.0.3.2)
|
|
18
|
+
activesupport (= 6.0.3.2)
|
|
19
|
+
builder (~> 3.1)
|
|
20
|
+
erubi (~> 1.4)
|
|
21
|
+
rails-dom-testing (~> 2.0)
|
|
22
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
23
|
+
activesupport (6.0.3.2)
|
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
25
|
+
i18n (>= 0.7, < 2)
|
|
26
|
+
minitest (~> 5.1)
|
|
27
|
+
tzinfo (~> 1.1)
|
|
28
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
|
29
|
+
ast (2.4.1)
|
|
30
|
+
builder (3.2.4)
|
|
31
|
+
byebug (11.1.3)
|
|
32
|
+
combustion (1.3.0)
|
|
33
|
+
activesupport (>= 3.0.0)
|
|
34
|
+
railties (>= 3.0.0)
|
|
35
|
+
thor (>= 0.14.6)
|
|
36
|
+
concurrent-ruby (1.1.6)
|
|
37
|
+
crass (1.0.6)
|
|
38
|
+
diff-lcs (1.4.4)
|
|
39
|
+
erubi (1.9.0)
|
|
40
|
+
i18n (1.8.4)
|
|
41
|
+
concurrent-ruby (~> 1.0)
|
|
42
|
+
loofah (2.6.0)
|
|
43
|
+
crass (~> 1.0.2)
|
|
44
|
+
nokogiri (>= 1.5.9)
|
|
45
|
+
method_source (1.0.0)
|
|
46
|
+
mini_portile2 (2.4.0)
|
|
47
|
+
minitest (5.14.1)
|
|
48
|
+
nokogiri (1.10.10)
|
|
49
|
+
mini_portile2 (~> 2.4.0)
|
|
50
|
+
parallel (1.19.2)
|
|
51
|
+
parser (2.7.1.4)
|
|
52
|
+
ast (~> 2.4.1)
|
|
53
|
+
rack (2.2.3)
|
|
54
|
+
rack-test (1.1.0)
|
|
55
|
+
rack (>= 1.0, < 3)
|
|
56
|
+
rails-dom-testing (2.0.3)
|
|
57
|
+
activesupport (>= 4.2.0)
|
|
58
|
+
nokogiri (>= 1.6)
|
|
59
|
+
rails-html-sanitizer (1.3.0)
|
|
60
|
+
loofah (~> 2.3)
|
|
61
|
+
railties (6.0.3.2)
|
|
62
|
+
actionpack (= 6.0.3.2)
|
|
63
|
+
activesupport (= 6.0.3.2)
|
|
64
|
+
method_source
|
|
65
|
+
rake (>= 0.8.7)
|
|
66
|
+
thor (>= 0.20.3, < 2.0)
|
|
67
|
+
rainbow (3.0.0)
|
|
68
|
+
rake (12.3.3)
|
|
69
|
+
regexp_parser (1.7.1)
|
|
70
|
+
rexml (3.2.4)
|
|
71
|
+
rspec (3.9.0)
|
|
72
|
+
rspec-core (~> 3.9.0)
|
|
73
|
+
rspec-expectations (~> 3.9.0)
|
|
74
|
+
rspec-mocks (~> 3.9.0)
|
|
75
|
+
rspec-core (3.9.2)
|
|
76
|
+
rspec-support (~> 3.9.3)
|
|
77
|
+
rspec-expectations (3.9.2)
|
|
78
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
79
|
+
rspec-support (~> 3.9.0)
|
|
80
|
+
rspec-mocks (3.9.1)
|
|
81
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
82
|
+
rspec-support (~> 3.9.0)
|
|
83
|
+
rspec-rails (4.0.1)
|
|
84
|
+
actionpack (>= 4.2)
|
|
85
|
+
activesupport (>= 4.2)
|
|
86
|
+
railties (>= 4.2)
|
|
87
|
+
rspec-core (~> 3.9)
|
|
88
|
+
rspec-expectations (~> 3.9)
|
|
89
|
+
rspec-mocks (~> 3.9)
|
|
90
|
+
rspec-support (~> 3.9)
|
|
91
|
+
rspec-support (3.9.3)
|
|
92
|
+
rubocop (0.88.0)
|
|
93
|
+
parallel (~> 1.10)
|
|
94
|
+
parser (>= 2.7.1.1)
|
|
95
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
96
|
+
regexp_parser (>= 1.7)
|
|
97
|
+
rexml
|
|
98
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
|
99
|
+
ruby-progressbar (~> 1.7)
|
|
100
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
|
101
|
+
rubocop-ast (0.2.0)
|
|
102
|
+
parser (>= 2.7.0.1)
|
|
103
|
+
ruby-progressbar (1.10.1)
|
|
104
|
+
sqlite3 (1.4.2)
|
|
105
|
+
thor (1.0.1)
|
|
106
|
+
thread_safe (0.3.6)
|
|
107
|
+
tzinfo (1.2.7)
|
|
108
|
+
thread_safe (~> 0.1)
|
|
109
|
+
unicode-display_width (1.7.0)
|
|
110
|
+
zeitwerk (2.4.0)
|
|
111
|
+
|
|
112
|
+
PLATFORMS
|
|
113
|
+
ruby
|
|
114
|
+
|
|
115
|
+
DEPENDENCIES
|
|
116
|
+
byebug
|
|
117
|
+
combustion (~> 1.3)
|
|
118
|
+
rake (~> 12.0)
|
|
119
|
+
rspec
|
|
120
|
+
rspec-rails
|
|
121
|
+
rubocop
|
|
122
|
+
sqlite3
|
|
123
|
+
versioned-routes-rails!
|
|
124
|
+
|
|
125
|
+
BUNDLED WITH
|
|
126
|
+
2.1.4
|
data/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# VersionedRoutes
|
|
2
|
+
|
|
3
|
+
`versioned-routes-rails` adds a single method to the Rails `routes.rb` DSL,`version`, which allows you to specify API versions.
|
|
4
|
+
|
|
5
|
+
When a user requests a specific version of an action, the closest version of that route is matched, starting with the requested version and going down to 1. This allows you to only specify a subset of routes to add or replace in subsequent API versions, allowing all the unmodified routes to fall through to the previous version.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'versioned-routes-rails'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle install
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install versioned-routes-rails
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Controllers must be namespaced as `VN::ThingController`, where `N` is the API version.
|
|
26
|
+
|
|
27
|
+
For example, let's define our V1 API as a set of `Message` resources, with some member actions. These will map to `V1::MessagesController`.
|
|
28
|
+
|
|
29
|
+
Our V2 API will only change the logic of `V1::MessagesController#show`, so we'll only specify that action in the `version 2` block. Requests to `/api/v2/messages/:id` will be routed to `V2::MessagesController#show`, while all other `/api/v2/messages` requests will still be routed to `V1::MessagesController`.
|
|
30
|
+
|
|
31
|
+
```ruby
|
|
32
|
+
Rails.application.routes.draw do
|
|
33
|
+
scope :api do
|
|
34
|
+
version 1 do
|
|
35
|
+
resources :messages do
|
|
36
|
+
member do
|
|
37
|
+
post :read
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
version 2 do
|
|
43
|
+
resources :messages, only: [:show]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
$ rake routes
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
Prefix Verb URI Pattern Controller#Action
|
|
55
|
+
read_v1_message POST /api/v1/messages/:id/read(.:format) v1/messages#read {:format=>:json, :api_version=>1}
|
|
56
|
+
v1_messages GET /api/v1/messages(.:format) v1/messages#index {:format=>:json, :api_version=>1}
|
|
57
|
+
POST /api/v1/messages(.:format) v1/messages#create {:format=>:json, :api_version=>1}
|
|
58
|
+
v1_message GET /api/v1/messages/:id(.:format) v1/messages#show {:format=>:json, :api_version=>1}
|
|
59
|
+
PATCH /api/v1/messages/:id(.:format) v1/messages#update {:format=>:json, :api_version=>1}
|
|
60
|
+
PUT /api/v1/messages/:id(.:format) v1/messages#update {:format=>:json, :api_version=>1}
|
|
61
|
+
DELETE /api/v1/messages/:id(.:format) v1/messages#destroy {:format=>:json, :api_version=>1}
|
|
62
|
+
v2_message GET /api/v2/messages/:id(.:format) v2/messages#show {:format=>:json, :api_version=>2}
|
|
63
|
+
read_v2_message POST /api/v2/messages/:id/read(.:format) v1/messages#read {:format=>:json, :api_version=>1}
|
|
64
|
+
v2_messages GET /api/v2/messages(.:format) v1/messages#index {:format=>:json, :api_version=>1}
|
|
65
|
+
POST /api/v2/messages(.:format) v1/messages#create {:format=>:json, :api_version=>1}
|
|
66
|
+
PATCH /api/v2/messages/:id(.:format) v1/messages#update {:format=>:json, :api_version=>1}
|
|
67
|
+
PUT /api/v2/messages/:id(.:format) v1/messages#update {:format=>:json, :api_version=>1}
|
|
68
|
+
DELETE /api/v2/messages/:id(.:format) v1/messages#destroy {:format=>:json, :api_version=>1}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
74
|
+
|
|
75
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
76
|
+
|
|
77
|
+
## Contributing
|
|
78
|
+
|
|
79
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/yasyf/versioned-routes-rails.
|
|
80
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'bundler/setup'
|
|
5
|
+
require 'versioned_routes'
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require 'irb'
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/config.ru
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'versioned_routes/version'
|
|
4
|
+
|
|
5
|
+
require 'versioned_routes/route_version_info'
|
|
6
|
+
require 'versioned_routes/route_versions'
|
|
7
|
+
|
|
8
|
+
require 'action_dispatch'
|
|
9
|
+
|
|
10
|
+
ActionDispatch::Routing::RouteSet.prepend VersionedRoutes::RouteVersionInfo
|
|
11
|
+
ActionDispatch::Routing::Mapper.prepend VersionedRoutes::RouteVersions
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'versioned_routes/versioned_routes_info'
|
|
4
|
+
|
|
5
|
+
module VersionedRoutes
|
|
6
|
+
module RouteVersionInfo
|
|
7
|
+
attr_accessor :current_version_number
|
|
8
|
+
|
|
9
|
+
def clear!
|
|
10
|
+
reset_version_info!
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def add_route(mapping, name)
|
|
15
|
+
return unless current_version.append mapping
|
|
16
|
+
super
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def current_version
|
|
20
|
+
version_info[current_version_number || 1]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def version_info
|
|
24
|
+
@version_info || reset_version_info!
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
def reset_version_info!
|
|
30
|
+
@version_info = Hash.new { |h, k| h[k] = VersionedRoutesInfo.new(k) }
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module VersionedRoutes
|
|
4
|
+
module RouteVersions
|
|
5
|
+
def version(number, &block)
|
|
6
|
+
@set.current_version_number = number
|
|
7
|
+
@set.current_version.block = block
|
|
8
|
+
|
|
9
|
+
versions = @set
|
|
10
|
+
.version_info
|
|
11
|
+
.values
|
|
12
|
+
.select { |info| info.number <= number }
|
|
13
|
+
.sort_by(&:number)
|
|
14
|
+
.reverse
|
|
15
|
+
|
|
16
|
+
scope path: "v#{number}", as: "v#{number}" do
|
|
17
|
+
versions.each do |info|
|
|
18
|
+
scope module: "v#{info.number}", defaults: { api_version: info.number } do
|
|
19
|
+
info.block.call if info.number <= number
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
@set.current_version_number = nil
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module VersionedRoutes
|
|
4
|
+
class VersionedRoutesInfo
|
|
5
|
+
attr_accessor :number, :block, :paths
|
|
6
|
+
|
|
7
|
+
def initialize(number)
|
|
8
|
+
@number = number
|
|
9
|
+
@block = nil
|
|
10
|
+
@paths = Hash.new { |h, k| h[k] = Set.new }
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def append(mapping)
|
|
14
|
+
verb = mapping.make_route(nil, nil).verb
|
|
15
|
+
regex = mapping.path.to_regexp
|
|
16
|
+
return false if paths[verb].include? regex
|
|
17
|
+
paths[verb] << regex
|
|
18
|
+
true
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'lib/versioned_routes/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'versioned-routes-rails'
|
|
7
|
+
spec.version = VersionedRoutes::VERSION
|
|
8
|
+
spec.authors = ['Yasyf Mohamedali']
|
|
9
|
+
spec.email = ['yasyfm@gmail.com']
|
|
10
|
+
|
|
11
|
+
spec.summary = 'A simple DSL for versioned routes in Rails.'
|
|
12
|
+
spec.description = '`versioned-routes-rails` adds a single method to the Rails `routes.rb` DSL,`version`, which allows you to specify API versions.'
|
|
13
|
+
spec.homepage = 'https://github.com/yasyf/versioned-routes-rails'
|
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
15
|
+
|
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/yasyf/versioned-routes-rails'
|
|
18
|
+
|
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
23
|
+
end
|
|
24
|
+
spec.bindir = 'exe'
|
|
25
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
26
|
+
spec.require_paths = ['lib']
|
|
27
|
+
|
|
28
|
+
spec.add_development_dependency 'byebug'
|
|
29
|
+
spec.add_development_dependency 'combustion', '~> 1.3'
|
|
30
|
+
spec.add_development_dependency 'rspec'
|
|
31
|
+
spec.add_development_dependency 'rspec-rails'
|
|
32
|
+
spec.add_development_dependency 'rubocop'
|
|
33
|
+
spec.add_development_dependency 'sqlite3'
|
|
34
|
+
|
|
35
|
+
spec.add_dependency 'actionpack'
|
|
36
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: versioned-routes-rails
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Yasyf Mohamedali
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-07-21 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: byebug
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: combustion
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.3'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.3'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rspec
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec-rails
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rubocop
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: sqlite3
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: actionpack
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :runtime
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
description: "`versioned-routes-rails` adds a single method to the Rails `routes.rb`
|
|
112
|
+
DSL,`version`, which allows you to specify API versions."
|
|
113
|
+
email:
|
|
114
|
+
- yasyfm@gmail.com
|
|
115
|
+
executables: []
|
|
116
|
+
extensions: []
|
|
117
|
+
extra_rdoc_files: []
|
|
118
|
+
files:
|
|
119
|
+
- ".byebug_history"
|
|
120
|
+
- ".gitignore"
|
|
121
|
+
- ".rubocop.yml"
|
|
122
|
+
- Gemfile
|
|
123
|
+
- Gemfile.lock
|
|
124
|
+
- README.md
|
|
125
|
+
- Rakefile
|
|
126
|
+
- bin/console
|
|
127
|
+
- bin/setup
|
|
128
|
+
- config.ru
|
|
129
|
+
- lib/versioned_routes.rb
|
|
130
|
+
- lib/versioned_routes/route_version_info.rb
|
|
131
|
+
- lib/versioned_routes/route_versions.rb
|
|
132
|
+
- lib/versioned_routes/version.rb
|
|
133
|
+
- lib/versioned_routes/versioned_routes_info.rb
|
|
134
|
+
- versioned-routes-rails.gemspec
|
|
135
|
+
homepage: https://github.com/yasyf/versioned-routes-rails
|
|
136
|
+
licenses: []
|
|
137
|
+
metadata:
|
|
138
|
+
homepage_uri: https://github.com/yasyf/versioned-routes-rails
|
|
139
|
+
source_code_uri: https://github.com/yasyf/versioned-routes-rails
|
|
140
|
+
post_install_message:
|
|
141
|
+
rdoc_options: []
|
|
142
|
+
require_paths:
|
|
143
|
+
- lib
|
|
144
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
|
+
requirements:
|
|
146
|
+
- - ">="
|
|
147
|
+
- !ruby/object:Gem::Version
|
|
148
|
+
version: 2.3.0
|
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
|
+
requirements:
|
|
151
|
+
- - ">="
|
|
152
|
+
- !ruby/object:Gem::Version
|
|
153
|
+
version: '0'
|
|
154
|
+
requirements: []
|
|
155
|
+
rubygems_version: 3.1.2
|
|
156
|
+
signing_key:
|
|
157
|
+
specification_version: 4
|
|
158
|
+
summary: A simple DSL for versioned routes in Rails.
|
|
159
|
+
test_files: []
|