work_timer 0.1.1 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +22 -6
- data/demo.gif +0 -0
- data/exe/work_timer +0 -4
- data/lib/work_timer/version.rb +1 -1
- data/lib/work_timer.rb +2 -7
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3117d2c46952fc1e87d53cc1cc25dd62b1606c20222b6a21c06deddcbd937ed4
|
4
|
+
data.tar.gz: 655bd1fd3490871081f86d48201bdcb567a7da094d336b80afe0366f241bd448
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5151c48038584a58c7db30733c1af5965542264eae1e1d8fe4fb8307539b344c4508ee8353cc04c29ae1632a36c32dc971cdd9b3135e9be8802a7580ec09cc53
|
7
|
+
data.tar.gz: bbd5c565e35ae45a846243f3880aaa5009b08cc50b53db7571a098fe34e098747653c97a61ad8c6e876a9d12ca1e2b2f2f3df284076382ffa39e5b9f4816d994
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
#
|
1
|
+
# work_timer
|
2
2
|
|
3
|
-
|
3
|
+
[](https://codeclimate.com/github/9sako6/work_timer/maintainability)
|
4
4
|
|
5
|
-
|
5
|
+
|
6
|
+
This gem measures the time.
|
7
|
+
|
8
|
+

|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -21,8 +24,21 @@ Or install it yourself as:
|
|
21
24
|
$ gem install work_timer
|
22
25
|
|
23
26
|
## Usage
|
27
|
+
**Run:**
|
28
|
+
|
29
|
+
```
|
30
|
+
$ work_timer
|
31
|
+
```
|
32
|
+
If you don't specify a logfile, your working log is saved in ```work_timer_default.log```.
|
33
|
+
|
34
|
+
You can specify the file to save your log:
|
35
|
+
```
|
36
|
+
$ work_timer <LOG_FILE_PATH>
|
37
|
+
```
|
38
|
+
|
24
39
|
|
25
|
-
|
40
|
+
**Quit:**
|
41
|
+
input ```q```
|
26
42
|
|
27
43
|
## Development
|
28
44
|
|
@@ -32,7 +48,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
48
|
|
33
49
|
## Contributing
|
34
50
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/9sako6/work_timer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
52
|
|
37
53
|
## License
|
38
54
|
|
@@ -40,4 +56,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
56
|
|
41
57
|
## Code of Conduct
|
42
58
|
|
43
|
-
Everyone interacting in the WorkTimer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
59
|
+
Everyone interacting in the WorkTimer project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/9sako6/work_timer/blob/master/CODE_OF_CONDUCT.md).
|
data/demo.gif
ADDED
Binary file
|
data/exe/work_timer
CHANGED
data/lib/work_timer/version.rb
CHANGED
data/lib/work_timer.rb
CHANGED
@@ -1,11 +1,6 @@
|
|
1
1
|
require "work_timer/version"
|
2
2
|
|
3
3
|
module WorkTimer
|
4
|
-
# Your code goes here...
|
5
|
-
def self.greet
|
6
|
-
'Hello'
|
7
|
-
end
|
8
|
-
|
9
4
|
class Work
|
10
5
|
def initialize(fileName)
|
11
6
|
@fileName = fileName
|
@@ -41,8 +36,8 @@ module WorkTimer
|
|
41
36
|
|
42
37
|
def record_time
|
43
38
|
File.open(@fileName, "a+") do |f|
|
44
|
-
|
45
|
-
workTime = (@endTime-@startTime.to_i+60*60*
|
39
|
+
timezone = Time.now.strftime("%z").to_i/100
|
40
|
+
workTime = (@endTime-@startTime.to_i+60*60*(24-timezone)).strftime("%T")
|
46
41
|
f.puts @startTime, @endTime, workTime
|
47
42
|
end
|
48
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: work_timer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 9sako6
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- bin/console
|
73
73
|
- bin/setup
|
74
74
|
- bin/work_timer
|
75
|
+
- demo.gif
|
75
76
|
- exe/work_timer
|
76
77
|
- lib/work_timer.rb
|
77
78
|
- lib/work_timer/version.rb
|