arc_weld 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +3 -0
- data/Guardfile +58 -0
- data/LICENSE.txt +674 -0
- data/README.md +73 -0
- data/Rakefile +6 -0
- data/arc_weld.gemspec +34 -0
- data/bin/setup +7 -0
- data/bin/weld +8 -0
- data/lib/arc_weld/archive.rb +87 -0
- data/lib/arc_weld/cli/project.rb +116 -0
- data/lib/arc_weld/cli/readers/relation_csv.rb +41 -0
- data/lib/arc_weld/cli/readers/resource_csv.rb +64 -0
- data/lib/arc_weld/cli.rb +45 -0
- data/lib/arc_weld/helpers.rb +12 -0
- data/lib/arc_weld/reference.rb +51 -0
- data/lib/arc_weld/relationship.rb +96 -0
- data/lib/arc_weld/relationships/customer_of.rb +28 -0
- data/lib/arc_weld/relationships/has_alternate_interface.rb +27 -0
- data/lib/arc_weld/relationships/has_child.rb +42 -0
- data/lib/arc_weld/relationships/has_customer.rb +28 -0
- data/lib/arc_weld/relationships/has_location.rb +16 -0
- data/lib/arc_weld/relationships/in_category.rb +26 -0
- data/lib/arc_weld/relationships/in_network.rb +26 -0
- data/lib/arc_weld/relationships/in_zone.rb +41 -0
- data/lib/arc_weld/relationships/location_of.rb +28 -0
- data/lib/arc_weld/resource.rb +149 -0
- data/lib/arc_weld/resource_definitions.rb +7 -0
- data/lib/arc_weld/resources/asset.rb +33 -0
- data/lib/arc_weld/resources/asset_category.rb +40 -0
- data/lib/arc_weld/resources/customer.rb +16 -0
- data/lib/arc_weld/resources/group.rb +29 -0
- data/lib/arc_weld/resources/location.rb +18 -0
- data/lib/arc_weld/resources/network.rb +14 -0
- data/lib/arc_weld/resources/zone.rb +65 -0
- data/lib/arc_weld/templates/project-csv/.gitignore.tt +2 -0
- data/lib/arc_weld/templates/project-csv/Gemfile.tt +3 -0
- data/lib/arc_weld/templates/project-csv/Thorfile.tt +9 -0
- data/lib/arc_weld/templates/project-csv/in/assets.csv.tt +2 -0
- data/lib/arc_weld/templates/project-csv/in/categories.csv.tt +3 -0
- data/lib/arc_weld/templates/project-csv/in/customer_groups.csv.tt +3 -0
- data/lib/arc_weld/templates/project-csv/in/customers.csv.tt +3 -0
- data/lib/arc_weld/templates/project-csv/in/group_categories.csv.tt +3 -0
- data/lib/arc_weld/templates/project-csv/in/locations.csv.tt +6 -0
- data/lib/arc_weld/templates/project-csv/in/networks.csv.tt +3 -0
- data/lib/arc_weld/templates/project-csv/in/zone_locations.csv.tt +2 -0
- data/lib/arc_weld/templates/project-csv/in/zones.csv.tt +2 -0
- data/lib/arc_weld/templates/project-csv/lib/thor/README.txt.tt +2 -0
- data/lib/arc_weld/templates/project-csv/lib/thor/sample.thor.tt +7 -0
- data/lib/arc_weld/templates/project-csv/out/README-archive.txt.tt +5 -0
- data/lib/arc_weld/templates/project-csv/weld.json.tt +39 -0
- data/lib/arc_weld/version.rb +3 -0
- data/lib/arc_weld.rb +19 -0
- metadata +269 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"name" : "<%= @config[:name] -%>",
|
3
|
+
"input_dir" : "in",
|
4
|
+
"output_dir" : "out",
|
5
|
+
"resource_driver" : "csv",
|
6
|
+
"resource_root" : {
|
7
|
+
"asset" : "<%= @config[:name] -%>",
|
8
|
+
"asset_category": "<%= @config[:name ] -%> Categories",
|
9
|
+
"customer" : "ArcWeld",
|
10
|
+
"location" : "<%= @config[:name] -%>",
|
11
|
+
"network" : "ArcWeld",
|
12
|
+
"zone" : "<%= @config[:name] -%>"
|
13
|
+
},
|
14
|
+
"resource_inputs" : {
|
15
|
+
"asset" : "assets.csv",
|
16
|
+
"asset_category" : "categories.csv",
|
17
|
+
"customer" : "customers.csv",
|
18
|
+
"location" : "locations.csv",
|
19
|
+
"network" : "networks.csv",
|
20
|
+
"zone" : "zones.csv"
|
21
|
+
},
|
22
|
+
"relationships" : [
|
23
|
+
{
|
24
|
+
"driver" : "csv",
|
25
|
+
"type" : "has_location=",
|
26
|
+
"file" : "zone_locations.csv"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"driver" : "csv",
|
30
|
+
"type" : "add_category",
|
31
|
+
"file" : "group_categories.csv"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"driver" : "csv",
|
35
|
+
"type" : "add_customer_resource",
|
36
|
+
"file" : "customer_groups.csv"
|
37
|
+
}
|
38
|
+
]
|
39
|
+
}
|
data/lib/arc_weld.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'ipaddr'
|
2
|
+
require 'gyoku'
|
3
|
+
require 'nokogiri'
|
4
|
+
require 'thor'
|
5
|
+
|
6
|
+
require 'arc_weld/version'
|
7
|
+
require 'arc_weld/helpers'
|
8
|
+
require 'arc_weld/archive'
|
9
|
+
require 'arc_weld/cli'
|
10
|
+
require 'arc_weld/resource'
|
11
|
+
require 'arc_weld/relationship'
|
12
|
+
require 'arc_weld/reference'
|
13
|
+
require 'arc_weld/resource_definitions'
|
14
|
+
|
15
|
+
module ArcWeld
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
end
|
metadata
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arc_weld
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Breed
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gyoku
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nokogiri
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: thor
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-doc
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.10'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.10'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: guard-rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: guard-bundler
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: simplecov
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
description: Toolkit for building ArcSight resources
|
182
|
+
email:
|
183
|
+
- opensource@breed.org
|
184
|
+
executables:
|
185
|
+
- setup
|
186
|
+
- weld
|
187
|
+
extensions: []
|
188
|
+
extra_rdoc_files: []
|
189
|
+
files:
|
190
|
+
- ".gitignore"
|
191
|
+
- ".rspec"
|
192
|
+
- ".travis.yml"
|
193
|
+
- Gemfile
|
194
|
+
- Guardfile
|
195
|
+
- LICENSE.txt
|
196
|
+
- README.md
|
197
|
+
- Rakefile
|
198
|
+
- arc_weld.gemspec
|
199
|
+
- bin/setup
|
200
|
+
- bin/weld
|
201
|
+
- lib/arc_weld.rb
|
202
|
+
- lib/arc_weld/archive.rb
|
203
|
+
- lib/arc_weld/cli.rb
|
204
|
+
- lib/arc_weld/cli/project.rb
|
205
|
+
- lib/arc_weld/cli/readers/relation_csv.rb
|
206
|
+
- lib/arc_weld/cli/readers/resource_csv.rb
|
207
|
+
- lib/arc_weld/helpers.rb
|
208
|
+
- lib/arc_weld/reference.rb
|
209
|
+
- lib/arc_weld/relationship.rb
|
210
|
+
- lib/arc_weld/relationships/customer_of.rb
|
211
|
+
- lib/arc_weld/relationships/has_alternate_interface.rb
|
212
|
+
- lib/arc_weld/relationships/has_child.rb
|
213
|
+
- lib/arc_weld/relationships/has_customer.rb
|
214
|
+
- lib/arc_weld/relationships/has_location.rb
|
215
|
+
- lib/arc_weld/relationships/in_category.rb
|
216
|
+
- lib/arc_weld/relationships/in_network.rb
|
217
|
+
- lib/arc_weld/relationships/in_zone.rb
|
218
|
+
- lib/arc_weld/relationships/location_of.rb
|
219
|
+
- lib/arc_weld/resource.rb
|
220
|
+
- lib/arc_weld/resource_definitions.rb
|
221
|
+
- lib/arc_weld/resources/asset.rb
|
222
|
+
- lib/arc_weld/resources/asset_category.rb
|
223
|
+
- lib/arc_weld/resources/customer.rb
|
224
|
+
- lib/arc_weld/resources/group.rb
|
225
|
+
- lib/arc_weld/resources/location.rb
|
226
|
+
- lib/arc_weld/resources/network.rb
|
227
|
+
- lib/arc_weld/resources/zone.rb
|
228
|
+
- lib/arc_weld/templates/project-csv/.gitignore.tt
|
229
|
+
- lib/arc_weld/templates/project-csv/Gemfile.tt
|
230
|
+
- lib/arc_weld/templates/project-csv/Thorfile.tt
|
231
|
+
- lib/arc_weld/templates/project-csv/in/assets.csv.tt
|
232
|
+
- lib/arc_weld/templates/project-csv/in/categories.csv.tt
|
233
|
+
- lib/arc_weld/templates/project-csv/in/customer_groups.csv.tt
|
234
|
+
- lib/arc_weld/templates/project-csv/in/customers.csv.tt
|
235
|
+
- lib/arc_weld/templates/project-csv/in/group_categories.csv.tt
|
236
|
+
- lib/arc_weld/templates/project-csv/in/locations.csv.tt
|
237
|
+
- lib/arc_weld/templates/project-csv/in/networks.csv.tt
|
238
|
+
- lib/arc_weld/templates/project-csv/in/zone_locations.csv.tt
|
239
|
+
- lib/arc_weld/templates/project-csv/in/zones.csv.tt
|
240
|
+
- lib/arc_weld/templates/project-csv/lib/thor/README.txt.tt
|
241
|
+
- lib/arc_weld/templates/project-csv/lib/thor/sample.thor.tt
|
242
|
+
- lib/arc_weld/templates/project-csv/out/README-archive.txt.tt
|
243
|
+
- lib/arc_weld/templates/project-csv/weld.json.tt
|
244
|
+
- lib/arc_weld/version.rb
|
245
|
+
homepage: https://github.com/ryanbreed/arc_weld
|
246
|
+
licenses: []
|
247
|
+
metadata: {}
|
248
|
+
post_install_message:
|
249
|
+
rdoc_options: []
|
250
|
+
require_paths:
|
251
|
+
- lib
|
252
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
253
|
+
requirements:
|
254
|
+
- - ">="
|
255
|
+
- !ruby/object:Gem::Version
|
256
|
+
version: '0'
|
257
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
|
+
requirements:
|
259
|
+
- - ">="
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '0'
|
262
|
+
requirements: []
|
263
|
+
rubyforge_project:
|
264
|
+
rubygems_version: 2.4.5.1
|
265
|
+
signing_key:
|
266
|
+
specification_version: 4
|
267
|
+
summary: Toolkit for building ArcSight resources
|
268
|
+
test_files: []
|
269
|
+
has_rdoc:
|