omniauth-klaviyo 0.1.0 → 0.1.1

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: ebac3b6b293d03b3120879723a33c560d0a29729019e1bb1145a1e63f9a49db3
4
- data.tar.gz: dd1130215887d307868f11b137b9f8b462e8837cda7fc261ca80b6b8fa568846
3
+ metadata.gz: 49a5680e3b676eded2807eccdfdf0ecc7b7e0689977bc30f35da549d75ade7c8
4
+ data.tar.gz: 25f57d4ed39c0d934b0b9dcec87580ede98c31872fc67c6180cdc1ca62cc4235
5
5
  SHA512:
6
- metadata.gz: 90abf90330f1096bd302e283dab73170b993d4187d1a465ddb9a022975e126eec5eb4563415336a77f91e3163430ecd26e16e45c3916fce133094a222ffa4aa0
7
- data.tar.gz: eb33fea59c301d62c53b43c6f07fca865d14bade508bfa4e6d16569ccf95ba9a9768c346c43b158fe5a62c013b82470326e8fd25210d9c2e20ffe35852efa5cf
6
+ metadata.gz: 79640e02f83b7320711e120d7e372f71c8b3befb7cd0b4a2f05c71f4f22c102431d17a85a76e0accb11792f04a8bd5b706eea2ef36b2c816bb09b78bdee99199
7
+ data.tar.gz: d992f42e81b229ceb4025e7735a6ad4a1551be8c5addd0f102676baff9d5c84e4b0ce222ddc4a158e36aedd32dfc9f111764debd2b4b949596524cfe366c9cb1
data/.rubocop.yml CHANGED
@@ -6,3 +6,6 @@ Style/StringLiterals:
6
6
 
7
7
  Style/StringLiteralsInInterpolation:
8
8
  EnforcedStyle: double_quotes
9
+
10
+ Naming/FileName:
11
+ Enabled: false
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Klaviyo
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "omniauth/klaviyo/version"
2
4
  require "omniauth/strategies/klaviyo"
@@ -1,31 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'omniauth-oauth2'
3
+ require "omniauth-oauth2"
4
4
 
5
5
  module OmniAuth
6
6
  module Strategies
7
+ # OmniAuth strategy for Klaviyo OAuth2 authentication.
8
+ # This class handles the authorization and callback process for Klaviyo.
7
9
  class Klaviyo < OmniAuth::Strategies::OAuth2
10
+ DEFAULT_REVISION = "2024-10-15"
8
11
 
9
- DEFAULT_REVISION = '2024-10-15'
10
-
11
- option :name, 'klaviyo'
12
+ option :name, "klaviyo"
12
13
 
13
14
  option :pkce, true
14
15
 
15
16
  option :client_options, {
16
- site: 'https://a.klaviyo.com',
17
- authorize_url: 'https://www.klaviyo.com/oauth/authorize',
18
- token_url: 'https://a.klaviyo.com/oauth/token'
17
+ site: "https://a.klaviyo.com",
18
+ authorize_url: "https://www.klaviyo.com/oauth/authorize",
19
+ token_url: "https://a.klaviyo.com/oauth/token"
19
20
  }
20
21
 
21
22
  def callback_url
22
23
  full_host + script_name + callback_path
23
24
  end
24
25
 
25
- uid { raw_info['id'] }
26
+ uid { raw_info["id"] }
26
27
 
27
28
  def raw_info
28
- response = access_token.get('/api/accounts', :headers => { 'revision' => DEFAULT_REVISION }).parsed
29
+ response = access_token.get("/api/accounts", headers: { "revision" => DEFAULT_REVISION }).parsed
29
30
  @raw_info ||= response.dig("data", 0) || {}
30
31
  end
31
32
  end
@@ -1 +1,3 @@
1
- require 'omniauth/klaviyo'
1
+ # frozen_string_literal: true
2
+
3
+ require "omniauth/klaviyo"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-klaviyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Morad Boukhari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-22 00:00:00.000000000 Z
11
+ date: 2024-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2