jsoncombiner 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/jsoncombiner.rb +24 -0
  2. metadata +47 -0
@@ -0,0 +1,24 @@
1
+ require 'json'
2
+
3
+ # Make gem
4
+ # Git repository
5
+ # Add to TT
6
+ # Fields to choose steps to combine
7
+ # Handling for getting input from steps
8
+
9
+ class JSONCombiner
10
+ def initialize(*inputjsons)
11
+ @inputjsons = inputjsons
12
+ end
13
+
14
+ # Concatenates JSONs together
15
+ def concatenate
16
+ savearray = Array.new
17
+ @inputjsons.each do |j|
18
+ savearray = savearray + JSON.parse(j)
19
+ end
20
+
21
+ return savearray.to_json
22
+ end
23
+ end
24
+
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jsoncombiner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - M. C. McGrath
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-12-19 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Input multiple JSONs, get back one with all the data
15
+ email: shidash@shidash.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/jsoncombiner.rb
21
+ homepage: https://github.com/Shidash/JSONCombiner
22
+ licenses:
23
+ - GPL
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ none: false
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ requirements: []
41
+ rubyforge_project:
42
+ rubygems_version: 1.8.23
43
+ signing_key:
44
+ specification_version: 3
45
+ summary: Combines JSONs
46
+ test_files: []
47
+ has_rdoc: