melog 0.0.0 → 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.
- data/MIT-LICENSE.md +10 -0
- data/{README → README.md} +0 -0
- data/bin/melog +3 -2
- data/lib/melog.rb +10 -0
- data/spec/melog_spec.rb +23 -1
- metadata +5 -4
data/MIT-LICENSE.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012 Juha Kajava
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
10
|
+
|
data/{README → README.md}
RENAMED
|
File without changes
|
data/bin/melog
CHANGED
data/lib/melog.rb
CHANGED
data/spec/melog_spec.rb
CHANGED
|
@@ -2,7 +2,29 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe Melog do
|
|
4
4
|
|
|
5
|
+
before :each do
|
|
6
|
+
@melog = Melog.new 'foo bar'
|
|
7
|
+
end
|
|
8
|
+
|
|
5
9
|
it 'should be able to create an instance' do
|
|
6
|
-
|
|
10
|
+
@melog.should_not be_nil
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
it 'should have changeable date stamp' do
|
|
14
|
+
@melog.time.should be_kind_of Time
|
|
15
|
+
@melog.time.should be_within(0.01).of Time.now
|
|
16
|
+
|
|
17
|
+
new_time = Time.now - 60
|
|
18
|
+
@melog.time = new_time
|
|
19
|
+
@melog.time.should be new_time
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it 'should have a message' do
|
|
23
|
+
@melog.message.should == 'foo bar'
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
it 'should display time with message using to_s' do
|
|
27
|
+
time = @melog.time
|
|
28
|
+
@melog.to_s.should == "[#{time}] foo bar"
|
|
7
29
|
end
|
|
8
30
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: melog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,9 +9,9 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-06-
|
|
12
|
+
date: 2012-06-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
|
-
description: Command line logging tool.
|
|
14
|
+
description: Command line logging tool. Prints a message with time-stamp.
|
|
15
15
|
email: juhakaja@gmail.com
|
|
16
16
|
executables:
|
|
17
17
|
- melog
|
|
@@ -21,7 +21,8 @@ files:
|
|
|
21
21
|
- lib/melog.rb
|
|
22
22
|
- spec/spec_helper.rb
|
|
23
23
|
- spec/melog_spec.rb
|
|
24
|
-
- README
|
|
24
|
+
- README.md
|
|
25
|
+
- MIT-LICENSE.md
|
|
25
26
|
- bin/melog
|
|
26
27
|
homepage: http://rubygems.org/gems/melog
|
|
27
28
|
licenses: []
|