fewald-worklog 0.2.13 → 0.2.14

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/lib/configuration.rb +20 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 190a52d7236e8befad053e79f9fbba8f32f149e354695148a73b732b21172e6b
4
- data.tar.gz: 5bbd3f3a1200119a20288eb59889bd7498c8d08a01e6ebbc1506b95dd8233e38
3
+ metadata.gz: 81ae390a529cac702e93988d280c29ada0a2b899d602981663d0c6bf7386a892
4
+ data.tar.gz: 40c570f2e79185946bfa8d2aa567ceb81e487ac1babcbffffbbcb50e890c499d
5
5
  SHA512:
6
- metadata.gz: a2a075eeda5349c0190ce4a6420c5bd6b34759ffdf11845227f9c4fc89d2b522ba095c5059abb19b8c4508c7eaf0a2faf72ac6a980844bd89e6d5dde7d982052
7
- data.tar.gz: 8af5b16a3b3288f5c124d59442d76e83a0d6743ad5a34de5d4c930d3217c0277809082c8fe9c4b2045bf77311c03617b4fb9d5c4b9f495045b737d9a21345efc
6
+ metadata.gz: eb070059289ac74060eae38e893e2792732a786412c93c75bdb5b284fb1663b576ebc242e51d732c0ef3dbe67b3f0ebfe1d3c5840ba5d0ae5485c0034e0a00ba
7
+ data.tar.gz: 3754d8ff695a472761253f26905a05f825c4f56a07a50ad6b398bbd2b436049fe91c7764ff0f7dcbbaa3422adc1dbeae6e30b4c667e818229d941c30546e7757
data/.version CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.14
data/lib/configuration.rb CHANGED
@@ -5,6 +5,14 @@ require 'yaml'
5
5
 
6
6
  module Worklog
7
7
  # Configuration class for the application.
8
+ # @!attribute [rw] storage_path
9
+ # @return [String] The path where the application stores its data.
10
+ # @!attribute [rw] log_level
11
+ # @return [Symbol] The logging level for the application.
12
+ # Possible values: :debug, :info, :warn, :error, :fatal
13
+ # @!attribute [rw] webserver_port
14
+ # @return [Integer] The port on which the web server runs.
15
+ # Default is 3000.
8
16
  class Configuration
9
17
  attr_accessor :storage_path, :log_level, :webserver_port
10
18
 
@@ -35,5 +43,17 @@ module Worklog
35
43
 
36
44
  config
37
45
  end
46
+
47
+ # Check if the storage path exists.
48
+ # @return [Boolean] true if the storage path exists, false otherwise
49
+ def storage_path_exist?
50
+ File.exist?(@storage_path)
51
+ end
52
+
53
+ # Check if the storage path is the default path.
54
+ # @return [Boolean] true if the storage path is the default, false otherwise
55
+ def default_storage_path?
56
+ @storage_path == File.join(Dir.home, '.worklog')
57
+ end
38
58
  end
39
59
  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.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Friedrich Ewald