cloudflare-rails 0.2.0 → 1.0.0.beta1

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: 947aaffd0442fcd48550cbc359a2f5d80685d0a4
4
- data.tar.gz: d29744071bb75ba4e9232466248acaa13b7cc272
2
+ SHA256:
3
+ metadata.gz: a0cb8e2ebd449505c8b3afc141a8b91ea4f05bee6b284969eaf1c026d6aa100c
4
+ data.tar.gz: b000033b1f6467bb7ec924d430e458ccb2105c4c95f4624bc7a44968b1abfc62
5
5
  SHA512:
6
- metadata.gz: 038cacccbde117a5e9e684a351102921e2947a1b7f2248e05ba033516ce4c163d28fdcb537e1735189caf5af88256a63b142ff6ae540f6ac324454f53026a7c7
7
- data.tar.gz: 146fc51215c8c709b4fed30a78fa9b8ba41c65e69ea3ffc4b16fc4c1f227186e9396b494af8c1559506997f04a80061da6038cf4d1238cb196fef3aba3c3d12e
6
+ metadata.gz: b61da727d6ef432af1beaf5871bc266eb0b436b10ba236b6cf022f8c4cbf74fe81f28d0dd91c58581abc5cbb879048696358084132a2850ec14a9e25c33d0d77
7
+ data.tar.gz: f5eab7c1665b3651779d5a422dbaef74d8f3daa627a55d2e8d859590bb209008fde96e5e6804cce32a78da7238dc7a8e7921ad7f77923250ed13c80966bf7ac0
@@ -0,0 +1,49 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # specify the version you desire here
10
+ - image: circleci/ruby:2.7.0
11
+
12
+ working_directory: ~/repo
13
+
14
+ steps:
15
+ - checkout
16
+
17
+ # Download and cache dependencies
18
+ - restore_cache:
19
+ keys:
20
+ - v1-dependencies-{{ checksum "cloudflare-rails.gemspec" }}-{{ checksum "Appraisals" }}
21
+ # fallback to using the latest cache if no exact match is found
22
+ - v1-dependencies-
23
+
24
+ - run:
25
+ name: install dependencies
26
+ command: |
27
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
28
+
29
+ - run:
30
+ name: install appraisal versions
31
+ command: |
32
+ bundle exec appraisal install
33
+
34
+ - save_cache:
35
+ paths:
36
+ - ./vendor/bundle
37
+ key: v1-dependencies-{{ checksum "cloudflare-rails.gemspec" }}-{{ checksum "Appraisals" }}
38
+
39
+ # run tests!
40
+ - run:
41
+ name: run tests
42
+ command: |
43
+ bundle exec appraisal rake
44
+ # collect reports
45
+ - store_test_results:
46
+ path: tmp/rspec
47
+ - store_artifacts:
48
+ path: tmp/rspec
49
+ destination: test-results
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
data/.gitignore CHANGED
@@ -10,3 +10,6 @@
10
10
  /log/
11
11
  .ruby-gemset
12
12
  .ruby-version
13
+ .DS_Store
14
+
15
+ *.gemfile.lock
data/.rspec CHANGED
@@ -1,2 +1,4 @@
1
- --format p
1
+ --format d
2
2
  --color
3
+ --format RspecJunitFormatter
4
+ --out tmp/rspec/rspec-<%= File.basename ENV['BUNDLE_GEMFILE'] %><%= ENV["RACK_ATTACK"] ? "-rack-attack-#{ENV["RACK_ATTACK"]}" : '' %>.xml
@@ -0,0 +1,5 @@
1
+ inherit_from:
2
+ - .rubocop_airbnb.yml
3
+ - .rubocop_todo.yml
4
+ AllCops:
5
+ TargetRubyVersion: 2.4
@@ -0,0 +1,2 @@
1
+ require:
2
+ - rubocop-airbnb
@@ -0,0 +1,39 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2018-06-03 21:15:22 -0700 using RuboCop version 0.52.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 4
10
+ # Cop supports --auto-correct.
11
+ Layout/MultilineBlockLayout:
12
+ Exclude:
13
+ - 'spec/cloudflare/rails_spec.rb'
14
+
15
+ # Offense count: 4
16
+ # Cop supports --auto-correct.
17
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
18
+ # SupportedStyles: space, no_space
19
+ # SupportedStylesForEmptyBraces: space, no_space
20
+ Layout/SpaceInsideBlockBraces:
21
+ Exclude:
22
+ - 'spec/cloudflare/rails_spec.rb'
23
+
24
+ # Offense count: 4
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
27
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining
28
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
29
+ # FunctionalMethods: let, let!, subject, watch
30
+ # IgnoredMethods: lambda, proc, it
31
+ Style/BlockDelimiters:
32
+ Exclude:
33
+ - 'spec/cloudflare/rails_spec.rb'
34
+
35
+ # Offense count: 6
36
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
37
+ # URISchemes: http, https
38
+ Metrics/LineLength:
39
+ Max: 126
@@ -0,0 +1,15 @@
1
+ appraise "rails-5.0" do
2
+ gem "rails", "~> 5.0.0"
3
+ end
4
+
5
+ appraise "rails-5.1" do
6
+ gem "rails", "~> 5.1.0"
7
+ end
8
+
9
+ appraise "rails-5.2" do
10
+ gem "rails", "~> 5.2.0"
11
+ end
12
+
13
+ appraise "rails-6.0" do
14
+ gem "rails", "~> 6.0.0"
15
+ end
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2014-2017 jonathan schatz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Cloudflare::Rails
2
-
1
+ # Cloudflare::Rails [![Gem Version](https://badge.fury.io/rb/cloudflare-rails.svg)](https://badge.fury.io/rb/cloudflare-rails) [![CircleCI](https://circleci.com/gh/modosc/cloudflare-rails/tree/master.svg?style=shield)](https://circleci.com/gh/modosc/cloudflare-rails/tree/master)
3
2
  This gem correctly configures Rails for [CloudFlare](https://www.cloudflare.com) so that `request.remote_ip` / `request.ip` both work correctly.
4
3
 
5
4
  ## Rails Compatibility
6
5
 
7
- For Rails 5, use 0.2.x
8
- For Rails 4.2, use 0.1.x
6
+ For Rails 5 / 6, use >= `0.6.x`
7
+
8
+ For Rails 4.2, use `0.1.x`
9
9
 
10
10
  ## Installation
11
11
 
@@ -23,16 +23,25 @@ And then execute:
23
23
 
24
24
  $ bundle
25
25
 
26
- ## Usage
26
+ ## Problem
27
+
28
+ Using Cloudflare means it's hard to identify the IP address of incoming requests since all requests are proxied through Cloudflare's infrastructure. Cloudflare provides a [CF-Connecting-IP](https://support.cloudflare.com/hc/en-us/articles/200170986-How-does-Cloudflare-handle-HTTP-Request-headers-) header which can be used to identify the originating IP address of a request. However, this header alone doesn't verify a request is legitimate. If an attacker has found the actual IP address of your server they could spoof this header and masquerade as legitimate traffic.
29
+
30
+ `cloudflare-rails` mitigates this attack by checking that the originating ip address of any incoming connecting is from one of Cloudflare's ip address ranges. If so, the incoming `X-Forwarded-For` header is trusted and used as the ip address provided to `rack` and `rails` (via `request.ip` and `request.remote_ip`). If the incoming connection does not originate from a Cloudflare server then the `X-Forwarded-For` header is ignored and the actual remote ip address is used.
27
31
 
28
- This code will fetch CloudFlare's current [IPv4](https://www.cloudflare.com/ips-v4) and [IPv6](https://www.cloudflare.com/ips-v6) lists, store them in `Rails.cache`, and add them to `config.cloudflare.ips`.
32
+ ## Usage
33
+ This code will fetch CloudFlare's current [IPv4](https://www.cloudflare.com/ips-v4) and [IPv6](https://www.cloudflare.com/ips-v6) lists, store them in `Rails.cache`, and add them to `config.cloudflare.ips`. The `X-Forwarded-For` header will then be trusted only from those ip addresses.
29
34
 
30
35
  You can configure the HTTP `timeout` and `expires_in` cache parameters inside of your rails config:
31
- ```
36
+ ```ruby
32
37
  config.cloudflare.expires_in = 12.hours # default value
33
- config.cloudfalre.timeout = 5.seconds # default value
38
+ config.cloudflare.timeout = 5.seconds # default value
34
39
  ```
35
40
 
41
+ ## Alternatives
42
+
43
+ [actionpack-cloudflare](https://github.com/customink/actionpack-cloudflare) simpler approach using the `CF-Connecting-IP` header.
44
+
36
45
  ## Development
37
46
 
38
47
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/Rakefile CHANGED
@@ -3,4 +3,22 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task :without_rack_attack do
7
+ ENV.delete 'RACK_ATTACK'
8
+ Rake::Task["spec"].reenable
9
+ Rake::Task["spec"].invoke
10
+ end
11
+
12
+ task :with_rack_attack_first do
13
+ ENV['RACK_ATTACK'] = 'first'
14
+ Rake::Task["spec"].reenable
15
+ Rake::Task["spec"].invoke
16
+ end
17
+
18
+ task :with_rack_attack_last do
19
+ ENV['RACK_ATTACK'] = 'last'
20
+ Rake::Task["spec"].reenable
21
+ Rake::Task["spec"].invoke
22
+ end
23
+
24
+ task :default => [:without_rack_attack, :with_rack_attack_first, :with_rack_attack_last]
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'cloudflare/rails/version'
@@ -12,21 +13,26 @@ Gem::Specification.new do |spec|
12
13
  spec.summary = "This gem configures Rails for CloudFlare so that request.ip and request.remote_ip and work correctly."
13
14
  spec.description = ""
14
15
  spec.homepage = "https://github.com/modosc/cloudflare-rails"
15
-
16
+ spec.license = "MIT"
16
17
 
17
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
19
  spec.bindir = "exe"
19
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
21
  spec.require_paths = ["lib"]
21
22
 
22
- spec.add_development_dependency "bundler", "~> 1.10"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rspec"
25
- spec.add_development_dependency "rspec-rails"
26
- spec.add_development_dependency "webmock"
23
+ spec.add_development_dependency "bundler", "~> 2.1.2"
24
+ spec.add_development_dependency "rake", "~> 13.0.1"
25
+ spec.add_development_dependency "rspec_junit_formatter", "~> 0.4.1"
26
+ spec.add_development_dependency "rspec-rails", "~> 4.0.0"
27
+ spec.add_development_dependency "rspec", "~> 3.9.0"
28
+ spec.add_development_dependency "rubocop-airbnb", "~> 3.0.2"
29
+ spec.add_development_dependency "webmock", "~> 3.9.1"
30
+ spec.add_development_dependency "rack-attack", "~> 6.3.0"
31
+ spec.add_development_dependency "pry-byebug"
32
+ spec.add_development_dependency "appraisal"
27
33
 
28
- spec.add_dependency "rails", "~> 5.0"
29
- spec.add_dependency 'httparty'
34
+ spec.add_dependency "httparty"
35
+ spec.add_dependency "rails", ">= 5.0", "< 6.1.0"
30
36
 
31
37
  # we need Module#prepend
32
38
  spec.required_ruby_version = '>= 2.0'
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_RETRY: "1"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.0.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 "rails", "~> 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 "rails", "~> 5.2.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 "rails", "~> 6.0.0"
6
+
7
+ gemspec path: "../"
@@ -3,8 +3,6 @@ require "httparty"
3
3
 
4
4
  module Cloudflare
5
5
  module Rails
6
-
7
-
8
6
  end
9
7
  end
10
8
 
@@ -3,28 +3,22 @@ require "httparty"
3
3
  module Cloudflare
4
4
  module Rails
5
5
  class Railtie < ::Rails::Railtie
6
-
7
6
  # patch rack::request::helpers to use our cloudflare ips - this way request.ip is
8
7
  # correct inside of rack and rails
9
8
  module CheckTrustedProxies
10
9
  def trusted_proxy?(ip)
11
- ::Rails.application.config.cloudflare.ips.any?{ |proxy| proxy === ip } || super
10
+ ::Rails.application.config.cloudflare.ips.any? { |proxy| proxy === ip } || super
12
11
  end
13
12
  end
14
13
 
15
- Rack::Request::Helpers.prepend CheckTrustedProxies
16
-
17
14
  # patch ActionDispatch::RemoteIP to use our cloudflare ips - this way
18
15
  # request.remote_ip is correct inside of rails
19
16
  module RemoteIpProxies
20
-
21
17
  def proxies
22
18
  super + ::Rails.application.config.cloudflare.ips
23
19
  end
24
20
  end
25
21
 
26
- ActionDispatch::RemoteIp.prepend RemoteIpProxies
27
-
28
22
  class Importer
29
23
  include HTTParty
30
24
  base_uri 'https://www.cloudflare.com'
@@ -33,8 +27,8 @@ module Cloudflare
33
27
 
34
28
  class ResponseError < HTTParty::ResponseError; end
35
29
 
36
- IPS_V4_URL = '/ips-v4'
37
- IPS_V6_URL = '/ips-v6'
30
+ IPS_V4_URL = '/ips-v4'.freeze
31
+ IPS_V6_URL = '/ips-v6'.freeze
38
32
 
39
33
  class << self
40
34
  def ips_v6
@@ -48,19 +42,17 @@ module Cloudflare
48
42
  def fetch(url)
49
43
  resp = get url, timeout: ::Rails.application.config.cloudflare.timeout
50
44
  if resp.success?
51
- resp.body.split("\n").reject(&:blank?).map{|ip| IPAddr.new ip}
45
+ resp.body.split("\n").reject(&:blank?).map { |ip| IPAddr.new ip }
52
46
  else
53
- raise ResponseError.new(resp.response)
47
+ raise ResponseError, resp.response
54
48
  end
55
49
  end
56
50
 
57
51
  def fetch_with_cache(type)
58
52
  ::Rails.cache.fetch("cloudflare-rails:#{type}", expires_in: ::Rails.application.config.cloudflare.expires_in) do
59
- self.send type
53
+ send type
60
54
  end
61
55
  end
62
-
63
-
64
56
  end
65
57
  end
66
58
 
@@ -68,8 +60,8 @@ module Cloudflare
68
60
  DEFAULTS = {
69
61
  expires_in: 12.hours,
70
62
  timeout: 5.seconds,
71
- ips: Array.new
72
- }
63
+ ips: [],
64
+ }.freeze
73
65
 
74
66
  config.before_configuration do |app|
75
67
  app.config.cloudflare = ActiveSupport::OrderedOptions.new
@@ -85,11 +77,22 @@ module Cloudflare
85
77
  ::Rails.application.config.cloudflare.ips += Importer.fetch_with_cache(type)
86
78
  rescue Importer::ResponseError => e
87
79
  ::Rails.logger.error "Cloudflare::Rails: Couldn't import #{type} blocks from CloudFlare: #{e.response}"
88
- rescue => e
89
- ::Rails.logger.error "Cloudflare::Rails: Got exception: #{e} for type:#{type}"
80
+ rescue StandardError => e
81
+ ::Rails.logger.error "Cloudflare::Rails: Got exception: #{e} for type: #{type}"
90
82
  end
91
83
  end
84
+ end
85
+ initializer "my_railtie.configure_rails_initialization" do
86
+ Rack::Request::Helpers.prepend CheckTrustedProxies
87
+
88
+ ObjectSpace.each_object(Class).
89
+ select do |c|
90
+ c.included_modules.include?(Rack::Request::Helpers) &&
91
+ !c.included_modules.include?(CheckTrustedProxies)
92
+ end.
93
+ map { |c| c .prepend CheckTrustedProxies }
92
94
 
95
+ ActionDispatch::RemoteIp.prepend RemoteIpProxies
93
96
  end
94
97
  end
95
98
  end
@@ -1,5 +1,5 @@
1
1
  module Cloudflare
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "1.0.0.beta1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudflare-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jonathan schatz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-07 00:00:00.000000000 Z
11
+ date: 2020-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,44 +16,114 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: 2.1.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.10'
26
+ version: 2.1.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 13.0.1
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
- version: '10.0'
40
+ version: 13.0.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rspec_junit_formatter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.4.1
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
- version: '0'
54
+ version: 0.4.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-rails
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 4.0.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 4.0.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: 3.9.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.9.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-airbnb
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.2
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.2
97
+ - !ruby/object:Gem::Dependency
98
+ name: webmock
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.9.1
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.9.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack-attack
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 6.3.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 6.3.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: pry-byebug
57
127
  requirement: !ruby/object:Gem::Requirement
58
128
  requirements:
59
129
  - - ">="
@@ -67,7 +137,7 @@ dependencies:
67
137
  - !ruby/object:Gem::Version
68
138
  version: '0'
69
139
  - !ruby/object:Gem::Dependency
70
- name: webmock
140
+ name: appraisal
71
141
  requirement: !ruby/object:Gem::Requirement
72
142
  requirements:
73
143
  - - ">="
@@ -81,33 +151,39 @@ dependencies:
81
151
  - !ruby/object:Gem::Version
82
152
  version: '0'
83
153
  - !ruby/object:Gem::Dependency
84
- name: rails
154
+ name: httparty
85
155
  requirement: !ruby/object:Gem::Requirement
86
156
  requirements:
87
- - - "~>"
157
+ - - ">="
88
158
  - !ruby/object:Gem::Version
89
- version: '5.0'
159
+ version: '0'
90
160
  type: :runtime
91
161
  prerelease: false
92
162
  version_requirements: !ruby/object:Gem::Requirement
93
163
  requirements:
94
- - - "~>"
164
+ - - ">="
95
165
  - !ruby/object:Gem::Version
96
- version: '5.0'
166
+ version: '0'
97
167
  - !ruby/object:Gem::Dependency
98
- name: httparty
168
+ name: rails
99
169
  requirement: !ruby/object:Gem::Requirement
100
170
  requirements:
101
171
  - - ">="
102
172
  - !ruby/object:Gem::Version
103
- version: '0'
173
+ version: '5.0'
174
+ - - "<"
175
+ - !ruby/object:Gem::Version
176
+ version: 6.1.0
104
177
  type: :runtime
105
178
  prerelease: false
106
179
  version_requirements: !ruby/object:Gem::Requirement
107
180
  requirements:
108
181
  - - ">="
109
182
  - !ruby/object:Gem::Version
110
- version: '0'
183
+ version: '5.0'
184
+ - - "<"
185
+ - !ruby/object:Gem::Version
186
+ version: 6.1.0
111
187
  description: ''
112
188
  email:
113
189
  - modosc@users.noreply.github.com
@@ -115,22 +191,35 @@ executables: []
115
191
  extensions: []
116
192
  extra_rdoc_files: []
117
193
  files:
194
+ - ".circleci/config.yml"
195
+ - ".github/dependabot.yml"
118
196
  - ".gitignore"
119
197
  - ".rspec"
198
+ - ".rubocop.yml"
199
+ - ".rubocop_airbnb.yml"
200
+ - ".rubocop_todo.yml"
120
201
  - ".travis.yml"
202
+ - Appraisals
121
203
  - Gemfile
204
+ - LICENSE
122
205
  - README.md
123
206
  - Rakefile
124
207
  - bin/console
125
208
  - bin/setup
126
209
  - cloudflare-rails.gemspec
210
+ - gemfiles/.bundle/config
211
+ - gemfiles/rails_5.0.gemfile
212
+ - gemfiles/rails_5.1.gemfile
213
+ - gemfiles/rails_5.2.gemfile
214
+ - gemfiles/rails_6.0.gemfile
127
215
  - lib/cloudflare/rails.rb
128
216
  - lib/cloudflare/rails/railtie.rb
129
217
  - lib/cloudflare/rails/version.rb
130
218
  homepage: https://github.com/modosc/cloudflare-rails
131
- licenses: []
219
+ licenses:
220
+ - MIT
132
221
  metadata: {}
133
- post_install_message:
222
+ post_install_message:
134
223
  rdoc_options: []
135
224
  require_paths:
136
225
  - lib
@@ -141,13 +230,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
230
  version: '2.0'
142
231
  required_rubygems_version: !ruby/object:Gem::Requirement
143
232
  requirements:
144
- - - ">="
233
+ - - ">"
145
234
  - !ruby/object:Gem::Version
146
- version: '0'
235
+ version: 1.3.1
147
236
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.4.8
150
- signing_key:
237
+ rubygems_version: 3.1.2
238
+ signing_key:
151
239
  specification_version: 4
152
240
  summary: This gem configures Rails for CloudFlare so that request.ip and request.remote_ip
153
241
  and work correctly.