jekyll-gist 1.3.0 → 1.3.2
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 +4 -4
- data/.travis.yml +5 -0
- data/History.markdown +10 -1
- data/jekyll-gist.gemspec +2 -0
- data/lib/jekyll-gist/gist_tag.rb +15 -7
- data/lib/jekyll-gist/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5963b7bd175984be6980f49a41df4a5afaf42f3c
|
4
|
+
data.tar.gz: a03afe7e0dca0f434804410b2a5d272e2d58ca7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a59ea77c5cc2b645a8fa1513457d80182838d809ad179dc9d09dff7cbb2b9ef1c2ddd1b88cb338ef6e234e15ef72d6f528546690d7398d7ea3dc3f82a2d4c4e
|
7
|
+
data.tar.gz: 712bbda80055fa286ab95d466e6aec6f737399b19541ddf07041f8eb84213a361f02547ade0c76565ec0f49eabc7a66ef9ec59415d33fa5f819398f02eb88392
|
data/.travis.yml
CHANGED
data/History.markdown
CHANGED
@@ -1,4 +1,13 @@
|
|
1
|
-
##
|
1
|
+
## 1.3.2 / 2016-08-19
|
2
|
+
|
3
|
+
* Re-add support for Ruby 1.9.3. Fixes #11 for 1.9.3 (#14)
|
4
|
+
* Replaced `OpenURI` with `Net::HTTP` and introduced timeout of 3 seconds (#11)
|
5
|
+
|
6
|
+
## 1.3.1 / 2015-08-16 (yanked)
|
7
|
+
|
8
|
+
* Replaced `OpenURI` with `Net::HTTP` and introduced timeout of 3 seconds (#11)
|
9
|
+
|
10
|
+
## 1.3.0 / 2015-08-05
|
2
11
|
|
3
12
|
* Added an `noscript` fallback for browsers without JavaScript enabled. (#7)
|
4
13
|
|
data/jekyll-gist.gemspec
CHANGED
@@ -12,6 +12,8 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.homepage = "https://github.com/jekyll/jekyll-gist"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
|
+
spec.required_ruby_version = '>= 2.0'
|
16
|
+
|
15
17
|
spec.files = `git ls-files -z`.split("\x0")
|
16
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
data/lib/jekyll-gist/gist_tag.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
require 'cgi'
|
2
|
-
require '
|
2
|
+
require 'net/http'
|
3
|
+
|
4
|
+
Net::OpenTimeout = Class.new(RuntimeError) unless Net.const_defined?(:OpenTimeout)
|
5
|
+
Net::ReadTimeout = Class.new(RuntimeError) unless Net.const_defined?(:ReadTimeout)
|
3
6
|
|
4
7
|
module Jekyll
|
5
8
|
module Gist
|
@@ -57,13 +60,18 @@ module Jekyll
|
|
57
60
|
end
|
58
61
|
|
59
62
|
def fetch_raw_code(gist_id, filename = nil)
|
63
|
+
url = "https://gist.githubusercontent.com/#{gist_id}/raw"
|
64
|
+
url = "#{url}/#{filename}" unless filename.empty?
|
60
65
|
begin
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
66
|
+
uri = URI(url)
|
67
|
+
Net::HTTP.start(uri.host, uri.port,
|
68
|
+
use_ssl: uri.scheme == 'https',
|
69
|
+
read_timeout: 3, open_timeout: 3) do |http|
|
70
|
+
request = Net::HTTP::Get.new uri.to_s
|
71
|
+
response = http.request(request)
|
72
|
+
response.body
|
73
|
+
end
|
74
|
+
rescue SocketError, Net::HTTPError, Net::OpenTimeout, Net::ReadTimeout
|
67
75
|
nil
|
68
76
|
end
|
69
77
|
end
|
data/lib/jekyll-gist/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-gist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '0'
|
118
|
+
version: '2.0'
|
119
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - ">="
|