acts_as_time_racing 0.1 → 0.2
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/.gitignore +1 -0
- data/README.markdown +23 -1
- data/acts_as_time_racing.gemspec +3 -3
- metadata +2 -2
data/.gitignore
CHANGED
data/README.markdown
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
Acts As Time Racing
|
|
2
2
|
===========================
|
|
3
|
+
Record one item's start and finish time
|
|
3
4
|
|
|
5
|
+
## Usage
|
|
6
|
+
1. Add started_at and finished_at datetime column to the table.
|
|
7
|
+
2. Now here you go.
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
```ruby
|
|
10
|
+
class LearnIssue < ActiveRecord::Base
|
|
11
|
+
include ActsAsTimeRacing
|
|
12
|
+
end
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
1.9.3-p392 :001 > issue = LearnIssue.find(7)
|
|
17
|
+
LearnIssue Load (0.5ms) SELECT `learn_issue`.* FROM `learn_issue` WHERE `learn_issue`.`id` = 7 LIMIT 1
|
|
18
|
+
=> #<LearnIssue id: 7, started_at: "2013-05-14 04:54:41", finished_at: nil, >
|
|
19
|
+
1.9.3-p392 :002 > issue.started_at
|
|
20
|
+
=> Tue, 14 May 2013 12:54:41 CST +08:00
|
|
21
|
+
1.9.3-p392 :003 > issue.started?
|
|
22
|
+
=> true
|
|
23
|
+
1.9.3-p392 :004 > issue.finished_at
|
|
24
|
+
=> nil
|
|
25
|
+
1.9.3-p392 :005 > issue.finished?
|
|
26
|
+
=> false
|
|
27
|
+
```
|
data/acts_as_time_racing.gemspec
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'acts_as_time_racing'
|
|
3
|
-
s.version = '0.
|
|
4
|
-
s.date = '2013-05
|
|
5
|
-
s.summary = "Record one item's start and finish"
|
|
3
|
+
s.version = '0.2'
|
|
4
|
+
s.date = '2013-06-05'
|
|
5
|
+
s.summary = "Record one item's start and finish time"
|
|
6
6
|
s.summary = s.description
|
|
7
7
|
s.authors = ["mvj3"]
|
|
8
8
|
s.email = 'mvjome@gmail.com'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts_as_time_racing
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.2'
|
|
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-05
|
|
12
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description:
|
|
15
15
|
email: mvjome@gmail.com
|