logtime 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +14 -14
- data/UPDATES.md +11 -0
- data/VERSION +1 -1
- data/lib/commands/list.rb +7 -2
- data/lib/subcommands/series.rb +18 -5
- data/lib/subcommands/tags.rb +2 -0
- data/logtime.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +6 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803c1f947737fec034e52bd6fb27a21db22150c4
|
4
|
+
data.tar.gz: d0a72ce3030c062b4ffd90bfb65d371ac93e92b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef463ffdeaf7df8785a7911f72b1e06b9e16c5f6b52df650081eada9144cc91868ca5e3cb22027b36c594cca99103969c82f9a48c7cdadda4880217b85e7b9ec
|
7
|
+
data.tar.gz: d9cb61ad887354ff65cca0b3be23eecc4ba442c9f245682fb1cfeb9b024aa5865fc949cc7f2c43cbe481b08eb28fc3165e631dd1175a94172957fc461ed8a842
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activemodel (4.1
|
5
|
-
activesupport (= 4.1
|
4
|
+
activemodel (4.2.1)
|
5
|
+
activesupport (= 4.2.1)
|
6
6
|
builder (~> 3.1)
|
7
|
-
activerecord (4.1
|
8
|
-
activemodel (= 4.1
|
9
|
-
activesupport (= 4.1
|
10
|
-
arel (~>
|
11
|
-
activesupport (4.1
|
12
|
-
i18n (~> 0.
|
7
|
+
activerecord (4.2.1)
|
8
|
+
activemodel (= 4.2.1)
|
9
|
+
activesupport (= 4.2.1)
|
10
|
+
arel (~> 6.0)
|
11
|
+
activesupport (4.2.1)
|
12
|
+
i18n (~> 0.7)
|
13
13
|
json (~> 1.7, >= 1.7.7)
|
14
14
|
minitest (~> 5.1)
|
15
|
-
thread_safe (~> 0.
|
15
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
16
16
|
tzinfo (~> 1.1)
|
17
|
-
arel (
|
17
|
+
arel (6.0.0)
|
18
18
|
builder (3.2.2)
|
19
19
|
chronic_duration (0.10.6)
|
20
20
|
numerizer (~> 0.1.1)
|
@@ -32,7 +32,7 @@ PLATFORMS
|
|
32
32
|
ruby
|
33
33
|
|
34
34
|
DEPENDENCIES
|
35
|
-
activerecord
|
36
|
-
chronic_duration
|
37
|
-
sqlite3
|
38
|
-
thor
|
35
|
+
activerecord
|
36
|
+
chronic_duration
|
37
|
+
sqlite3
|
38
|
+
thor
|
data/UPDATES.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
Releases
|
2
|
+
=======
|
3
|
+
|
4
|
+
## 0.2.0 (15th June 2015)
|
5
|
+
|
6
|
+
* Renamed --active option to --all for `list`
|
7
|
+
* Added ability to search series by log name, e,g; `series ls logname`
|
8
|
+
* Fixed debug output in `series ls`
|
9
|
+
* Fixed log name not displaying in `series ls`
|
10
|
+
* Formatted `tags ls` to be more similar to other tables
|
11
|
+
* Updated activerecord to 4.2.1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/commands/list.rb
CHANGED
@@ -2,11 +2,16 @@ module Commands
|
|
2
2
|
module List
|
3
3
|
def self.included(thor)
|
4
4
|
thor.class_eval do
|
5
|
-
option :
|
5
|
+
option :all, :type => :boolean, :default => false
|
6
6
|
option :order, :type => :string, :default => "updated_at"
|
7
7
|
desc "ls", "List time series"
|
8
8
|
def ls(search='')
|
9
|
-
|
9
|
+
if options[:all]
|
10
|
+
logs = Log.all
|
11
|
+
else
|
12
|
+
logs = Log.where(active: true)
|
13
|
+
end
|
14
|
+
logs = logs.includes(:series).includes(:tags)
|
10
15
|
logs = logs.order(options[:order].to_sym => :desc)
|
11
16
|
logs = logs.tagged(search) if !search.blank?
|
12
17
|
|
data/lib/subcommands/series.rb
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
module SubCommands
|
2
2
|
class Series < Thor
|
3
|
-
desc "ls", "List all series"
|
3
|
+
desc "ls [LOG]", "List all series"
|
4
4
|
option :order, :type => :string, :default => "updated_at"
|
5
|
-
def ls
|
6
|
-
|
5
|
+
def ls(search=nil)
|
6
|
+
|
7
|
+
if search.nil?
|
8
|
+
series = ::Series.all.order(options[:order].to_sym => :desc)
|
9
|
+
else
|
10
|
+
log = Log.find_by_name(search)
|
11
|
+
|
12
|
+
if log
|
13
|
+
series = ::Series.where(log: log).order(options[:order].to_sym => :desc)
|
14
|
+
else
|
15
|
+
puts ""
|
16
|
+
say "Could not find #{search}!", :red
|
17
|
+
puts ""
|
18
|
+
exit
|
19
|
+
end
|
20
|
+
end
|
7
21
|
|
8
22
|
series_stats = Statistics.new
|
9
23
|
table = [['#', 'log', 'start', 'end', 'hours']] # header
|
@@ -22,8 +36,7 @@ module SubCommands
|
|
22
36
|
|
23
37
|
# name
|
24
38
|
name = ''
|
25
|
-
|
26
|
-
# name = s.log.name if !s.log.name.empty?
|
39
|
+
name = s.log.name if !s.log.name.empty?
|
27
40
|
|
28
41
|
table << [s.id,
|
29
42
|
name || '',
|
data/lib/subcommands/tags.rb
CHANGED
data/logtime.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
|
-
s.date = '2015-06-
|
2
|
+
s.date = '2015-06-15'
|
3
3
|
s.version = `cat VERSION`.strip
|
4
4
|
s.license = 'MIT'
|
5
5
|
s.name = 'logtime'
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ['Paperback']
|
9
9
|
s.homepage = 'https://github.com/Paperback/Logtime.git'
|
10
10
|
s.description = <<-EOF
|
11
|
-
Tag, record and estimate your time.
|
11
|
+
Tag, record and estimate your time in the shell.
|
12
12
|
Get better at time estimation with statistics.
|
13
13
|
EOF
|
14
14
|
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
# runtime dependencies
|
28
28
|
s.add_runtime_dependency "thor", ["~> 0.19"]
|
29
|
-
s.add_runtime_dependency "activerecord", ["~> 4.
|
29
|
+
s.add_runtime_dependency "activerecord", ["~> 4.2"]
|
30
30
|
s.add_runtime_dependency "sqlite3", ["~> 1.3"]
|
31
31
|
s.add_runtime_dependency "chronic_duration", ["~> 0.10"]
|
32
32
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logtime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paperback
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
2/luIWFCIDih/t3xy/BezkXJLXfRZF2Xd6/Ax9+zEVss6iUJ6kcxwaZ/J5r28EDI
|
31
31
|
KS3vMuAGgck=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-06-
|
33
|
+
date: 2015-06-15 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: thor
|
@@ -52,14 +52,14 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '4.
|
55
|
+
version: '4.2'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '4.
|
62
|
+
version: '4.2'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: sqlite3
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0.10'
|
91
91
|
description: |2
|
92
|
-
Tag, record and estimate your time.
|
92
|
+
Tag, record and estimate your time in the shell.
|
93
93
|
Get better at time estimation with statistics.
|
94
94
|
email: sam@samwhat.com
|
95
95
|
executables:
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- Gemfile.lock
|
104
104
|
- LICENSE.md
|
105
105
|
- README.md
|
106
|
+
- UPDATES.md
|
106
107
|
- VERSION
|
107
108
|
- bin/logtime
|
108
109
|
- bin/lt
|
metadata.gz.sig
CHANGED
Binary file
|