codesake_commons 0.60.0 → 0.67.0

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ codesake
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p429
@@ -19,35 +19,35 @@ module Codesake
19
19
  end
20
20
 
21
21
  def die(msg, pid_file=nil)
22
- printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:red)
22
+ STDERR.printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:red)
23
23
  send_to_syslog(msg, :helo)
24
24
  Codesake::Commons::Io.remove_pid_file(pid_file) unless pid_file.nil?
25
25
  Kernel.exit(-1)
26
26
  end
27
27
 
28
28
  def err(msg)
29
- printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:red)
29
+ STDERR.printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:red)
30
30
  send_to_syslog(msg, :err)
31
31
  end
32
32
 
33
33
  def warn(msg)
34
- printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:yellow)
34
+ STDOUT.printf "#{Time.now.strftime("%H:%M:%S")} [!] #{msg}\n".color(:yellow)
35
35
  send_to_syslog(msg, :warn)
36
36
  end
37
37
 
38
38
  def ok(msg)
39
- printf "#{Time.now.strftime("%H:%M:%S")} [*] #{msg}\n".color(:green)
39
+ STDOUT.printf "#{Time.now.strftime("%H:%M:%S")} [*] #{msg}\n".color(:green)
40
40
  send_to_syslog(msg, :log)
41
41
  end
42
42
 
43
43
  def log(msg)
44
44
  return if @silencer
45
- printf "#{Time.now.strftime("%H:%M:%S")}: #{msg}\n".color(:white)
45
+ STDOUT.printf "#{Time.now.strftime("%H:%M:%S")}: #{msg}\n".color(:white)
46
46
  send_to_syslog(msg, :debug)
47
47
  end
48
48
 
49
49
  def helo(msg, pid_file = nil)
50
- printf "[*] #{msg} at #{Time.now.strftime("%H:%M:%S")}\n".color(:white)
50
+ STDOUT.printf "[*] #{msg} at #{Time.now.strftime("%H:%M:%S")}\n".color(:white)
51
51
  send_to_syslog(msg, :helo)
52
52
  create_pid_file(pid_file) unless pid_file.nil?
53
53
  end
@@ -55,7 +55,6 @@ module Codesake
55
55
  def toggle_silence
56
56
  @silencer = ! @silencer
57
57
  @verbose = ! @silencer
58
- warn("silenced. Logs are disabled") if @silencer
59
58
  end
60
59
 
61
60
  def toggle_syslog
@@ -1,5 +1,5 @@
1
1
  module Codesake
2
2
  module Commons
3
- VERSION = "0.60.0"
3
+ VERSION = "0.67.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.60.0
4
+ version: 0.67.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-30 00:00:00.000000000 Z
12
+ date: 2013-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rainbow
@@ -39,9 +39,9 @@ files:
39
39
  - .document
40
40
  - .gitignore
41
41
  - .rspec
42
- - .rvmrc
42
+ - .ruby-gemset
43
+ - .ruby-version
43
44
  - Gemfile
44
- - LICENSE
45
45
  - LICENSE.txt
46
46
  - README.md
47
47
  - Rakefile
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 1.8.24
76
+ rubygems_version: 1.8.25
77
77
  signing_key:
78
78
  specification_version: 3
79
79
  summary: codesake_commons is the gem containing common ground routines useful across
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use 1.9.3@codesake
data/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2012 Paolo Perego
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.