grape-cache_control 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.document +3 -0
- data/.travis.yml +7 -2
- data/.yardopts +6 -0
- data/Gemfile +7 -0
- data/README.md +11 -13
- data/Rakefile +12 -6
- data/grape-cache_control.gemspec +3 -8
- data/lib/grape/cache_control/version.rb +1 -1
- data/spec/support/timecop.rb +1 -8
- data/spec/unit/grape/cache_control_spec.rb +0 -4
- metadata +28 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c5374719822fa86ef17ba1955e41a1dad98f10
|
4
|
+
data.tar.gz: 2c1b05aff04cff14acc2770b41457d175ae5c89e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5d1240da98c05aff50f2370d7c192376e1dcf3a1bc54e75f53c93efb5754beded52e6437506b3949a9781561508b01d8370ffe6bf1d224e4fca82fd2f129d5a
|
7
|
+
data.tar.gz: adb644c6c090cd6726d0c10f5989f05980e823c53782e4df305b08e31f8f8a6157fbe8671bc168130f6f1ef463753564e17eaabffe1d8b1bed175ce50adda715
|
data/.document
ADDED
data/.travis.yml
CHANGED
@@ -1,17 +1,22 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
|
+
bundler_args: --without development
|
3
4
|
rvm:
|
4
5
|
- ruby-head
|
6
|
+
- ruby
|
5
7
|
- jruby-head
|
8
|
+
- jruby
|
6
9
|
- 2.1.0
|
7
10
|
- 2.0.0
|
8
11
|
- 1.9.3
|
9
|
-
-
|
12
|
+
- rbx-2
|
10
13
|
matrix:
|
11
14
|
fast_finish: true
|
12
15
|
allow_failures:
|
13
16
|
- rvm: ruby-head
|
17
|
+
- rvm: ruby
|
14
18
|
- rvm: jruby-head
|
15
|
-
- rvm: jruby
|
19
|
+
- rvm: jruby
|
20
|
+
- rvm: rbx-2
|
16
21
|
notifications:
|
17
22
|
email: false
|
data/.yardopts
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Grape::CacheControl
|
2
2
|
|
3
|
-
`Cache-Control` and `Expires` helpers for [Grape]
|
3
|
+
`Cache-Control` and `Expires` helpers for [Grape](http://intridea.github.io/grape)
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -114,28 +114,28 @@ class API < Grape::API
|
|
114
114
|
end
|
115
115
|
```
|
116
116
|
|
117
|
-
##
|
117
|
+
## Badges
|
118
118
|
|
119
|
-
[![Gem Version](
|
120
|
-
[![Build Status](
|
121
|
-
[![Code Quality](
|
122
|
-
[![Gittip](http://img.shields.io/gittip/karlfreeman.
|
119
|
+
[![Gem Version](http://img.shields.io/gem/v/grape-cache_control.svg)][gem]
|
120
|
+
[![Build Status](http://img.shields.io/travis/karlfreeman/grape-cache_control.svg)][travis]
|
121
|
+
[![Code Quality](http://img.shields.io/codeclimate/github/karlfreeman/grape-cache_control.svg)][codeclimate]
|
122
|
+
[![Gittip](http://img.shields.io/gittip/karlfreeman.svg)][gittip]
|
123
123
|
|
124
124
|
## Supported Ruby Versions
|
125
125
|
|
126
126
|
This library aims to support and is [tested against][travis] the following Ruby
|
127
127
|
implementations:
|
128
128
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
129
|
+
- Ruby 2.1.0
|
130
|
+
- Ruby 2.0.0
|
131
|
+
- Ruby 1.9.3
|
132
|
+
- [JRuby][jruby]
|
133
133
|
|
134
134
|
# Credits
|
135
135
|
|
136
136
|
Inspiration:
|
137
137
|
|
138
|
-
- [Sinatra's Cache-Control
|
138
|
+
- [Sinatra's Cache-Control/Expires](https://github.com/sinatra/sinatra/blob/faf2efc670bf4c6076c26d5234c577950c19b699/lib/sinatra/base.rb#L439-L492)
|
139
139
|
|
140
140
|
Cribbed:
|
141
141
|
|
@@ -146,5 +146,3 @@ Cribbed:
|
|
146
146
|
[codeclimate]: https://codeclimate.com/github/karlfreeman/grape-cache_control
|
147
147
|
[gittip]: https://www.gittip.com/karlfreeman
|
148
148
|
[jruby]: http://www.jruby.org
|
149
|
-
|
150
|
-
[grape]: http://intridea.github.io/grape
|
data/Rakefile
CHANGED
@@ -2,16 +2,22 @@ require 'bundler'
|
|
2
2
|
Bundler.setup
|
3
3
|
Bundler::GemHelper.install_tasks
|
4
4
|
|
5
|
-
require 'yard'
|
6
|
-
YARD::Rake::YardocTask.new
|
7
|
-
|
8
5
|
require 'rspec/core/rake_task'
|
9
6
|
desc 'Run all examples'
|
10
7
|
RSpec::Core::RakeTask.new(:spec)
|
11
8
|
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
begin
|
10
|
+
require 'yard'
|
11
|
+
YARD::Rake::YardocTask.new
|
12
|
+
rescue LoadError
|
13
|
+
end
|
14
|
+
|
15
|
+
begin
|
16
|
+
require 'rubocop/rake_task'
|
17
|
+
desc 'Run rubocop'
|
18
|
+
Rubocop::RakeTask.new(:rubocop)
|
19
|
+
rescue LoadError
|
20
|
+
end
|
15
21
|
|
16
22
|
task default: :spec
|
17
23
|
task test: :spec
|
data/grape-cache_control.gemspec
CHANGED
@@ -17,19 +17,14 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
|
-
spec.required_ruby_version = '>=
|
20
|
+
spec.required_ruby_version = '>= 1.9.3'
|
21
21
|
|
22
22
|
spec.add_dependency 'grape', '~> 0.3'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.5'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency 'rspec'
|
26
|
+
spec.add_development_dependency 'kramdown', '>= 0.14'
|
28
27
|
spec.add_development_dependency 'rubocop'
|
29
|
-
spec.add_development_dependency 'timecop'
|
30
28
|
spec.add_development_dependency 'pry'
|
31
29
|
spec.add_development_dependency 'yard'
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
30
|
+
end
|
data/spec/support/timecop.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
|
3
2
|
describe Grape::CacheControl do
|
4
3
|
subject { Class.new(Grape::API) }
|
5
4
|
|
@@ -8,7 +7,6 @@ describe Grape::CacheControl do
|
|
8
7
|
end
|
9
8
|
|
10
9
|
context 'helpers' do
|
11
|
-
|
12
10
|
describe 'cache_control' do
|
13
11
|
it 'sets headers' do
|
14
12
|
subject.get('/apples') do
|
@@ -91,7 +89,5 @@ describe Grape::CacheControl do
|
|
91
89
|
expect(last_response.headers['Expires']).to eq((Time.now + 60).httpdate)
|
92
90
|
end
|
93
91
|
end
|
94
|
-
|
95
92
|
end
|
96
|
-
|
97
93
|
end
|
metadata
CHANGED
@@ -1,139 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-cache_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Freeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-31 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.3'
|
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.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.5'
|
34
34
|
type: :development
|
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: '1.5'
|
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: '10.0'
|
48
48
|
type: :development
|
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: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: kramdown
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
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: rspec
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
61
|
+
version: '0.14'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- -
|
66
|
+
- - ">="
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
68
|
+
version: '0.14'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rubocop
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
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: timecop
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
73
|
+
- - ">="
|
102
74
|
- !ruby/object:Gem::Version
|
103
75
|
version: '0'
|
104
76
|
type: :development
|
105
77
|
prerelease: false
|
106
78
|
version_requirements: !ruby/object:Gem::Requirement
|
107
79
|
requirements:
|
108
|
-
- -
|
80
|
+
- - ">="
|
109
81
|
- !ruby/object:Gem::Version
|
110
82
|
version: '0'
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
84
|
name: pry
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
114
86
|
requirements:
|
115
|
-
- -
|
87
|
+
- - ">="
|
116
88
|
- !ruby/object:Gem::Version
|
117
89
|
version: '0'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
93
|
requirements:
|
122
|
-
- -
|
94
|
+
- - ">="
|
123
95
|
- !ruby/object:Gem::Version
|
124
96
|
version: '0'
|
125
97
|
- !ruby/object:Gem::Dependency
|
126
98
|
name: yard
|
127
99
|
requirement: !ruby/object:Gem::Requirement
|
128
100
|
requirements:
|
129
|
-
- -
|
101
|
+
- - ">="
|
130
102
|
- !ruby/object:Gem::Version
|
131
103
|
version: '0'
|
132
104
|
type: :development
|
133
105
|
prerelease: false
|
134
106
|
version_requirements: !ruby/object:Gem::Requirement
|
135
107
|
requirements:
|
136
|
-
- -
|
108
|
+
- - ">="
|
137
109
|
- !ruby/object:Gem::Version
|
138
110
|
version: '0'
|
139
111
|
description: Cache-Control and Expires helpers for Grape
|
@@ -143,9 +115,11 @@ executables: []
|
|
143
115
|
extensions: []
|
144
116
|
extra_rdoc_files: []
|
145
117
|
files:
|
146
|
-
- .
|
147
|
-
- .
|
148
|
-
- .
|
118
|
+
- ".document"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rubocop.yml"
|
121
|
+
- ".travis.yml"
|
122
|
+
- ".yardopts"
|
149
123
|
- CHANGELOG.md
|
150
124
|
- CONTRIBUTING.md
|
151
125
|
- Gemfile
|
@@ -172,17 +146,17 @@ require_paths:
|
|
172
146
|
- lib
|
173
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
174
148
|
requirements:
|
175
|
-
- -
|
149
|
+
- - ">="
|
176
150
|
- !ruby/object:Gem::Version
|
177
|
-
version:
|
151
|
+
version: 1.9.3
|
178
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
153
|
requirements:
|
180
|
-
- -
|
154
|
+
- - ">="
|
181
155
|
- !ruby/object:Gem::Version
|
182
156
|
version: '0'
|
183
157
|
requirements: []
|
184
158
|
rubyforge_project:
|
185
|
-
rubygems_version: 2.0
|
159
|
+
rubygems_version: 2.2.0
|
186
160
|
signing_key:
|
187
161
|
specification_version: 4
|
188
162
|
summary: Cache-Control and Expires helpers for Grape
|
@@ -192,4 +166,3 @@ test_files:
|
|
192
166
|
- spec/support/rack-test.rb
|
193
167
|
- spec/support/timecop.rb
|
194
168
|
- spec/unit/grape/cache_control_spec.rb
|
195
|
-
has_rdoc:
|