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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ca6c5f044f7d2eea1ce13fcc06dced1d6439228b
4
- data.tar.gz: fa6ef23c416140e45ef17c408470623340615045
3
+ metadata.gz: e3c5374719822fa86ef17ba1955e41a1dad98f10
4
+ data.tar.gz: 2c1b05aff04cff14acc2770b41457d175ae5c89e
5
5
  SHA512:
6
- metadata.gz: 95d528dd48d44fd98ca2108d0aa3de25c4a6dab206307db951e4bbdcf27424f326f0ac06c1288299e9f36c43a6e8883cd64d7a4b15a06e08f6df981622530185
7
- data.tar.gz: 93e0af1de79521d38773f4aa9a6baf938a13680951cb509bc1fcd71c6e4a04a5a8bae4d94379a6c35161c2bbfef6f85808b031b875adba0fac14175fd502ee15
6
+ metadata.gz: c5d1240da98c05aff50f2370d7c192376e1dcf3a1bc54e75f53c93efb5754beded52e6437506b3949a9781561508b01d8370ffe6bf1d224e4fca82fd2f129d5a
7
+ data.tar.gz: adb644c6c090cd6726d0c10f5989f05980e823c53782e4df305b08e31f8f8a6157fbe8671bc168130f6f1ef463753564e17eaabffe1d8b1bed175ce50adda715
data/.document ADDED
@@ -0,0 +1,3 @@
1
+ LICENSE.md
2
+ README.md
3
+ lib/**/*.rb
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
- - jruby-19mode
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-19mode
19
+ - rvm: jruby
20
+ - rvm: rbx-2
16
21
  notifications:
17
22
  email: false
data/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ --markup markdown
2
+ -
3
+ CHANGELOG.md
4
+ CONTRIBUTING.md
5
+ LICENSE.md
6
+ README.md
data/Gemfile CHANGED
@@ -1,3 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ group :test do
6
+ gem 'rake', '~> 10.0'
7
+ gem 'rspec'
8
+ gem 'rack-test'
9
+ gem 'timecop'
10
+ end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Grape::CacheControl
2
2
 
3
- `Cache-Control` and `Expires` helpers for [Grape][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
- ## Build & Dependency Status
117
+ ## Badges
118
118
 
119
- [![Gem Version](https://badge.fury.io/rb/grape-cache_control.png)][gem]
120
- [![Build Status](https://travis-ci.org/karlfreeman/grape-cache_control.png)][travis]
121
- [![Code Quality](https://codeclimate.com/github/karlfreeman/grape-cache_control.png)][codeclimate]
122
- [![Gittip](http://img.shields.io/gittip/karlfreeman.png)][gittip]
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
- * Ruby 2.1.0
130
- * Ruby 2.0.0
131
- * Ruby 1.9.3
132
- * [JRuby][jruby]
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 / Expires](https://github.com/sinatra/sinatra/blob/faf2efc670bf4c6076c26d5234c577950c19b699/lib/sinatra/base.rb#L439-L492)
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
- require 'rubocop/rake_task'
13
- desc 'Run rubocop'
14
- Rubocop::RakeTask.new(:rubocop)
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
@@ -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 = '>= 2.0.0'
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 'rack-test'
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
@@ -1,5 +1,5 @@
1
1
  module Grape
2
2
  module CacheControl
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2' unless defined?(Grape::CacheControl::VERSION)
4
4
  end
5
5
  end
@@ -1,9 +1,2 @@
1
1
  require 'timecop'
2
- RSpec.configure do |config|
3
- config.before(:each) do
4
- Timecop.freeze
5
- end
6
- config.after(:each) do
7
- Timecop.return
8
- end
9
- end
2
+ Timecop.freeze
@@ -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.1
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-02-25 00:00:00.000000000 Z
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: rack-test
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
- - .gitignore
147
- - .rubocop.yml
148
- - .travis.yml
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: 2.0.0
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.14
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: