Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-et-orbi for openSUSE:Factory 
checked in at 2026-07-15 16:33:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-et-orbi (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-et-orbi.new.1991 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-et-orbi"

Wed Jul 15 16:33:52 2026 rev:2 rq:1365322 version:1.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-et-orbi/rubygem-et-orbi.changes  
2024-12-13 22:34:56.537574401 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-et-orbi.new.1991/rubygem-et-orbi.changes    
    2026-07-15 16:50:08.887889296 +0200
@@ -1,0 +2,7 @@
+Mon Jul 13 09:16:25 UTC 2026 - Aleksei Burlakov <[email protected]>
+
+- update to version 1.4.0:
+  * Rework EoTime #rweek and #rday
+  * Introduce EtOrbi.rweek_ref= (:sunday, :monday, :iso, :us, ...)
+
+-------------------------------------------------------------------

Old:
----
  et-orbi-1.2.11.gem

New:
----
  et-orbi-1.4.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-et-orbi.spec ++++++
--- /var/tmp/diff_new_pack.qR2Q4g/_old  2026-07-15 16:50:12.544013521 +0200
+++ /var/tmp/diff_new_pack.qR2Q4g/_new  2026-07-15 16:50:12.544013521 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-et-orbi
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,14 +24,14 @@
 #
 
 Name:           rubygem-et-orbi
-Version:        1.2.11
+Version:        1.4.0
 Release:        0
 %define mod_name et-orbi
 %define mod_full_name %{mod_name}-%{version}
-BuildRequires:  ruby-macros >= 5
-BuildRequires:  %{ruby}
 BuildRequires:  %{rubygem gem2rpm}
-Url:            https://github.com/floraison/et-orbi
+BuildRequires:  %{ruby}
+BuildRequires:  ruby-macros >= 5
+URL:            https://github.com/floraison/et-orbi
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        time with zones

++++++ et-orbi-1.2.11.gem -> et-orbi-1.4.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2024-03-23 01:37:41.000000000 +0100
+++ new/CHANGELOG.md    2025-09-28 07:17:44.000000000 +0200
@@ -2,6 +2,20 @@
 # CHANGELOG.md
 
 
+## et-orbi 1.4.0  released 2025-09-28
+
+- Rework EoTime #rweek and #rday
+- Introduce EtOrbi.rweek_ref= (:sunday, :monday, :iso, :us, ...)
+
+
+## et-orbi 1.3.0  released 2025-08-08
+
+- Use probatio for testing
+- Drop unnecessary touch in EoTime#inc
+- Let EtOrbi #+ and #- accept instances with #to_i or #to_f (not strs), gh-40
+- Introduce EtOrbi.zone_abbreviation(zone_name, time)
+
+
 ## et-orbi 1.2.11  released 2024-03-23
 
 - Cache @rweek and @rday, not @ref, gh-38
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CREDITS.md new/CREDITS.md
--- old/CREDITS.md      2024-03-23 01:37:41.000000000 +0100
+++ new/CREDITS.md      2025-09-28 07:17:44.000000000 +0200
@@ -1,6 +1,8 @@
 
 # et-orbi credits
 
+* Hugh Kelsey https://github.com/hughkelsey fugit gh-94 rweek/rday rework
+* Keenan Brock https://github.com/kbrock version parsing and ostruct dep
 * Benjami Darcet https://github.com/bdarcet 
https://github.com/floraison/fugit/issues/67 gh-38
 * https://github.com/franckduche https://github.com/floraison/fugit/issues/67 
gh-38
 * Igor Viktor https://github.com/gogainda gh-34
@@ -8,7 +10,7 @@
 * Peter Goldstein, https://github.com/petergoldstein GHA 3.3 j9.3, gh-32
 * harsha-flipp https://github.com/harsha-flipp 
https://github.com/floraison/fugit/issues/63
 * adank92 https://github.com/adank92 
https://github.com/ondrejbartas/sidekiq-cron/issues/276 gh-28
-* Stan Hu https://github.com/stanhu Chronic toubles, gh-24, gh-26, etc
+* Stan Hu https://github.com/stanhu Chronic troubles, gh-24, gh-26, etc
 * d-m-u https://github.com/d-m-u EoTime#==(Time), gh-20, gh-7
 * Vais Salikhov (https://github.com/vais) missing US timezone aliases, gh-18 
gh-19
 * Wenhui Wang https://github.com/w11th .parse vs Chronic+ActiveSupport, fugit 
11
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LICENSE.txt new/LICENSE.txt
--- old/LICENSE.txt     2024-03-23 01:37:41.000000000 +0100
+++ new/LICENSE.txt     2025-09-28 07:17:44.000000000 +0200
@@ -1,5 +1,5 @@
 
-Copyright (c) 2017-2024, John Mettraux, [email protected]
+Copyright (c) 2017-2025, John Mettraux, [email protected]
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Makefile new/Makefile
--- old/Makefile        2024-03-23 01:37:41.000000000 +0100
+++ new/Makefile        2025-09-28 07:17:44.000000000 +0200
@@ -33,9 +33,9 @@
 push: build
        gem push --otp "$(OTP)" pkg/$(NAME)-$(VERSION).gem
 
-spec:
-       bundle exec rspec
-test: spec
+test:
+       bundle exec proba
+spec: test
 
 
 ## specific to project ##
@@ -48,5 +48,5 @@
 
 ## done ##
 
-.PHONY: count_lines scan gemspec_validate name cw build push spec info
+.PHONY: count_lines scan gemspec_validate name cw build push test info
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2024-03-23 01:37:41.000000000 +0100
+++ new/README.md       2025-09-28 07:17:44.000000000 +0200
@@ -43,7 +43,7 @@
 eot.to_local_time.class  # => Time
 eot.to_local_time.to_s   # => "1970-01-01 09:00:00 +0900" (at least on my 
system)
 
-# For the rest, EtOrbi::EoTime mimicks ::Time
+# For the rest, EtOrbi::EoTime mimics ::Time
 ```
 
 Helper methods:
@@ -69,6 +69,77 @@
     # astz: ActiveSupport provided Time.zone
 ```
 
+
+### #rweek and #rday (clarification et-orbi 1.4.0)
+
+`EoTime#rweek` and `#rday` are mostly used in 
[fugit](https://github.com/floraison/fugit) for its [modulo 
extension](https://github.com/floraison/fugit?tab=readme-ov-file#the-modulo-extension).
+
+By default (since et-orbi 1.4.0), the "reference week" for et-orbi
+starts on Monday 2018-12-31, its `#rweek` 0 and `#rday` 0
+
+```ruby
+class EtOrbi::EoTime;
+  def rr; [ strftime('%A'), rweek, rday ]; end
+end
+
+EtOrbi.rweek_ref # => '2018-12-31'
+
+                               #                  rw  rd
+EtOrbi.parse('2018-12-29').rr  # => [ "Saturday", -1, -2 ]
+EtOrbi.parse('2018-12-30').rr  # => [ "Sunday",   -1, -1 ]
+EtOrbi.parse('2018-12-31').rr  # => [ "Monday",    0,  0 ]
+```
+
+Users living in the US, in Canada, or in the Philippines where the week start 
on Sunday can tune their et-orbi:
+```ruby
+class EtOrbi::EoTime;
+  def rr; [ strftime('%A'), rweek, rday ]; end
+end
+
+EtOrbi.rweek_ref = :sunday
+EtOrbi.rweek_ref # => '2018-12-30'
+
+                               #                  rw  rd
+EtOrbi.parse('2018-12-29').rr  # => [ "Saturday", -1, -1 ]
+EtOrbi.parse('2018-12-30').rr  # => [ "Sunday",    0,  0 ]
+EtOrbi.parse('2018-12-31').rr  # => [ "Monday",    0,  1 ]
+```
+
+You can set the `rweek_ref` to `:sunday`, `:saturday`, `:monday`, or `:iso`, 
`:us`, or `:default`.
+
+`:sunday` and `:us` are equivalent. `:monday`, `:iso`, and `:default` are 
equivalent.
+
+If you feel like it, you can choose your own reference:
+
+```ruby
+class EtOrbi::EoTime;
+  def rr; [ strftime('%A'), rweek, rday ]; end
+end
+
+EtOrbi.rweek_ref = '2025-09-28'
+
+                               #                    rw     rd
+EtOrbi.parse('2018-12-29').rr  # => [ "Saturday", -353, -2465 ]
+EtOrbi.parse('2018-12-30').rr  # => [ "Sunday",   -352, -2464 ]
+EtOrbi.parse('2018-12-31').rr  # => [ "Monday",   -352, -2463 ]
+```
+
+Before et-orbi 1.4.0, the computation was a bit different, yielding:
+```ruby
+class EtOrbi::EoTime;
+  def rr; [ strftime('%A'), rweek, rday ]; end
+end
+
+                               #                 rw  rd
+EtOrbi.parse('2018-12-29').rr  # => [ "Saturday", 0, -2 ]
+EtOrbi.parse('2018-12-30').rr  # => [ "Sunday",   0, -1 ]
+EtOrbi.parse('2018-12-31').rr  # => [ "Monday",   0,  0 ]
+EtOrbi.parse('2019-01-01').rr  # => [ "Tuesday",  1,  1 ]
+```
+
+This change was motivated by [fugit 
gh-114](https://github.com/floraison/fugit/issues/114).
+
+
 ### Chronic integration
 
 By default, et-orbi relies on [Chronic](https://github.com/mojombo/chronic) to 
parse strings like "tomorrow" or "friday 1pm", if `Chronic` is present.
@@ -115,6 +186,14 @@
   #   from /home/jmettraux/w/et-orbi/lib/et-orbi/make.rb:31:in `rescue in 
parse'
 ```
 
+### Testing
+
+To run tests, use `proba`:
+
+```
+bundle exec proba
+```
+
 ### Rails?
 
 If Rails is present, `Time.zone` is provided and EtOrbi will use it, unless 
`ENV['TZ']` is set to a valid timezone name. Setting `ENV['TZ']` to nil can 
give back precedence to `Time.zone`.
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/et-orbi.gemspec new/et-orbi.gemspec
--- old/et-orbi.gemspec 2024-03-23 01:37:41.000000000 +0100
+++ new/et-orbi.gemspec 2025-09-28 07:17:44.000000000 +0200
@@ -1,12 +1,11 @@
 
-Gem::Specification.new do |s|
+require File.expand_path('../lib/et-orbi/version.rb', __FILE__)
 
-  s.name = 'et-orbi'
 
-  s.version = File.read(
-    File.expand_path('../lib/et-orbi.rb', __FILE__)
-  ).match(/ VERSION *= *['"]([^'"]+)/)[1]
+Gem::Specification.new do |s|
 
+  s.name = 'et-orbi'
+  s.version = EtOrbi::VERSION
   s.platform = Gem::Platform::RUBY
   s.authors = [ 'John Mettraux' ]
   s.email = [ '[email protected]' ]
@@ -26,6 +25,7 @@
     'homepage_uri' =>  s.homepage,
     'source_code_uri' => s.homepage,
     #'wiki_uri' => s.homepage + '/wiki',
+    'rubygems_mfa_required' => 'true',
   }
 
   #s.files = `git ls-files`.split("\n")
@@ -48,8 +48,11 @@
 
   #s.add_runtime_dependency 'raabro', '>= 1.1.3'
 
-  s.add_development_dependency 'rspec', '~> 3.8'
+  #s.add_development_dependency 'rspec', '~> 3.8'
+  s.add_development_dependency 'ostruct'
+  s.add_development_dependency 'probatio', '~> 1.3'
   s.add_development_dependency 'chronic', '~> 0.10'
+  #s.add_development_dependency 'activesupport', '~> 8.0'
 
   s.require_path = 'lib'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/et-orbi/info.rb new/lib/et-orbi/info.rb
--- old/lib/et-orbi/info.rb     2024-03-23 01:37:41.000000000 +0100
+++ new/lib/et-orbi/info.rb     2025-09-28 07:17:44.000000000 +0200
@@ -17,6 +17,7 @@
         'win' => Gem.win_platform?,
         'rorv' => (Rails::VERSION::STRING rescue nil),
         'astz' => ([ Time.zone.class, Time.zone.tzinfo.name ] rescue nil),
+        'chronic' => (Chronic::VERSION rescue nil),
         'eov' => EtOrbi::VERSION,
         'eotnz' => '???',
         'eotnfz' => '???',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/et-orbi/time.rb new/lib/et-orbi/time.rb
--- old/lib/et-orbi/time.rb     2024-03-23 01:37:41.000000000 +0100
+++ new/lib/et-orbi/time.rb     2025-09-28 07:17:44.000000000 +0200
@@ -91,13 +91,12 @@
       touch
     end
 
-    # Nullify the "caches" used by #to_time, #rweek, and others
+    # Nullify the "caches" used by #to_time, #rday, and others
     #
     def touch
 
       @time = nil
       @rday = nil
-      @rweek = nil
     end
 
     def seconds=(f)
@@ -316,24 +315,32 @@
 
     def inc(t, dir=1)
 
-      r =
-        case t
-        when Numeric
-          nt = self.dup
-          nt.seconds += dir * t.to_f
-          nt
-        when ::Time, ::EtOrbi::EoTime
-          fail ArgumentError.new(
-            "Cannot add #{t.class} to EoTime") if dir > 0
-          @seconds + dir * t.to_f
+      case t
+      when ::Time, ::EtOrbi::EoTime
+
+        fail(
+          ArgumentError.new("Cannot add #{t.class} to EoTime instance")
+            ) if dir > 0
+
+        @seconds + dir * t.to_f
+
+      when String
+
+        false
+
+      else
+
+        if t.respond_to?(:to_f)
+          nt = self.dup; nt.seconds += dir * t.to_f; nt
+        elsif t.respond_to?(:to_i)
+          nt = self.dup; nt.seconds += dir * t.to_i; nt
         else
-          fail ArgumentError.new(
-            "Cannot call add or subtract #{t.class} to EoTime instance")
+          false
         end
 
-      touch
-
-      r
+      end || fail(
+        ArgumentError.new(
+          "Cannot call add or subtract #{t.class} on EoTime instance"))
     end
 
     def localtime(zone=nil)
@@ -350,30 +357,27 @@
         - count_weeks(EtOrbi.make_time(strftime('%F 12:00:00 %/Z')) , 1) ]
     end
 
-    # "reference week", used in fugit for cron modulo notation
+    # "reference day", used in fugit for cron modulo notation
     #
-    def rweek
+    def rday
 
-      @rweek ||=
-        begin
-          ref = EtOrbi.make_time('2019-01-01 12:00:00', @zone)
-          noon = EtOrbi.make_time(strftime('%F 12:00:00'), @zone)
-          ((noon - ref) / WEEK_S).floor + 1
-        end
+      @rday ||= (
+        (EtOrbi.make_time(strftime('%F 12:00:00'), @zone) - rref) / DAY_S
+          ).floor
     end
 
     # "reference week", used in fugit for cron modulo notation
     #
-    def rday
+    def rweek
 
-      @rday ||=
-        begin
-          ref = EtOrbi.make_time('2019-01-01 12:00:00', @zone)
-          noon = EtOrbi.make_time(strftime('%F 12:00:00'), @zone)
-          ((noon - ref) / DAY_S).floor + 1
-        end
+      rday / 7
     end
 
+    # A debug method, seen in its first iteration in
+    # 
https://github.com/floraison/et-orbi?tab=readme-ov-file#rweek-and-rday-clarification-et-orbi-140
+    #
+    def rr; [ strftime('%F %a'), rweek, rday ]; end
+
     def reach(points)
 
       t = EoTime.new(self.to_f, @zone)
@@ -470,6 +474,40 @@
 
       o.to_f
     end
+
+    # Gives back the Eotime instance pointing to the reference day
+    # used to compute #rweek and #rday
+    #
+    def rref
+
+      EtOrbi.make_time("#{::EtOrbi.rweek_ref} 12:00:00", @zone)
+    end
+  end
+end
+
+module EtOrbi
+
+  #RWEEK_REF_DEFAULT = '2019-01-01'.freeze
+  RWEEK_REF_DEFAULT = '2018-12-31'.freeze # monday / ISO 8601
+
+  class << self
+
+    def rweek_ref=(x)
+
+      @rweek_ref =
+        case x
+        when /^[21]\d{3}-(1[012]|0?\d)-(3[01]|[21]\d|0?\d)$/ then x
+        when :saturday                then '2019-01-05'
+        when :sunday, :us             then '2018-12-30'
+        when :monday, :default, :iso  then RWEEK_REF_DEFAULT
+        else fail(ArgumentError.new("not a valid rweek_ref #{x.inspect}"))
+        end
+    end
+
+    def rweek_ref
+
+      @rweek_ref || RWEEK_REF_DEFAULT
+    end
   end
 end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/et-orbi/version.rb new/lib/et-orbi/version.rb
--- old/lib/et-orbi/version.rb  1970-01-01 01:00:00.000000000 +0100
+++ new/lib/et-orbi/version.rb  2025-09-28 07:17:44.000000000 +0200
@@ -0,0 +1,6 @@
+
+module EtOrbi
+
+  VERSION = '1.4.0'
+end
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/et-orbi/zones.rb new/lib/et-orbi/zones.rb
--- old/lib/et-orbi/zones.rb    2024-03-23 01:37:41.000000000 +0100
+++ new/lib/et-orbi/zones.rb    2025-09-28 07:17:44.000000000 +0200
@@ -77,7 +77,7 @@
       tz = (etz && tzs.find { |z| z.name == etz }) || tzs.first
       return tz if tz
 
-      # then, fall back to GMT offest :-(
+      # then, fall back to GMT offset :-(
 
       n = Time.now
 
@@ -161,6 +161,18 @@
       end
     end
 
+    def zone_abbreviation(zone_name, time)
+
+      tz = ::TZInfo::Timezone.get(zone_name)
+
+      ts = tz.period_for_local(time, true) rescue -1
+      tw = tz.period_for_local(time, false) rescue -2
+
+      return ts.abbreviation.to_s if ts == tw
+
+      tz.period_for_local(time + 2 * 3600).abbreviation.to_s
+    end
+
     def tweak_zone_name(name)
 
       return name unless (name.match(/./) rescue nil)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/et-orbi.rb new/lib/et-orbi.rb
--- old/lib/et-orbi.rb  2024-03-23 01:37:41.000000000 +0100
+++ new/lib/et-orbi.rb  2025-09-28 07:17:44.000000000 +0200
@@ -4,15 +4,10 @@
 
 require 'tzinfo'
 
+require 'et-orbi/version'
 require 'et-orbi/info'
 require 'et-orbi/make'
 require 'et-orbi/time'
 require 'et-orbi/zones'
 require 'et-orbi/zone'
 
-
-module EtOrbi
-
-  VERSION = '1.2.11'
-end
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2024-03-23 01:37:41.000000000 +0100
+++ new/metadata        2025-09-28 07:17:44.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: et-orbi
 version: !ruby/object:Gem::Version
-  version: 1.2.11
+  version: 1.4.0
 platform: ruby
 authors:
 - John Mettraux
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2024-03-23 00:00:00.000000000 Z
+date: 2025-09-28 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: tzinfo
@@ -25,19 +25,33 @@
       - !ruby/object:Gem::Version
         version: '0'
 - !ruby/object:Gem::Dependency
-  name: rspec
+  name: ostruct
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: probatio
   requirement: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '3.8'
+        version: '1.3'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '3.8'
+        version: '1.3'
 - !ruby/object:Gem::Dependency
   name: chronic
   requirement: !ruby/object:Gem::Requirement
@@ -69,6 +83,7 @@
 - lib/et-orbi/info.rb
 - lib/et-orbi/make.rb
 - lib/et-orbi/time.rb
+- lib/et-orbi/version.rb
 - lib/et-orbi/zone.rb
 - lib/et-orbi/zones.rb
 - lib/et_orbi.rb
@@ -82,6 +97,7 @@
   bug_tracker_uri: https://github.com/floraison/et-orbi/issues
   homepage_uri: https://github.com/floraison/et-orbi
   source_code_uri: https://github.com/floraison/et-orbi
+  rubygems_mfa_required: 'true'
 post_install_message:
 rdoc_options: []
 require_paths:
@@ -97,7 +113,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.4.10
+rubygems_version: 3.4.19
 signing_key:
 specification_version: 4
 summary: time with zones

Reply via email to