nifi_sdk_ruby 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 339e4cf534f08eb702e3a89a090a9a64ca033ce6
4
- data.tar.gz: 1db5d0e70bfbb0cd02cec61bf47e6dd99b0d2537
3
+ metadata.gz: 5bb97fd650f0de430ee1b893f5abff6bf28c59f1
4
+ data.tar.gz: 049c9dc2772ee4c9acd83b1ae8f69e686f522a0a
5
5
  SHA512:
6
- metadata.gz: 6f04e42eaabca6534482530890300e3b753bdd7292048a9c83e9f0ea5ec1caa7ab90c7610d26ab6a2af6c5bb6aadf53196b81c013817edad362e34fed04a06d8
7
- data.tar.gz: 2b7494a8e630440913692e0cc9edbd6813cab454f1d9ab61d56371a4381090cd3b46cffa7360005c6b13199196b306b1188c61898e09863382f7437d63c09628
6
+ metadata.gz: 284592edc6779800145e9150086f513210c7e67bb96ab5c985afe075321d9b40e650f57120cc1ae15a0a646b51f10291deed51fc0588f62b3774b15993922609
7
+ data.tar.gz: 28e7e0e03ded209b4458a65e69ab0df00cb686f384e0e2f8387a1f1b347281b8f3bbb1e1722416a7536cbd1eb64114e2a9f7b45b475740aa5de4df97fd4975c6
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/*
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
data/README.md CHANGED
@@ -4,6 +4,8 @@ A RUBY SDK to use [APACHE NIFI](https://nifi.apache.org/) API.
4
4
 
5
5
  See more at [APACHE NIFI API](https://nifi.apache.org/docs/nifi-docs/rest-api/index.html).
6
6
 
7
+ https://rubygems.org/gems/nifi_sdk_ruby
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -22,28 +24,48 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
27
+ ### Instanciate the client
25
28
 
26
- ```
27
- require '../lib/nifi_sdk_ruby'
29
+ ```ruby
30
+ require 'nifi_sdk_ruby'
28
31
 
29
32
  nifi_client = Nifi.new()
30
33
  nifi_client.set_debug(true)
31
34
 
32
- # Get the ID of Root Process Group
33
- pg_root_id = nifi_client.get_process_group(:attr => 'id')
34
- puts "\n"
35
+ ```
36
+
37
+ ### Get root id
38
+
39
+ ```ruby
40
+ # Get Root Process Group
41
+ pg_root = nifi_client.get_process_group()
35
42
  puts "PG Root's ID"
36
- puts "\n"
37
- puts pg_root_id
38
- puts "\n"
43
+ puts pg_root['id']
44
+ ```
45
+
46
+ ### Create new PG
39
47
 
40
- # Get all attrs of the Process Group with ID 9c3ebb60-015b-1000-1027-b27d47832152 (PG Root's child)
41
- some_pg = nifi_client.get_process_group(:pg_id => '9c3ebb60-015b-1000-1027-b27d47832152')
42
- puts "PG 9c3ebb60-015b-1000-1027-b27d47832152`s attrs"
43
- puts "\n"
44
- puts some_pg
45
- puts "\n"
48
+ ```ruby
49
+ new_pg = nifi_client.create_process_group(:name => 'test')
50
+ puts new_pg
51
+ ```
46
52
 
53
+ ### Get all attrs of the Process Group with ID 9c3ebb60-015b-1000-1027-b27d47832152 (PG Root's child)
54
+
55
+ ```ruby
56
+ puts nifi_client.get_process_group(:id => new_pg['id'])
57
+ ```
58
+
59
+ ### Delete some PG
60
+
61
+ ```ruby
62
+ puts nifi_client.delete_process_group(new_pg['id'])
63
+ ```
64
+
65
+ # Upload a template to Root PG
66
+
67
+ ```ruby
68
+ puts nifi_client.upload_template(:path => 'IN.hmStaff.taskStatus.xml')
47
69
  ```
48
70
 
49
71
  ## Contributing