empezar 0.4.0 → 0.4.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.
- data/README.md +8 -6
- data/lib/empezar/runner.rb +6 -2
- data/lib/empezar/version.rb +1 -1
- metadata +3 -4
data/README.md
CHANGED
@@ -19,10 +19,12 @@ Then create a ruby script anywhere in the folder and run it
|
|
19
19
|
|
20
20
|
```ruby
|
21
21
|
# script.rb
|
22
|
-
require 'empezar'
|
23
22
|
|
24
|
-
|
25
|
-
|
23
|
+
require 'empezar/run'
|
24
|
+
# Maps config/main.yaml to Configuration as SymbolMatrix
|
25
|
+
# Gets ready Log as a logger in log/main.log
|
26
|
+
# Also gets $stdout setted as the output IO
|
27
|
+
# and gets ARGV passed as arguments for the configuration to be completed
|
26
28
|
|
27
29
|
Log.info "This will be logged and written in the shell"
|
28
30
|
|
@@ -33,8 +35,8 @@ end
|
|
33
35
|
|
34
36
|
...and then
|
35
37
|
|
36
|
-
ruby script.rb
|
38
|
+
ruby script.rb speak.only:truth
|
37
39
|
|
38
|
-
You
|
40
|
+
You will see some output in the terminal after that.
|
39
41
|
|
40
|
-
This is really short, so here, [have a picture of a monkey](http://i.dailymail.co.uk/i/pix/2011/07/04/article-2011051-0CDC0F0900000578-739_634x894.jpg) . Enjoy
|
42
|
+
This is really short, so here, [have a picture of a monkey](http://i.dailymail.co.uk/i/pix/2011/07/04/article-2011051-0CDC0F0900000578-739_634x894.jpg) . Enjoy
|
data/lib/empezar/runner.rb
CHANGED
@@ -15,8 +15,12 @@ module Empezar
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.start_logger log_file, stdout
|
18
|
-
|
19
|
-
|
18
|
+
if log_file == 'log/main.log'
|
19
|
+
Dir.mkdir 'log' unless Dir.exist? 'log'
|
20
|
+
Empezar::Log.start Logger.new 'log/main.log', 'daily'
|
21
|
+
else
|
22
|
+
Empezar::Log.start Logger.new log_file, 'daily'
|
23
|
+
end
|
20
24
|
if Empezar::Configuration.instance.has_key? :verbosity and Empezar::Configuration.instance.verbosity == 'silent'
|
21
25
|
else
|
22
26
|
Empezar::Log.instance.formatter = EchoingFormatter.new Logger::Formatter.new, stdout
|
data/lib/empezar/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: empezar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
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:
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: symbolmatrix
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
requirements: []
|
190
190
|
rubyforge_project:
|
191
|
-
rubygems_version: 1.8.
|
191
|
+
rubygems_version: 1.8.23
|
192
192
|
signing_key:
|
193
193
|
specification_version: 3
|
194
194
|
summary: A simple Ruby library to enforce a convention for configuration, logging
|
@@ -210,4 +210,3 @@ test_files:
|
|
210
210
|
- spec/log_spec.rb
|
211
211
|
- spec/runner_spec.rb
|
212
212
|
- spec/spec_helper.rb
|
213
|
-
has_rdoc:
|