stateful.rb 2.3.4 → 2.3.5

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: 76836b904757327dca9d69e1938022b78f22b7eba4883d631662b90a7c73f092
4
- data.tar.gz: 3eeffc4c8bab601de3a158a562f7f4cb9847b014af3a5099edb7e37c0edd0557
3
+ metadata.gz: c59db122c866f83bcf4ee3edeb84e119fdf9983361adc7bcb58b9ae8f2b4a025
4
+ data.tar.gz: 38b5376b18359e05f7540eb50321bb18d6b8988988738818f1b049f9d62c6e80
5
5
  SHA512:
6
- metadata.gz: f667aceca2eb2a708cd7b6a41e7e246a14d5dea2944ccf28c75762492046f93fea0d3f979d40b6fca91584e8bdb11bab39b123858ca393ccb08e2c0ffa02c252
7
- data.tar.gz: f268873ad0d04c7437f1ad55158acf6ad8b3d7c0e2a1cd4dd5ae2d2ae450600041039d31e9fda1c33346e500bfbe5a34c364807af6ffa665fe4ce64b34c68084
6
+ metadata.gz: 56db73d72bfc7ea6d6ce667b7b7be9f5455fc437471d8db84f16cfd28a63d990c80c3002bdd47f2788e7921a7e1711c411ebe549131c384603fe34b1ec517c4b
7
+ data.tar.gz: 37125b132d495b7a38da67b33f4a49b57da1a11ac8716d5927935156a00949f6e8fef2df15d09cc8f5928a67076c80fc3d44d162beb62fd8201dd4d3f3a8fe97
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # stateful/CHANGELOG.md
2
2
 
3
+ ## 2.3.5 (20260912): ~ the requires: /File.join('a', 'b')/'a\/b'/; - the blank line inside each class and module.
4
+ ----------------------------------------------------------------------------------------------------
5
+
6
+ ### ~
7
+ 1. lib and test: 7 requires read `File.join` over two string literals, which returns the same string the literal would: File.join joins with File::SEPARATOR, and that is "/" on every platform Ruby runs on, Windows included, File::ALT_SEPARATOR being untouched by it. So it conferred no portability and cost a `git grep` for the path it names.
8
+ 2. lib and test: - 11 blank lines, each immediately after a class or module line and nothing else.
9
+ 3. Stateful::VERSION: /2.3.4/2.3.5/
10
+
3
11
  ## 2.3.4 (20260910): ~ lib/Stateful.rb: + require_relative File.join('Stateful', 'VERSION'); + test/VERSION.rb
4
12
  ----------------------------------------------------------------------------------------------------
5
13
 
@@ -3,11 +3,10 @@
3
3
 
4
4
  require_relative 'ClassMethods'
5
5
  require_relative 'InstanceMethods'
6
- require_relative File.join('ActiveRecord', 'ClassMethods')
6
+ require_relative 'ActiveRecord/ClassMethods'
7
7
 
8
8
  module Stateful
9
9
  module ActiveRecord
10
-
11
10
  class << self
12
11
 
13
12
  def set_column_name(klass)
@@ -25,6 +24,5 @@ module Stateful
25
24
  alias_method :included, :extended
26
25
 
27
26
  end # class << self
28
-
29
27
  end
30
28
  end
data/lib/Stateful/Poro.rb CHANGED
@@ -3,11 +3,10 @@
3
3
 
4
4
  require_relative 'ClassMethods'
5
5
  require_relative 'InstanceMethods'
6
- require_relative File.join('Poro', 'ClassMethods')
6
+ require_relative 'Poro/ClassMethods'
7
7
 
8
8
  module Stateful
9
9
  module Poro
10
-
11
10
  class << self
12
11
 
13
12
  def set_variable_name(klass)
@@ -25,6 +24,5 @@ module Stateful
25
24
  alias_method :included, :extended
26
25
 
27
26
  end # class << self
28
-
29
27
  end
30
28
  end
@@ -3,11 +3,10 @@
3
3
 
4
4
  require_relative 'ClassMethods'
5
5
  require_relative 'InstanceMethods'
6
- require_relative File.join('Sequel', 'ClassMethods')
6
+ require_relative 'Sequel/ClassMethods'
7
7
 
8
8
  module Stateful
9
9
  module Sequel
10
-
11
10
  class << self
12
11
 
13
12
  def set_column_name(klass)
@@ -25,6 +24,5 @@ module Stateful
25
24
  alias_method :included, :extended
26
25
 
27
26
  end # class << self
28
-
29
27
  end
30
28
  end
@@ -5,7 +5,6 @@ require_relative 'Transition'
5
5
 
6
6
  module Stateful
7
7
  class State
8
-
9
8
  attr_accessor :name
10
9
  attr_accessor :transitions
11
10
 
@@ -5,7 +5,6 @@ require_relative 'State'
5
5
 
6
6
  module Stateful
7
7
  class StateMachine
8
-
9
8
  attr_accessor :options
10
9
  attr_reader(
11
10
  :all,
@@ -3,13 +3,11 @@
3
3
 
4
4
  module Stateful
5
5
  class Transition
6
-
7
6
  attr_reader :event_name
8
7
  attr_reader :next_state_name
9
8
 
10
9
  def initialize(event_name, next_state_name)
11
10
  @event_name, @next_state_name = event_name, next_state_name
12
11
  end
13
-
14
12
  end
15
13
  end
@@ -1,3 +1,3 @@
1
1
  module Stateful
2
- VERSION = '2.3.4'
2
+ VERSION = '2.3.5'
3
3
  end
data/lib/Stateful.rb CHANGED
@@ -1,26 +1,24 @@
1
1
  # Stateful.rb
2
2
  # Stateful
3
3
 
4
- require_relative File.join('Stateful', 'VERSION')
4
+ require_relative 'Stateful/VERSION'
5
5
 
6
6
  module Stateful
7
-
8
7
  class << self
9
8
 
10
9
  def extended(klass)
11
10
  if Object.const_defined?(:ActiveRecord) && defined?(::ActiveRecord::Base) && klass < ::ActiveRecord::Base
12
- require_relative File.join('Stateful', 'ActiveRecord')
11
+ require_relative 'Stateful/ActiveRecord'
13
12
  klass.extend(Stateful::ActiveRecord)
14
13
  elsif Object.const_defined?(:Sequel) && defined?(::Sequel::Model) && klass < ::Sequel::Model
15
- require_relative File.join('Stateful', 'Sequel')
14
+ require_relative 'Stateful/Sequel'
16
15
  klass.extend(Stateful::Sequel)
17
16
  else
18
- require_relative File.join('Stateful', 'Poro')
17
+ require_relative 'Stateful/Poro'
19
18
  klass.extend(Stateful::Poro)
20
19
  end
21
20
  end
22
21
  alias_method :included, :extended
23
22
 
24
23
  end # class << self
25
-
26
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stateful.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran