uk_academic_calendar 1.0.1 → 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: 7aa36c9ba0f969516eac1444d2e813e0d93d6b7245cfb541389194f01b46a071
4
- data.tar.gz: ab41634252915a46d51a32d3f41dbd5c0c2b87a273d4fde6080f8b68f0e1cf30
3
+ metadata.gz: d8d9575b8f3803af612842832ee53b8068e4670a0bea5149b948c3f58615916f
4
+ data.tar.gz: 50f733b2e4fca44401fce42d16e466f66250e09d007f0afbb06f826f66d61b05
5
5
  SHA512:
6
- metadata.gz: 15fd067c6b0d6a70c8b79ec9c55da321a39bee5007d922e18c9eadda423b28ec5b45880606ae915d1d64a79060b49e84369b80d8e0e8048c4aeb9aeddd662959
7
- data.tar.gz: 3a0c358137540b78d5a3c44e53b7e18f9526f5241da34c1a94a399da2c533efd1a425ec686ac8034772ebd0d660d9f5006be818cc6f29833aa413ea90a712038
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,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.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.1
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-15 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
@@ -28,22 +28,16 @@ dependencies:
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '6.1'
34
- - - "<"
31
+ - - "~>"
35
32
  - !ruby/object:Gem::Version
36
- version: 8.x
33
+ version: '7.0'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '6.1'
44
- - - "<"
38
+ - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: 8.x
40
+ version: '7.0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: easter
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -79,9 +73,12 @@ executables: []
79
73
  extensions: []
80
74
  extra_rdoc_files: []
81
75
  files:
76
+ - ".CHANGELOG.md"
77
+ - ".release-please-manifest.json"
82
78
  - ".rspec"
83
79
  - ".rubocop.yml"
84
80
  - ".ruby-version"
81
+ - CHANGELOG.md
85
82
  - LICENSE.txt
86
83
  - README.md
87
84
  - Rakefile
@@ -100,14 +97,16 @@ files:
100
97
  - lib/uk_academic_calendar/summer_term.rb
101
98
  - lib/uk_academic_calendar/term.rb
102
99
  - lib/uk_academic_calendar/version.rb
100
+ - release-please-config.json
101
+ - uk_academic_calendar.gemspec
103
102
  homepage: https://www.github.com/m-smiff/uk_academic_calendar
104
103
  licenses:
105
104
  - MIT
106
105
  metadata:
107
106
  homepage_uri: https://www.github.com/m-smiff/uk_academic_calendar
108
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
109
109
  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
110
  rubygems_mfa_required: 'true'
112
111
  post_install_message:
113
112
  rdoc_options: []
@@ -117,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
116
  requirements:
118
117
  - - ">="
119
118
  - !ruby/object:Gem::Version
120
- version: 2.6.0
119
+ version: 3.0.0
121
120
  required_rubygems_version: !ruby/object:Gem::Requirement
122
121
  requirements:
123
122
  - - ">="