directlink 0.0.11.0 → 0.0.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/directlink.gemspec +4 -4
  3. data/lib/directlink.rb +1 -1
  4. metadata +4 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30657b1850442ca6f1267344dc356cdd3e0e55e8
4
- data.tar.gz: b8dc86a2fb80cadb1583207934840fc28fdb6177
3
+ metadata.gz: e0cadc1fae7bcad2314224fa404ca05dff9988e6
4
+ data.tar.gz: e5c4c32ac6e03efa4633b9dc323c8a44d8f52c4e
5
5
  SHA512:
6
- metadata.gz: d11e9b0f07127be8b711495f1496e527bd979c015a0376512e916c5f92fda19fcfd617d67584c768c1c223ebd41cb57c28bbf258b39659cdd12d5db4653f4120
7
- data.tar.gz: 8d6beddd649ec2f1316009abe70c9224de3a34d8234443a040d492066b792b79d9f3fe3771b9906949982f1f5d12ff00a4dbebd9468bda2db63941e74e34f663
6
+ metadata.gz: c96f80c6d75a232d282112cc2aad8a085e7c324df5bce7951cde142a11ec94346a53ce2a1f34ad073215307220540402ea64442ea9f55ee9ad2910aa9eac349e
7
+ data.tar.gz: 00f67755c1df4fab9aa7f2819b7b633f3d2462e3b55b767f38d5d3e458f20ce50feb45e50735d7fd06900d97bb2201a80425aa3852a82c569cebfe40fcedd6ca
data/directlink.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "directlink"
3
- spec.version = "0.0.11.0"
3
+ spec.version = "0.0.11.1"
4
4
  spec.summary = "obtains from any kind of hyperlink a link to an image, its format and resolution"
5
5
 
6
6
  spec.author = "Victor Maslov aka Nakilon"
@@ -12,9 +12,9 @@ Gem::Specification.new do |spec|
12
12
  spec.required_ruby_version = ">=2.3" # because <<~ heredocs in tests
13
13
 
14
14
  spec.add_dependency "fastimage", "~>2.2.0"
15
- spec.add_dependency "nokogiri", "<1.11" # 1.11 requires ruby 2.5
16
- spec.add_dependency "nethttputils", "~>0.4.1.0"
17
- spec.add_dependency "reddit_bot", "~>1.9.0"
15
+ spec.add_dependency "nokogiri", "<1.11" # 1.11 requires ruby 2.5 # TODO: switch to Oga?
16
+ # spec.add_dependency "nethttputils", "~>0.4.2.0"
17
+ spec.add_dependency "reddit_bot", "~>1.10.0"
18
18
  spec.add_dependency "kramdown"
19
19
  spec.add_dependency "addressable"
20
20
  spec.add_development_dependency "minitest-around"
data/lib/directlink.rb CHANGED
@@ -256,7 +256,7 @@ module DirectLink
256
256
  end.compact]
257
257
  end
258
258
  return [true, "#{"https://www.reddit.com" if /\A\/r\/[0-9a-zA-Z_]+\/comments\/[0-9a-z]{5,6}\// =~ data["url"]}#{data["url"]}"] if data["crosspost_parent"]
259
- return [true, data["url"]] unless data["is_self"]
259
+ return [true, CGI.unescapeHTML(data["url"])] unless data["is_self"]
260
260
  raise ErrorAssert.new "our knowledge about Reddit API seems to be outdated" if data["url"] != "https://www.reddit.com" + data["permalink"]
261
261
  return [false, data["selftext"]]
262
262
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directlink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11.0
4
+ version: 0.0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-29 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastimage
@@ -38,34 +38,20 @@ dependencies:
38
38
  - - "<"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.11'
41
- - !ruby/object:Gem::Dependency
42
- name: nethttputils
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.4.1.0
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.4.1.0
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: reddit_bot
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 1.9.0
47
+ version: 1.10.0
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 1.9.0
54
+ version: 1.10.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: kramdown
71
57
  requirement: !ruby/object:Gem::Requirement