octodown 1.5.1 → 1.5.2
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2014389d722bdf1f9a125def2450eeb22cb4e76
|
4
|
+
data.tar.gz: 219cdb334a1035a0b4b334ded79c0ee8255f6d70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47c9da8f49e13660920ed5de23a360dcb13025514faee44fa57124fe0324b148bcd2db5b74bb5a6d4e208d13982ac09f9559ff26a04d270d90285de81573dfe
|
7
|
+
data.tar.gz: 716449ed4fbb3df0e2a34873cee0bbfa6cf5a4046bd14e9626a2716ce5f680df3b58cf97a75f7ce3e84d215ba338f44002bf8d592b543bd62ea3e41a301c5c48
|
@@ -20,11 +20,13 @@ module Octodown
|
|
20
20
|
if file == STDIN
|
21
21
|
buffer = file.read
|
22
22
|
else
|
23
|
-
|
24
|
-
buffer = f.read
|
23
|
+
begin
|
24
|
+
File.open(file.path, 'r') { |f| buffer = f.read }
|
25
|
+
rescue Errno::ENOENT
|
26
|
+
puts '[WARN] something went wrong when trying to open the file'
|
25
27
|
end
|
26
28
|
end
|
27
|
-
pipeline.call(buffer)[:output].to_s
|
29
|
+
pipeline.call(buffer ||= 'could not read changes')[:output].to_s
|
28
30
|
end
|
29
31
|
|
30
32
|
private
|
@@ -8,8 +8,8 @@ module Octodown
|
|
8
8
|
path = File.dirname(File.expand_path(file.path))
|
9
9
|
regex = Regexp.new("^#{File.basename(file.path)}$")
|
10
10
|
|
11
|
-
@listener ||= Listen.to(path, only: regex) do
|
12
|
-
listener_callback.call
|
11
|
+
@listener ||= Listen.to(path, only: regex) do |modified, added, _rm|
|
12
|
+
listener_callback.call if modified.any? || added.any?
|
13
13
|
end
|
14
14
|
|
15
15
|
@listener.start
|
data/lib/octodown/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octodown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Ker-Seymer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-markup
|