apidragon 1.2.1 → 1.3.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/README.md +42 -1
- data/VERSION +1 -1
- data/apidragon.gemspec +3 -3
- data/lib/apidragon/macro.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e44b27d4c1f256b66c5b961033b08eacf4d5ac00
|
4
|
+
data.tar.gz: d764e3b81b24c3217f0ba5985c290f4cf293d940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa1cb300824858e9e4860483c16f511885ccb3501bba9f689dd3470e9258a6f55cf38b91f87f860f5b73d21a97265e63f6d256af71036ed3d0b94dd5000f4cf3
|
7
|
+
data.tar.gz: 272087cb664a076c799a7e614001679c7027782ae0e8e5f4ccf289703ae89240cbeb2315dffb9d956398f2ef47e2334eef9625947b7bd6242f1015a8fdc7a90c
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# apidragon: an Api Interaction Automation Framework
|
2
|
+
[](https://codeclimate.com/github/isand3r/apidragon)
|
2
3
|
|
3
4
|
These classes run a sequence of API calls using a configuration file.
|
4
5
|
- config file is read and `vars` are dumped into an `arg_bucket`
|
@@ -53,8 +54,49 @@ Currently supported modes:
|
|
53
54
|
- `put`
|
54
55
|
- `delete`
|
55
56
|
- `curl_get`, `curl_post` (uses curl instead of the `rest-client` gem for special cases)
|
57
|
+
- `plugin`
|
56
58
|
- Planned: `curl_put`, `curl_delete`
|
57
59
|
|
60
|
+
## get, post, put, delete
|
61
|
+
|
62
|
+
Makes an api call using the respective HTTP verb through the rest-client gem.
|
63
|
+
|
64
|
+
## curl_get, curl_post
|
65
|
+
|
66
|
+
Makes an api call using the respective HTTP verb through curl.
|
67
|
+
|
68
|
+
## plugin
|
69
|
+
|
70
|
+
Evaluates the given line of ruby code through `eval()`.
|
71
|
+
- e.g.:
|
72
|
+
- test.rb (@/tmp/apidragonplugins/):
|
73
|
+
```ruby
|
74
|
+
class Plugin
|
75
|
+
def initialize(message)
|
76
|
+
@message = message
|
77
|
+
end
|
78
|
+
|
79
|
+
def run
|
80
|
+
puts "This is a test, here are my args: \n #{@message}"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
```
|
84
|
+
- apidragonconf.yaml:
|
85
|
+
```yaml
|
86
|
+
vars:
|
87
|
+
test: test
|
88
|
+
example:
|
89
|
+
test:
|
90
|
+
function: Plugin.new(@arg_bucket).run # initializes and calls the run function for my Plugin class, passing the arg_bucket.
|
91
|
+
plugin: test
|
92
|
+
mode: plugin
|
93
|
+
```
|
94
|
+
- ouput of `apidragon do example`:
|
95
|
+
```
|
96
|
+
This is a test, here are my args:
|
97
|
+
{"test" => "test"}
|
98
|
+
```
|
99
|
+
|
58
100
|
# Further Options
|
59
101
|
|
60
102
|
## record
|
@@ -114,7 +156,6 @@ Each call can refer to a plugin file. The Plugin class should follow the structu
|
|
114
156
|
|
115
157
|
|
116
158
|
# Planned Features
|
117
|
-
- The ability to include custom scripts at the end of a call for extensibility
|
118
159
|
- Support for multiple instances of variable names for different api's
|
119
160
|
|
120
161
|
#License
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/apidragon.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: apidragon 1.
|
5
|
+
# stub: apidragon 1.3.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "apidragon"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.3.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["isaiah thiessen"]
|
14
|
-
s.date = "2015-12-
|
14
|
+
s.date = "2015-12-03"
|
15
15
|
s.description = "Ruby based CLI for accessing veracode's api"
|
16
16
|
s.email = "isaiah.thiessen@live.ca"
|
17
17
|
s.executables = ["apidragon"]
|
data/lib/apidragon/macro.rb
CHANGED
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.
|
4
|
+
version: 1.3.0
|
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-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|