sniper_links 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3f5c9fbc1542fc776dc6084b63a5ea0702745f13f1a1025cdaffd5a679901c9
4
- data.tar.gz: 8ee4b279afc745bbeeb2d7da7d8bfc4d27f96f6e280db791ddee9cc531eb71a9
3
+ metadata.gz: 7d8d49e81d5f3f891e01b0a4aa85d05c36a0392cc0e889d41b026df85da5e2c1
4
+ data.tar.gz: 816f8f356503e852ec4490e6442f3225fac044f5755e4128b66b2deff3384823
5
5
  SHA512:
6
- metadata.gz: 37ede0163e2104888cd30389474cc7b87c2c4d9039355f3b54c433c63c8898c5653e98f42a7279c0d7fab48a340f44ad05cf411b94047e549224496582fd8bcb
7
- data.tar.gz: 6391562cab9a13990df5901c1bce17e43ee9adcb8793f61708b821fe1a9687daa34e2df581a1d68e63440d60d0f7a5880c75867b3ecb431e45e8636eefd8cd69
6
+ metadata.gz: 75411ea50dc88482681e905ea272c228141eec6a5c85c766535c89a0ddce3f69c3a044da2b602c19c3c0f4d2bfebdba777b11ee64a61e62b01b0c9a5fcf053c9
7
+ data.tar.gz: e322441d0a9a065ea553f890fda5d9212ead1a0c8e8d1a95c9555522cd3c859c72b6761b279ebcb0bf3a4b74c49626ed9592a60925fbd01bef07ad260c7686cf
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.2.1 - 2026-10-02
11
+
12
+ ### Fixed
13
+
14
+ * GMail sniper links now select the recipient's account with `?authuser=<email>` instead of always opening the first signed-in account
15
+ * Outlook sniper links now pass the recipient's email as `login_hint` instead of the sender's address
16
+
17
+ ## 0.2.0 - 2025-05-29
18
+
19
+ ### Added
20
+
21
+ * Support for hey.com (browser link only)
22
+ * Support for aol.com (browser link only)
23
+ * Support for mail.ru (browser link only)
24
+
10
25
  ## 0.1.1 - 2025-05-23
11
26
 
12
27
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sniper_links (0.1.0)
4
+ sniper_links (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -41,4 +41,4 @@ DEPENDENCIES
41
41
  sniper_links!
42
42
 
43
43
  BUNDLED WITH
44
- 2.1.4
44
+ 2.4.5
data/README.md CHANGED
@@ -44,7 +44,7 @@ snipe.sniper_link_strategy # => SniperLinks::Strategies::GMail
44
44
  snipe.sniper_link(from) # => URI
45
45
 
46
46
  puts snipe.sniper_link.to_s
47
- # => https://mail.google.com/mail/u/0/#search/from%3A%28us%40our.domain%29%2Bin%3Aanywhere%2Bnewer_than%3A1h
47
+ # => https://mail.google.com/mail/?authuser=marlon.rando%40gmail.com#search/from%3A%28us%40our.domain%29+in%3Aanywhere+newer_than%3A1h
48
48
  ```
49
49
 
50
50
  ### Using a strategy directly
@@ -73,18 +73,21 @@ We support the following email service provider platforms:
73
73
  * Yahoo - `*@yahoo.*` or `*@myyahoo.*`
74
74
  * ProtonMail - `*@protonmail.com`, `*@proton.me`, `*@protonmail.ch`, or `*@pm.me`
75
75
  * iCloud - `*@icloud.com`, `*@me.com`, or `*@mac.com`
76
+ * Hey.com - `*@hey.com`
77
+ * AOL - `*@aol.com`
78
+ * Mail.ru - `*@mail.ru`
76
79
 
77
80
  ### Sniper link strategy functionality
78
81
 
79
82
  Each email service provider has its own sniper link strategy. The following table shows how much functionality is supported by each provider.
80
83
 
81
- | | Gmail | Outlook | Yahoo | Protonmail | iCloud |
82
- |--------------|-------|---------|-------|------------|--------|
83
- | Link | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
84
- | Account | ✔️ | ✔️ | ✖️ | ✖️️ | ✖️ |
85
- | From filter | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ |
86
- | Spam piercer | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ |
87
- | Time filter | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ |
84
+ | | Gmail | Outlook | Yahoo | Protonmail | iCloud | Hey.com | AOL | Mail.ru |
85
+ |--------------|-------|---------|-------|------------|--------|---------|---------|-------|
86
+ | Link | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
87
+ | Account | ✔️ | ✔️ | ✖️ | ✖️️ | ✖️ | ✖️ | ✖️ | ✖️ |
88
+ | From filter | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ | ✖️ | ✔️ | ✔️ |
89
+ | Spam piercer | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ | ✔️ | ✖️ | ✖️ |
90
+ | Time filter | ✔️ | ✖️️️️ | ✔️ | ✔️ | ✖️ | ✖️ | ✔️ | ✖️ |
88
91
 
89
92
  ## Development
90
93
 
@@ -96,7 +99,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/zero-o
96
99
 
97
100
  ### Feature wishlist
98
101
 
99
- * Add support for more email service providers, like Hey.com, Fastmail, etc.
102
+ * Add support for more email service providers, like Fastmail, etc.
100
103
  * Add support for selecting a strategy based on the email address domain's MX records.
101
104
 
102
105
  ## License
@@ -0,0 +1,21 @@
1
+ class SniperLinks
2
+ module Strategies
3
+ class AOLDotCom
4
+ def initialize(email)
5
+ @email = email
6
+ end
7
+
8
+ def sniper_link(from)
9
+ @from = from
10
+
11
+ URI("https://mail.aol.com/d/search/keyword=from:#{from}")
12
+ end
13
+
14
+ attr_reader :email, :from
15
+ end
16
+ end
17
+ end
18
+
19
+ __END__
20
+
21
+ https://mail.aol.com/d/search/keyword=from:me@you.com
@@ -10,7 +10,8 @@ class SniperLinks
10
10
 
11
11
  sniper_filter = encode(filter)
12
12
 
13
- URI("https://mail.google.com/mail/u/0/#search/#{sniper_filter}")
13
+ # Gmail rejects /mail/u/<email>/ with a search fragment ("Temporary Error") since April 2026
14
+ URI("https://mail.google.com/mail/?authuser=#{encode(email)}#search/#{sniper_filter}")
14
15
  end
15
16
 
16
17
  private
@@ -31,4 +32,4 @@ end
31
32
 
32
33
  __END__
33
34
 
34
- https://mail.google.com/mail/u/0/#search/from%3A(user%40some.domain)+in%3Aanywhere+newer_than%3A1h
35
+ https://mail.google.com/mail/?authuser=user%40gmail.com#search/from%3A(user%40some.domain)+in%3Aanywhere+newer_than%3A1h
@@ -0,0 +1,19 @@
1
+ class SniperLinks
2
+ module Strategies
3
+ class HeyDotCom
4
+ def initialize(email)
5
+ @email = email
6
+ end
7
+
8
+ def sniper_link(_from = nil)
9
+ URI("https://app.hey.com/topics/everything")
10
+ end
11
+
12
+ attr_reader :email
13
+ end
14
+ end
15
+ end
16
+
17
+ __END__
18
+
19
+ https://app.hey.com/topics/everything
@@ -0,0 +1,21 @@
1
+ class SniperLinks
2
+ module Strategies
3
+ class MailDotRu
4
+ def initialize(email)
5
+ @email = email
6
+ end
7
+
8
+ def sniper_link(from)
9
+ @from = from
10
+
11
+ URI("https://e.mail.ru/search?q_from=#{from}")
12
+ end
13
+
14
+ attr_reader :email, :from
15
+ end
16
+ end
17
+ end
18
+
19
+ __END__
20
+
21
+ https://e.mail.ru/search/?q_from=me@you.com
@@ -5,10 +5,8 @@ class SniperLinks
5
5
  @email = email
6
6
  end
7
7
 
8
- def sniper_link(from)
9
- @from = from
10
-
11
- URI("https://outlook.live.com/mail/?login_hint=#{encode(from)}")
8
+ def sniper_link(_from = nil)
9
+ URI("https://outlook.live.com/mail/?login_hint=#{encode(email)}")
12
10
  end
13
11
 
14
12
  private
@@ -17,11 +15,11 @@ class SniperLinks
17
15
  URI.encode_www_form_component(str)
18
16
  end
19
17
 
20
- attr_reader :email, :from
18
+ attr_reader :email
21
19
  end
22
20
  end
23
21
  end
24
22
 
25
23
  __END__
26
24
 
27
- https://outlook.live.com/mail/?login_hint=encoded_email}
25
+ https://outlook.live.com/mail/?login_hint=user%40outlook.com
@@ -1,3 +1,3 @@
1
1
  class SniperLinks
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.1"
3
3
  end
data/lib/sniper_links.rb CHANGED
@@ -2,8 +2,11 @@ require "sniper_links/version"
2
2
 
3
3
  require "uri"
4
4
 
5
+ require "sniper_links/strategies/aol_dot_com"
5
6
  require "sniper_links/strategies/apple"
6
7
  require "sniper_links/strategies/gmail"
8
+ require "sniper_links/strategies/hey_dot_com"
9
+ require "sniper_links/strategies/mail_dot_ru"
7
10
  require "sniper_links/strategies/outlook"
8
11
  require "sniper_links/strategies/proton"
9
12
  require "sniper_links/strategies/yahoo"
@@ -43,6 +46,12 @@ class SniperLinks
43
46
  SniperLinks::Strategies::Proton.new(email)
44
47
  when /(me|mac|icloud)\.com\z/
45
48
  SniperLinks::Strategies::Apple.new(email)
49
+ when /hey\.com\z/
50
+ SniperLinks::Strategies::HeyDotCom.new(email)
51
+ when /aol\.com\z/
52
+ SniperLinks::Strategies::AOLDotCom.new(email)
53
+ when /mail\.ru\z/
54
+ SniperLinks::Strategies::MailDotRu.new(email)
46
55
  else
47
56
  raise Error, "Unsupported email domain"
48
57
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sniper_links
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Fortuna
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-05-23 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: Increase your email open rates with sniper links. This gem generates
14
13
  sniper links for various email platforms, increasing the chance that an email will
@@ -31,8 +30,11 @@ files:
31
30
  - bin/console
32
31
  - bin/setup
33
32
  - lib/sniper_links.rb
33
+ - lib/sniper_links/strategies/aol_dot_com.rb
34
34
  - lib/sniper_links/strategies/apple.rb
35
35
  - lib/sniper_links/strategies/gmail.rb
36
+ - lib/sniper_links/strategies/hey_dot_com.rb
37
+ - lib/sniper_links/strategies/mail_dot_ru.rb
36
38
  - lib/sniper_links/strategies/outlook.rb
37
39
  - lib/sniper_links/strategies/proton.rb
38
40
  - lib/sniper_links/strategies/yahoo.rb
@@ -46,7 +48,6 @@ metadata:
46
48
  allowed_push_host: https://rubygems.org
47
49
  source_code_uri: https://github.com/zero-one-software/sniper-links
48
50
  changelog_uri: https://github.com/zero-one-software/sniper-links/blob/main/CHANGELOG.md
49
- post_install_message:
50
51
  rdoc_options: []
51
52
  require_paths:
52
53
  - lib
@@ -61,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
62
  - !ruby/object:Gem::Version
62
63
  version: '0'
63
64
  requirements: []
64
- rubygems_version: 3.1.6
65
- signing_key:
65
+ rubygems_version: 4.0.18
66
66
  specification_version: 4
67
67
  summary: Generate sniper links for various email platforms
68
68
  test_files: []