rack_strip_client_ip 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2ab5b3902b289cf1d81dc33f85a901b224c2ae4d
4
+ data.tar.gz: 6dfc8279e700694ca8ebd009ecf5eadc5b3043f3
5
+ SHA512:
6
+ metadata.gz: 7d18c335a1086ee5b69e8aaf4d229a81929c954044e6ed26e40b6119b657d46228884c3df6aeaff29cad22d630186c53cb56277860b18407dcb3acf91615a136
7
+ data.tar.gz: 8dba23b8abb4586c9dae75b2694ac44b27320095a8b32f9812227ffdebff5b175cb86dedc60defd69203a9fac42683c43ff096f80257c5f9c88ec6dce3a2be0d
@@ -0,0 +1,12 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - "2.3"
5
+ - "2.4"
6
+ deploy:
7
+ provider: rubygems
8
+ api_key:
9
+ secure: QYeXVSWEymGm58SyHk1ndCO1hS7ApK5eRREJk9+qqTQvQjG2JGj5JFfybUaE4W4xCcOgFIA62oXRYlynSzYJ2s9lbivXgaDDUl7eS776XXgjv8+Mz2Rvcdgr5bpyMQUNxEcGNlC6D5a8UOW2eUOCmaMH0Qf3BQH1h9i5Czydy9M=
10
+ on:
11
+ tags: true
12
+ ruby: "2.4"
@@ -0,0 +1,7 @@
1
+ # 0.0.2
2
+
3
+ * Fix middleware deprecation message for Rails 5.
4
+
5
+ # 0.0.1
6
+
7
+ * Initial release
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # RackStripClientIp
2
2
 
3
+ [![Build Status](https://travis-ci.org/alext/rack_strip_client_ip.png?branch=master)](https://travis-ci.org/alext/rack_strip_client_ip)
4
+
3
5
  Rack middleware to strip the Client-Ip HTTP header. This is intended to prevent a spoofed Client-Ip header from triggering an IpSpoofAttackError exception.
4
6
 
5
7
  ## Installation
@@ -26,7 +28,7 @@ Add the gem to the Gemfile as above, and it will automatically add itself to the
26
28
 
27
29
  Add the gem to the Gemfile, and add it to the middleware stack. e.g.
28
30
 
29
- use RackStripClientIp
31
+ use RackStripClientIp::Middleware
30
32
 
31
33
 
32
34
  ## Contributing
@@ -1,7 +1,11 @@
1
1
  module RackStripClientIp
2
2
  class Railtie < Rails::Railtie
3
3
  initializer "rack_strip_client_ip.insert_middleware" do |app|
4
- app.config.middleware.insert_before 0, "RackStripClientIp::Middleware"
4
+ if Rails::VERSION::MAJOR >= 5
5
+ app.config.middleware.insert_before 0, RackStripClientIp::Middleware
6
+ else
7
+ app.config.middleware.insert_before 0, "RackStripClientIp::Middleware"
8
+ end
5
9
  end
6
10
  end
7
11
  end
@@ -1,3 +1,3 @@
1
1
  module RackStripClientIp
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler"
22
22
  spec.add_development_dependency "rake"
23
- spec.add_development_dependency "rack-test", "0.6.2"
24
- spec.add_development_dependency "rspec", "2.14.1"
23
+ spec.add_development_dependency "rack-test", "0.6.3"
24
+ spec.add_development_dependency "rspec", "3.6.0"
25
25
  end
@@ -5,7 +5,6 @@
5
5
  #
6
6
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
7
  RSpec.configure do |config|
8
- config.treat_symbols_as_metadata_keys_with_true_values = true
9
8
  config.run_all_when_everything_filtered = true
10
9
  config.filter_run :focus
11
10
 
metadata CHANGED
@@ -1,80 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack_strip_client_ip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Alex Tomlins
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-09-02 00:00:00.000000000 Z
11
+ date: 2017-05-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rack-test
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - '='
52
46
  - !ruby/object:Gem::Version
53
- version: 0.6.2
47
+ version: 0.6.3
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - '='
60
53
  - !ruby/object:Gem::Version
61
- version: 0.6.2
54
+ version: 0.6.3
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rspec
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - '='
68
60
  - !ruby/object:Gem::Version
69
- version: 2.14.1
61
+ version: 3.6.0
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - '='
76
67
  - !ruby/object:Gem::Version
77
- version: 2.14.1
68
+ version: 3.6.0
78
69
  description: rack middleware to remote Client-IP headers. This is to prevent IpSpoofAttackErrors
79
70
  in a Rails app
80
71
  email:
@@ -83,8 +74,10 @@ executables: []
83
74
  extensions: []
84
75
  extra_rdoc_files: []
85
76
  files:
86
- - .gitignore
87
- - .rspec
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
+ - CHANGELOG.md
88
81
  - Gemfile
89
82
  - LICENSE.txt
90
83
  - README.md
@@ -99,33 +92,26 @@ files:
99
92
  homepage: https://github.com/alext/rack_strip_client_ip
100
93
  licenses:
101
94
  - MIT
95
+ metadata: {}
102
96
  post_install_message:
103
97
  rdoc_options: []
104
98
  require_paths:
105
99
  - lib
106
100
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
101
  requirements:
109
- - - ! '>='
102
+ - - ">="
110
103
  - !ruby/object:Gem::Version
111
104
  version: '0'
112
- segments:
113
- - 0
114
- hash: 1162669491065718405
115
105
  required_rubygems_version: !ruby/object:Gem::Requirement
116
- none: false
117
106
  requirements:
118
- - - ! '>='
107
+ - - ">="
119
108
  - !ruby/object:Gem::Version
120
109
  version: '0'
121
- segments:
122
- - 0
123
- hash: 1162669491065718405
124
110
  requirements: []
125
111
  rubyforge_project:
126
- rubygems_version: 1.8.23
112
+ rubygems_version: 2.4.5
127
113
  signing_key:
128
- specification_version: 3
114
+ specification_version: 4
129
115
  summary: rack middleware to remote Client-IP headers
130
116
  test_files:
131
117
  - spec/middleware_spec.rb