sniper_links 0.2.0 → 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: ca3113b41e761eff4fd8aeb31503d0bf914029a150abd3b1018ec6ee0f7e2f2d
4
- data.tar.gz: 8567b12c6431f595d4a04da9dd5dbadfc2bc2f3c76d70850979c13f6d1b201f9
3
+ metadata.gz: 7d8d49e81d5f3f891e01b0a4aa85d05c36a0392cc0e889d41b026df85da5e2c1
4
+ data.tar.gz: 816f8f356503e852ec4490e6442f3225fac044f5755e4128b66b2deff3384823
5
5
  SHA512:
6
- metadata.gz: b770935a564133235a690d7dacdaf843e0d0ba4c3d83464fb5ea1d779c160d04d06a387ac0f4847a8b56f2f521b6f44bf304a67e2d65b7efeea04cdcf80d4a78
7
- data.tar.gz: 5990297577be8db4dbe10649cec084ca1968899b623d2d3659f44ed216a33d6504cc9e84a04107ecec00f93c624936495d33b184072744e8d4e392b16f55af0b
6
+ metadata.gz: 75411ea50dc88482681e905ea272c228141eec6a5c85c766535c89a0ddce3f69c3a044da2b602c19c3c0f4d2bfebdba777b11ee64a61e62b01b0c9a5fcf053c9
7
+ data.tar.gz: e322441d0a9a065ea553f890fda5d9212ead1a0c8e8d1a95c9555522cd3c859c72b6761b279ebcb0bf3a4b74c49626ed9592a60925fbd01bef07ad260c7686cf
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ 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
+
10
17
  ## 0.2.0 - 2025-05-29
11
18
 
12
19
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sniper_links (0.2.0)
4
+ sniper_links (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
@@ -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
@@ -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.2.0"
2
+ VERSION = "0.2.1"
3
3
  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.2.0
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-29 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
@@ -49,7 +48,6 @@ metadata:
49
48
  allowed_push_host: https://rubygems.org
50
49
  source_code_uri: https://github.com/zero-one-software/sniper-links
51
50
  changelog_uri: https://github.com/zero-one-software/sniper-links/blob/main/CHANGELOG.md
52
- post_install_message:
53
51
  rdoc_options: []
54
52
  require_paths:
55
53
  - lib
@@ -64,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
62
  - !ruby/object:Gem::Version
65
63
  version: '0'
66
64
  requirements: []
67
- rubygems_version: 3.3.22
68
- signing_key:
65
+ rubygems_version: 4.0.18
69
66
  specification_version: 4
70
67
  summary: Generate sniper links for various email platforms
71
68
  test_files: []