uk_academic_calendar 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71d754790b2fdbde926c3ba208b5e860d00d5e1804ea07c74bab60d9478807d4
4
- data.tar.gz: 4bbc74989d5cffb7e3fda1789a01112e45379474b0b4e6cad8e3645e8f75a507
3
+ metadata.gz: d8d9575b8f3803af612842832ee53b8068e4670a0bea5149b948c3f58615916f
4
+ data.tar.gz: 50f733b2e4fca44401fce42d16e466f66250e09d007f0afbb06f826f66d61b05
5
5
  SHA512:
6
- metadata.gz: 89aadec469b4df7320211d795dbf992c7e55083f486f8767dd6083d236d0f5a3ba8208654861545d2fe0ab60022bccd51ed0deb501cbd64f94ae88f10722f672
7
- data.tar.gz: 163abbbdde711855ab3e6218278a61d84b58c83025c74dc397dd346662498de48009f7761f3692f36c0b6b661dac7ab892d0f577cb014da8a1a0a3b9feffc622
6
+ metadata.gz: b3f2563ec589f255288daf6a6f3bf862e63ca573dbf45e8a8ea4baba30629bc6d4414e83eb8de099efbf9dc43a27fc1f618f8d08cc55c927e8a28d811bfaa486
7
+ data.tar.gz: f74a3b9d82241b5615221bacccb861e54590fb3894e32c193c64603fd3fd780611e4e02866fee2b0fb3e733e18f95d73a4fb65b687e9a656c73b922c71716d08
data/.CHANGELOG.md ADDED
File without changes
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.1.0"
3
+ }
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
+ require: rubocop-rspec
2
+
1
3
  AllCops:
2
- TargetRubyVersion: 2.6
4
+ TargetRubyVersion: 3.0
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/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## [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)
4
+
5
+
6
+ ### Continuous Integration
7
+
8
+ * 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))
9
+ * 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))
10
+ * 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))
11
+ * 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))
12
+ * 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))
13
+ * 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))
14
+ * 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))
15
+ * 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))
16
+ * 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,3 +1,6 @@
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)
3
+
1
4
  # UKAcademicCalendar
2
5
 
3
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).
@@ -46,7 +49,9 @@ See rubydoc [docs](https://www.rubydoc.info/github/m-smiff/uk_academic_calendar/
46
49
 
47
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.
48
51
 
49
- 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.
50
55
 
51
56
  ## TODO
52
57
 
@@ -54,10 +59,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
54
59
  - Considering the above, implementation of e.g., `#teachable_days` and `#non_teachable_days` returning sorted sets of applicable dates
55
60
  - Setting of 'contexts' so terms understand what dates to apply for a given 'context' (e.g. a particular local authority)
56
61
 
57
- ## Contributing
58
-
59
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/uk_academic_calendar.
60
-
61
62
  ## License
62
63
 
63
64
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -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.0'
4
+ VERSION = '1.1.0'
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.0.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'
37
+ spec.add_dependency 'easter', '~> 0.2'
38
+ spec.add_dependency 'sorted_set', '~> 1.0'
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uk_academic_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-10 00:00:00.000000000 Z
11
+ date: 2024-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: abstract_class
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.1'
33
+ version: '7.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '6.1'
40
+ version: '7.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: easter
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -73,9 +73,12 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".CHANGELOG.md"
77
+ - ".release-please-manifest.json"
76
78
  - ".rspec"
77
79
  - ".rubocop.yml"
78
80
  - ".ruby-version"
81
+ - CHANGELOG.md
79
82
  - LICENSE.txt
80
83
  - README.md
81
84
  - Rakefile
@@ -94,14 +97,16 @@ files:
94
97
  - lib/uk_academic_calendar/summer_term.rb
95
98
  - lib/uk_academic_calendar/term.rb
96
99
  - lib/uk_academic_calendar/version.rb
100
+ - release-please-config.json
101
+ - uk_academic_calendar.gemspec
97
102
  homepage: https://www.github.com/m-smiff/uk_academic_calendar
98
103
  licenses:
99
104
  - MIT
100
105
  metadata:
101
106
  homepage_uri: https://www.github.com/m-smiff/uk_academic_calendar
102
107
  documentation_uri: https://www.rubydoc.info/github/m-smiff/uk_academic_calendar/main
108
+ changelog_uri: https://www.github.com/m-smiff/uk_academic_calendar/blob/main/CHANGELOG.md
103
109
  source_code_uri: https://www.github.com/m-smiff/uk_academic_calendar
104
- changelog_uri: https://www.github.com/m-smiff/uk_academic_calendar
105
110
  rubygems_mfa_required: 'true'
106
111
  post_install_message:
107
112
  rdoc_options: []
@@ -111,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
116
  requirements:
112
117
  - - ">="
113
118
  - !ruby/object:Gem::Version
114
- version: 2.6.0
119
+ version: 3.0.0
115
120
  required_rubygems_version: !ruby/object:Gem::Requirement
116
121
  requirements:
117
122
  - - ">="