apidragon 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/bin/apidragon +1 -1
- data/lib/apidragon/macro.rb +0 -4
- data/plugin_examples/SlackNotify.rb +16 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7366413d79773c8e33c3d94a5fe1e64e4fae174
|
4
|
+
data.tar.gz: e0c297e44c47882c66dd8d6cd7e327030b0fbd5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8bf6d4e7ca869c63ff0f3e237478ec0a29197bef609c718bcd914c9f338ca403764bb4ab1e76a66125739cf1db91dd1a2f48358a98b670610ef13ca4b3e6443
|
7
|
+
data.tar.gz: 1b25c82b93c668be525010aef6a66f84bdd840dc984301d3df8800ae4a11d704ce1b2c46bef7c8394a8fc06a95d297593b78cc209aea5df1dc9eb18fff1b2456
|
data/README.md
CHANGED
@@ -170,7 +170,7 @@ Each call can refer to a plugin file. The Plugin class should follow the structu
|
|
170
170
|
|
171
171
|
|
172
172
|
# Planned Features
|
173
|
-
-
|
173
|
+
- Ability to pass any variables as options at the command line
|
174
174
|
|
175
175
|
#License
|
176
176
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.1
|
data/bin/apidragon
CHANGED
@@ -6,7 +6,7 @@ require_relative '../lib/apidragon.rb'
|
|
6
6
|
|
7
7
|
Commander.configure do
|
8
8
|
program :name, 'apidragon'
|
9
|
-
program :version, '1.7.
|
9
|
+
program :version, '1.7.1'
|
10
10
|
program :description, 'CLI for automating api requests'
|
11
11
|
program :help, 'Author', 'Isaiah Thiessen <isaiah.thiessen@telus.com>'
|
12
12
|
|
data/lib/apidragon/macro.rb
CHANGED
@@ -54,11 +54,7 @@ class Call < ArgBucket
|
|
54
54
|
curl_request command
|
55
55
|
@response = `#{command}`
|
56
56
|
when 'plugin'
|
57
|
-
begin
|
58
57
|
Object.const_get(@plugin).new(@arg_bucket).run
|
59
|
-
rescue
|
60
|
-
puts 'Plugin initialization failed. Class or methods may be incorrectly defined.'
|
61
|
-
end
|
62
58
|
else
|
63
59
|
puts "#{@mode} not supported."
|
64
60
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class SlackNotify
|
2
|
+
def initialize(args)
|
3
|
+
@args = args
|
4
|
+
end
|
5
|
+
|
6
|
+
def run
|
7
|
+
f = File.open '/tmp/report.json', 'w'
|
8
|
+
f.write @args['response']
|
9
|
+
puts 'file created'
|
10
|
+
f.close
|
11
|
+
r = `curl https://slack.com/api/files.upload -F 'token=#{@args['token']}' -F 'file=@/tmp/report.json' -F 'channels=#{@args['channel']}'`
|
12
|
+
File.delete '/tmp/report.json'
|
13
|
+
puts 'file deleted'
|
14
|
+
puts r
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apidragon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- isaiah thiessen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -257,6 +257,7 @@ files:
|
|
257
257
|
- lib/apidragon/macro.rb
|
258
258
|
- lib/apidragon/parser.rb
|
259
259
|
- plugin_examples/GitClone.rb
|
260
|
+
- plugin_examples/SlackNotify.rb
|
260
261
|
homepage: http://github.com/isand3r/apidragon
|
261
262
|
licenses:
|
262
263
|
- MIT
|