codesake-commons 0.90.0 → 0.95.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "codesake-commons"
8
8
  gem.version = Codesake::Commons::VERSION
9
9
  gem.authors = ["Paolo Perego"]
10
- gem.email = ["thesp0nge@gmail.com"]
10
+ gem.email = ["paolo@codesake.com"]
11
11
  gem.description = %q{codesake.com is an application security startup providing code review and penetration test services for Ruby powered web applications. codesake_commons is the gem containing common ground routines useful across the project}
12
12
  gem.summary = %q{codesake_commons is the gem containing common ground routines useful across the codesake.com project}
13
13
  gem.homepage = "http://codesake.com"
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.add_dependency 'rainbow'
20
+ gem.add_dependency 'rainbow', '~> 2.0.0'
21
21
  gem.add_dependency 'mechanize'
22
22
  gem.add_dependency 'nokogiri'
23
23
  end
@@ -23,7 +23,7 @@ module Codesake
23
23
  end
24
24
 
25
25
  def die(msg, pid_file=nil)
26
- STDERR.print "#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n".color(:red)
26
+ STDERR.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n").red
27
27
  send_to_syslog(msg, :helo)
28
28
  send_to_file(msg, :helo)
29
29
  Codesake::Commons::Io.remove_pid_file(pid_file) unless pid_file.nil?
@@ -31,40 +31,40 @@ module Codesake
31
31
  end
32
32
 
33
33
  def err(msg)
34
- STDERR.print "#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n".color(:red)
34
+ STDERR.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n").red
35
35
  send_to_syslog(msg, :err)
36
36
  send_to_file(msg, :err)
37
37
  end
38
38
 
39
39
  def warn(msg)
40
- STDOUT.print "#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n".color(:yellow)
40
+ STDOUT.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [!] #{@component}: #{msg}\n").yellow
41
41
  send_to_syslog(msg, :warn)
42
42
  send_to_file(msg, :warn)
43
43
  end
44
44
 
45
45
  def ok(msg)
46
- STDOUT.print "#{Time.now.strftime("%H:%M:%S")} [*] #{@component}: #{msg}\n".color(:green)
46
+ STDOUT.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [*] #{@component}: #{msg}\n").green
47
47
  send_to_syslog(msg, :log)
48
48
  send_to_file(msg, :log)
49
49
  end
50
50
 
51
51
  def log(msg)
52
52
  return if @silencer
53
- STDOUT.print "#{Time.now.strftime("%H:%M:%S")} [$] #{@component}: #{msg}\n".color(:white)
53
+ STDOUT.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [$] #{@component}: #{msg}\n").white
54
54
  send_to_syslog(msg, :log)
55
55
  send_to_file(msg, :log)
56
56
  end
57
57
 
58
58
  def helo(component, version, pid_file = nil)
59
59
  @component = component
60
- STDOUT.print "#{Time.now.strftime("%H:%M:%S")} [*] #{@component} v#{version} is starting up\n".color(:white)
60
+ STDOUT.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [*] #{@component} v#{version} is starting up\n").white
61
61
  send_to_syslog("#{@component} v#{version} is starting up", :helo)
62
62
  send_to_file("#{@component} v#{version} is starting up", :helo)
63
63
  Codesake::Commons::Io.create_pid_file(pid_file) unless pid_file.nil?
64
64
  end
65
65
 
66
66
  def bye(pid_file = nil)
67
- STDOUT.print "#{Time.now.strftime("%H:%M:%S")} [*] #{@component} is leaving\n".color(:white)
67
+ STDOUT.print Rainbow("#{Time.now.strftime("%H:%M:%S")} [*] #{@component} is leaving\n").white
68
68
  send_to_syslog("#{@component} is leaving", :helo)
69
69
  send_to_file("#{@component} is leaving", :helo)
70
70
  Codesake::Commons::Io.remove_pid_file(pid_file) unless pid_file.nil?
@@ -1,5 +1,5 @@
1
1
  module Codesake
2
2
  module Commons
3
- VERSION = "0.90.0"
3
+ VERSION = "0.95.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codesake-commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.90.0
4
+ version: 0.95.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-12 00:00:00.000000000 Z
12
+ date: 2014-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: 2.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: 2.0.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: mechanize
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -63,7 +63,7 @@ description: codesake.com is an application security startup providing code revi
63
63
  and penetration test services for Ruby powered web applications. codesake_commons
64
64
  is the gem containing common ground routines useful across the project
65
65
  email:
66
- - thesp0nge@gmail.com
66
+ - paolo@codesake.com
67
67
  executables: []
68
68
  extensions: []
69
69
  extra_rdoc_files: []