searchlink 2.3.63 → 2.3.64

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: 4fe46ed7fe6c7688ce62b32035592b22ada5ccfd918c39cb4efde42d40c328a4
4
- data.tar.gz: 14c5b53c4b88f6fea15f729781fc8fb7bb21ecabc211e0d49fd7a3b2078d36b0
3
+ metadata.gz: c19b349c222ba84795f47cc03fc5039efb3ea3f0c7ae305ad1e125c2763d33e3
4
+ data.tar.gz: 7be23e30bcee8c3dd2dbffe05dc06c345ffa7d65f64b20cf10e33b6a57f1b6fe
5
5
  SHA512:
6
- metadata.gz: 560cbfc23c8ebcb47ccd67d896e1168ce9acb9d58adccde348df1bd11cea3e8d5e9990d2565088a2367239e4b3799bd50effd856fb41836d8007d4ae3f42e4ea
7
- data.tar.gz: debe843ab12a7abd1075f36456d789f38f7cb402af6bb717c7c53ffb59205626e3a925aa515a17dd40c0fb34b9e2950203fc368a33d28e4a4fcc6857a10a7446
6
+ metadata.gz: e27d21134df20d7b7721375899a62fedcd0fa0f9ac7378a2c3bf8e54dbd1f302bdc899b4d1edc89e25d2652229a980639ffe8a906e687848fbbdd60ca5129771
7
+ data.tar.gz: fd1f793c0031421d5525c78ae7b173119eb45b203ca7966db09e3991d420ab078f81a92c51280cd369a1fe5ee66a75c77df2bb4f99c9c1eeb73fc2e5c65ccbf8
@@ -107,6 +107,7 @@ module Curl
107
107
  ## @param tag The tag
108
108
  ## @param source [Boolean] Return full tag instead of contents
109
109
  ##
110
+ ## @return [Array] array of tag matches/contents
110
111
  def extract_tag_contents(tag, source: false)
111
112
  return @body.scan(%r{<#{tag}.*?>(?:.*?</#{tag}>)?}) if source
112
113
 
@@ -452,13 +453,11 @@ module Curl
452
453
  end
453
454
 
454
455
  # look for a charset in a content-encoding header
455
- if content_type
456
- encoding ||= content_type[/charset=["']?(.*?)($|["';\s])/i, 1]
457
- end
456
+ encoding ||= content_type[/charset=["']?(.*?)($|["';\s])/i, 1] if content_type
458
457
 
459
458
  # look for a charset in a meta tag in the first 1024 bytes
460
459
  unless encoding
461
- data = body[0..1023].gsub(/<!--.*?(-->|\Z)/m, "")
460
+ data = body[0..1023].gsub(/<!--.*?(-->|\Z)/m, '')
462
461
  data.scan(/<meta.*?>/im).each do |meta|
463
462
  encoding ||= meta[/charset=["']?([^>]*?)($|["'\s>])/im, 1]
464
463
  end
@@ -1,11 +1,11 @@
1
1
  module SL
2
- VERSION = '2.3.63'
2
+ VERSION = '2.3.64'
3
3
  end
4
4
 
5
5
  module SL
6
6
  class << self
7
7
  def version_check
8
- cachefile = File.expand_path('~/.searchlink_update_check')
8
+ cachefile = File.expand_path('~/.config/cache/update.txt')
9
9
  if File.exist?(cachefile)
10
10
  last_check, latest_tag = IO.read(cachefile).strip.split(/\|/)
11
11
  last_time = Time.parse(last_check)
@@ -22,12 +22,12 @@ module SL
22
22
  latest_tag ||= SL::VERSION
23
23
  latest = SemVer.new(latest_tag)
24
24
  current = SemVer.new(SL::VERSION)
25
-
25
+
26
26
  File.open(cachefile, 'w') { |f| f.puts("#{last_time.strftime('%c')}|#{latest.to_s}") }
27
27
 
28
- return "SearchLink v#{current.to_s}, #{latest.to_s} available. Run 'update' to download." if latest_tag && current.older_than(latest)
28
+ return "SearchLink v#{current}, #{latest} available. Run 'update' to download." if latest_tag && current.older_than(latest)
29
29
 
30
- "SearchLink v#{current.to_s}"
30
+ "SearchLink v#{current}"
31
31
  end
32
32
 
33
33
  # Check for a newer version than local copy using GitHub release tag
@@ -63,6 +63,11 @@ module SL
63
63
  end
64
64
 
65
65
  def update_searchlink
66
+ if %x{uname}.strip !~ /Darwin/
67
+ add_output('Auto updating only available on macOS')
68
+ return
69
+ end
70
+
66
71
  new_version = SL.new_version?
67
72
  if new_version
68
73
  folder = File.expand_path('~/Downloads')
data/lib/tokens.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Secrets
2
- GH_AUTH_TOKEN = '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'
2
+ GH_AUTH_TOKEN = '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'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchlink
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.63
4
+ version: 2.3.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-29 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler