darjeelink 0.14.5 → 0.14.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/app/controllers/darjeelink/application_controller.rb +11 -9
- data/config/initializers/darjeelink.rb +1 -0
- data/lib/darjeelink/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe18ade1a67f8f92f09f7e95ea71d8bb27bfe1ac9604be8dd4e62b0156b987b7
|
4
|
+
data.tar.gz: 616617118a3317479035593d85daeed19ad7b538ca27a54cd5a1861d2e80f631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bebc83488bca28c7291c095d24b0ae3cacddf8a07e28fb2db332e99ed4dcc3b0236ff8b63c8dc70289af2e0203bd6fb59d004b8d463d8d2b2c47f8a04e385376
|
7
|
+
data.tar.gz: '088614333aa05239f7c819b5acbad2115fd6728a4245b5228c69e3cccc617f4ce541a1d898113ffa7c199847fa88ccb899128bbd93f849c9beae904ddce0a047'
|
data/README.md
CHANGED
@@ -120,9 +120,11 @@ Change the database url to be different to the development one i.e. `postgres://
|
|
120
120
|
## Releasing
|
121
121
|
Darjeelink follows [Semantic Versioning](https://semver.org)
|
122
122
|
|
123
|
+
NB: Before releasing, ensure that the gem is working as expected by running the tests. If possible perform some manual testing via a webserver.
|
124
|
+
|
123
125
|
Once all necessary changes have made it in to master and you are ready to do a release you need to do these steps.
|
124
126
|
|
125
|
-
Note that if you are running in a vagrant VM, most of these steps can be done from
|
127
|
+
Note that if you are running in a vagrant VM or `docker-shell.sh` constainer, most of these steps can be done from the terminal session.
|
126
128
|
|
127
129
|
- Update `lib/darjeelink/version.rb` to the new version
|
128
130
|
- Run `bundle install` to pick up the change in Gemfile.lock
|
@@ -9,25 +9,27 @@ module Darjeelink
|
|
9
9
|
|
10
10
|
private
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
request.ip
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
12
|
+
# Disabling these rubocop rules. This is a simple function and tested in production sinve version 0.14.4.
|
13
|
+
#
|
14
|
+
# rubocop:disable Metrics/AbcSize
|
15
|
+
# rubocop:disable Layout/LineLength
|
20
16
|
# Check user IP address against whitelist from ENV
|
21
17
|
def check_ip_whitelist
|
22
18
|
return unless Rails.env.production?
|
23
19
|
return unless Rails.application.config.permitted_ips
|
24
20
|
|
25
|
-
ip_to_verify =
|
21
|
+
ip_to_verify = if Rails.application.config.respond_to?(:client_ip_header) && Rails.application.config.client_ip_header.present?
|
22
|
+
request.headers[Rails.application.config.client_ip_header]
|
23
|
+
else
|
24
|
+
request.ip
|
25
|
+
end
|
26
26
|
|
27
27
|
return if Rails.application.config.permitted_ips.split(',').include? ip_to_verify
|
28
28
|
|
29
29
|
render plain: 'Access Denied', status: :forbidden
|
30
30
|
end
|
31
|
+
# rubocop:enable Metrics/AbcSize
|
32
|
+
# rubocop:enable Layout/LineLength
|
31
33
|
|
32
34
|
# Authenticate against Google OAuth
|
33
35
|
def authenticate
|
data/lib/darjeelink/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darjeelink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Hulme
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|