From 0ed2b9843e9e643d65c51c2d5a28815ea3d0f748 Mon Sep 17 00:00:00 2001 From: Jakub Pavlik Date: Wed, 25 Nov 2020 23:29:30 +0100 Subject: [PATCH] version bump -> 0.8.0 --- CHANGELOG.md | 91 +++++++++++++++++++ README.md | 5 +- lib/calendarium-romanum/abstract_date.rb | 1 + lib/calendarium-romanum/calendar.rb | 2 + lib/calendarium-romanum/enums.rb | 2 + lib/calendarium-romanum/rank.rb | 1 + lib/calendarium-romanum/sanctorale_writer.rb | 2 + lib/calendarium-romanum/temporale.rb | 1 + .../temporale/easter_table.rb | 1 + .../temporale/extensions.rb | 1 + .../dedication_before_all_saints.rb | 2 + lib/calendarium-romanum/version.rb | 4 +- 12 files changed, 109 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd21e50b..f2f3e0ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,96 @@ # Changelog +## [0.8.0] 2020-11-25 + +### Fixed + +- several fixes to the solemnity transfer rules: + - the algorithm was searching for free days only forwards, + but liturgical law assumes closest free day, even earlier + - check that two solemnities are not transferred to the same date, + overwriting one another + - the special rule on Annunciation from *Normae universales* 60 + implemented +- fixed bug in computation of the date of Baptism of the Lord if Epiphany + is transferred to Sunday +- fixed bug in `Sanctorale#update` preventing more than one `Celebration` + with nil `#symbol` in a single `Sanctorale` +- `CelebrationFactory` was setting `Celebration#date` (if not specified) + to false instead of expected nil (thus breaking type promises) +- data: `czech-cs.txt`: typo fixed in the feast *symbol* of St. Bartholomew; + spelling of several feast titles corrected +- data: `czech-cs.txt`: proof-read against official sources, feasts + of "BVM, Queen of Angels" and St. Teresa of Calcutta deleted + (they are not on the calendar of Czech and Moravian dioceses, + incorrect information was copied from Czech Wikipedia at the time + of the data file's creation) +- data: all: Dedication of the Lateran Basilica is feast of the Lord + (had incorrect rank of a normal feast so far) +- data: `universal-en.txt`: several inaccuracies concerning liturgical + colour fixed + +### Added + +- `liturgical_law/`: all documents of liturgical legislation + containing the liturgical calendar rules (original Latin text) + in Markdown format, with Ruby code examples proving that + the rules are implemented correctly; + the code examples are all executed as part of the gem's test suite +- `SanctoraleWriter` (contributed by Mike Kasberg @mkasberg) +- `PerpetualCalendar.new` accepts keyword argument `vespers` + (cf. `Calendar.new` argument of the same name) +- `Rank#optional_memorial?`, `#obligatory_memorial?` +- `AbstractDate#in_year` - more readable alias of `#concretize` +- `Rank#succ` - (among other things) allows constructing `Range` of `Rank`s +- `Calendar#transferred` +- `Temporale::Extensions::DedicationBeforeAllSaints` defining the solemnity + of Aniversary of Dedication for churches celebrating it on the movable + date on the last October Sunday +- `Temporale::Extensions.all` - method listing all Temporale extensions + defined by the gem +- `Temporale#each_day` +- `Temporale::EasterTable` - class handling a simple plaintext format + for tables of Easter dates +- `Celebration.new`: new argument `sunday` +- `SanctoraleLoader`: proper solemnities/feasts/memorials + can be specified also by adding suffix `p` to the rank code + (instead of rank priority number used so far), + similarly suffix `l` can be used to specify proper rank for + feasts of the Lord +- data: `universal-1969-la.txt` - historical first version + of the General Roman Calendar +- module `Constants` containing all the constants from `Colours`, + `Seasons` and `Ranks` + +### Changed + +- the gemspec now declares requirement of Ruby >= 2.0 +- `Calendar.new` can be called also without the `year` argument if `Temporale` + is provided (thus calling `Calendar.new(temporale, sanctorale)` + instead of `Calendar.new(year, sanctorale, temporale)`) +- Easter Triduum is now dealt with as a separate `Season`, + because *Normae universales* 18-21 clearly set the Triduum apart from + both Lent and Eastertide +- `Temporale::Extensions::ChristEternalPriest` specifies celebration + symbol (so far it was nil) +- `Celebration.new` supports keyword arguments (as an alternative to + or even in combination with the positional ones) +- `Temporale`: business logic guaranteeing that `Celebration#sunday?` + is true also for privileged Sundays (Advent, Lent) +- `calendariumrom` executable: all subcommands dealing with sanctorale + data files accept special file name `-` and load sanctorale data + from stdin in that case +- `Enum`, `Colours`, `Seasons`, `Ranks` and `Data` changed from classes + to modules + +### Acknowledgements + +Improvements not affecting the gem's public interface (and thus not listed +in the changelog) contributed by + +- Ihor Voloshyn @Snick555 +- Dmitry Zhmurko @zhmurko + ## [0.7.1] 2020-06-28 ### Fixed diff --git a/README.md b/README.md index f565e1eb..a245dc93 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Gem Version](https://badge.fury.io/rb/calendarium-romanum.svg)](https://badge.fury.io/rb/calendarium-romanum) API documentation: +[0.8.0](http://www.rubydoc.info/gems/calendarium-romanum/0.8.0) [0.7.1](http://www.rubydoc.info/gems/calendarium-romanum/0.7.1) [0.6.0](http://www.rubydoc.info/gems/calendarium-romanum/0.6.0) [0.5.0](http://www.rubydoc.info/gems/calendarium-romanum/0.5.0) @@ -84,13 +85,13 @@ the dependency to a particular minor version. In your app's Gemfile ``` -gem 'calendarium-romanum', '~>0.7.0' +gem 'calendarium-romanum', '~>0.8.0' ``` or in gemspec of your gem ``` -spec.add_dependency 'calendarium-romanum', '~>0.7.0' +spec.add_dependency 'calendarium-romanum', '~>0.8.0' ``` ## Usage diff --git a/lib/calendarium-romanum/abstract_date.rb b/lib/calendarium-romanum/abstract_date.rb index e35450fe..009e7c66 100644 --- a/lib/calendarium-romanum/abstract_date.rb +++ b/lib/calendarium-romanum/abstract_date.rb @@ -48,6 +48,7 @@ def concretize(year) Date.new(year, month, day) end + # @since 0.8.0 alias in_year concretize private diff --git a/lib/calendarium-romanum/calendar.rb b/lib/calendarium-romanum/calendar.rb index 2fa95aea..db753ec3 100644 --- a/lib/calendarium-romanum/calendar.rb +++ b/lib/calendarium-romanum/calendar.rb @@ -34,6 +34,7 @@ class Calendar # If not provided, the +Calendar+ will only know celebrations # of the temporale cycle, no feasts of the saints! # @param vespers [Boolean] Set to true if you want the +Calendar+ to populate {Day#vespers} + # @since 0.8.0 # # @raise [RangeError] # if +year+ is specified for which the implemented calendar @@ -116,6 +117,7 @@ def for_day(date, *constructor_args) # due to occurrence with a higher-ranking celebration. # # @return [HashCelebration>] + # @since 0.8.0 attr_reader :transferred # Do {Day} instances returned by this +Calendar+ diff --git a/lib/calendarium-romanum/enums.rb b/lib/calendarium-romanum/enums.rb index a0f36dbe..4aed9a09 100644 --- a/lib/calendarium-romanum/enums.rb +++ b/lib/calendarium-romanum/enums.rb @@ -157,6 +157,8 @@ module Ranks # @example # include CalendariumRomanum::Constants # RED # now all the constants are available in current module + # + # @since 0.8.0 module Constants include Colours include Seasons diff --git a/lib/calendarium-romanum/rank.rb b/lib/calendarium-romanum/rank.rb index de1aa557..4f18542a 100644 --- a/lib/calendarium-romanum/rank.rb +++ b/lib/calendarium-romanum/rank.rb @@ -52,6 +52,7 @@ def <=>(other) # Allows constructing ranges of ranks. # # @return [Rank] + # @since 0.8.0 def succ all = CR::Ranks.all index = all.index(self) diff --git a/lib/calendarium-romanum/sanctorale_writer.rb b/lib/calendarium-romanum/sanctorale_writer.rb index 45f45362..3b4987f4 100644 --- a/lib/calendarium-romanum/sanctorale_writer.rb +++ b/lib/calendarium-romanum/sanctorale_writer.rb @@ -9,6 +9,8 @@ module CalendariumRomanum # For specification of the data format see {file:data/README.md} # of the data directory, For a complete example see e.g. # {file:universal-en.txt the file describing General Roman Calendar}. + # + # @since 0.8.0 class SanctoraleWriter # @api private diff --git a/lib/calendarium-romanum/temporale.rb b/lib/calendarium-romanum/temporale.rb index beb7cca5..87174587 100644 --- a/lib/calendarium-romanum/temporale.rb +++ b/lib/calendarium-romanum/temporale.rb @@ -338,6 +338,7 @@ def get(*args) # # @yield [Date, Celebration] # @return [void, Enumerator] if called without a block, returns +Enumerator+ + # @since 0.8.0 def each_day return to_enum(__method__) unless block_given? diff --git a/lib/calendarium-romanum/temporale/easter_table.rb b/lib/calendarium-romanum/temporale/easter_table.rb index d4758ab7..578495a4 100644 --- a/lib/calendarium-romanum/temporale/easter_table.rb +++ b/lib/calendarium-romanum/temporale/easter_table.rb @@ -1,5 +1,6 @@ module CalendariumRomanum class Temporale + # @since 0.8.0 class EasterTable # Loads an Easter table from a String- or IO-like object +src+. # +src+ must contain Easter dates, parseable by +Date.parse+, one date per line. diff --git a/lib/calendarium-romanum/temporale/extensions.rb b/lib/calendarium-romanum/temporale/extensions.rb index f264a541..7642e07a 100644 --- a/lib/calendarium-romanum/temporale/extensions.rb +++ b/lib/calendarium-romanum/temporale/extensions.rb @@ -4,6 +4,7 @@ module Extensions # Returns all Temporale extensions defined by the gem. # # @return [Array] + # @since 0.8.0 def self.all constants .collect {|c| const_get(c) } diff --git a/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb b/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb index bdb0fd4f..7a812d75 100644 --- a/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb +++ b/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb @@ -20,6 +20,8 @@ module Extensions # temporale = Temporale.new(2015, extensions: [ # Temporale::Extensions::DedicationBeforeAllSaints.new(title: 'Title', symbol: :symbol) # ]) + # + # @since 0.8.0 class DedicationBeforeAllSaints DEFAULT_TITLE = proc { I18n.t('temporale.extension.dedication') } DEFAULT_SYMBOL = :dedication diff --git a/lib/calendarium-romanum/version.rb b/lib/calendarium-romanum/version.rb index d66053f5..8d33f90d 100644 --- a/lib/calendarium-romanum/version.rb +++ b/lib/calendarium-romanum/version.rb @@ -1,7 +1,7 @@ require 'date' module CalendariumRomanum - VERSION = '0.7.1'.freeze + VERSION = '0.8.0'.freeze - RELEASE_DATE = Date.new(2020, 6, 28).freeze + RELEASE_DATE = Date.new(2020, 11, 25).freeze end