darjeelink 0.14.1 → 0.14.3

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
2
  SHA256:
3
- metadata.gz: 4f5ecabb09d4b9a2e0a12553b98e220e915e6ccbb2ab5d0a7781a68fd8919844
4
- data.tar.gz: 8e2451e81d04c586cb4722dfee5ea17e0d8358eee38204dc005ce20ab6c2589a
3
+ metadata.gz: 14059695406ff350a6f1448de495ea9d3c7ab1b030e73f5338f0445616616c1c
4
+ data.tar.gz: 9a36d7bb72af0d4806e2eedd398504b5737bb8f666bc5181e2b7379358f0c255
5
5
  SHA512:
6
- metadata.gz: 6876cb53f8605e28f2ace40885178e9b68dbee5516c23f2596b456d97c9dc1a303429b8f20499a6a617452db8ce0391bdcce9b7224124109a20764eb1c658908
7
- data.tar.gz: be14a81de6bb7a609acb727a33decd5bf9a63bd7c1ccbd9b41288e4f9162aa518c77485f80c5f3126ba20fb0d7a342631bcccae1848a3e574f6fec9c050afcc4
6
+ metadata.gz: fed691a4f2f77b15de4524059c2b9ce4e39c5ec05210c8aeb425c09aac3787541dd7c64b43d52f495d6f57146e63a225d4682841fdba8963c381feaf0194ce25
7
+ data.tar.gz: 735929fd6da7160a48f983b04a7f1c3de725dc80982fc4dd77d92266922ddb672fd46cde6f4752405e0dd361c90cdb1c00760365e51d466bcba9b97fe5a0683e
@@ -13,7 +13,9 @@ module Darjeelink
13
13
  def check_ip_whitelist
14
14
  return unless Rails.env.production?
15
15
  return unless Rails.application.config.permitted_ips
16
- return if Rails.application.config.permitted_ips.split(',').include? request.ip
16
+ ip_to_verify = Rails.application.client_ip_header ? request.headers[Rails.application.client_ip_header ] : request.ip
17
+
18
+ return if Rails.application.config.permitted_ips.split(',').include? ip_to_verify
17
19
 
18
20
  render plain: 'Access Denied', status: :forbidden
19
21
  end
@@ -4,30 +4,33 @@
4
4
  Darjeelink.configure do |config|
5
5
  config.domain = ENV['DOMAIN']
6
6
 
7
+ # keep in alphabetical order, execpt for 'other' which should be last
7
8
  config.source_mediums = {
9
+ chatbot: 'Chatbot',
10
+ 'digitalorganiser-share': 'Digital Organiser',
8
11
  'email-blast': 'Email blast',
9
12
  'email-thankyou': 'Email - Thank you',
10
- 'facebook-post': 'Facebook post',
11
13
  'facebook-advert': 'Facebook advert',
12
- 'twitter-tweet': 'Twitter tweet',
13
- 'twitter-advert': 'Twitter advert',
14
- 'sms-blast': 'SMS Blast',
14
+ 'facebook-post': 'Facebook post',
15
15
  'google-advert': 'Google advert',
16
- 'instagram-advert': 'Instagram Advert',
17
- 'instagram-post': 'Instagram Post',
18
- 'instagram-story': 'Instagram Story',
19
- 'instagram-reel': 'Instagram Reel',
20
- 'linkedin-post': 'LinkedIn Post',
21
- 'whatsapp-share': 'WhatsApp Share',
22
- chatbot: 'Chatbot',
23
- template: 'Template',
24
- other: 'Other',
16
+ 'google-display': 'Google display',
17
+ 'google-search': 'Google search',
18
+ 'instagram-advert': 'Instagram advert',
19
+ 'instagram-post': 'Instagram post',
20
+ 'instagram-reel': 'Instagram reel',
21
+ 'instagram-story': 'Instagram story',
22
+ 'linkedin-post': 'LinkedIn post',
23
+ 'sms-blast': 'SMS blast',
24
+ 'snapchat-advert': 'Snapchat advert',
25
25
  spotify: 'Spotify',
26
+ template: 'Template',
27
+ 'tiktok-advert': 'TikTok advert',
28
+ 'tiktok-post': 'TikTok post',
29
+ 'twitter-advert': 'Twitter advert',
30
+ 'twitter-tweet': 'Twitter tweet',
31
+ 'whatsapp-share': 'WhatsApp share',
26
32
  youtube: 'Youtube',
27
- 'google-search': 'Google search',
28
- 'google-display': 'Google display',
29
- 'snapchat-advert': 'Snapchat Advert',
30
- 'digitalorganiser-share': 'Digital Organiser'
33
+ other: 'Other'
31
34
  }
32
35
 
33
36
  config.auth_domain = ENV['AUTH_DOMAIN']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Darjeelink
4
- VERSION = '0.14.1'
4
+ VERSION = '0.14.3'
5
5
  end
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.1
4
+ version: 0.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Hulme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  - !ruby/object:Gem::Version
261
261
  version: '0'
262
262
  requirements: []
263
- rubygems_version: 3.3.7
263
+ rubygems_version: 3.3.21
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: URL Shortener