salestation 5.2.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/salestation/web/ip_address.rb +15 -0
- data/lib/salestation/web.rb +1 -0
- data/salestation.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3978171d3a2b78287dd0f3b86049f8253d1f66199545002701b1f4bd46295a64
|
4
|
+
data.tar.gz: 469b3e6ddfe9c1b399eda6f63827b7b674142f6a67ac16b03ad0f8ddb5e5e88a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a5140a9348d79cfde31b44dd7c8d24bbea0135d2d8371272a1ed86db6690be64f3248be27f1a845d3d6f64ab5b8c59809534cae6d68af6223c3d6f0edafcf11
|
7
|
+
data.tar.gz: 14ad1ff09a48d7d6c7be4c7bf5781cf922990dd43dac6f6df46aaa78939ed94875bcdeb9544ec85cac82252453975cc1ad5457bf644aa5ef6fc54e484fc39dec
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Salestation
|
4
|
+
class Web < Module
|
5
|
+
module IPAddress
|
6
|
+
def self.extract(request)
|
7
|
+
if request['HTTP_X_FORWARDED_FOR'].nil?
|
8
|
+
request['REMOTE_ADDR']
|
9
|
+
else
|
10
|
+
request['HTTP_X_FORWARDED_FOR'].split(',').first
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/salestation/web.rb
CHANGED
data/salestation.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "salestation"
|
7
|
-
spec.version = "5.
|
7
|
+
spec.version = "5.3.0"
|
8
8
|
spec.authors = ["Glia TechMovers"]
|
9
9
|
spec.email = ["techmovers@glia.com"]
|
10
10
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency "rspec", "~> 3.0"
|
25
25
|
spec.add_development_dependency "pry", "~> 0.10.4"
|
26
26
|
spec.add_development_dependency "glia-errors", "~> 0.11.4"
|
27
|
-
spec.add_development_dependency "dry-validation", "~> 1.7
|
27
|
+
spec.add_development_dependency "dry-validation", "~> 1.7"
|
28
28
|
|
29
29
|
spec.add_dependency 'deterministic'
|
30
30
|
spec.add_dependency 'dry-struct'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salestation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glia TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08
|
11
|
+
date: 2022-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.7
|
89
|
+
version: '1.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.7
|
96
|
+
version: '1.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: deterministic
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -195,6 +195,7 @@ files:
|
|
195
195
|
- lib/salestation/web/input_validator.rb
|
196
196
|
- lib/salestation/web/input_validators/accept_header.rb
|
197
197
|
- lib/salestation/web/input_validators/content_type_header.rb
|
198
|
+
- lib/salestation/web/ip_address.rb
|
198
199
|
- lib/salestation/web/request_logger.rb
|
199
200
|
- lib/salestation/web/responses.rb
|
200
201
|
- lib/salestation/web/statsd_middleware.rb
|