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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 927abaa366daf63661393c31de23b001af89ec1d
4
- data.tar.gz: 04fb06c7765cda54e5cf6f3c29b953d21863e474
2
+ SHA256:
3
+ metadata.gz: ebdccfc0281d7039df41056e9b8b7abe41848d69635c6b858a3af34c86beac2a
4
+ data.tar.gz: 8510a5073f2de16071750b23b9b8f8e8cda833e875e5e09e256f57183a84d810
5
5
  SHA512:
6
- metadata.gz: 6480cbf93718a16469b4f4c9fb161f71e70dadd0eaac798240cbd6c64ccc213ec1feaa70d718f73143b7ae3f9fac1c6917cd7a00d98f03a7bc329e595f85df6b
7
- data.tar.gz: 60d5bd323acb6a972ddf00fcf24d73433a1e62a8f526173d908ab3dab77429ff8681e5b257b3c66751859bca73bfeb4f1c38c951793e150bac5274f29df54cf5
6
+ metadata.gz: ee54cbc74ac4573d2d27f0169b2971b0840001850b6851ecaf6638239606ab986c41440fef1549761181f32211db7129d005355be907bdc3364c7d6b0445b4e5
7
+ data.tar.gz: a2ad576300d5156b954d5245d86a537482f7be40501e5758088e656fb02afeb0660e1eee6f83fe70c934b383edda028885671adcf3ece5ac967b30c4e16e3245
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
3
  /Gemfile.lock
4
+ /gemfiles/.bundle/
4
5
  /gemfiles/*.lock
5
6
  /_yardoc/
6
7
  /coverage/
@@ -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"
@@ -1,27 +1,18 @@
1
- before_install: gem install bundler -v 1.13.7
1
+ before_install: gem install bundler -v 2.0.1
2
2
  cache: bundler
3
3
  gemfile:
4
- - gemfiles/railties_3.2.gemfile
5
- - gemfiles/railties_4.x.gemfile
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.1.10
22
- - 2.2.6
23
- - 2.3.3
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
- appraise "railties-3.2" do
2
- gem "railties", "~> 3.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 "railties-4.x" do
6
- gem "railties", "~> 4.0"
15
+ appraise 'railties-5.2' do
16
+ gem 'railties', '~> 5.2.0'
7
17
  end
8
18
 
9
- appraise "railties-5.x" do
10
- gem "railties", "~> 5.0"
19
+ appraise 'railties-5.x' do
20
+ gem 'railties', '~> 5.0'
11
21
  end
@@ -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
- [HEAD]: https://github.com/nbibler/sha_header/compare/v1.1.0...master
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
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in sha_header.gemspec
4
6
  gemspec
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 3. When required, it
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.1 through 2.4, and
23
- * Rails 3.2 through 5.0.
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
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "sha_header"
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 "irb"
14
+ require 'irb'
14
15
  IRB.start
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "railties", "~> 3.2"
5
+ gem "railties", "~> 4.2"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "railties", "~> 4.0"
5
+ gem "railties", "~> 5.0.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 5.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 5.2.0"
6
+
7
+ gemspec path: "../"
@@ -4,4 +4,4 @@ source "https://rubygems.org"
4
4
 
5
5
  gem "railties", "~> 5.0"
6
6
 
7
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sha_header/railtie' if defined?(::Rails::Railtie)
2
4
 
3
5
  module SHAHeader
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_support/core_ext/object/blank'
2
4
 
3
5
  module SHAHeader
@@ -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 "sha_header.use_rack_middleware" do |app|
7
- app.middleware.use "SHAHeader::Middleware"
8
+ initializer 'sha_header.use_rack_middleware' do |app|
9
+ app.middleware.use 'SHAHeader::Middleware'
8
10
  end
9
11
  end
10
12
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SHAHeader
2
- VERSION = "1.1.0".freeze
4
+ VERSION = '1.1.1'
3
5
  end
@@ -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 = "sha_header"
10
+ spec.name = 'sha_header'
8
11
  spec.version = SHAHeader::VERSION
9
- spec.authors = ["Nathaniel Bibler"]
10
- spec.email = ["gem@nathanielbibler.com"]
12
+ spec.authors = ['Nathaniel Bibler']
13
+ spec.email = ['gem@nathanielbibler.com']
11
14
 
12
- spec.summary = %q{Add a header to the response of your Rails application containing the current commit SHA.}
13
- spec.description = %q{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.}
14
- spec.homepage = "https://github.com/nbibler/sha_header"
15
- spec.license = "MIT"
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 = "exe"
23
+ spec.bindir = 'exe'
21
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
- spec.require_paths = ["lib"]
25
+ spec.require_paths = ['lib']
23
26
 
24
- spec.add_dependency 'railties', '>= 3.2', '< 5.1'
27
+ spec.add_dependency 'railties', '>= 3.2', '< 5.3'
25
28
 
26
- spec.add_development_dependency "appraisal", "~> 2.0"
27
- spec.add_development_dependency "bundler", "~> 1.13"
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 "rake", "~> 12.0"
30
- spec.add_development_dependency "rspec", "~> 3.0"
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.0
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: 2017-01-09 00:00:00.000000000 Z
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.1'
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.1'
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: '1.13'
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: '1.13'
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/railties_3.2.gemfile
129
- - gemfiles/railties_4.x.gemfile
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
- rubyforge_project:
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: