versioncake 3.4.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3b123482ee49261b07fe0401505628dbeec8ac0d
4
- data.tar.gz: 7328d725356e07f50637f42e142d8bfae143804f
2
+ SHA256:
3
+ metadata.gz: 696e791d2898b34ffbe47306b0e7c2aad37dc5a3e9e6b0591805b5b6dd195d13
4
+ data.tar.gz: e570aacf53b0bd9fc7342d3a308b84567024771e2b894cd27dc5e740479e8bba
5
5
  SHA512:
6
- metadata.gz: d52bdf13972f46c24260222d3030ada9d6e9debbb9caa04b4881711ae17b232d2a8c4b999339b9572d9e790e49a197c1955e73757eac8f6e7d0909d9d1979146
7
- data.tar.gz: 3b67d99ef5758d3d116abb6f3dc67bdefd3d9aeed365378ebc65529b430e74913f093be3d6045764a2eceb7f71195e9cdf7bf2dd5b27649bb86cd6576f4c4f42
6
+ metadata.gz: 78c9959d5e58a4b19a383722e3a002b17025778570f3ff7deff0136b568b5848cb7f5e707c450092f97afe7ea067da551e3e6aa1fbabebd2c3b522a9e4ebdc3f
7
+ data.tar.gz: e622bf39372ccbf1c00c7fad62f818c287fb68b218461cccef484924b2943d786443971af0dfdf11acdcb5e1a1ddb477f304bab2b7696107dfd5631b87485301
@@ -1,43 +1,20 @@
1
1
  language: ruby
2
2
 
3
- # https://github.com/travis-ci/travis-ci/issues/5239
4
- before_install:
5
- - gem install bundler
3
+ before_install: gem install bundler && bundle update --bundler
6
4
 
7
5
  rvm:
8
- - 1.9.2-p330
9
- - 1.9.3
10
- - 2.0.0
11
- - 2.1.0
12
- - 2.2.0
13
- - 2.2.2
14
- - ruby-head
6
+ - 2.3.3
7
+ - 2.4.7
8
+ - 2.5.6
15
9
 
16
10
  gemfile:
17
- - gemfiles/rails3.2.gemfile
18
- - gemfiles/rails4.0.gemfile
19
- - gemfiles/rails4.1.gemfile
20
- - gemfiles/rails4.2.gemfile
21
11
  - gemfiles/rails5.0.gemfile
12
+ - gemfiles/rails5.2.gemfile
13
+ - gemfiles/rails6.0.gemfile
22
14
 
23
15
  matrix:
24
16
  exclude:
25
- - rvm: 1.9.2-p330
26
- gemfile: gemfiles/rails4.0.gemfile
27
- - rvm: 1.9.2-p330
28
- gemfile: gemfiles/rails4.1.gemfile
29
- - rvm: 1.9.2-p330
30
- gemfile: gemfiles/rails4.2.gemfile
31
- - rvm: 1.9.2-p330
32
- gemfile: gemfiles/rails5.0.gemfile
33
- - rvm: 1.9.3
34
- gemfile: gemfiles/rails5.0.gemfile
35
- - rvm: 2.0.0
36
- gemfile: gemfiles/rails5.0.gemfile
37
- - rvm: 2.1.0
38
- gemfile: gemfiles/rails5.0.gemfile
39
- - rvm: 2.2.0
40
- gemfile: gemfiles/rails5.0.gemfile
41
-
42
- allow_failures:
43
- - rvm: ruby-head
17
+ - rvm: 2.3.3
18
+ gemfile: gemfiles/rails6.0.gemfile
19
+ - rvm: 2.4.7
20
+ gemfile: gemfiles/rails6.0.gemfile
data/Appraisals CHANGED
@@ -1,35 +1,17 @@
1
- appraise "rails3.2" do
2
- gem('actionpack', '~> 3.2.0')
3
- gem('activesupport', '~> 3.2.0')
4
- gem('railties', '~> 3.2.0')
5
- # Rails 3.2 has test-unit as a dependency, but Ruby 2.2 removes
6
- # it, so we need to now manually require it as a dependency
7
- gem('test-unit', '~>3.0')
8
- end
9
-
10
- appraise "rails4.0" do
11
- gem('actionpack', '~> 4.0.0')
12
- gem('activesupport', '~> 4.0.0')
13
- gem('railties', '~> 4.0.0')
14
- # Rails 4.0 has test-unit as a dependency, but Ruby 2.2 removes
15
- # it, so we need to now manually require it as a dependency
16
- gem('test-unit', '~>3.0')
17
- end
18
-
19
- appraise "rails4.1" do
20
- gem('actionpack', '~> 4.1.0')
21
- gem('activesupport', '~> 4.1.0')
22
- gem('railties', '~> 4.1.0')
23
- end
24
-
25
- appraise "rails4.2" do
26
- gem('actionpack', '~> 4.2.0')
27
- gem('activesupport', '~> 4.2.0')
28
- gem('railties', '~> 4.2.0')
29
- end
30
-
31
1
  appraise "rails5.0" do
32
2
  gem('actionpack', '~> 5.0.0')
33
3
  gem('activesupport', '~> 5.0.0')
34
4
  gem('railties', '~> 5.0.0')
35
5
  end
6
+
7
+ appraise "rails5.2" do
8
+ gem('actionpack', '~> 5.2.0')
9
+ gem('activesupport', '~> 5.2.0')
10
+ gem('railties', '~> 5.2.0')
11
+ end
12
+
13
+ appraise "rails6.0" do
14
+ gem('actionpack', '~> 5.2.0')
15
+ gem('activesupport', '~> 5.2.0')
16
+ gem('railties', '~> 5.2.0')
17
+ end
@@ -1,6 +1,6 @@
1
1
  ## Unreleased Changes
2
2
 
3
- [Full Changelog](https://github.com/bwillis/versioncake/compare/v3.4...master)
3
+ [Full Changelog](https://github.com/bwillis/versioncake/compare/v4.0...master)
4
4
 
5
5
  Bug Fixes:
6
6
 
@@ -14,6 +14,20 @@ Deprecations:
14
14
 
15
15
  * None
16
16
 
17
+ ## 4.0.0 (March 10, 2020)
18
+
19
+ Bug Fixes:
20
+
21
+ * Path versions could parse incorrect version in some circumstances (#83) thanks [Luke Abel](https://github.com/llhhaa)
22
+
23
+ Enhancements:
24
+
25
+ * Rails 6 support (#81) thanks [Thomas "Teflon Ted" Davis](https://github.com/trak3r)
26
+
27
+ Deprecations:
28
+
29
+ * Remove Rails v3/v4 and Ruby <v2.3 support
30
+
17
31
  ## 3.4.0 (March 4, 2018)
18
32
 
19
33
  Bug Fixes:
@@ -1,74 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- versioncake (3.4.0)
5
- actionpack (>= 3.2)
6
- activesupport (>= 3.2)
7
- railties (>= 3.2)
8
- tzinfo
4
+ versioncake (4.0.0)
5
+ actionpack (~> 5.0)
6
+ activesupport (~> 5.0)
7
+ railties (~> 5.0)
8
+ tzinfo (~> 1.2)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actionpack (5.1.4)
14
- actionview (= 5.1.4)
15
- activesupport (= 5.1.4)
16
- rack (~> 2.0)
13
+ actionpack (5.2.4.1)
14
+ actionview (= 5.2.4.1)
15
+ activesupport (= 5.2.4.1)
16
+ rack (~> 2.0, >= 2.0.8)
17
17
  rack-test (>= 0.6.3)
18
18
  rails-dom-testing (~> 2.0)
19
19
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
20
- actionview (5.1.4)
21
- activesupport (= 5.1.4)
20
+ actionview (5.2.4.1)
21
+ activesupport (= 5.2.4.1)
22
22
  builder (~> 3.1)
23
23
  erubi (~> 1.4)
24
24
  rails-dom-testing (~> 2.0)
25
25
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
26
- activesupport (5.1.4)
26
+ activesupport (5.2.4.1)
27
27
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
- i18n (~> 0.7)
28
+ i18n (>= 0.7, < 2)
29
29
  minitest (~> 5.1)
30
30
  tzinfo (~> 1.1)
31
31
  appraisal (2.2.0)
32
32
  bundler
33
33
  rake
34
34
  thor (>= 0.14.0)
35
- builder (3.2.3)
36
- concurrent-ruby (1.0.5)
35
+ builder (3.2.4)
36
+ concurrent-ruby (1.1.6)
37
37
  coveralls (0.8.21)
38
38
  json (>= 1.8, < 3)
39
39
  simplecov (~> 0.14.1)
40
40
  term-ansicolor (~> 1.3)
41
41
  thor (~> 0.19.4)
42
42
  tins (~> 1.6)
43
- crass (1.0.2)
43
+ crass (1.0.6)
44
44
  diff-lcs (1.3)
45
45
  docile (1.1.5)
46
- erubi (1.7.0)
47
- i18n (0.8.6)
46
+ erubi (1.9.0)
47
+ i18n (1.8.2)
48
+ concurrent-ruby (~> 1.0)
48
49
  json (2.1.0)
49
- loofah (2.1.1)
50
+ loofah (2.4.0)
50
51
  crass (~> 1.0.2)
51
52
  nokogiri (>= 1.5.9)
52
- method_source (0.9.0)
53
- mini_portile2 (2.3.0)
54
- minitest (5.10.3)
55
- nokogiri (1.8.1)
56
- mini_portile2 (~> 2.3.0)
57
- rack (2.0.3)
58
- rack-test (0.7.0)
53
+ method_source (0.9.2)
54
+ mini_portile2 (2.4.0)
55
+ minitest (5.14.0)
56
+ nokogiri (1.10.9)
57
+ mini_portile2 (~> 2.4.0)
58
+ rack (2.2.2)
59
+ rack-test (1.1.0)
59
60
  rack (>= 1.0, < 3)
60
61
  rails-dom-testing (2.0.3)
61
62
  activesupport (>= 4.2.0)
62
63
  nokogiri (>= 1.6)
63
- rails-html-sanitizer (1.0.3)
64
- loofah (~> 2.0)
65
- railties (5.1.4)
66
- actionpack (= 5.1.4)
67
- activesupport (= 5.1.4)
64
+ rails-html-sanitizer (1.3.0)
65
+ loofah (~> 2.3)
66
+ railties (5.2.4.1)
67
+ actionpack (= 5.2.4.1)
68
+ activesupport (= 5.2.4.1)
68
69
  method_source
69
70
  rake (>= 0.8.7)
70
- thor (>= 0.18.1, < 2.0)
71
- rake (12.1.0)
71
+ thor (>= 0.19.0, < 2.0)
72
+ rake (13.0.1)
72
73
  rspec (3.6.0)
73
74
  rspec-core (~> 3.6.0)
74
75
  rspec-expectations (~> 3.6.0)
@@ -100,19 +101,19 @@ GEM
100
101
  thor (0.19.4)
101
102
  thread_safe (0.3.6)
102
103
  tins (1.15.0)
103
- tzinfo (1.2.3)
104
+ tzinfo (1.2.6)
104
105
  thread_safe (~> 0.1)
105
106
 
106
107
  PLATFORMS
107
108
  ruby
108
109
 
109
110
  DEPENDENCIES
110
- appraisal
111
- coveralls
112
- rake
113
- rspec
114
- rspec-rails
111
+ appraisal (~> 2.2)
112
+ coveralls (~> 0.8)
113
+ rake (~> 13.0)
114
+ rspec (~> 3.6)
115
+ rspec-rails (~> 3.6)
115
116
  versioncake!
116
117
 
117
118
  BUNDLED WITH
118
- 1.14.6
119
+ 1.17.2
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Build Status](https://secure.travis-ci.org/bwillis/versioncake.png?branch=master)](http://travis-ci.org/bwillis/versioncake)
4
4
  [![Code Climate](https://codeclimate.com/github/bwillis/versioncake.png)](https://codeclimate.com/github/bwillis/versioncake)
5
5
  [![Coverage Status](https://coveralls.io/repos/bwillis/versioncake/badge.png?branch=master)](https://coveralls.io/r/bwillis/versioncake)
6
- [![Dependency Status](https://gemnasium.com/bwillis/versioncake.png)](https://gemnasium.com/bwillis/versioncake)
7
6
  [![Gem Version](https://badge.fury.io/rb/versioncake.png)](http://badge.fury.io/rb/versioncake)
8
7
 
9
8
  Co-authored by Ben Willis ([bwillis](https://github.com/bwillis/)) and Jim Jones ([aantix](https://github.com/aantix)).
@@ -314,7 +313,7 @@ If you start supporting a newer version, v3 for instance, you do not have to cop
314
313
 
315
314
  ### Controller
316
315
 
317
- You don't need to do anything special in your controller, but if you find that you want to perform some tasks for a specific version you can use `requested_version` and `latest_version`. This may be updated in the [near future](https://github.com/bwillis/versioncake/issues/1).
316
+ You don't need to do anything special in your controller, but if you find that you want to perform some tasks for a specific version you can use `request_version` and `version_context.resource.latest_version`. This may be updated in the [near future](https://github.com/bwillis/versioncake/issues/1).
318
317
  ```ruby
319
318
  def index
320
319
  # shared code for all versions
@@ -356,7 +355,7 @@ class ApplicationController < ActionController::Base
356
355
  def render_unsupported_version
357
356
  headers['API-Version-Supported'] = 'false'
358
357
  respond_to do |format|
359
- format.json { render json: {message: "You requested an unsupported version (#{requested_version})"}, status: :unprocessable_entity }
358
+ format.json { render json: {message: "You requested an unsupported version (#{request_version})"}, status: :unprocessable_entity }
360
359
  end
361
360
  end
362
361
 
@@ -398,12 +397,12 @@ end
398
397
 
399
398
  ### Testing all supported versions
400
399
 
401
- You can iterate over all of the supported version numbers by accessing the ```AppName::Application.config.versioncake.supported_version_numbers```.
400
+ You can iterate over all of the supported version numbers by accessing the ```VersionCake.config.versioned_resources.first.available_versions```.
402
401
 
403
402
  ```ruby
404
- VersionCake.config.resources.first.supported_versions.each do |supported_version|
403
+ VersionCake.config.versioned_resources.first.available_versions.each do |supported_version|
405
404
  before do
406
- @controller.stubs(:requested_version).returns(supported_version)
405
+ @controller.stubs(:request_version).returns(supported_version)
407
406
  end
408
407
 
409
408
  test "all versions render the correct template" do
@@ -436,6 +435,7 @@ Thanks to all those who have helped make Version Cake really sweet:
436
435
  * [John Hawthorn](https://github.com/jhawthorn)
437
436
  * [Ersin Akinci](https://github.com/earksiinni)
438
437
  * [Bartosz Bonisławski](https://github.com/bbonislawski)
438
+ * [Harry Lascelles](https://github.com/hlascelles)
439
439
 
440
440
  # Related Material
441
441
 
@@ -2,9 +2,9 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  versioncake (3.4.0)
5
- actionpack (>= 3.2)
6
- activesupport (>= 3.2)
7
- railties (>= 3.2)
5
+ actionpack (>= 5.0)
6
+ activesupport (>= 5.0)
7
+ railties (>= 5.0)
8
8
  tzinfo
9
9
 
10
10
  GEM
@@ -118,4 +118,4 @@ DEPENDENCIES
118
118
  versioncake!
119
119
 
120
120
  BUNDLED WITH
121
- 1.14.6
121
+ 1.17.2
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "actionpack", "~> 4.1.0"
6
- gem "activesupport", "~> 4.1.0"
7
- gem "railties", "~> 4.1.0"
5
+ gem "actionpack", "~> 5.2.0"
6
+ gem "activesupport", "~> 5.2.0"
7
+ gem "railties", "~> 5.2.0"
8
8
 
9
9
  gemspec path: "../"
@@ -0,0 +1,122 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ versioncake (3.4.0)
5
+ actionpack (>= 5.0)
6
+ activesupport (>= 5.0)
7
+ railties (>= 5.0)
8
+ tzinfo
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actionpack (5.2.3)
14
+ actionview (= 5.2.3)
15
+ activesupport (= 5.2.3)
16
+ rack (~> 2.0)
17
+ rack-test (>= 0.6.3)
18
+ rails-dom-testing (~> 2.0)
19
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
20
+ actionview (5.2.3)
21
+ activesupport (= 5.2.3)
22
+ builder (~> 3.1)
23
+ erubi (~> 1.4)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
26
+ activesupport (5.2.3)
27
+ concurrent-ruby (~> 1.0, >= 1.0.2)
28
+ i18n (>= 0.7, < 2)
29
+ minitest (~> 5.1)
30
+ tzinfo (~> 1.1)
31
+ appraisal (2.2.0)
32
+ bundler
33
+ rake
34
+ thor (>= 0.14.0)
35
+ builder (3.2.4)
36
+ concurrent-ruby (1.1.6)
37
+ coveralls (0.8.21)
38
+ json (>= 1.8, < 3)
39
+ simplecov (~> 0.14.1)
40
+ term-ansicolor (~> 1.3)
41
+ thor (~> 0.19.4)
42
+ tins (~> 1.6)
43
+ crass (1.0.6)
44
+ diff-lcs (1.3)
45
+ docile (1.1.5)
46
+ erubi (1.9.0)
47
+ i18n (1.8.2)
48
+ concurrent-ruby (~> 1.0)
49
+ json (2.2.0)
50
+ loofah (2.4.0)
51
+ crass (~> 1.0.2)
52
+ nokogiri (>= 1.5.9)
53
+ method_source (0.9.2)
54
+ mini_portile2 (2.4.0)
55
+ minitest (5.14.0)
56
+ nokogiri (1.10.9)
57
+ mini_portile2 (~> 2.4.0)
58
+ rack (2.2.2)
59
+ rack-test (1.1.0)
60
+ rack (>= 1.0, < 3)
61
+ rails-dom-testing (2.0.3)
62
+ activesupport (>= 4.2.0)
63
+ nokogiri (>= 1.6)
64
+ rails-html-sanitizer (1.3.0)
65
+ loofah (~> 2.3)
66
+ railties (5.2.3)
67
+ actionpack (= 5.2.3)
68
+ activesupport (= 5.2.3)
69
+ method_source
70
+ rake (>= 0.8.7)
71
+ thor (>= 0.19.0, < 2.0)
72
+ rake (13.0.1)
73
+ rspec (3.7.0)
74
+ rspec-core (~> 3.7.0)
75
+ rspec-expectations (~> 3.7.0)
76
+ rspec-mocks (~> 3.7.0)
77
+ rspec-core (3.7.1)
78
+ rspec-support (~> 3.7.0)
79
+ rspec-expectations (3.7.0)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.7.0)
82
+ rspec-mocks (3.7.0)
83
+ diff-lcs (>= 1.2.0, < 2.0)
84
+ rspec-support (~> 3.7.0)
85
+ rspec-rails (3.7.2)
86
+ actionpack (>= 3.0)
87
+ activesupport (>= 3.0)
88
+ railties (>= 3.0)
89
+ rspec-core (~> 3.7.0)
90
+ rspec-expectations (~> 3.7.0)
91
+ rspec-mocks (~> 3.7.0)
92
+ rspec-support (~> 3.7.0)
93
+ rspec-support (3.7.1)
94
+ simplecov (0.14.1)
95
+ docile (~> 1.1.0)
96
+ json (>= 1.8, < 3)
97
+ simplecov-html (~> 0.10.0)
98
+ simplecov-html (0.10.2)
99
+ term-ansicolor (1.6.0)
100
+ tins (~> 1.0)
101
+ thor (0.19.4)
102
+ thread_safe (0.3.6)
103
+ tins (1.15.0)
104
+ tzinfo (1.2.6)
105
+ thread_safe (~> 0.1)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ actionpack (~> 5.2.0)
112
+ activesupport (~> 5.2.0)
113
+ appraisal
114
+ coveralls
115
+ railties (~> 5.2.0)
116
+ rake
117
+ rspec
118
+ rspec-rails
119
+ versioncake!
120
+
121
+ BUNDLED WITH
122
+ 1.17.2