mcalendar 0.5.1 → 0.5.2
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/README.md +1 -1
- data/lib/mcalendar/config.rb +2 -1
- data/lib/mcalendar/options.rb +7 -4
- data/lib/mcalendar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d1ff265098d4230e22ea2fc37fa0abc0eb0beab77d4ed599b4d3b9d5010ba1
|
4
|
+
data.tar.gz: e4690991dcd510c5b6586d1ccb84a6504c6774962c1a0def325cb5464bdbb152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c1671c2e46bccae55d446fa2ef6a81cbb2b690d806bb7f909a9e0f6ef7a6b8ba8544cf7ec19cc503fa873692b4ab6f6485d4bd25293e4185f12ffcb789e0f9
|
7
|
+
data.tar.gz: 3db78a0da8022da712daa53a2c61a34b0e7aa986abf8a71ade7e2827c92cea320f263d03173cae21c26751640de3cfb204eaba4703fc5aa9a5f357e508eab0b3
|
data/README.md
CHANGED
@@ -74,7 +74,7 @@ mcalendar 2021/02 -n my_calendar.pdf
|
|
74
74
|
|
75
75
|
### Configure mcalendar schedule
|
76
76
|
|
77
|
-
mcalendar reads mcalendar.yml in the current working directory as mcalendar's schedule file. It can contain the following settings:
|
77
|
+
mcalendar reads `~/.mcalendar.yml` or `mcalendar.yml` in the current working directory as mcalendar's schedule file. It can contain the following settings:
|
78
78
|
* holiday
|
79
79
|
* anniversary
|
80
80
|
|
data/lib/mcalendar/config.rb
CHANGED
@@ -23,5 +23,6 @@ module Mcalendar
|
|
23
23
|
DEFAULT_PDF_NAME = "calendar.pdf".freeze
|
24
24
|
|
25
25
|
DEFAULT_CONFIG_FILE = "mcalendar.yml".freeze
|
26
|
-
|
26
|
+
GLOBAL_CONFIG_FILE = File.expand_path("~/.mcalendar.yml").freeze
|
27
|
+
BUILT_IN_CONFIG_FILE = File.expand_path("../../mcalendar.yml", __dir__).freeze
|
27
28
|
end
|
data/lib/mcalendar/options.rb
CHANGED
@@ -7,14 +7,17 @@ module Mcalendar
|
|
7
7
|
:anniversary => {}
|
8
8
|
}
|
9
9
|
|
10
|
-
# If mcalendar.yml is not found, load the built-in mcalendar.yml.
|
10
|
+
# If mcalendar.yml or ~/.mcalendar.yml is not found, load the built-in mcalendar.yml.
|
11
11
|
if File.exist?(Mcalendar::DEFAULT_CONFIG_FILE)
|
12
|
-
|
12
|
+
config_yaml = Mcalendar::DEFAULT_CONFIG_FILE
|
13
|
+
elsif File.exist?(Mcalendar::GLOBAL_CONFIG_FILE)
|
14
|
+
config_yaml = Mcalendar::GLOBAL_CONFIG_FILE
|
13
15
|
else
|
14
|
-
|
15
|
-
load_config(config_file)
|
16
|
+
config_yaml = Mcalendar::BUILT_IN_CONFIG_FILE
|
16
17
|
end
|
17
18
|
|
19
|
+
load_config(config_yaml)
|
20
|
+
|
18
21
|
end
|
19
22
|
|
20
23
|
def hash_key_to_sym(h)
|
data/lib/mcalendar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mcalendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icm7216
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prawn
|