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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95211b380e35341b87a230655872177aa6bcb4263fcdbc0b0a590bdc357346d3
4
- data.tar.gz: d64857404d738154ee5b5b7bd717eea2d862bad294cede2946b1debf08f6940d
3
+ metadata.gz: 6d00dc4409fc2a39a23679acc288ef11cfe8af1d8998a5db003487b2113deebd
4
+ data.tar.gz: f262b00bcfb7eed0a284806589dcd261a66a27e64583618e4f9e6a6411226919
5
5
  SHA512:
6
- metadata.gz: 27f40f229dc637b3985793a8b2bcb5858ac3883cc739a5bc56c77919e65d3a6580b7deac2e1f5825e9165da0035754f3b15d68a22e4971bf460b0c51be4048bc
7
- data.tar.gz: 4292212bb151fe886c8996b8538144b7a76427e5518783d62bc40616a3c969fe398edbfbaa2fcfbc042c76785f11fba1ad186670a378bcccbe2f45264e3e7e23
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.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>