calendarium-romanum 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -13
  3. data/.yardopts +1 -1
  4. data/CHANGELOG.md +91 -0
  5. data/README.md +128 -45
  6. data/Rakefile +7 -0
  7. data/calendarium-romanum.gemspec +6 -1
  8. data/config/locales/cs.yml +2 -0
  9. data/config/locales/en.yml +4 -0
  10. data/config/locales/es.yml +4 -0
  11. data/config/locales/fr.yml +4 -0
  12. data/config/locales/it.yml +4 -0
  13. data/config/locales/la.yml +4 -0
  14. data/data/README.md +27 -23
  15. data/data/czech-cs.txt +13 -15
  16. data/data/easter_dates.txt +67 -0
  17. data/data/universal-1969-la.txt +234 -0
  18. data/data/universal-en.txt +4 -4
  19. data/data/universal-es.txt +4 -4
  20. data/data/universal-fr.txt +4 -4
  21. data/data/universal-it.txt +4 -4
  22. data/data/universal-la.txt +4 -4
  23. data/lib/calendarium-romanum.rb +5 -0
  24. data/lib/calendarium-romanum/abstract_date.rb +6 -3
  25. data/lib/calendarium-romanum/calendar.rb +37 -15
  26. data/lib/calendarium-romanum/cli.rb +49 -111
  27. data/lib/calendarium-romanum/cli/comparator.rb +63 -0
  28. data/lib/calendarium-romanum/cli/date_parser.rb +30 -0
  29. data/lib/calendarium-romanum/cli/dumper.rb +68 -0
  30. data/lib/calendarium-romanum/cli/helper.rb +23 -0
  31. data/lib/calendarium-romanum/cli/querier.rb +73 -0
  32. data/lib/calendarium-romanum/data.rb +4 -1
  33. data/lib/calendarium-romanum/day.rb +49 -40
  34. data/lib/calendarium-romanum/enum.rb +37 -39
  35. data/lib/calendarium-romanum/enums.rb +28 -4
  36. data/lib/calendarium-romanum/ordinalizer.rb +2 -2
  37. data/lib/calendarium-romanum/perpetual_calendar.rb +6 -3
  38. data/lib/calendarium-romanum/rank.rb +16 -22
  39. data/lib/calendarium-romanum/rank_predicates.rb +43 -0
  40. data/lib/calendarium-romanum/sanctorale.rb +9 -8
  41. data/lib/calendarium-romanum/sanctorale_loader.rb +7 -3
  42. data/lib/calendarium-romanum/sanctorale_writer.rb +119 -0
  43. data/lib/calendarium-romanum/temporale.rb +44 -17
  44. data/lib/calendarium-romanum/temporale/celebration_factory.rb +4 -3
  45. data/lib/calendarium-romanum/temporale/dates.rb +5 -5
  46. data/lib/calendarium-romanum/temporale/easter_table.rb +27 -0
  47. data/lib/calendarium-romanum/temporale/extensions.rb +15 -0
  48. data/lib/calendarium-romanum/temporale/extensions/christ_eternal_priest.rb +3 -2
  49. data/lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb +73 -0
  50. data/lib/calendarium-romanum/transfers.rb +44 -18
  51. data/lib/calendarium-romanum/util.rb +10 -24
  52. data/lib/calendarium-romanum/version.rb +2 -2
  53. data/liturgical_law/1969_normae_universales.md +568 -0
  54. data/liturgical_law/1977_decretum_de_celebratione_baptismatis_domini.md +58 -0
  55. data/liturgical_law/1990_decretum_de_variatione_inducenda.md +67 -0
  56. data/liturgical_law/1998_notificatio_de_occurrentia.md +57 -0
  57. data/liturgical_law/2002_normae_universales.md +946 -0
  58. data/liturgical_law/2006_notification.md +37 -0
  59. data/liturgical_law/2012_declarationes.md +38 -0
  60. data/liturgical_law/README.md +74 -0
  61. metadata +28 -5
@@ -0,0 +1,37 @@
1
+ ---
2
+ source: Notitiae 475-476/2006, p. 96 http://www.cultodivino.va/content/dam/cultodivino/notitiae/2006/475-476%20DEF.pdf#page=34
3
+ note: |
4
+ Not an act of liturgical legislation in a proper sense, but an authoritative example
5
+ of correct application of the law in force.
6
+ ---
7
+
8
+ CONGREGATIO DE CULTU DIVINO ET DISCIPLINA SACRAMENTORUM
9
+
10
+ NOTIFICAZIONE
11
+
12
+ La Congregazione per il Culto Divino e la Disciplina dei Sacramenti si fa premura
13
+ di attirare l’attenzione sulla occorrenza di alcune celebrazioni che ricorreranno
14
+ nell’anno 2008. In particolare, si fa presente che la solennità di San Giuseppe (19 marzo)
15
+ ricorre il mercoledì della Settimana Santa e la solennità dell’Annunciazione del Signore
16
+ (25 marzo) il martedì fra l’Ottava di Pasqua.
17
+
18
+ Secondo la normativa vigente contenuta nelle Normae Universales de Anno Liturgico
19
+ et de Calendario, le summenzionate solennità devono essere trasferite in tal modo:
20
+ « Sollemnitas S. Ioseph, ubi est de praecepto servanda, si cum Dominica
21
+ in Palmis de Passione Domini occurrit, anticipatur sabbato praecedenti, die 18 martii.
22
+ Ubi vero non est de praecepto servanda, a Conferentia Episcoporum ad alium diem
23
+ extra Quadragesimam transferri potest » (n. 56 f);
24
+ « Sollemnitas vero Annuntiationis Domini, quotiescumque occurrit aliquo die Hebdomadae
25
+ Sanctae, semper ad feriam II post dominicam II Paschae erit transferenda » (n. 60).
26
+
27
+ Pertanto, è stabilito che nell’anno 2008 la solennità di San Giuseppe sarà celebrata
28
+ il 15 marzo, ovvero il sabato precedente la Domenica delle Palme, mentre la solennità
29
+ dell’Annunciazione del Signore sarà celebrata il 31 marzo, ovvero il lunedì dopo
30
+ la II Domenica di Pasqua.
31
+
32
+ ```ruby
33
+ calendar = CR::PerpetualCalendar.new(sanctorale: CR::Data::GENERAL_ROMAN_LATIN.load)
34
+
35
+ expect(calendar[Date.new(2008, 3, 15)].celebrations[0].symbol).to be :joseph
36
+ expect(calendar[Date.new(2008, 3, 31)].celebrations[0].symbol).to be :annunciation
37
+ ```
@@ -0,0 +1,38 @@
1
+ ---
2
+ source: Notitiae 549-550/2012, p. 269; http://www.cultodivino.va/content/dam/cultodivino/notitiae/2012/549-550 DEF.pdf#page=80
3
+ note: |
4
+ Not an act of liturgical legislation in a proper sense, but an authoritative example
5
+ of correct application of the law in force.
6
+ ---
7
+
8
+ # Declaratio circa Sollemnitatem Annuntiationis Domini anno 2013 celebrandam
9
+
10
+ Cum anno 2013, die 25 martii incidat feria II Hebdomadae
11
+ Sanctae, iuxta Tabulam dierum liturgicorum secundum ordinem
12
+ praecedentiae dispositam et secundum n. 60 Normarum de Anno
13
+ liturgico et de Calendario, sollemnitas Annuntiationis Domini
14
+ celebrabitur die 8 aprilis, scilicet feria II post Dominicam II Paschae, sicut
15
+ ex editione typica tertia Missalis Romani patet.
16
+
17
+ ```ruby
18
+ calendar = CR::Calendar.new(2012, CR::Data::GENERAL_ROMAN_LATIN.load)
19
+
20
+ day = calendar[Date.new(2013, 4, 8)]
21
+ expect(day.celebrations.first.symbol).to be :annunciation
22
+ ```
23
+
24
+ # Declaratio circa sollemnitatem Immaculatae Conceptionis Beatae Mariae Virginis a. 2013 in Dominica II Adventus incidentem
25
+
26
+ Cum anno 2013, die 8 decembris incidat Dominica II Adventus,
27
+ iuxta Tabulam dierum liturgicorum secundum ordinem praecedentiae
28
+ dispositam et secundum nn. 5 et 60 Normarum de Anno liturgico
29
+ et de Calendario, sollemnitas Immaculatae Conceptionis Beatae
30
+ Mariae Virginis celebrabitur die 9 decembris, feria II post Dominica
31
+ II Adventus.
32
+
33
+ ```ruby
34
+ calendar = CR::Calendar.new(2013, CR::Data::GENERAL_ROMAN_LATIN.load)
35
+
36
+ day = calendar[Date.new(2013, 12, 9)]
37
+ expect(day.celebrations.first.symbol).to be :bvm_immaculate
38
+ ```
@@ -0,0 +1,74 @@
1
+ # Liturgical Law
2
+
3
+ This directory contains documents of liturgical legislation
4
+ implemented by the library. Each document is reproduced in Latin,
5
+ in a form of a Markdown file.
6
+
7
+ ## Main documents, development overview
8
+
9
+ Fundamental outline of the calendar system is contained in the document
10
+ *Normae universales de anno liturgico et de calendario*, first published in 1969.
11
+ Most of the 1969 text is in force without a substantial change up to this day,
12
+ but during the years some important parts were changed, a particularly hot matter
13
+ being the rules concerning transfer of impeded solemnities.
14
+ Apart of updates of the *Normae* themselves, a few additional rules were added
15
+ to the calendar system by separate documents (the more formal ones being CDW decrees,
16
+ the less formal ones notifications).
17
+
18
+ * **1969 Normae universales de anno liturgico et de calendario**
19
+ initial outline of the calendar system
20
+ * **1970 Missale Romanum, editio typica**
21
+ [updated](http://www.cultodivino.va/content/dam/cultodivino/notitiae/1970/54 1.pdf#page=49)
22
+ paragraphs 13, 56, 59 and 60 of the *Normae*
23
+ * **1975 Missale Romanum, editio typica altera**
24
+ [updated](http://www.cultodivino.va/content/dam/cultodivino/notitiae/1975/111-112.pdf#page=27)
25
+ paragraphs 14, 47 and 59 of the *Normae* (mostly mere terminological changes;
26
+ the change of paragraph 59 dropped a few categories from the *Table of Liturgical Days*)
27
+ * **1977 Decree about the feast of Baptism of the Lord**
28
+ with an improved rule of computing it's date for places where Epiphany is celebrated
29
+ on a Sunday
30
+ * **1990 Decree updating Normae, n. 5**
31
+ (transfer rule for a solemnity impeded by a privileged Sunday)
32
+ * **1998 Notification concerning occurrence of the memorial of the Immaculate Heart of Mary**
33
+
34
+ ## Code examples
35
+
36
+ The Markdown files, in addition to the text of documents of liturgical
37
+ legislation, contain also blocks of Ruby code, each proving
38
+ that the immediately preceding part of the document is implemented
39
+ by the library. The documents illustrated with code blocks thus constitute
40
+ sort of a test suite in the [literate programming](https://en.wikipedia.org/wiki/Literate_programming)
41
+ style. This test suite is integrated in the project's main test suite
42
+ (see `spec/liturgical_law_spec.rb`)
43
+
44
+ Utilities commonly used in the code blocks:
45
+
46
+ ```ruby
47
+ # RSpec expectations are available in the code blocks
48
+ expect(1).to be_truthy
49
+
50
+ # method `year` returns a random year (which is a valid liturgical years
51
+ # for calendarium-romanum) and should be used in all examples which need
52
+ # a single year and don't require a particular one
53
+ expect(year).to be_a Integer
54
+ expect(year).to be >= 1970
55
+ # year is the same for the whole example, even if called multiple times
56
+ a = year; b = year
57
+ expect(a).to be b
58
+
59
+ # method `years` returns a representative Enumerable of (valid liturgical)
60
+ # years and should be used in all examples which test across several years
61
+ # and don't require particular ones
62
+ expect(years).to be_a Enumerable
63
+ yrs = years.to_a
64
+ expect(yrs[0]).to be_a Integer
65
+
66
+ # method `years_with` returns an array of years (which are valid liturgical years
67
+ # for calendarium-romanum) matching the specified condition
68
+ yrs = years_with {|y| true }
69
+ expect(yrs).to be_an Array
70
+ expect(yrs[0]).to be_an Integer
71
+ # if no matching year is found an exception is raised
72
+ expect { years_with {|y| false } }
73
+ .to raise_exception(RuntimeError, /no matching year/)
74
+ ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calendarium-romanum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Pavlík
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-28 00:00:00.000000000 Z
11
+ date: 2020-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -81,7 +81,9 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.5'
83
83
  description: calendar computations according to the Roman Catholic liturgical calendar
84
- as instituted by MP Mysterii Paschalis of Paul VI (1969).
84
+ as instituted by MP Mysterii Paschalis of Paul VI (1969) and defined in General
85
+ Norms for the Liturgical Year and the Calendar and other documents of liturgical
86
+ legislation.
85
87
  email: jkb.pavlik@gmail.com
86
88
  executables:
87
89
  - calendariumrom
@@ -118,6 +120,8 @@ files:
118
120
  - data/czech-ostrava-cs.txt
119
121
  - data/czech-plzen-cs.txt
120
122
  - data/czech-praha-cs.txt
123
+ - data/easter_dates.txt
124
+ - data/universal-1969-la.txt
121
125
  - data/universal-en.txt
122
126
  - data/universal-es.txt
123
127
  - data/universal-fr.txt
@@ -131,6 +135,11 @@ files:
131
135
  - lib/calendarium-romanum/abstract_date.rb
132
136
  - lib/calendarium-romanum/calendar.rb
133
137
  - lib/calendarium-romanum/cli.rb
138
+ - lib/calendarium-romanum/cli/comparator.rb
139
+ - lib/calendarium-romanum/cli/date_parser.rb
140
+ - lib/calendarium-romanum/cli/dumper.rb
141
+ - lib/calendarium-romanum/cli/helper.rb
142
+ - lib/calendarium-romanum/cli/querier.rb
134
143
  - lib/calendarium-romanum/cr.rb
135
144
  - lib/calendarium-romanum/data.rb
136
145
  - lib/calendarium-romanum/day.rb
@@ -141,21 +150,35 @@ files:
141
150
  - lib/calendarium-romanum/ordinalizer.rb
142
151
  - lib/calendarium-romanum/perpetual_calendar.rb
143
152
  - lib/calendarium-romanum/rank.rb
153
+ - lib/calendarium-romanum/rank_predicates.rb
144
154
  - lib/calendarium-romanum/sanctorale.rb
145
155
  - lib/calendarium-romanum/sanctorale_factory.rb
146
156
  - lib/calendarium-romanum/sanctorale_loader.rb
157
+ - lib/calendarium-romanum/sanctorale_writer.rb
147
158
  - lib/calendarium-romanum/temporale.rb
148
159
  - lib/calendarium-romanum/temporale/celebration_factory.rb
149
160
  - lib/calendarium-romanum/temporale/dates.rb
161
+ - lib/calendarium-romanum/temporale/easter_table.rb
162
+ - lib/calendarium-romanum/temporale/extensions.rb
150
163
  - lib/calendarium-romanum/temporale/extensions/christ_eternal_priest.rb
164
+ - lib/calendarium-romanum/temporale/extensions/dedication_before_all_saints.rb
151
165
  - lib/calendarium-romanum/transfers.rb
152
166
  - lib/calendarium-romanum/util.rb
153
167
  - lib/calendarium-romanum/version.rb
168
+ - liturgical_law/1969_normae_universales.md
169
+ - liturgical_law/1977_decretum_de_celebratione_baptismatis_domini.md
170
+ - liturgical_law/1990_decretum_de_variatione_inducenda.md
171
+ - liturgical_law/1998_notificatio_de_occurrentia.md
172
+ - liturgical_law/2002_normae_universales.md
173
+ - liturgical_law/2006_notification.md
174
+ - liturgical_law/2012_declarationes.md
175
+ - liturgical_law/README.md
154
176
  homepage: http://github.com/igneus/calendarium-romanum
155
177
  licenses:
156
178
  - LGPL-3.0
157
179
  - MIT
158
- metadata: {}
180
+ metadata:
181
+ documentation_uri: https://www.rubydoc.info/gems/calendarium-romanum/
159
182
  post_install_message:
160
183
  rdoc_options: []
161
184
  require_paths:
@@ -164,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
187
  requirements:
165
188
  - - ">="
166
189
  - !ruby/object:Gem::Version
167
- version: '0'
190
+ version: '2.0'
168
191
  required_rubygems_version: !ruby/object:Gem::Requirement
169
192
  requirements:
170
193
  - - ">="