spigit_ops 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/lib/spigit_ops/tomcat.rb +5 -5
- data/lib/spigit_ops/utils.rb +12 -5
- data/lib/spigit_ops/version.rb +1 -1
- data/spigit_ops.gemspec +4 -4
- metadata +14 -16
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YmEwYjMzMjUzMTA2OWM5MzAwOWEyOGVlMmUyYjM5NDBkMTY0OWUzN2JjZDIw
|
10
|
-
MGQ3MmQ1OWE5M2UxMDMwMjgwMjRhZGQ0OTcyZWJlMDgxNTY2ZjgzMTc4Zjlj
|
11
|
-
NTU0ZGU1OWMzYTcyODU1NTZjOWNlZmQ3NTA2YmU0OWEyNGY4YjM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
OWMzODJkNGI1ZmJkMGNlYWJmNGQ0N2JkN2Y4ODY4ZjQxZmY3M2E3ZWVjODg4
|
14
|
-
MTY2ZDc3ZGMzZDcxYTA0OWU2ZTVlOTA3NzNiNjVmMzE2ZDA3NTljZGZiZjI2
|
15
|
-
MGU5NmZlNDhlNzgxYjQxNTY5YzcyNDgzM2QxOGMwOTU2MzE5N2I=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 80272ddecc2d296fea37c255fa22203cd6db5f73
|
4
|
+
data.tar.gz: e412eb22e3cee9933247a2aae8facefac490a5b0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5edefb42453e02fd86c7ebcf048eeba23584c3599299214a8b8fa46e07e53207c78502332c7cdf51ef75e6b0cc4694284693d45d5b55674a6d21b1a3235681f8
|
7
|
+
data.tar.gz: 0face8097dc6d2cffac677db14e496bbef69bec4907a527b4a2106ae2c558f7c6adbf886f949e2ac4995a1db43b9d58ab59554d330fd1ae3c686ea2a2d21ba5d
|
data/lib/spigit_ops/tomcat.rb
CHANGED
@@ -93,14 +93,14 @@ module SpigitOps
|
|
93
93
|
|
94
94
|
resources = []
|
95
95
|
service.children.css('Resource').each do |resource|
|
96
|
-
db_host = resource[:url].scan(%r{mysql://(.*)/}).join.sub(/^127\.0\.0\.1$/, "localhost")
|
97
|
-
schema_name = resource[:url].scan(%r{/([^/]+)\?}).join
|
96
|
+
db_host = resource[:url].scan(%r{mysql://(.*)/}).join.sub(/^127\.0\.0\.1$/, "localhost") if String === resource[:url]
|
97
|
+
schema_name = resource[:url].scan(%r{/([^/]+)\?}).join if String === resource[:url]
|
98
98
|
|
99
99
|
if resources.empty?
|
100
|
-
resources << {:db_host => db_host, :schema_name => schema_name}
|
101
|
-
resources << {:db_host => db_host, :schema_name => "#{schema_name}user"}
|
100
|
+
resources << {:db_host => db_host, :schema_name => schema_name} if db_host and schema_name
|
101
|
+
resources << {:db_host => db_host, :schema_name => "#{schema_name}user"} if resources.length > 0
|
102
102
|
else
|
103
|
-
## This checks to see if the result
|
103
|
+
## This checks to see if the result
|
104
104
|
duplicate=""
|
105
105
|
resources.each do |i|
|
106
106
|
if i[:db_host] == db_host and i[:schema_name] == schema_name
|
data/lib/spigit_ops/utils.rb
CHANGED
@@ -5,7 +5,7 @@ module SpigitOps
|
|
5
5
|
|
6
6
|
def self.win_to_unix(time)
|
7
7
|
begin
|
8
|
-
time.to_i if String === time
|
8
|
+
time = time.to_i if String === time
|
9
9
|
windows_time = time
|
10
10
|
unix_time = windows_time / 10000000 - 11644473600
|
11
11
|
|
@@ -17,7 +17,7 @@ module SpigitOps
|
|
17
17
|
|
18
18
|
def self.unix_to_win(time)
|
19
19
|
begin
|
20
|
-
time.to_i if String === time
|
20
|
+
time = time.to_i if String === time
|
21
21
|
unix_time = time
|
22
22
|
windows_time = (unix_time + 11644473600) * 10000000
|
23
23
|
|
@@ -33,18 +33,25 @@ module SpigitOps
|
|
33
33
|
|
34
34
|
host = options[:host] ? options[:host] : "localhost"
|
35
35
|
|
36
|
-
from = options[:from] ? options[:from] : "
|
37
|
-
to = options[:to] ? options[:to] : "
|
36
|
+
from = options[:from] ? options[:from] : "techops-team@mindjet.com"
|
37
|
+
to = options[:to] ? options[:to] : "techops-team@mindjet.com"
|
38
38
|
subject = options[:subject] ? options[:subject] : raise("Must declare a subject for email")
|
39
39
|
message = options[:message] ? options[:message] : raise("Must declare a message for email")
|
40
40
|
format = options[:format] ? options[:format] : "text"
|
41
41
|
|
42
42
|
content_type = type.has_key?(format.to_sym) ? type[format.to_sym] : type["text"]
|
43
43
|
|
44
|
+
if Array === to
|
45
|
+
to_header = to.join(', ')
|
46
|
+
elsif String === to
|
47
|
+
to_header = to
|
48
|
+
else
|
49
|
+
to_header = to
|
50
|
+
end
|
44
51
|
|
45
52
|
message = <<MESSAGE_END
|
46
53
|
From: #{from}
|
47
|
-
To: #{
|
54
|
+
To: #{to_header}
|
48
55
|
Subject: #{subject}
|
49
56
|
Mime-Version: 1.0
|
50
57
|
Content-Type: #{content_type}
|
data/lib/spigit_ops/version.rb
CHANGED
data/spigit_ops.gemspec
CHANGED
@@ -6,11 +6,11 @@ require 'spigit_ops/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "spigit_ops"
|
8
8
|
spec.version = SpigitOps::VERSION
|
9
|
-
spec.authors = ["Jason Barnett"
|
10
|
-
spec.email = ["J@sonBarnett.com"
|
9
|
+
spec.authors = ["Jason Barnett"]
|
10
|
+
spec.email = ["J@sonBarnett.com"]
|
11
11
|
spec.description = %q{This gem does this and that.}
|
12
|
-
spec.summary = %q{Want to manage Spigit? Grab this gem.}
|
13
|
-
spec.homepage = "
|
12
|
+
spec.summary = %q{Want to manage things @ Spigit? Grab this gem.}
|
13
|
+
spec.homepage = "https://github.com/spigit-inc/spigit_ops"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,67 +1,65 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spigit_ops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Barnett
|
8
|
-
- Bob Santos
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: nokogiri
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
|
-
- -
|
17
|
+
- - ">="
|
19
18
|
- !ruby/object:Gem::Version
|
20
19
|
version: 1.5.9
|
21
20
|
type: :runtime
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
|
-
- -
|
24
|
+
- - ">="
|
26
25
|
- !ruby/object:Gem::Version
|
27
26
|
version: 1.5.9
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
28
|
name: bundler
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
32
|
-
- - ~>
|
31
|
+
- - "~>"
|
33
32
|
- !ruby/object:Gem::Version
|
34
33
|
version: '1.3'
|
35
34
|
type: :development
|
36
35
|
prerelease: false
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
38
37
|
requirements:
|
39
|
-
- - ~>
|
38
|
+
- - "~>"
|
40
39
|
- !ruby/object:Gem::Version
|
41
40
|
version: '1.3'
|
42
41
|
- !ruby/object:Gem::Dependency
|
43
42
|
name: rake
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
45
44
|
requirements:
|
46
|
-
- -
|
45
|
+
- - ">="
|
47
46
|
- !ruby/object:Gem::Version
|
48
47
|
version: '0'
|
49
48
|
type: :development
|
50
49
|
prerelease: false
|
51
50
|
version_requirements: !ruby/object:Gem::Requirement
|
52
51
|
requirements:
|
53
|
-
- -
|
52
|
+
- - ">="
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: '0'
|
56
55
|
description: This gem does this and that.
|
57
56
|
email:
|
58
57
|
- J@sonBarnett.com
|
59
|
-
- bob.santos@spigit.com
|
60
58
|
executables: []
|
61
59
|
extensions: []
|
62
60
|
extra_rdoc_files: []
|
63
61
|
files:
|
64
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
65
63
|
- EXAMPLES
|
66
64
|
- Gemfile
|
67
65
|
- LICENSE.txt
|
@@ -73,7 +71,7 @@ files:
|
|
73
71
|
- lib/spigit_ops/utils.rb
|
74
72
|
- lib/spigit_ops/version.rb
|
75
73
|
- spigit_ops.gemspec
|
76
|
-
homepage:
|
74
|
+
homepage: https://github.com/spigit-inc/spigit_ops
|
77
75
|
licenses:
|
78
76
|
- MIT
|
79
77
|
metadata: {}
|
@@ -83,18 +81,18 @@ require_paths:
|
|
83
81
|
- lib
|
84
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
83
|
requirements:
|
86
|
-
- -
|
84
|
+
- - ">="
|
87
85
|
- !ruby/object:Gem::Version
|
88
86
|
version: '0'
|
89
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
88
|
requirements:
|
91
|
-
- -
|
89
|
+
- - ">="
|
92
90
|
- !ruby/object:Gem::Version
|
93
91
|
version: '0'
|
94
92
|
requirements: []
|
95
93
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.4.3
|
97
95
|
signing_key:
|
98
96
|
specification_version: 4
|
99
|
-
summary: Want to manage Spigit? Grab this gem.
|
97
|
+
summary: Want to manage things @ Spigit? Grab this gem.
|
100
98
|
test_files: []
|