uk_academic_calendar 1.0.1 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7aa36c9ba0f969516eac1444d2e813e0d93d6b7245cfb541389194f01b46a071
4
- data.tar.gz: ab41634252915a46d51a32d3f41dbd5c0c2b87a273d4fde6080f8b68f0e1cf30
3
+ metadata.gz: 7c0986148a084bec8dbbad95bb6b7f1bf966043572240a8df91b440a246262dd
4
+ data.tar.gz: '02918a6863f8348d711b3e3a6b3eab441e784494792528edbc4a9223bad1bf01'
5
5
  SHA512:
6
- metadata.gz: 15fd067c6b0d6a70c8b79ec9c55da321a39bee5007d922e18c9eadda423b28ec5b45880606ae915d1d64a79060b49e84369b80d8e0e8048c4aeb9aeddd662959
7
- data.tar.gz: 3a0c358137540b78d5a3c44e53b7e18f9526f5241da34c1a94a399da2c533efd1a425ec686ac8034772ebd0d660d9f5006be818cc6f29833aa413ea90a712038
6
+ metadata.gz: 7fb5b65d02383d0b22e5e9122d06c15a4f9cec833e61382956707fe73a8a3f4554ed7e35254d005c69386e27873c5118f18eac340da374eade6a1f92d7105484
7
+ data.tar.gz: fa26e8dc65974f741c3b691f22d5c6f61b82b5649020b59f456c618613ea2ce238bee8fef7d1ef3fb5b61ff047c031bb0fb1cbc9c53b973a8b459e749094ff41
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.2.1"
3
+ }
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
+ plugins: rubocop-rspec
2
+
1
3
  AllCops:
2
- TargetRubyVersion: 2.6
4
+ TargetRubyVersion: 3.2
3
5
  NewCops: enable
4
6
 
5
7
  Style/StringLiterals:
@@ -20,3 +22,6 @@ Metrics/BlockLength:
20
22
  Exclude:
21
23
  - '*.gemspec'
22
24
  - 'spec/**/*.rb'
25
+
26
+ RSpec/NestedGroups:
27
+ Max: 4
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3
data/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ## [1.2.1](https://github.com/m-smiff/uk_academic_calendar/compare/uk_academic_calendar/v1.2.0...uk_academic_calendar/v1.2.1) (2025-06-17)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * force release ([eea77df](https://github.com/m-smiff/uk_academic_calendar/commit/eea77dfb3794ff6bf9c0cfdda15ed8f8b99a0c2a))
9
+
10
+ ## [1.2.0](https://github.com/m-smiff/uk_academic_calendar/compare/uk_academic_calendar/v1.1.0...uk_academic_calendar/v1.2.0) (2025-06-17)
11
+
12
+
13
+ ### Miscellaneous Chores
14
+
15
+ * bump version ([5325610](https://github.com/m-smiff/uk_academic_calendar/commit/5325610ad9f2e43dd5d39c3286ff274a288d311a))
16
+
17
+ ## [1.1.0](https://github.com/m-smiff/uk_academic_calendar/compare/uk_academic_calendar-v1.0.1...uk_academic_calendar/v1.1.0) (2024-02-25)
18
+
19
+
20
+ ### Continuous Integration
21
+
22
+ * add empty object to rp manifest ([#18](https://github.com/m-smiff/uk_academic_calendar/issues/18)) ([a76b007](https://github.com/m-smiff/uk_academic_calendar/commit/a76b007d52415e50f4960ebae5536992dc76917d))
23
+ * add release-please-config ([#14](https://github.com/m-smiff/uk_academic_calendar/issues/14)) ([be681e7](https://github.com/m-smiff/uk_academic_calendar/commit/be681e7352346f5f299e6f74086ac62bc9f72ea9))
24
+ * correct release-please config ([#16](https://github.com/m-smiff/uk_academic_calendar/issues/16)) ([3a9fb40](https://github.com/m-smiff/uk_academic_calendar/commit/3a9fb4020cff5c5a7effeb9261ebfd36ca7793a7))
25
+ * correct release-please config file naming ([#15](https://github.com/m-smiff/uk_academic_calendar/issues/15)) ([cf18198](https://github.com/m-smiff/uk_academic_calendar/commit/cf181986340f70caf17f689b36fcb318b4e9f073))
26
+ * correct the rp config ([#19](https://github.com/m-smiff/uk_academic_calendar/issues/19)) ([2d13bc3](https://github.com/m-smiff/uk_academic_calendar/commit/2d13bc380614c6ff429aa2d02c2181ff9e7d1d00))
27
+ * ensure tests are run on pushes to main ([#13](https://github.com/m-smiff/uk_academic_calendar/issues/13)) ([65bb27b](https://github.com/m-smiff/uk_academic_calendar/commit/65bb27bdbfc0ea243d8cd2a0de47df5e19d092fb))
28
+ * fix rp permissions in workflow ([#21](https://github.com/m-smiff/uk_academic_calendar/issues/21)) ([7464b2f](https://github.com/m-smiff/uk_academic_calendar/commit/7464b2fde32e99efea5917e00922dacc51d463bc))
29
+ * fix the rp config ([#20](https://github.com/m-smiff/uk_academic_calendar/issues/20)) ([e29fa3a](https://github.com/m-smiff/uk_academic_calendar/commit/e29fa3a450cdff41cf1bbef84769ffe24253d5e3))
30
+ * tweaks to release-please manifest and config ([#17](https://github.com/m-smiff/uk_academic_calendar/issues/17)) ([0ba3e4e](https://github.com/m-smiff/uk_academic_calendar/commit/0ba3e4efbb22002e008d2730dab97e3927072ad3))
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
- # UKAcademicCalendar
1
+ ![Gem version badge](https://badge.fury.io/rb/uk_academic_calendar.svg)
2
+ ![Tests status](https://github.com/m-smiff/uk_academic_calendar/actions/workflows/specs.yml/badge.svg)
2
3
 
3
- <div style="display:flex;">
4
- <a href="https://badge.fury.io/rb/uk_academic_calendar"><img src="https://badge.fury.io/rb/uk_academic_calendar.svg" alt="Gem Version" height="18"></a>
5
- </div>
4
+ # UKAcademicCalendar
6
5
 
7
6
  Designed to assist in Ruby programs dealing with the UK Academic Calendar, i.e. the Sept - Sept academic year, and the 3 'terms' (Autumn, Spring, Summer).
8
7
 
@@ -50,7 +49,9 @@ See rubydoc [docs](https://www.rubydoc.info/github/m-smiff/uk_academic_calendar/
50
49
 
51
50
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
52
51
 
53
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
52
+ ## Contribution
53
+
54
+ We are using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) and an [automated release action](https://github.com/google-github-actions/release-please-action). Please ensure you familiarise youself with these before contributing.
54
55
 
55
56
  ## TODO
56
57
 
@@ -7,12 +7,12 @@ module UKAcademicCalendar
7
7
  class AutumnTerm < Term
8
8
  # @return [Date] Sep 1st
9
9
  def nominal_start_date
10
- @nominal_start_date ||= Date.today.beginning_of_academic_year.change(year: academic_year)
10
+ Date.today.beginning_of_academic_year.change(year: academic_year)
11
11
  end
12
12
 
13
13
  # @return [Date] Dec 31st
14
14
  def nominal_end_date
15
- @nominal_end_date ||= nominal_start_date.end_of_year
15
+ nominal_start_date.end_of_year
16
16
  end
17
17
  end
18
18
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/date'
4
3
  require_relative '../mixins/date_and_time_instance_methods'
5
4
 
6
5
  class Date
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/time'
4
3
  require_relative '../mixins/date_and_time_instance_methods'
5
4
 
6
5
  class Time
@@ -3,7 +3,7 @@
3
3
  require_relative 'term'
4
4
 
5
5
  module UKAcademicCalendar
6
- # Concrete class allowing instantiation of instances of an spring term, for a given academic year
6
+ # Concrete class allowing instantiation of instances of a spring term, for a given academic year
7
7
  class SpringTerm < Term
8
8
  # @return [Date] Jan 1st
9
9
  def nominal_start_date
@@ -3,7 +3,7 @@
3
3
  require_relative 'term'
4
4
 
5
5
  module UKAcademicCalendar
6
- # Concrete class allowing instantiation of instances of an Summer term, for a given academic year
6
+ # Concrete class allowing instantiation of instances of a Summer term, for a given academic year
7
7
  class SummerTerm < Term
8
8
  # @return [Date] the Monday after Easter Sunday
9
9
  def nominal_start_date
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UKAcademicCalendar
4
- VERSION = '1.0.1'
4
+ VERSION = '1.2.1'
5
5
  end
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'uk_academic_calendar/version'
4
4
 
5
+ require 'active_support/all'
6
+
5
7
  require 'uk_academic_calendar/core_ext/date'
6
8
  require 'uk_academic_calendar/core_ext/time'
7
9
  require 'uk_academic_calendar/core_ext/integer'
@@ -9,9 +11,6 @@ require 'uk_academic_calendar/autumn_term'
9
11
  require 'uk_academic_calendar/spring_term'
10
12
  require 'uk_academic_calendar/summer_term'
11
13
 
12
- require 'active_support/core_ext/class/subclasses'
13
- require 'active_support/core_ext/object/inclusion'
14
-
15
14
  # Top-level namespace, itself implementing a number of constants and module methods documented below.
16
15
  module UKAcademicCalendar
17
16
  # The month-number corresponding to the first month within the calendar year that the academic year starts in.
@@ -0,0 +1,10 @@
1
+ {
2
+ "packages": {
3
+ ".": {
4
+ "release-type": "ruby",
5
+ "package-name": "uk_academic_calendar",
6
+ "version-file": "lib/uk_academic_calendar/version.rb",
7
+ "bump-minor-pre-major": true
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/uk_academic_calendar/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'uk_academic_calendar'
7
+ spec.version = UKAcademicCalendar::VERSION
8
+ spec.authors = ['Matt']
9
+ spec.email = ['jetnova@pm.me']
10
+
11
+ spec.summary = 'UK Academic Calendar'
12
+ spec.description = 'Designed to assist in Ruby programs dealing with the UK Academic Calendar'
13
+ spec.homepage = "https://www.github.com/m-smiff/#{spec.name}"
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 3.2.0'
16
+
17
+ spec.metadata = {
18
+ 'homepage_uri' => spec.homepage,
19
+ 'documentation_uri' => "https://www.rubydoc.info/github/m-smiff/#{spec.name}/main",
20
+ 'changelog_uri' => "#{spec.homepage}/blob/main/CHANGELOG.md",
21
+ 'source_code_uri' => spec.homepage,
22
+ 'rubygems_mfa_required' => 'true'
23
+ }
24
+
25
+ spec.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (File.expand_path(f) == __FILE__) ||
28
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
29
+ end
30
+ end
31
+ spec.bindir = 'exe'
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ['lib']
34
+
35
+ spec.add_dependency 'abstract_class', '~> 1.0'
36
+ spec.add_dependency 'activesupport', '>= 7.0', '< 8.1'
37
+ spec.add_dependency 'easter', '~> 0.2'
38
+ spec.add_dependency 'sorted_set', '~> 1.0'
39
+ end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uk_academic_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: abstract_class
@@ -30,20 +29,20 @@ dependencies:
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '6.1'
32
+ version: '7.0'
34
33
  - - "<"
35
34
  - !ruby/object:Gem::Version
36
- version: 8.x
35
+ version: '8.1'
37
36
  type: :runtime
38
37
  prerelease: false
39
38
  version_requirements: !ruby/object:Gem::Requirement
40
39
  requirements:
41
40
  - - ">="
42
41
  - !ruby/object:Gem::Version
43
- version: '6.1'
42
+ version: '7.0'
44
43
  - - "<"
45
44
  - !ruby/object:Gem::Version
46
- version: 8.x
45
+ version: '8.1'
47
46
  - !ruby/object:Gem::Dependency
48
47
  name: easter
49
48
  requirement: !ruby/object:Gem::Requirement
@@ -79,9 +78,11 @@ executables: []
79
78
  extensions: []
80
79
  extra_rdoc_files: []
81
80
  files:
81
+ - ".release-please-manifest.json"
82
82
  - ".rspec"
83
83
  - ".rubocop.yml"
84
84
  - ".ruby-version"
85
+ - CHANGELOG.md
85
86
  - LICENSE.txt
86
87
  - README.md
87
88
  - Rakefile
@@ -100,16 +101,17 @@ files:
100
101
  - lib/uk_academic_calendar/summer_term.rb
101
102
  - lib/uk_academic_calendar/term.rb
102
103
  - lib/uk_academic_calendar/version.rb
104
+ - release-please-config.json
105
+ - uk_academic_calendar.gemspec
103
106
  homepage: https://www.github.com/m-smiff/uk_academic_calendar
104
107
  licenses:
105
108
  - MIT
106
109
  metadata:
107
110
  homepage_uri: https://www.github.com/m-smiff/uk_academic_calendar
108
111
  documentation_uri: https://www.rubydoc.info/github/m-smiff/uk_academic_calendar/main
112
+ changelog_uri: https://www.github.com/m-smiff/uk_academic_calendar/blob/main/CHANGELOG.md
109
113
  source_code_uri: https://www.github.com/m-smiff/uk_academic_calendar
110
- changelog_uri: https://www.github.com/m-smiff/uk_academic_calendar
111
114
  rubygems_mfa_required: 'true'
112
- post_install_message:
113
115
  rdoc_options: []
114
116
  require_paths:
115
117
  - lib
@@ -117,15 +119,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
119
  requirements:
118
120
  - - ">="
119
121
  - !ruby/object:Gem::Version
120
- version: 2.6.0
122
+ version: 3.2.0
121
123
  required_rubygems_version: !ruby/object:Gem::Requirement
122
124
  requirements:
123
125
  - - ">="
124
126
  - !ruby/object:Gem::Version
125
127
  version: '0'
126
128
  requirements: []
127
- rubygems_version: 3.5.5
128
- signing_key:
129
+ rubygems_version: 3.6.7
129
130
  specification_version: 4
130
131
  summary: UK Academic Calendar
131
132
  test_files: []