gpuzzletime 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -0
- data/.travis.yml +3 -1
- data/Gemfile +2 -0
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/gpuzzletime.gemspec +3 -1
- data/lib/gpuzzletime/app.rb +5 -4
- data/lib/gpuzzletime/version.rb +1 -1
- metadata +34 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad32482efc9bdb226539c6ff78448407dc53abd9290d245d9d90303c97b8a8d4
|
4
|
+
data.tar.gz: f10bf0669eb02e48aa06ea0f668af33b79a641f88c1dc0fbbc578dfa9694f357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94eb248ad45b98d633af96960952edbe7067d0fed37623769b0ca1d7fb1830f39b4173b9ac84608c26bb7c5a9256ca323a731a1a2c202e1c5be4b1c366fa6c71
|
7
|
+
data.tar.gz: cf5212b3a8846f48e4a09f02deef0337ec5ce01861797982c53670e67610549af3427ec89705704b06ac44add75ceeb19a0982f9522948cb11f7c84fb05bb039
|
data/.rubocop.yml
CHANGED
@@ -7,6 +7,11 @@ Style/TrailingCommaInArrayLiteral:
|
|
7
7
|
Style/TrailingCommaInHashLiteral:
|
8
8
|
EnforcedStyleForMultiline: consistent_comma
|
9
9
|
|
10
|
+
Layout/AlignHash:
|
11
|
+
EnforcedHashRocketStyle: table
|
12
|
+
EnforcedColonStyle: table
|
13
|
+
EnforcedLastArgumentHashStyle: always_inspect # default
|
14
|
+
|
10
15
|
Metrics/BlockLength:
|
11
16
|
Exclude:
|
12
17
|
- spec/**/*
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'gpuzzletime'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "gpuzzletime"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start
|
data/gpuzzletime.gemspec
CHANGED
@@ -20,9 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_development_dependency 'bundler'
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
24
|
spec.add_development_dependency 'overcommit', '~> 0.45'
|
25
|
+
spec.add_development_dependency 'pry', '~> 0.12'
|
25
26
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
27
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
28
|
spec.add_development_dependency 'rubocop', '~> 0.50'
|
29
|
+
spec.add_development_dependency 'timecop', '~> 0.9'
|
28
30
|
end
|
data/lib/gpuzzletime/app.rb
CHANGED
@@ -57,6 +57,7 @@ module Gpuzzletime
|
|
57
57
|
# this is mixing preparation, assembly and output, but gets the job done
|
58
58
|
next unless date # guard against the machine
|
59
59
|
next unless @date == :all || @date == date # limit to one day if passed
|
60
|
+
|
60
61
|
entries[date] = []
|
61
62
|
|
62
63
|
start = nil # at the start of the day, we have no previous end
|
@@ -132,10 +133,10 @@ module Gpuzzletime
|
|
132
133
|
|
133
134
|
def named_dates(date)
|
134
135
|
case date
|
135
|
-
when 'yesterday'
|
136
|
-
when 'today'
|
137
|
-
when 'last'
|
138
|
-
when
|
136
|
+
when 'yesterday' then Date.today.prev_day.to_s
|
137
|
+
when 'today' then Date.today.to_s
|
138
|
+
when 'last' then parse(read).to_h.keys.compact.sort[-2] || Date.today.prev_day.to_s
|
139
|
+
when /\d{4}(-\d{2}){2}/ then date
|
139
140
|
end
|
140
141
|
end
|
141
142
|
|
data/lib/gpuzzletime/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gpuzzletime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Viehweger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: overcommit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.45'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.12'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.12'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0.50'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: timecop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.9'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.9'
|
83
111
|
description:
|
84
112
|
email:
|
85
113
|
- kronn@kronn.de
|