timetrap_toggl 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timetrap_toggl/config.rb +4 -0
- data/lib/timetrap_toggl/formatter.rb +9 -3
- data/lib/timetrap_toggl/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb0331f36f9285322c88cf43c20ae509394c179
|
4
|
+
data.tar.gz: dccae8c5d548308ff32eb4bf61c4bb564fea12dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a90e69ec2cec4dc5fb9f15b18aeff0cc9f65c54041888bbc3c905ce8e83091aca7946eadd80c1002c3f5b74d78008024bfee593b23c39f6b5adc996845ad927f
|
7
|
+
data.tar.gz: 6c7bb6cf97697915f28e5335063815a11487bffc254735bc80e8311233796578d0db59908a213fdac92c427b9a38d35d7d671a468de6c052f3deb51f7b46fabf
|
@@ -30,8 +30,14 @@ class TimetrapToggl::Formatter
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def project
|
33
|
-
config.
|
34
|
-
|
33
|
+
if config.aliases[code]
|
34
|
+
config.projects.find do |p|
|
35
|
+
p["name"] == config.aliases[code]
|
36
|
+
end
|
37
|
+
else
|
38
|
+
config.projects.find do |p|
|
39
|
+
code == p["name"].downcase.gsub(/[^a-zA-Z\d\s]/, '').gsub(/\s+/, '-')
|
40
|
+
end
|
35
41
|
end
|
36
42
|
end
|
37
43
|
|
@@ -45,7 +51,7 @@ class TimetrapToggl::Formatter
|
|
45
51
|
|
46
52
|
def code
|
47
53
|
if match = TOGGABLE_REGEX.match(entry[:note])
|
48
|
-
code = match[1]
|
54
|
+
code = match[1].downcase
|
49
55
|
end
|
50
56
|
end
|
51
57
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timetrap_toggl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Palhas
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.6.
|
122
|
+
rubygems_version: 2.6.8
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: A toggl formatter for Timetrap
|