fewald-worklog 0.1.1 → 0.1.6
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/worklog/version.rb +20 -0
- metadata +1 -2
- data/worklog/templates/favicon.svg.erb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d00dc4409fc2a39a23679acc288ef11cfe8af1d8998a5db003487b2113deebd
|
4
|
+
data.tar.gz: f262b00bcfb7eed0a284806589dcd261a66a27e64583618e4f9e6a6411226919
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03bbe92f50825ec35eeca2a008cf24e62d846703edb8e6213f4a3ed65a105a527bf87d19ac436c96f26267f9962396a3fbf5481a1f551e4f78ce7c6568ef5843
|
7
|
+
data.tar.gz: 64d71ce544ff8902ebc1535fd1ee83c39c9cf7d71cd6137ff4ec5fd46041932ce52001123514f266eec629cd477a09304f4c0f68241c3cf2337521be43df754a
|
data/worklog/version.rb
CHANGED
@@ -9,3 +9,23 @@ def current_version
|
|
9
9
|
version_file_path = File.join(Pathname.new(__dir__).parent, '.version')
|
10
10
|
File.read(version_file_path).strip
|
11
11
|
end
|
12
|
+
|
13
|
+
# Increment version number according to SemVer.
|
14
|
+
# @param version [String] The current version.
|
15
|
+
# @param part [String] The part of the version to increment.
|
16
|
+
# @return [String] The incremented version.
|
17
|
+
def increment_version(version, part = 'patch')
|
18
|
+
major, minor, patch = version.split('.').map(&:to_i)
|
19
|
+
case part
|
20
|
+
when 'major'
|
21
|
+
major += 1
|
22
|
+
minor = 0
|
23
|
+
patch = 0
|
24
|
+
when 'minor'
|
25
|
+
minor += 1
|
26
|
+
patch = 0
|
27
|
+
when 'patch'
|
28
|
+
patch += 1
|
29
|
+
end
|
30
|
+
[major, minor, patch].join('.')
|
31
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fewald-worklog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Friedrich Ewald
|
@@ -36,7 +36,6 @@ files:
|
|
36
36
|
- worklog/storage.rb
|
37
37
|
- worklog/string_helper.rb
|
38
38
|
- worklog/summary.rb
|
39
|
-
- worklog/templates/favicon.svg.erb
|
40
39
|
- worklog/templates/index.html.erb
|
41
40
|
- worklog/version.rb
|
42
41
|
- worklog/webserver.rb
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
-
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
4
|
-
<rect fill="#fff" stroke="#000" x="0" y="0" width="128" height="128" stroke-width="4" />
|
5
|
-
<rect fill="#fff" stroke="#000" x="32" y="32" width="64" height="64" stroke-width="2" />
|
6
|
-
<text x="10" y="30" fill="green" font-size="32"><%= Date.today %></text>
|
7
|
-
</svg>
|