calendarium-romanum 0.5.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +5 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +50 -0
  5. data/.travis.yml +23 -0
  6. data/.yardopts +3 -0
  7. data/Appraisals +67 -0
  8. data/CHANGELOG.md +488 -0
  9. data/Gemfile +26 -0
  10. data/Gemfile.lock +95 -0
  11. data/README.md +601 -0
  12. data/Rakefile +27 -0
  13. data/bin/calendariumrom +3 -0
  14. data/calendarium-romanum.gemspec +31 -0
  15. data/config/locales/cs.yml +4 -0
  16. data/config/locales/en.yml +20 -14
  17. data/config/locales/es.yml +94 -0
  18. data/config/locales/fr.yml +6 -0
  19. data/config/locales/it.yml +6 -0
  20. data/config/locales/la.yml +6 -0
  21. data/config/locales/pt.yml +94 -0
  22. data/data/README.md +70 -24
  23. data/data/czech-brno-cs.txt +4 -6
  24. data/data/czech-budejovice-cs.txt +4 -6
  25. data/data/czech-cechy-cs.txt +4 -5
  26. data/data/czech-cs.txt +239 -235
  27. data/data/czech-hradec-cs.txt +3 -5
  28. data/data/czech-litomerice-cs.txt +5 -7
  29. data/data/czech-morava-cs.txt +4 -5
  30. data/data/czech-olomouc-cs.txt +2 -4
  31. data/data/czech-ostrava-cs.txt +3 -5
  32. data/data/czech-plzen-cs.txt +3 -5
  33. data/data/czech-praha-cs.txt +3 -4
  34. data/data/easter_dates.txt +67 -0
  35. data/data/universal-1969-la.txt +234 -0
  36. data/data/universal-en.txt +217 -211
  37. data/data/universal-es.txt +246 -0
  38. data/data/universal-fr.txt +217 -210
  39. data/data/universal-it.txt +217 -211
  40. data/data/universal-la.txt +217 -212
  41. data/data/universal-pt.txt +248 -0
  42. data/doc/data_readme.md +2 -0
  43. data/doc/images/class_diagram.png +0 -0
  44. data/doc/images/class_diagram.puml +44 -0
  45. data/doc/yard_readme.rdoc +76 -0
  46. data/lib/calendarium-romanum.rb +16 -2
  47. data/lib/calendarium-romanum/abstract_date.rb +15 -0
  48. data/lib/calendarium-romanum/calendar.rb +150 -33
  49. data/lib/calendarium-romanum/cli.rb +80 -100
  50. data/lib/calendarium-romanum/cli/comparator.rb +83 -0
  51. data/lib/calendarium-romanum/cli/date_parser.rb +30 -0
  52. data/lib/calendarium-romanum/cli/dumper.rb +68 -0
  53. data/lib/calendarium-romanum/cli/helper.rb +23 -0
  54. data/lib/calendarium-romanum/cli/querier.rb +73 -0
  55. data/lib/calendarium-romanum/cr.rb +16 -0
  56. data/lib/calendarium-romanum/data.rb +40 -8
  57. data/lib/calendarium-romanum/day.rb +187 -32
  58. data/lib/calendarium-romanum/enum.rb +41 -24
  59. data/lib/calendarium-romanum/enums.rb +127 -43
  60. data/lib/calendarium-romanum/errors.rb +1 -1
  61. data/lib/calendarium-romanum/ordinalizer.rb +10 -1
  62. data/lib/calendarium-romanum/perpetual_calendar.rb +58 -7
  63. data/lib/calendarium-romanum/rank.rb +39 -8
  64. data/lib/calendarium-romanum/rank_predicates.rb +43 -0
  65. data/lib/calendarium-romanum/sanctorale.rb +213 -23
  66. data/lib/calendarium-romanum/sanctorale_factory.rb +74 -3
  67. data/lib/calendarium-romanum/sanctorale_loader.rb +180 -0
  68. data/lib/calendarium-romanum/sanctorale_writer.rb +124 -0
  69. data/lib/calendarium-romanum/temporale.rb +222 -42
  70. data/lib/calendarium-romanum/temporale/celebration_factory.rb +68 -9
  71. data/lib/calendarium-romanum/temporale/date_helper.rb +85 -0
  72. data/lib/calendarium-romanum/temporale/dates.rb +52 -59
  73. data/lib/calendarium-romanum/temporale/easter_table.rb +27 -0
  74. data/lib/calendarium-romanum/temporale/extensions.rb +15 -0
  75. data/lib/calendarium-romanum/temporale/extensions/christ_eternal_priest.rb +16 -3
  76. data/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb +73 -0
  77. data/lib/calendarium-romanum/transfers.rb +84 -24
  78. data/lib/calendarium-romanum/util.rb +21 -23
  79. data/lib/calendarium-romanum/version.rb +3 -2
  80. data/liturgical_law/1969_normae_universales.md +568 -0
  81. data/liturgical_law/1977_decretum_de_celebratione_baptismatis_domini.md +58 -0
  82. data/liturgical_law/1990_decretum_de_variatione_inducenda.md +67 -0
  83. data/liturgical_law/1998_notificatio_de_occurrentia.md +57 -0
  84. data/liturgical_law/2002_normae_universales.md +946 -0
  85. data/liturgical_law/2006_notification.md +37 -0
  86. data/liturgical_law/2012_declarationes.md +38 -0
  87. data/liturgical_law/2020_dubia_de_calendario_2022.md +100 -0
  88. data/liturgical_law/README.md +74 -0
  89. metadata +61 -38
  90. data/lib/calendarium-romanum/sanctoraleloader.rb +0 -122
  91. data/spec/abstract_date_spec.rb +0 -62
  92. data/spec/calendar_spec.rb +0 -559
  93. data/spec/celebration_factory_spec.rb +0 -16
  94. data/spec/celebration_spec.rb +0 -43
  95. data/spec/cli_spec.rb +0 -155
  96. data/spec/colour_spec.rb +0 -17
  97. data/spec/data_spec.rb +0 -23
  98. data/spec/date_parser_spec.rb +0 -68
  99. data/spec/date_spec.rb +0 -61
  100. data/spec/dates_spec.rb +0 -45
  101. data/spec/day_spec.rb +0 -108
  102. data/spec/enum_spec.rb +0 -51
  103. data/spec/i18n_spec.rb +0 -58
  104. data/spec/ordinalizer_spec.rb +0 -36
  105. data/spec/perpetual_calendar_spec.rb +0 -91
  106. data/spec/rank_spec.rb +0 -57
  107. data/spec/readme_spec.rb +0 -56
  108. data/spec/sanctorale_factory_spec.rb +0 -42
  109. data/spec/sanctorale_spec.rb +0 -191
  110. data/spec/sanctoraleloader_spec.rb +0 -176
  111. data/spec/season_spec.rb +0 -17
  112. data/spec/spec_helper.rb +0 -46
  113. data/spec/temporale_spec.rb +0 -572
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4faa0e6242f3815ad7bdc2b32c13c61f203cd5e6
4
- data.tar.gz: 78018940d6ae8129c0625db963543991bf980350
2
+ SHA256:
3
+ metadata.gz: 4190d0074dc4a169e720b277ae04d3de9d81ea34286e0d6003efb51a5a09fe57
4
+ data.tar.gz: b0e1d5fb8b5d51b253a9558efa3e886aba1c0d4e2c1501a62a04121637e5fb1d
5
5
  SHA512:
6
- metadata.gz: f3b27ee6cd3919d97b6a819baa88cf694a9eedf9b5182ddf766dedf39a9ef85fef8c90962d6fee8417ac3261d0062d158bb60f9cd7a801fcd67f7e1d2d816e85
7
- data.tar.gz: 2cdfdb4bb9d604e5c1b6e59e604719634458c5b0859c79d70d2cb6fe80bf29139ec5400273f83f7e81854144b88cc75affb49f4dfd25681648f1464dc68fb9d7
6
+ metadata.gz: d961be6997bd1d5f8f266724cb0933bd6cc34bd6b4e1078fb59b91435f2103b3646588da16fd548756960d592fac1e1ff42992c54685925a81593bcadbcd926a
7
+ data.tar.gz: 1402abc3b7663cedb0ddb710886d57783ec39af4fb688c3317c43c5c6e0298134b0bc28297ebafd400871cf6e46b01ec5b480d2fc1ace3789e1a6c05b385bd95
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *~
2
+ .rvmrc
3
+ *.gem
4
+ coverage/
5
+ .idea/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/.rubocop.yml ADDED
@@ -0,0 +1,50 @@
1
+ Metrics/LineLength:
2
+ Max: 100
3
+
4
+ Layout/EmptyLinesAroundClassBody:
5
+ Enabled: false
6
+
7
+ Layout/EmptyLinesAroundModuleBody:
8
+ Enabled: false
9
+
10
+ Style/FrozenStringLiteralComment:
11
+ Enabled: false
12
+
13
+ Style/IfUnlessModifier:
14
+ Enabled: false
15
+
16
+ Style/Lambda:
17
+ Enabled: false
18
+
19
+ Style/LambdaCall:
20
+ Enabled: false
21
+
22
+ Style/NumericPredicate:
23
+ Enabled: false
24
+
25
+ Style/PreferredHashMethods:
26
+ Enabled: false
27
+
28
+ Style/RaiseArgs:
29
+ Enabled: false
30
+
31
+ Style/RedundantException:
32
+ Enabled: false
33
+
34
+ Layout/SpaceInsideBlockBraces:
35
+ SpaceBeforeBlockParameters: false
36
+
37
+ Layout/SpaceInsideHashLiteralBraces:
38
+ EnforcedStyle: no_space
39
+
40
+ Layout/SpaceInsideRangeLiteral:
41
+ Enabled: false
42
+
43
+ Style/TrailingCommaInArrayLiteral:
44
+ Enabled: false
45
+
46
+ Style/TrailingCommaInHashLiteral:
47
+ Enabled: false
48
+
49
+ Style/ZeroLengthPredicate:
50
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,23 @@
1
+ language: ruby
2
+ cache: bundler
3
+ dist: trusty
4
+
5
+ install: bundle install --jobs=3 --deployment --without development
6
+
7
+ script: bundle exec rake spec
8
+
9
+ jobs:
10
+ include:
11
+ - rvm: 2.6.5 # ~ latest MRI
12
+ script:
13
+ - bundle exec rake spec_all_locales
14
+ - bundle exec rake data_cmp
15
+ - bash spec/build/gem_build_test.sh
16
+ - rvm: 2.5.0 # oldest officially maintained MRI
17
+ - rvm: 2.0.0 # oldest MRI we support
18
+ # - rvm: jruby-9.1.12.0 # experimental
19
+ # allow_failures:
20
+ # - rvm: jruby-9.1.12.0
21
+
22
+ git:
23
+ depth: 3
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --main doc/yard_readme.rdoc
2
+ --asset doc/images:images
3
+ --file README.md,doc/yard_readme.rdoc,doc/data_readme.md,data/universal-en.txt
data/Appraisals ADDED
@@ -0,0 +1,67 @@
1
+ ### i18n
2
+
3
+ appraise 'i18n-0.7' do
4
+ gem 'i18n', '0.7.0'
5
+ end
6
+
7
+ appraise 'i18n-0.9' do
8
+ gem 'i18n', '0.9.5'
9
+ end
10
+
11
+ appraise 'i18n-1.0' do
12
+ gem 'i18n', '1.0.0'
13
+ end
14
+
15
+ appraise 'i18n-1.8' do
16
+ gem 'i18n', '1.8.9'
17
+ end
18
+
19
+ ### thor
20
+
21
+ appraise 'thor-0.15' do
22
+ gem 'thor', '0.15.0'
23
+ end
24
+
25
+ appraise 'thor-0.16' do
26
+ gem 'thor', '0.15.0'
27
+ end
28
+
29
+ appraise 'thor-0.17' do
30
+ gem 'thor', '0.17.0'
31
+ end
32
+
33
+ appraise 'thor-0.18' do
34
+ gem 'thor', '0.18.1'
35
+ end
36
+
37
+ appraise 'thor-0.19' do
38
+ gem 'thor', '0.19.4'
39
+ end
40
+
41
+ appraise 'thor-0.20' do
42
+ gem 'thor', '0.20.3'
43
+ end
44
+
45
+ # thor >= 1.0 isn't compatible with our version of aruba; CLI specs are broken,
46
+ # but the CLI itself works well, as can be tested by
47
+ # `bundle exec appraisal thor-1.1 ruby -Ilib bin/calendariumrom ...`
48
+
49
+ # ruby >= 2.4 required
50
+ appraise 'thor-1.0' do
51
+ gem 'thor', '1.0.1'
52
+
53
+ group :test do
54
+ gem 'aruba', '1.0.0'
55
+ gem 'cucumber', '3.0.0'
56
+ end
57
+ end
58
+
59
+ # ruby >= 2.4 required
60
+ appraise 'thor-1.1' do
61
+ gem 'thor', '1.1.0'
62
+
63
+ group :test do
64
+ gem 'aruba', '1.0.0'
65
+ gem 'cucumber', '3.0.0'
66
+ end
67
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,488 @@
1
+ # Changelog
2
+
3
+ ## [0.9.0] 2021-04-11
4
+
5
+ ### Fixed
6
+
7
+ - `Transfers` + `Calendar`: on collision of two solemnities of
8
+ exactly the same rank (e.g. collision of the solemnities of
9
+ Sacred Heart of Jesus and Birth of St. John the Baptist in 2022)
10
+ the sanctorale one was scheduled both on the original date and
11
+ on the transferred date and the temporale solemnity was not
12
+ scheduled at all
13
+ - liturgical colour of All Souls (has incorrectly been white
14
+ since the beginning of the project, changed to violet)
15
+
16
+ ### Added
17
+
18
+ - data: General Roman Calendar in Portuguese + Portuguese locale (by Tomas Monteiro @tmonteiro2344)
19
+ - data: all calendars: new memorial of St. Martha, Mary and Lazarus
20
+ (replacing memorial of St. Martha alone),
21
+ new optional memorials of St. Gregory of Narek, St. John De Avila
22
+ and St. Hildegard of Bingen
23
+ - `SanctoraleWriter.new`: new optional keyword argument `front_matter`
24
+ - `Calendar.new`: new optional keyword argument `transfers`
25
+ for supplying custom implementation of the solemnity transfer logic
26
+ - `Temporale#provides_celebration?`
27
+ - `Sanctorale#provides_celebration?`, `#by_symbol`, `#merge`
28
+ - CLI: `calendariumrom id` to list celebration symbols included
29
+ in specified sanctorale data file
30
+ - CLI: `calendariumrom merge` to merge two or more sanctorale data files
31
+ - CLI: `calendariumrom cmp` supports new options `--no-rank`,
32
+ `--no-colour`, `--no-symbol` for ignoring differences in the specified
33
+ celebration properties and option `--title` to check for differences
34
+ in title (ignored by default)
35
+
36
+ ### Changed
37
+
38
+ - `Temporale::Dates` methods are defined as instance methods and made
39
+ available as module methods through `extend self` (so far they were
40
+ defined and only available as module methods)
41
+ - `Temporale::Dates`: helper methods `weekday_before`, `weekday_after`,
42
+ `octave_of` and their derivatives extracted to a new module
43
+ `Temporale::DateHelper` (but they are still available on `Temporale::Dates`, too)
44
+ - data: repeated spaces removed from the Latin, Italian and Spanish
45
+ version of the General Roman Calendar (this does not affect behaviour
46
+ of calendarium-romanum itself, but may affect some other applications
47
+ possibly processing the data files directly)
48
+ - `Transfers#call` return value: now it contains not only solemnities
49
+ transferred (and the destination dates), but also the ones winning
50
+ the original date, unless they are of the two highest ranks
51
+ - `Transfer#call`: in case of collision of two solemnities of exactly
52
+ the same rank temporale always wins over sanctorale
53
+ - `Sanctorale#dup` now properly creates for the clone it's own internal
54
+ data structures independent of the original's ones
55
+ - CLI: `calendariumrom cmp` exits with status 1 if any differences are found
56
+ - CLI: `calendariumrom cmp` prints celebration symbol if available
57
+ - runtime dependencies loosenned: we support `thor` already from version 0.15
58
+ and `i18n` from version 0.7
59
+
60
+ ## [0.8.0] 2020-11-25
61
+
62
+ ### Fixed
63
+
64
+ - several fixes to the solemnity transfer rules:
65
+ - the algorithm was searching for free days only forwards,
66
+ but liturgical law assumes closest free day, even earlier
67
+ - check that two solemnities are not transferred to the same date,
68
+ overwriting one another
69
+ - the special rule on Annunciation from *Normae universales* 60
70
+ implemented
71
+ - fixed bug in computation of the date of Baptism of the Lord if Epiphany
72
+ is transferred to Sunday
73
+ - fixed bug in `Sanctorale#update` preventing more than one `Celebration`
74
+ with nil `#symbol` in a single `Sanctorale`
75
+ - `CelebrationFactory` was setting `Celebration#date` (if not specified)
76
+ to false instead of expected nil (thus breaking type promises)
77
+ - data: `czech-cs.txt`: typo fixed in the feast *symbol* of St. Bartholomew;
78
+ spelling of several feast titles corrected
79
+ - data: `czech-cs.txt`: proof-read against official sources, feasts
80
+ of "BVM, Queen of Angels" and St. Teresa of Calcutta deleted
81
+ (they are not on the calendar of Czech and Moravian dioceses,
82
+ incorrect information was copied from Czech Wikipedia at the time
83
+ of the data file's creation)
84
+ - data: all: Dedication of the Lateran Basilica is feast of the Lord
85
+ (had incorrect rank of a normal feast so far)
86
+ - data: `universal-en.txt`: several inaccuracies concerning liturgical
87
+ colour fixed
88
+
89
+ ### Added
90
+
91
+ - `liturgical_law/`: all documents of liturgical legislation
92
+ containing the liturgical calendar rules (original Latin text)
93
+ in Markdown format, with Ruby code examples proving that
94
+ the rules are implemented correctly;
95
+ the code examples are all executed as part of the gem's test suite
96
+ - `SanctoraleWriter` (contributed by Mike Kasberg @mkasberg)
97
+ - `PerpetualCalendar.new` accepts keyword argument `vespers`
98
+ (cf. `Calendar.new` argument of the same name)
99
+ - `Rank#optional_memorial?`, `#obligatory_memorial?`
100
+ - `AbstractDate#in_year` - more readable alias of `#concretize`
101
+ - `Rank#succ` - (among other things) allows constructing `Range` of `Rank`s
102
+ - `Calendar#transferred`
103
+ - `Temporale::Extensions::DedicationBeforeAllSaints` defining the solemnity
104
+ of Aniversary of Dedication for churches celebrating it on the movable
105
+ date on the last October Sunday
106
+ - `Temporale::Extensions.all` - method listing all Temporale extensions
107
+ defined by the gem
108
+ - `Temporale#each_day`
109
+ - `Temporale::EasterTable` - class handling a simple plaintext format
110
+ for tables of Easter dates
111
+ - `Celebration.new`: new argument `sunday`
112
+ - `SanctoraleLoader`: proper solemnities/feasts/memorials
113
+ can be specified also by adding suffix `p` to the rank code
114
+ (instead of rank priority number used so far),
115
+ similarly suffix `l` can be used to specify proper rank for
116
+ feasts of the Lord
117
+ - data: `universal-1969-la.txt` - historical first version
118
+ of the General Roman Calendar
119
+ - module `Constants` containing all the constants from `Colours`,
120
+ `Seasons` and `Ranks`
121
+
122
+ ### Changed
123
+
124
+ - the gemspec now declares requirement of Ruby >= 2.0
125
+ - `Calendar.new` can be called also without the `year` argument if `Temporale`
126
+ is provided (thus calling `Calendar.new(temporale, sanctorale)`
127
+ instead of `Calendar.new(year, sanctorale, temporale)`)
128
+ - Easter Triduum is now dealt with as a separate `Season`,
129
+ because *Normae universales* 18-21 clearly set the Triduum apart from
130
+ both Lent and Eastertide
131
+ - `Temporale::Extensions::ChristEternalPriest` specifies celebration
132
+ symbol (so far it was nil)
133
+ - `Celebration.new` supports keyword arguments (as an alternative to
134
+ or even in combination with the positional ones)
135
+ - `Temporale`: business logic guaranteeing that `Celebration#sunday?`
136
+ is true also for privileged Sundays (Advent, Lent)
137
+ - `calendariumrom` executable: all subcommands dealing with sanctorale
138
+ data files accept special file name `-` and load sanctorale data
139
+ from stdin in that case
140
+ - `Enum`, `Colours`, `Seasons`, `Ranks` and `Data` changed from classes
141
+ to modules
142
+
143
+ ### Acknowledgements
144
+
145
+ Improvements not affecting the gem's public interface (and thus not listed
146
+ in the changelog) contributed by
147
+
148
+ - Ihor Voloshyn @Snick555
149
+ - Dmitry Zhmurko @zhmurko
150
+
151
+ ## [0.7.1] 2020-06-28
152
+
153
+ ### Fixed
154
+
155
+ - `SanctoraleFactory.load_with_parents` crashing on files without
156
+ metadata
157
+ - `Sanctorale#update` prohibiting application of a particular
158
+ calendar which moves s celebration contained in the calendar being
159
+ updated to an earlier date
160
+ (as exemplified by the bundled calendar of diocese of Litoměřice,
161
+ Czech Republic: on calendarium-romanum 0.7.0
162
+ `CalendariumRomanum::Data['czech-litomerice-cs'].load_with_parents`
163
+ raises `ArgumentError` complaining about non-unique celebration symbols)
164
+ - broken links in YARD documentation (due to files missing in the
165
+ gem archive and basename clashes)
166
+
167
+ ### Changed
168
+
169
+ - if `Sanctorale#update` raises `ArgumentError` complaining about
170
+ non-unique celebration symbols, the updated `Sanctorale` instance
171
+ is left in an inconsistent internal state (more than one occurrence
172
+ of at least one celebration symbol)
173
+ - some additional non-code files (mostly for YARD documentation)
174
+ included in the gem archive
175
+
176
+ ## [0.7.0] 2020-06-21
177
+
178
+ ### Fixed
179
+
180
+ - St. Sebastian was missing in the French version of General Roman Calendar
181
+ - St. of Pietrelcina had incorrect rank in the Czech calendar
182
+ - `Sanctorale#add`: invalid attempt (i.e. an attempt raising an exception)
183
+ to add a second (or n-th) celebration for a given date was causing
184
+ inconsistency in the instance's internal state
185
+ - CLI: `calendariumrom query` wasn't printing celebrations of the highest
186
+ ranks (spotted and fixed by Mike Kasberg @mkasberg)
187
+ - CLI: got rid of a deprecation warning of the `i18n` gem
188
+ concerning `I18n.enforce_available_locales` (by Mike Kasberg @mkasberg)
189
+
190
+ ### Added
191
+
192
+ - data: General Roman Calendar in Spanish + Spanish locale (by Alejandro Ulate @CodingAleCR)
193
+ - data: optional memorials of St. Paul VI, Our Lady of Loreto, St. Faustina Kowalska
194
+ - data: diocese of Prague: optional memorial of Bl. Friedrich Bachstein and companions
195
+ - `Day#weekday_name` (by Ronald Walker @RonWalker22)
196
+ - `Day#to_s`, `Celebration#to_s` (by PJ Pollina @pjpollina)
197
+ - all sanctorale data files are provided with celebration symbols (available as
198
+ `Celebration#symbol` when loaded)
199
+ - `SanctoraleLoader` loads the YAML front matter (if provided),
200
+ to `Sanctorale#metadata` (new property added for this purpose)
201
+ - `SanctoraleFactory` methods merge not only sanctorale contents,
202
+ but also metadata
203
+ - `SanctoraleFactory.load_with_parents`, `Data#load_with_parents`
204
+ to conveniently load sanctorale file hierarchies based on their
205
+ metadata (using key `"extends"`)
206
+ - `calendarium-romanum/cr` defining `::CR` shortcut constant
207
+ - huge improvement of the API documentation
208
+
209
+ ### Changed
210
+
211
+ - data files format: celebration symbols never more start with a colon
212
+ - `Sanctorale#add` throws `ArgumentError` on attempt to add a `Celebration`
213
+ with `#symbol` which is already present in the given sanctorale
214
+ - all `#each` and `#each_*` methods defined in the gem return `Enumerator`
215
+ if called without a block
216
+
217
+ ## [0.6.0] 2018-03-27
218
+
219
+ ### Fixed
220
+
221
+ *Feature release - bugs were only introduced, not fixed :)*
222
+
223
+ ### Added
224
+
225
+ - now handled: *Saturday Memorial of the Blessed Virgin Mary*
226
+ - new memorial of *Mary, Mother of the Church*
227
+ (both handled by `Temporale`)
228
+ - `Temporale#==`, `Sanctorale#==`
229
+ - `Calendar#populates_vespers?` (access value of an option)
230
+ - `Temporale#[]`, `Sanctorale#[]`, `PerpetualCalendar#[]`
231
+ - `Celebration#date` - only set for fixed-date celebrations,
232
+ contains the celebration's *usual* date (as `AbstractDate` instance),
233
+ thus making it possible
234
+ to check if a solemnity was transferred and what would be
235
+ it's normal date if the transfer didn't occur
236
+ - `Celebration#cycle` - returns either `:temporale` or `:sanctorale`
237
+ - cycle predicates:
238
+ `Celebration#temporale?` and `#sanctorale?`
239
+ - `Calendar#each` - yields each day of the liturgical year
240
+ - missing rank predicates:
241
+ `Rank#ferial?`, `Rank#sunday?`,
242
+ `Celebration#ferial?`, `Celebration#sunday?`
243
+ - `Celebration#symbol` can be specified also in sanctorale data files
244
+ (but data files with symbols are not yet available)
245
+ - CLI: `calendariumrom version` prints gem version
246
+
247
+ ### Changed
248
+
249
+ - `Calendar#==` used to compare only class and year, now it compares
250
+ complete internal data
251
+ - `Colour#to_s` and `Season#to_s` now return meaningful values
252
+ like `"#<CalendariumRomanum::Colour red>"`
253
+ and `"#<CalendariumRomanum::Season lent>"`;
254
+ return value of `Rank#to_s` changed to match the common format
255
+ - English temporale feast names edited to match the standard US
256
+ liturgical books (by Mike Kasberg @mkasberg)
257
+ - `examples/` directory removed (README is now the main source
258
+ of copy-pastable examples)
259
+ - file naming unified: `calendarium-romanum/sanctoraleloader.rb`
260
+ renamed to `.../sanctorale_loader.rb`
261
+
262
+ ## [0.5.0] 2017-11-01
263
+
264
+ ### Fixed
265
+
266
+ - transfer of Epiphany to a Sunday was breaking numbering of weeks
267
+ of the Ordinary Time
268
+ - `Day.new()` (call without any arguments) was crashing
269
+ - shebang of `calendariumrom`
270
+ - CLI: `calendariumrom query` was printing internal representation
271
+ of a `Season` object instead of human-readable season name
272
+ (spotted and fixed by Simon Szutkowski @simonszu)
273
+ - MRI 2.x interpreter warnings
274
+
275
+ ### Added
276
+
277
+ - first Vespers of Sundays and solemnities: optional feature
278
+ of the `Calendar` (constructor has new keyword argument
279
+ `vespers: true` to activate it), populates `Day#vespers`
280
+ with a `Celebration` if Vespers should be taken from the following
281
+ day
282
+ - proper handling of collision between *Immaculate heart of Mary*
283
+ and another obligatory memorial ([CDW Prot. n. 2671/98/L](http://www.vatican.va/roman_curia/congregations/ccdds/documents/rc_con_ccdds_doc_20000630_memoria-immaculati-cordis-mariae-virginis_lt.html))
284
+ - `Calendar#[]` - alias of `Calendar#day`, but with additional
285
+ support for a `Range` of `Date`s (returns an `Array` of `Dates`
286
+ when called this way;
287
+ by Brian Gates @bgates)
288
+ - `Celebration#change(title: nil, rank: nil, colour: nil, color: nil, symbol: nil)` -
289
+ returns a copy of the celebration with values of selected
290
+ properties replaced by those passed as arguments
291
+ - `Celebration#symbol` - machine-readable unique identifier
292
+ of a celebration, for now only for solemnities of the temporale
293
+ - CLI: `calendariumrom query` supports printing a day, month or year
294
+ (by Simon Szutkowski @simonszu)
295
+ - CLI: `calendariumrom query` supports apart of bundled calendars
296
+ also custom ones, specified on the command line
297
+ (by Simon Szutkowski @simonszu)
298
+ - CLI: `calendariumrom cmp` correctly handles celebrations
299
+ present in only one of the compared sources
300
+ - data: memorials of saint popes John XXIII and John Paul II added
301
+ to Universal Roman calendar in Latin and to the calendar
302
+ of Czech and Moravian dioceses where they were missing
303
+
304
+ ### Changed
305
+
306
+ - ferials of the final week of Advent have proper titles
307
+ - ordinals in French names of Sundays and ferials have proper
308
+ suffixes
309
+ - `Day.new` signature changed from argument Hash
310
+ to Ruby 2 keyword arguments (no change in argument names
311
+ or count, but previously it wouldn't even notice unexpected
312
+ arguments, now it will crash when encountering them)
313
+ - `SanctoraleLoader` raises always `InvalidDataError`
314
+ (it used to raise `RangeError` on invalid date and
315
+ `RuntimeError` on other kinds of invalid data)
316
+ - `CelebrationFactory` creates also temporale solemnities
317
+ (useful mostly in specs)
318
+ - CLI: `calendariumrom errors` fails gracefully, without backtrace
319
+
320
+ ## [0.4.0] 2017-09-02
321
+
322
+ ### Fixed
323
+
324
+ - `Sanctorale#replace` saving the supplied array as part of
325
+ the internal data structures (and thus allowing their -
326
+ usually unintentional - modification by external code)
327
+ - `Calendar` unintentionally modifying `Sanctorale` internal data
328
+ when handling optional memorials
329
+ - errors in English ordinals greater than 10 ("21th" -> "21st" etc.)
330
+ - `Ranks::FERIAL.memorial?` wrongly returning `true`
331
+ - rank of *All Souls* fixed in all data files
332
+
333
+ ### Added
334
+
335
+ - support for transfer of Epiphany, Ascension and Corpus Christi
336
+ to a Sunday (GNLYC 7)
337
+ - General Roman Calendar in French and French localization
338
+ (by Azarias Boutin @AzariasB)
339
+ - `PerpetualCalendar`
340
+ - `Season#name`, `Colour#name` - localized human-readable names
341
+
342
+ ### Changed
343
+
344
+ - interface for `Temporale` extensions changed completely:
345
+ extensions are self-contained, isolated; their sole responsibility
346
+ is to yield data
347
+ - `Calendar` stripped of the ability to create new instances
348
+ with the same settings:
349
+ - `Calendar#pred` and `#succ` removed
350
+ - `Calendar.new` receives `Temporale` *instance*
351
+ (instead of a temporale factory)
352
+ - `Calendar#day` raises `RangeError` if the day is earlier than
353
+ 1st January 1970 (day of introduction of the implemented calendar
354
+ system)
355
+ - `Temporale::Dates.easter_sunday` doesn't return Julian calendar
356
+ Easter date for years <= 1752 (this library isn't intended to be used
357
+ for years earlier than 1970)
358
+ - `Day#==` and `Calendar#==` test object contents, not identity
359
+ - `Temporale::Dates.body_blood` renamed to `.corpus_christi`
360
+ - `Sanctorale#freeze` freezes also the internal data structures
361
+ - `Calendar#freeze` freezes contained `Temporale` and `Sanctorale`
362
+ - seasons and colours indexed by their symbols, not by index number -
363
+ e.g. `Seasons[:lent]`, `Colours[:violet]`
364
+ - `Calendar#celebrations_for` made private
365
+
366
+ ## [0.3.0] 2017-08-07
367
+
368
+ ### Fixed
369
+
370
+ *This is a feature release - bugs were only introduced, not fixed :)*
371
+
372
+ ### Added
373
+
374
+ - `Celebration#title` is now being generated for all Sundays and
375
+ ferials (was empty)
376
+ - ferials of the Holy Week and of the last week of Advent
377
+ have proper ranks
378
+ - new rank `Ranks::COMMEMORATION` introduced;
379
+ during privileged seasons, suppressed memorials, which
380
+ can be commemorated in the Divine Office (see GILH 239),
381
+ appear in `Day#celebrations` with this rank
382
+ - memorial of the *Immaculate Heart of Mary*
383
+ (although it really belongs to the sanctorale, as a movable feast
384
+ it is implemented in `Temporale`)
385
+ - support for extending `Temporale` with additional feasts
386
+ (`Temporale.with_extensions`, `Temporale.add_celebration`,
387
+ additional optional argument accepted by `Calendar.new` and
388
+ `Calendar.for_date`)
389
+ - `Temporale::Extensions::ChristEternalPriest` - `Temporale` extension
390
+ implementing the feast of *Christ the Eternal Priest*,
391
+ celebrated in some dioceses and religious institutes
392
+ on Thursday after Pentecost
393
+ - `Temporale::Dates` - module containing all the
394
+ temporale-solemnity-date-computing algorithms used in `Temporale`
395
+ - `Temporale#year`
396
+ - sanctorale data files may have YAML front matter
397
+ (a YAML document with metadata placed before the main content)
398
+
399
+ ### Changed
400
+
401
+ - seasons and colours are represented by `Season` and `Colour`
402
+ instances, not by `Symbol`s
403
+ - `Temporale#advent_sunday` and most `#*_advent_sunday`
404
+ removed, only `Temporale#first_advent_sunday` remains
405
+ - `Temporale#weekday_before`, `#weekday_after`, `#octave_of`,
406
+ `#monday_before` etc., `#monday_after` etc. removed
407
+ (all these general date helpers now reside in `Temporale::Dates`)
408
+ - unused attribute `Day#vespers` removed
409
+ - `Temporale#concretize_abstract_date` removed
410
+
411
+ ## [0.2.1] 2017-07-21
412
+
413
+ ### Fixed
414
+
415
+ - `AbstractDate` validity checks refusing 29th February
416
+
417
+ ## [0.2.0] 2017-07-20
418
+
419
+ ### Fixed
420
+
421
+ - numbering of Ordinary Time Sundays after Pentecost
422
+ - `Calendar#day` when an instance of `DateTime` is supplied as argument
423
+ - minor fixes in data files
424
+ - `calendariumrom` executable (broken in recent releases)
425
+
426
+ ### Added
427
+
428
+ - missing *temporale* feast days: Ash Wednesday, Palm Sunday, Ascension,
429
+ - new bundled locales: Latin, Italian, Czech
430
+ - contents of `Seasons`, `Ranks` and `Colours` can be explored via `each` and `all`
431
+ - bundled data files easily accessible through `CalendariumRomanum::Data`
432
+
433
+ ### Changed
434
+
435
+ - `Rank` never more inherits from `Struct`
436
+ - `Seasons`, `Ranks` and `Colours` changed from modules to classes
437
+ - `Sanctorale` raises `ArgumentError` on attempt to load two celebrations of rank other than optional memorial on a single day
438
+ - data file format: rank letter is optional when the rank is specified by number
439
+ - data file format: rank and colour letters are treated case-insensitively
440
+
441
+ ## [0.1.0] 2017-02-25
442
+
443
+ ### Fixed
444
+ - computing date of Holy Family when there is no Sunday between December 25th and January 1st (by Eddy Mulyono @eddymul)
445
+ - missing information for some celebrations added to the General Roman Calendar in English (by Andrea Ferrato @ferra-andre)
446
+
447
+ ### Added
448
+ - General Roman Calendar in Italian (by Andrea Ferrato @ferra-andre)
449
+ - `CalendariumRomanum::SanctoraleFactory` for loading of layered sanctorale calendars
450
+ - `Rank#short_desc` value for unprivileged Sunday and privileged ferial
451
+ - Temporale feast titles and some other strings can be translated (gem `i18n` used)
452
+
453
+ ### Changed
454
+ - [breaking change] `SanctoraleLoader#load` argument order changed
455
+
456
+ ## [0.0.3] 2016-08-27
457
+
458
+ ### Fixed
459
+ - fatal constant reference bug in `Temporale`
460
+ - the specs that covered it
461
+
462
+ ## [0.0.2] 2016-08-27 YANKED
463
+
464
+ release yanked, as it contained a fatal bug in `Temporale`,
465
+ resulting in `NameError` being raised on each initialization
466
+
467
+ ### Fixed
468
+ - all celebrations handled by `Temporale` purged from the sanctorale
469
+ data files. Note that having temporale *solemnities* in sanctorale
470
+ data results in these being duplicated due to the transfer of
471
+ impeded solemnities.
472
+ - rank of Mary Magdalene updated in the sanctorale data files
473
+ - rank of the feast of the Holy Family fixed
474
+
475
+ ### Changed
476
+ - solemnity of Mary, Mother of God (January 1st) is handled by
477
+ `Temporale`
478
+
479
+ ## [0.0.1] 2016-08-20
480
+
481
+ ### Added
482
+ - transfer of impeded solemnities
483
+
484
+ ### Changed
485
+ - sanctorale data must be loaded before `Calendar` initialization
486
+ - `Calendar#sanctorale` is read-only
487
+ - dropped `Calendar.day`, `Sanctorale#validate_date`
488
+ - `SanctoraleLoader` raises exceptions on errors (instead of writing invalid entries to a log and skipping them)