xify 0.0.2 → 0.1.0
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/lib/xify/input/pipe.rb +10 -0
- data/lib/xify/input/{stdin.rb → prompt.rb} +2 -2
- data/lib/xify/input/shell.rb +10 -0
- data/lib/xify/output/stdout.rb +1 -1
- data/lib/xify.rb +9 -3
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 670138629af686c5ae8d7fe7bd773a6a24ab23e4a1cac1e43ec2c5b1d6a1d6d7
|
4
|
+
data.tar.gz: ba760cff71020f421c22ec7c100c9bad5193c439fa5af222aeb4f0467a335c35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8628de616941c4f2b450739af88d4d60eca6f393babd3f08261b9c178e5a983d332c4ddfa775f6da50f644df3c6a4727c4ea7442d08d70e04a769f7ab172beb
|
7
|
+
data.tar.gz: 27132224d15386e6e23be525e9e030461643643c2deccfedc3ec2f8a0c4d6f70ac2d5680ff6a2f17279ff3ed718afc3f1e063271576b4e2deacdbc2125cc5dff
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'xify/event'
|
2
2
|
|
3
|
-
class
|
3
|
+
class Prompt
|
4
4
|
def initialize(config)
|
5
5
|
@author = config['author']
|
6
6
|
end
|
@@ -17,7 +17,7 @@ class Stdin
|
|
17
17
|
end
|
18
18
|
|
19
19
|
if input.length != 1
|
20
|
-
yield Event.new @author, input
|
20
|
+
yield Event.new @author, input.chomp
|
21
21
|
end
|
22
22
|
rescue Interrupt
|
23
23
|
# Stop on CTRL+C
|
data/lib/xify/output/stdout.rb
CHANGED
data/lib/xify.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
|
3
|
-
require 'xify/input/
|
3
|
+
require 'xify/input/pipe'
|
4
|
+
require 'xify/input/prompt'
|
5
|
+
require 'xify/input/shell'
|
4
6
|
require 'xify/output/stdout'
|
5
7
|
require 'xify/output/rocket_chat'
|
6
8
|
|
@@ -9,7 +11,12 @@ class Xify
|
|
9
11
|
working_dir = "#{ENV['HOME']}/.xify"
|
10
12
|
Dir.mkdir working_dir rescue Errno::EEXIST
|
11
13
|
|
12
|
-
config_file =
|
14
|
+
config_file = "#{working_dir}/config.yml"
|
15
|
+
if args.first == '-c'
|
16
|
+
args.shift
|
17
|
+
config_file = args.shift
|
18
|
+
end
|
19
|
+
|
13
20
|
puts "Loading config from #{config_file}"
|
14
21
|
config = YAML::load_file config_file
|
15
22
|
|
@@ -20,7 +27,6 @@ class Xify
|
|
20
27
|
end.compact!
|
21
28
|
end
|
22
29
|
|
23
|
-
puts 'Looking for updates'
|
24
30
|
config['inputs'].each do |i|
|
25
31
|
i.updates do |u|
|
26
32
|
config['outputs'].each do |o|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Finn Glöe
|
@@ -20,7 +20,9 @@ files:
|
|
20
20
|
- bin/xify
|
21
21
|
- lib/xify.rb
|
22
22
|
- lib/xify/event.rb
|
23
|
-
- lib/xify/input/
|
23
|
+
- lib/xify/input/pipe.rb
|
24
|
+
- lib/xify/input/prompt.rb
|
25
|
+
- lib/xify/input/shell.rb
|
24
26
|
- lib/xify/output/rocket_chat.rb
|
25
27
|
- lib/xify/output/stdout.rb
|
26
28
|
homepage:
|