soar_xt 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d16287ffded1511d2753c20a310eb3d807cbebcd
4
+ data.tar.gz: acd2c7cb108a6863c5751c095238591f7f688e3c
5
+ SHA512:
6
+ metadata.gz: d45d3169f513457486cc7d692f5f07d65a73fc457a2cd2dd6e81711d7e7e759335ab457b2de649774c9349f86cf4b4f3e3049b2e7e780dcf7898d2bf42e826b1
7
+ data.tar.gz: 852bec0c8d3a6faa89e49d0b2c651ff16d282b1e9b1125c695b7ba29d03fef77bbb2e136e70d418773f06c0ec5ef2165a353d125bc6c4317c6d8bae03a4026a5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in soar_sr.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ soar_xt (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ byebug (8.2.1)
10
+ diff-lcs (1.2.5)
11
+ rake (10.5.0)
12
+ rspec (3.4.0)
13
+ rspec-core (~> 3.4.0)
14
+ rspec-expectations (~> 3.4.0)
15
+ rspec-mocks (~> 3.4.0)
16
+ rspec-core (3.4.1)
17
+ rspec-support (~> 3.4.0)
18
+ rspec-expectations (3.4.0)
19
+ diff-lcs (>= 1.2.0, < 2.0)
20
+ rspec-support (~> 3.4.0)
21
+ rspec-mocks (3.4.1)
22
+ diff-lcs (>= 1.2.0, < 2.0)
23
+ rspec-support (~> 3.4.0)
24
+ rspec-support (3.4.1)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.10)
31
+ byebug
32
+ rake (~> 10.0)
33
+ rspec
34
+ soar_xt!
35
+
36
+ BUNDLED WITH
37
+ 1.10.6
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Ernst van Graan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # SoarXt
2
+
3
+ SoarXt is an extensions library with useful functions and algorithms for use in the SOAR architecture.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'soar_xt'
10
+
11
+ And then execute:
12
+
13
+ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ gem install soar_xt
18
+
19
+ ## Usage
20
+ spec.add_dependency 'soar_xt'
21
+
22
+ Bug reports and feature requests are welcome by email to ernst dot van dot graan at hetzner dot co dot za. This gem is sponsored by Hetzner (Pty) Ltd (http://hetzner.co.za)
23
+
24
+ ## License
25
+
26
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
27
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,36 @@
1
+ class ::Hash
2
+ def self.deep_merge(first, second)
3
+ # result = first
4
+ if first.is_a?(Hash) and (second.is_a?(Hash))
5
+ result = first.merge(second)
6
+ # elsif first.is_a?(Array) and second.is_a?(Array)
7
+ # return first + second
8
+ # else
9
+ # return second
10
+ end
11
+ first.each do |first_key, first_value|
12
+ second.each do |second_key, second_value|
13
+ if (first_key == second_key)
14
+ if first_value.is_a?(Hash) and (second_value.is_a?(Hash))
15
+ result[first_key] = Hash::deep_merge(first_value, second_value)
16
+ elsif first_value.is_a?(Array) and (second_value.is_a?(Array))
17
+ result[first_key] = first_value + second_value
18
+ else
19
+ puts "tbd"
20
+ # result[first_key] = second_value
21
+ end
22
+ end
23
+ end
24
+ end
25
+ result
26
+ end
27
+
28
+ # def self.value_has_hash?(value)
29
+ # return nil if not value.is_a?(Hash)
30
+ # keys = []
31
+ # value.each do |k, v|
32
+ # keys << k if v.is_a?(Hash)
33
+ # end
34
+ # keys
35
+ # end
36
+ end
@@ -0,0 +1,3 @@
1
+ module SoarXt
2
+ VERSION = "0.0.1"
3
+ end
data/lib/soar_xt.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "soar_xt/version"
2
+ require "soar_xt/soar_extend_hash"
3
+
4
+ module SoarXt
5
+ end
data/soar_xt.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'soar_xt/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "soar_xt"
8
+ spec.version = SoarXt::VERSION
9
+ spec.authors = ["Ernst van Graan"]
10
+ spec.email = ["ernst.van.graan@hetzner.co.za"]
11
+
12
+ spec.summary = %q{Library extension for the SOAR architecture}
13
+ spec.description = %q{SoarXt is an extensions library with useful functions and algorithms for use in the SOAR architecture}
14
+ # spec.homepage = "TODO: Put your gem's website or public repo URL here."
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+ spec.required_ruby_version = ['>=2.0.0']
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.10"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rspec"
26
+ spec.add_development_dependency "byebug"
27
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: soar_xt
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ernst van Graan
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
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: byebug
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
+ description: SoarXt is an extensions library with useful functions and algorithms
70
+ for use in the SOAR architecture
71
+ email:
72
+ - ernst.van.graan@hetzner.co.za
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - Gemfile
78
+ - Gemfile.lock
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - lib/soar_xt.rb
83
+ - lib/soar_xt/soar_extend_hash.rb
84
+ - lib/soar_xt/version.rb
85
+ - soar_xt.gemspec
86
+ homepage:
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 2.0.0
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.4.8
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Library extension for the SOAR architecture
110
+ test_files: []
111
+ has_rdoc: