sha_header 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +37 -0
- data/.travis.yml +8 -17
- data/Appraisals +16 -6
- data/CHANGELOG.md +6 -1
- data/Gemfile +3 -1
- data/README.md +8 -4
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/gemfiles/{railties_3.2.gemfile → railties_4.2.gemfile} +2 -2
- data/gemfiles/{railties_4.x.gemfile → railties_5.0.gemfile} +2 -2
- data/gemfiles/railties_5.1.gemfile +7 -0
- data/gemfiles/railties_5.2.gemfile +7 -0
- data/gemfiles/railties_5.x.gemfile +1 -1
- data/lib/sha_header.rb +2 -0
- data/lib/sha_header/middleware.rb +2 -0
- data/lib/sha_header/railtie.rb +4 -2
- data/lib/sha_header/version.rb +3 -1
- data/sha_header.gemspec +17 -14
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ebdccfc0281d7039df41056e9b8b7abe41848d69635c6b858a3af34c86beac2a
|
4
|
+
data.tar.gz: 8510a5073f2de16071750b23b9b8f8e8cda833e875e5e09e256f57183a84d810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee54cbc74ac4573d2d27f0169b2971b0840001850b6851ecaf6638239606ab986c41440fef1549761181f32211db7129d005355be907bdc3364c7d6b0445b4e5
|
7
|
+
data.tar.gz: a2ad576300d5156b954d5245d86a537482f7be40501e5758088e656fb02afeb0660e1eee6f83fe70c934b383edda028885671adcf3ece5ac967b30c4e16e3245
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-rails_config:
|
3
|
+
- "config/rails.yml"
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
TargetRubyVersion: 2.2
|
7
|
+
Exclude:
|
8
|
+
- 'gemfiles/*'
|
9
|
+
|
10
|
+
Layout/CaseIndentation:
|
11
|
+
Enabled: true
|
12
|
+
EnforcedStyle: end
|
13
|
+
|
14
|
+
Layout/EndOfLine:
|
15
|
+
EnforcedStyle: "lf"
|
16
|
+
|
17
|
+
Layout/IndentHeredoc:
|
18
|
+
EnforcedStyle: "squiggly"
|
19
|
+
|
20
|
+
Layout/IndentationConsistency:
|
21
|
+
EnforcedStyle: "normal"
|
22
|
+
|
23
|
+
Metrics/BlockLength:
|
24
|
+
Exclude:
|
25
|
+
- 'Rakefile'
|
26
|
+
- '**/*.rake'
|
27
|
+
- 'spec/**/*.rb'
|
28
|
+
|
29
|
+
Metrics/ModuleLength:
|
30
|
+
Exclude:
|
31
|
+
- 'spec/**/*.rb'
|
32
|
+
|
33
|
+
Style/SafeNavigation:
|
34
|
+
Enabled: false
|
35
|
+
|
36
|
+
Style/StringLiterals:
|
37
|
+
EnforcedStyle: "single_quotes"
|
data/.travis.yml
CHANGED
@@ -1,27 +1,18 @@
|
|
1
|
-
before_install: gem install bundler -v
|
1
|
+
before_install: gem install bundler -v 2.0.1
|
2
2
|
cache: bundler
|
3
3
|
gemfile:
|
4
|
-
- gemfiles/
|
5
|
-
- gemfiles/
|
4
|
+
- gemfiles/railties_4.2.gemfile
|
5
|
+
- gemfiles/railties_5.0.gemfile
|
6
|
+
- gemfiles/railties_5.1.gemfile
|
7
|
+
- gemfiles/railties_5.2.gemfile
|
6
8
|
- gemfiles/railties_5.x.gemfile
|
7
9
|
language: ruby
|
8
10
|
matrix:
|
9
|
-
allow_failures:
|
10
|
-
# json 1.8.3 fails to build under 2.4.0
|
11
|
-
- rvm: 2.4.0
|
12
|
-
gemfile: gemfiles/railties_3.2.gemfile
|
13
|
-
- rvm: 2.4.0
|
14
|
-
gemfile: gemfiles/railties_4.x.gemfile
|
15
|
-
exclude:
|
16
|
-
# rails 5 requires Ruby 2.2.2+
|
17
|
-
- rvm: 2.1.10
|
18
|
-
gemfile: gemfiles/railties_5.x.gemfile
|
19
11
|
fast_finish: true
|
20
12
|
rvm:
|
21
|
-
- 2.
|
22
|
-
- 2.
|
23
|
-
- 2.
|
24
|
-
- 2.4.0
|
13
|
+
- 2.4.5
|
14
|
+
- 2.5.5
|
15
|
+
- 2.6.2
|
25
16
|
notifications:
|
26
17
|
email:
|
27
18
|
on_failure: always
|
data/Appraisals
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
appraise 'railties-4.2' do
|
4
|
+
gem 'railties', '~> 4.2'
|
5
|
+
end
|
6
|
+
|
7
|
+
appraise 'railties-5.0' do
|
8
|
+
gem 'railties', '~> 5.0.0'
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise 'railties-5.1' do
|
12
|
+
gem 'railties', '~> 5.1.0'
|
3
13
|
end
|
4
14
|
|
5
|
-
appraise
|
6
|
-
gem
|
15
|
+
appraise 'railties-5.2' do
|
16
|
+
gem 'railties', '~> 5.2.0'
|
7
17
|
end
|
8
18
|
|
9
|
-
appraise
|
10
|
-
gem
|
19
|
+
appraise 'railties-5.x' do
|
20
|
+
gem 'railties', '~> 5.0'
|
11
21
|
end
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
|
8
8
|
* No significant changes.
|
9
9
|
|
10
|
+
## [v1.1.1][] / 2019-03-26
|
11
|
+
|
12
|
+
* Widen supported Rails version to include 3.2 to 5.2.
|
13
|
+
|
10
14
|
## [v1.1.0][] / 2017-01-08
|
11
15
|
|
12
16
|
* Widen supported Rails version to include 3.2 to 5.0.
|
@@ -23,4 +27,5 @@
|
|
23
27
|
[v0.0.4]: https://github.com/nbibler/sha_header/compare/v0.0.3...v0.0.4
|
24
28
|
[v1.0.0]: https://github.com/nbibler/sha_header/compare/v0.0.4...v1.0.0
|
25
29
|
[v1.1.0]: https://github.com/nbibler/sha_header/compare/v1.0.0...v1.1.0
|
26
|
-
[
|
30
|
+
[v1.1.1]: https://github.com/nbibler/sha_header/compare/v1.1.0...v1.1.1
|
31
|
+
[HEAD]: https://github.com/nbibler/sha_header/compare/v1.1.1...master
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ revision, system time, uptime, whatever).
|
|
10
10
|
[![Gem Version](http://img.shields.io/gem/v/sha_header.svg?style=flat)](http://rubygems.org/gems/sha_header)
|
11
11
|
[![Build Status](http://img.shields.io/travis/nbibler/sha_header/master.svg?style=flat)](https://travis-ci.org/nbibler/sha_header)
|
12
12
|
|
13
|
-
SHAHeader is a simple Rack middleware gem for Rails
|
13
|
+
SHAHeader is a simple Rack middleware gem for Rails. When required, it
|
14
14
|
will instruct Rails to automatically insert its middleware into the Rack
|
15
15
|
stack and inject your current git SHA hash into all of your dynamic
|
16
16
|
response headers.
|
@@ -19,8 +19,12 @@ response headers.
|
|
19
19
|
|
20
20
|
The SHAHeader gem is compatible with:
|
21
21
|
|
22
|
-
* Ruby 2.
|
23
|
-
* Rails
|
22
|
+
* Ruby 2.4, 2.5, and 2.6 and
|
23
|
+
* Rails 4.2, 5.1, and 5.2.
|
24
|
+
|
25
|
+
This library may continue to be compatible with older versions (Ruby 2.1+,
|
26
|
+
Rails 3.2+), however those versions have been end-of-life'd and are no longer
|
27
|
+
maintained by their authors.
|
24
28
|
|
25
29
|
## Installation
|
26
30
|
|
@@ -40,7 +44,7 @@ application has added the above `Gemfile` line. Using curl:
|
|
40
44
|
|
41
45
|
And, the following response is received:
|
42
46
|
|
43
|
-
HTTP/1.1 200 OK
|
47
|
+
HTTP/1.1 200 OK
|
44
48
|
Content-Type: text/html; charset=utf-8
|
45
49
|
ETag: "25ec427afba8daa376f309559b1b3c5c"
|
46
50
|
Cache-Control: max-age=0, private, must-revalidate
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'sha_header'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "sha_header"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start
|
data/lib/sha_header.rb
CHANGED
data/lib/sha_header/railtie.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'sha_header'
|
2
4
|
require 'rails'
|
3
5
|
|
4
6
|
module SHAHeader
|
5
7
|
class Railtie < Rails::Railtie
|
6
|
-
initializer
|
7
|
-
app.middleware.use
|
8
|
+
initializer 'sha_header.use_rack_middleware' do |app|
|
9
|
+
app.middleware.use 'SHAHeader::Middleware'
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
data/lib/sha_header/version.rb
CHANGED
data/sha_header.gemspec
CHANGED
@@ -1,31 +1,34 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
|
2
5
|
lib = File.expand_path('../lib', __FILE__)
|
3
6
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
7
|
require 'sha_header/version'
|
5
8
|
|
6
9
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
10
|
+
spec.name = 'sha_header'
|
8
11
|
spec.version = SHAHeader::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
12
|
+
spec.authors = ['Nathaniel Bibler']
|
13
|
+
spec.email = ['gem@nathanielbibler.com']
|
11
14
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
15
|
+
spec.summary = 'Add a header to the response of your Rails application containing the current commit SHA.'
|
16
|
+
spec.description = "This library adds a new, custom X-Git-SHA header to your Rails application's response which contains the SHA hash that your application is currently running."
|
17
|
+
spec.homepage = 'https://github.com/nbibler/sha_header'
|
18
|
+
spec.license = 'MIT'
|
16
19
|
|
17
20
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
21
|
f.match(%r{^(test|spec|features)/})
|
19
22
|
end
|
20
|
-
spec.bindir =
|
23
|
+
spec.bindir = 'exe'
|
21
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = [
|
25
|
+
spec.require_paths = ['lib']
|
23
26
|
|
24
|
-
spec.add_dependency 'railties', '>= 3.2', '< 5.
|
27
|
+
spec.add_dependency 'railties', '>= 3.2', '< 5.3'
|
25
28
|
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
29
|
+
spec.add_development_dependency 'appraisal', '~> 2.0'
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
28
31
|
spec.add_development_dependency 'fakefs', '~>0.4', '>= 0.4.3'
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.add_development_dependency
|
32
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
33
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
31
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sha_header
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Bibler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.3'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: appraisal
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '2.0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '2.0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: fakefs
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,6 +116,7 @@ extra_rdoc_files: []
|
|
116
116
|
files:
|
117
117
|
- ".gitignore"
|
118
118
|
- ".rspec"
|
119
|
+
- ".rubocop.yml"
|
119
120
|
- ".travis.yml"
|
120
121
|
- Appraisals
|
121
122
|
- CHANGELOG.md
|
@@ -125,8 +126,10 @@ files:
|
|
125
126
|
- Rakefile
|
126
127
|
- bin/console
|
127
128
|
- bin/setup
|
128
|
-
- gemfiles/
|
129
|
-
- gemfiles/
|
129
|
+
- gemfiles/railties_4.2.gemfile
|
130
|
+
- gemfiles/railties_5.0.gemfile
|
131
|
+
- gemfiles/railties_5.1.gemfile
|
132
|
+
- gemfiles/railties_5.2.gemfile
|
130
133
|
- gemfiles/railties_5.x.gemfile
|
131
134
|
- lib/sha_header.rb
|
132
135
|
- lib/sha_header/middleware.rb
|
@@ -152,11 +155,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
155
|
- !ruby/object:Gem::Version
|
153
156
|
version: '0'
|
154
157
|
requirements: []
|
155
|
-
|
156
|
-
rubygems_version: 2.5.2
|
158
|
+
rubygems_version: 3.0.3
|
157
159
|
signing_key:
|
158
160
|
specification_version: 4
|
159
161
|
summary: Add a header to the response of your Rails application containing the current
|
160
162
|
commit SHA.
|
161
163
|
test_files: []
|
162
|
-
has_rdoc:
|