onebox 1.9.19 → 1.9.20

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: 3d7e47ae4e64c9ed8cf658a4765a1fdcdeaf4917d9c6f7de7e72858897d7dd47
4
- data.tar.gz: 33c7e9af8b8e5e68674c477cf1e7d3ed6ce0ac3642df3246769a3a0d16a65f78
3
+ metadata.gz: 419d39dcf42db192d7a4ad9b9433d9116b8681a1fe0dc26f7769e483ab96e70a
4
+ data.tar.gz: c982a68192d84f2f68baeb470554b7153ccbfe7d9536e92080031f1ad9d60bb6
5
5
  SHA512:
6
- metadata.gz: fd99e361d21d1604b5de74d382a949a3540ca49c504dbaa2531653d99a78d1662e04159bb0cd85f2941a7376a0c42c8c5eb56119c360ab59661013d7cd8288cb
7
- data.tar.gz: 3f11c1f03fbc9c305562db03ac8d2061b2f5e1c0f691e8a73f4b50f67a1c0f6226683b3c5d1d78d3918c40dc38fc70d793aa18aa60f145bb3c223f82c1d1e029
6
+ metadata.gz: 3e9be16ec4a7830baae8ed2169a4f18ab2c73efd46035c408c7ce13eddb628dd0e47bcd04e4f883421f0b2629387bb9db8b801ac8e36bcb5374292f20ebcb45e
7
+ data.tar.gz: adf223e50bfa42f55aeb7f15696dc2ccd2f9616bacb1d2e3b022c4a7dc4f0e66d193cf1527d86f38c2eb0ea723dfee4fd0aae01281935b20511c2da8a01b3d5a
data/.gitignore CHANGED
@@ -17,5 +17,6 @@ test/version_tmp
17
17
  tmp
18
18
  *.swp
19
19
  .DS_Store
20
+ Gemfile.lock
20
21
 
21
22
  .rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
@@ -169,8 +169,9 @@ module Onebox
169
169
  http = Net::HTTP.start(uri.host, uri.port,
170
170
  use_ssl: uri.scheme == 'https', open_timeout: timeout, read_timeout: timeout)
171
171
  response = http.head(uri.path)
172
- raise "unexpected response code #{response.code}" unless %w(301 302).include?(response.code)
173
- @url = response["Location"]
172
+
173
+ raise "unexpected response code #{response.code}" unless %w(200 301 302).include?(response.code)
174
+ @url = response.code == "200" ? uri.to_s : response["Location"]
174
175
  ensure
175
176
  http.finish rescue nil
176
177
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "1.9.19"
4
+ VERSION = "1.9.20"
5
5
  end
data/onebox.gemspec CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency 'guard-rspec', '~> 4.2.8'
39
39
  spec.add_development_dependency 'sinatra', '~> 1.4'
40
40
  spec.add_development_dependency 'sinatra-contrib', '~> 1.4'
41
- spec.add_development_dependency 'haml', '~> 4.0'
41
+ spec.add_development_dependency 'haml', '~> 5.1'
42
42
  spec.add_development_dependency 'listen', '~> 2.10.0'
43
43
 
44
44
  spec.required_ruby_version = '>=2.4.0'
@@ -1,5 +1,7 @@
1
1
  <h3><a href='{{link}}' target='_blank'>{{title}}</a></h3>
2
2
 
3
- <img src="{{image}}" />
3
+ {{#image}}
4
+ <div class="xkcd-image"><img src="{{image}}"/></div>
5
+ {{/image}}
4
6
 
5
7
  <p>{{description}}</p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.19
4
+ version: 1.9.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-10-15 00:00:00.000000000 Z
13
+ date: 2019-10-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: multi_json
@@ -256,14 +256,14 @@ dependencies:
256
256
  requirements:
257
257
  - - "~>"
258
258
  - !ruby/object:Gem::Version
259
- version: '4.0'
259
+ version: '5.1'
260
260
  type: :development
261
261
  prerelease: false
262
262
  version_requirements: !ruby/object:Gem::Requirement
263
263
  requirements:
264
264
  - - "~>"
265
265
  - !ruby/object:Gem::Version
266
- version: '4.0'
266
+ version: '5.1'
267
267
  - !ruby/object:Gem::Dependency
268
268
  name: listen
269
269
  requirement: !ruby/object:Gem::Requirement
@@ -294,7 +294,6 @@ files:
294
294
  - ".travis.yml"
295
295
  - CHANGELOG.md
296
296
  - Gemfile
297
- - Gemfile.lock
298
297
  - Guardfile
299
298
  - LICENSE.txt
300
299
  - README.md
data/Gemfile.lock DELETED
@@ -1,154 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- onebox (1.9.19)
5
- htmlentities (~> 4.3)
6
- moneta (~> 1.0)
7
- multi_json (~> 1.11)
8
- mustache
9
- nokogiri (~> 1.7)
10
- sanitize
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- ast (2.4.0)
16
- backports (3.12.0)
17
- celluloid (0.16.0)
18
- timers (~> 4.0.0)
19
- coderay (1.1.2)
20
- crass (1.0.4)
21
- diff-lcs (1.3)
22
- fakeweb (1.3.0)
23
- faraday (0.9.2)
24
- multipart-post (>= 1.2, < 3)
25
- ffi (1.10.0)
26
- formatador (0.2.5)
27
- guard (2.15.0)
28
- formatador (>= 0.2.4)
29
- listen (>= 2.7, < 4.0)
30
- lumberjack (>= 1.0.12, < 2.0)
31
- nenv (~> 0.1)
32
- notiffany (~> 0.0)
33
- pry (>= 0.9.12)
34
- shellany (~> 0.0)
35
- thor (>= 0.18.1)
36
- guard-rspec (4.2.10)
37
- guard (~> 2.1)
38
- rspec (>= 2.14, < 4.0)
39
- haml (4.0.7)
40
- tilt
41
- hitimes (1.3.1)
42
- htmlentities (4.3.4)
43
- jaro_winkler (1.5.2)
44
- listen (2.10.1)
45
- celluloid (~> 0.16.0)
46
- rb-fsevent (>= 0.9.3)
47
- rb-inotify (>= 0.9)
48
- lumberjack (1.0.13)
49
- metaclass (0.0.4)
50
- method_source (0.9.2)
51
- mini_portile2 (2.4.0)
52
- mocha (1.8.0)
53
- metaclass (~> 0.0.1)
54
- moneta (1.1.1)
55
- multi_json (1.13.1)
56
- multipart-post (2.0.0)
57
- mustache (1.1.0)
58
- nenv (0.3.0)
59
- nokogiri (1.10.4)
60
- mini_portile2 (~> 2.4.0)
61
- nokogumbo (2.0.1)
62
- nokogiri (~> 1.8, >= 1.8.4)
63
- notiffany (0.1.1)
64
- nenv (~> 0.1)
65
- shellany (~> 0.0)
66
- parallel (1.14.0)
67
- parser (2.6.0.0)
68
- ast (~> 2.4.0)
69
- powerpack (0.1.2)
70
- pry (0.12.2)
71
- coderay (~> 1.1.0)
72
- method_source (~> 0.9.0)
73
- psych (3.1.0)
74
- rack (1.6.11)
75
- rack-protection (1.5.5)
76
- rack
77
- rack-test (1.1.0)
78
- rack (>= 1.0, < 3)
79
- rainbow (3.0.0)
80
- rake (10.5.0)
81
- rb-fsevent (0.10.3)
82
- rb-inotify (0.10.0)
83
- ffi (~> 1.0)
84
- rspec (3.8.0)
85
- rspec-core (~> 3.8.0)
86
- rspec-expectations (~> 3.8.0)
87
- rspec-mocks (~> 3.8.0)
88
- rspec-core (3.8.0)
89
- rspec-support (~> 3.8.0)
90
- rspec-expectations (3.8.2)
91
- diff-lcs (>= 1.2.0, < 2.0)
92
- rspec-support (~> 3.8.0)
93
- rspec-mocks (3.8.0)
94
- diff-lcs (>= 1.2.0, < 2.0)
95
- rspec-support (~> 3.8.0)
96
- rspec-support (3.8.0)
97
- rubocop (0.65.0)
98
- jaro_winkler (~> 1.5.1)
99
- parallel (~> 1.10)
100
- parser (>= 2.5, != 2.5.1.1)
101
- powerpack (~> 0.1)
102
- psych (>= 3.1.0)
103
- rainbow (>= 2.2.2, < 4.0)
104
- ruby-progressbar (~> 1.7)
105
- unicode-display_width (~> 1.4.0)
106
- ruby-progressbar (1.10.0)
107
- sanitize (5.1.0)
108
- crass (~> 1.0.2)
109
- nokogiri (>= 1.8.0)
110
- nokogumbo (~> 2.0)
111
- shellany (0.0.1)
112
- simple_oauth (0.3.1)
113
- sinatra (1.4.8)
114
- rack (~> 1.5)
115
- rack-protection (~> 1.4)
116
- tilt (>= 1.3, < 3)
117
- sinatra-contrib (1.4.7)
118
- backports (>= 2.0)
119
- multi_json
120
- rack-protection
121
- rack-test
122
- sinatra (~> 1.4.0)
123
- tilt (>= 1.3, < 3)
124
- thor (0.20.3)
125
- tilt (2.0.9)
126
- timers (4.0.4)
127
- hitimes
128
- twitter (4.8.1)
129
- faraday (~> 0.8, < 0.10)
130
- multi_json (~> 1.0)
131
- simple_oauth (~> 0.2)
132
- unicode-display_width (1.4.1)
133
-
134
- PLATFORMS
135
- ruby
136
-
137
- DEPENDENCIES
138
- bundler (~> 2.0)
139
- fakeweb (~> 1.3)
140
- guard-rspec (~> 4.2.8)
141
- haml (~> 4.0)
142
- listen (~> 2.10.0)
143
- mocha (~> 1.1)
144
- onebox!
145
- pry (~> 0.10)
146
- rake (~> 10.4)
147
- rspec (~> 3.2)
148
- rubocop (~> 0.50)
149
- sinatra (~> 1.4)
150
- sinatra-contrib (~> 1.4)
151
- twitter (~> 4.8)
152
-
153
- BUNDLED WITH
154
- 2.0.2