statesman 12.0.0 → 13.0.0

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: a799d928f8e674203dde325b7653ed8fe2b719f5b9108ded9353afaa5eefe028
4
- data.tar.gz: a92e8f0a4a49a22e66c4d3a83ccdec62e042cf8cd2a734368090f9144373f02a
3
+ metadata.gz: b15bf5cd57e2049db1ae4a0e93f41b16528c8a73c5741cf6337ec280f6ed1041
4
+ data.tar.gz: 28fba6b8a3304b97fb97a56d145243b5da73f79057fc05449dd3c48a6ea76f72
5
5
  SHA512:
6
- metadata.gz: 781f2603034ba02007a26678f06738ff5b0691cf2bd45c9d56406c3d4bffe15f375301b52f42f4a5e5bf8fd7fcb2b10b61e61d623cfab5d21c901025cb6f70a6
7
- data.tar.gz: df7bfefdb22eaf086e25dfc91b233bd3eb02b3c7e658315e05b4d1e92a30e534f626622b7025a8eff244f6b29c1637bb3ed0678a1c04cab0c5ffd180b18df105
6
+ metadata.gz: 5df7c20cbbc737fc8527d959ad8d894cc0e5fece227099287dc1a96d72cbc62000d5d87b854f4a8483b2ee58c726154d9d50ca7568be27fc4126afe5a94818e5
7
+ data.tar.gz: 29c4efb1b93e7057ba343b8c4894978e3d9660a53043755f8d26e6378fa804085cd83e8d81203ab7f81a2cbcdd89bab5126042a113d9bb0ca376cb5967b65ba3
@@ -0,0 +1,31 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ "dockerComposeFile": "docker-compose.yml",
6
+ "service": "ruby",
7
+ "workspaceFolder": "/workspace",
8
+ // Environment variables for database connections
9
+ "containerEnv": {
10
+ "POSTGRES_URL": "postgresql://postgres:password@postgres:5432/statesman_dev",
11
+ "MYSQL_URL": "mysql2://root:password@mysql:3306/statesman_dev",
12
+ "PGHOST": "postgres",
13
+ "PGPORT": "5432",
14
+ "PGDATABASE": "statesman_dev",
15
+ "PGUSER": "postgres",
16
+ "PGPASSWORD": "password",
17
+ "MYSQL_HOST": "mysql",
18
+ "MYSQL_PORT": "3306",
19
+ "MYSQL_DATABASE": "statesman_dev",
20
+ "MYSQL_USER": "root",
21
+ "MYSQL_PASSWORD": "password"
22
+ },
23
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
24
+ // "forwardPorts": [],
25
+ // Use 'postCreateCommand' to run commands after the container is created.
26
+ "postCreateCommand": "sudo apt-get update && sudo apt-get install -y postgresql-client default-mysql-client && sudo chown -R vscode:vscode /usr/local/rvm/gems/default && bundle install",
27
+ // Configure tool-specific properties.
28
+ // "customizations": {},
29
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
30
+ // "remoteUser": "root"
31
+ }
@@ -0,0 +1,39 @@
1
+ version: '3.8'
2
+
3
+ services:
4
+ ruby:
5
+ image: mcr.microsoft.com/devcontainers/ruby:1-3.4-bullseye
6
+ volumes:
7
+ - ..:/workspace:cached
8
+ - gem-cache:/usr/local/rvm/gems/default
9
+ command: sleep infinity
10
+ depends_on:
11
+ - postgres
12
+ - mysql
13
+
14
+ postgres:
15
+ image: postgres:15
16
+ restart: unless-stopped
17
+ environment:
18
+ POSTGRES_PASSWORD: password
19
+ POSTGRES_DB: statesman_dev
20
+ volumes:
21
+ - postgres-data:/var/lib/postgresql/data
22
+ expose:
23
+ - "5432"
24
+
25
+ mysql:
26
+ image: mysql:8.0
27
+ restart: unless-stopped
28
+ environment:
29
+ MYSQL_ROOT_PASSWORD: password
30
+ MYSQL_DATABASE: statesman_dev
31
+ volumes:
32
+ - mysql-data:/var/lib/mysql
33
+ expose:
34
+ - "3306"
35
+
36
+ volumes:
37
+ postgres-data:
38
+ mysql-data:
39
+ gem-cache:
@@ -3,8 +3,9 @@ name: tests
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - "master"
6
+ - master
7
7
  pull_request:
8
+ types: [opened, reopened, synchronize]
8
9
 
9
10
  concurrency:
10
11
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,26 +15,47 @@ jobs:
14
15
  rubocop:
15
16
  runs-on: ubuntu-latest
16
17
  steps:
17
- - uses: actions/checkout@v3
18
+ - uses: actions/checkout@v5
18
19
  - uses: ruby/setup-ruby@v1
19
20
  with:
20
21
  bundler-cache: true
21
22
  - run: bundle exec rubocop --extra-details --display-style-guide --parallel --force-exclusion
22
23
 
24
+ sqlite:
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ ruby-version: ["3.2", "3.3", "3.4", "3.5"]
29
+ rails-version:
30
+ - "7.1"
31
+ - "7.2"
32
+ - "8.0"
33
+ - "main"
34
+ runs-on: ubuntu-latest
35
+ env:
36
+ RAILS_VERSION: ${{ matrix.rails-version }}
37
+ steps:
38
+ - uses: actions/checkout@v5
39
+ - name: Set up Ruby
40
+ uses: ruby/setup-ruby@v1
41
+ with:
42
+ bundler-cache: true
43
+ ruby-version: "${{ matrix.ruby-version }}"
44
+ - name: Run specs
45
+ run: |
46
+ bundle exec rspec --profile --format progress --format RSpec::Github::Formatter
47
+
23
48
  postgres:
24
49
  strategy:
25
50
  fail-fast: false
26
51
  matrix:
27
- ruby-version: ["3.0", "3.1", "3.2"]
52
+ ruby-version: ["3.2", "3.3", "3.4", "3.5"]
28
53
  rails-version:
29
- - "6.1.7.6"
30
- - "7.0.8"
31
- - "7.1.1"
54
+ - "7.1"
55
+ - "7.2"
56
+ - "8.0"
32
57
  - "main"
33
- postgres-version: ["12", "13", "14", "15", "16"]
34
- exclude:
35
- - ruby-version: "3.2"
36
- rails-version: "6.1.7.6"
58
+ postgres-version: ["14", "15", "16", "17"]
37
59
  runs-on: ubuntu-latest
38
60
  services:
39
61
  postgres:
@@ -52,8 +74,9 @@ jobs:
52
74
  env:
53
75
  DATABASE_URL: postgres://postgres:statesman@localhost/statesman_test
54
76
  DATABASE_DEPENDENCY_PORT: "5432"
77
+ RAILS_VERSION: ${{ matrix.rails-version }}
55
78
  steps:
56
- - uses: actions/checkout@v3
79
+ - uses: actions/checkout@v5
57
80
  - name: Set up Ruby
58
81
  uses: ruby/setup-ruby@v1
59
82
  with:
@@ -67,16 +90,14 @@ jobs:
67
90
  strategy:
68
91
  fail-fast: false
69
92
  matrix:
70
- ruby-version: ["3.0", "3.1", "3.2"]
93
+ ruby-version: ["3.2", "3.3", "3.4", "3.5"]
71
94
  rails-version:
72
- - "6.1.7.6"
73
- - "7.0.8"
74
- - "7.1.1"
95
+ - "7.1"
96
+ - "7.2"
97
+ - "8.0"
75
98
  - "main"
76
- mysql-version: ["8.0", "8.2"]
77
- exclude:
78
- - ruby-version: 3.2
79
- rails-version: "6.1.7.6"
99
+ mysql-version: ["8.0", "8.4", "9.4"]
100
+
80
101
  runs-on: ubuntu-latest
81
102
  services:
82
103
  mysql:
@@ -96,8 +117,9 @@ jobs:
96
117
  env:
97
118
  DATABASE_URL: mysql2://foobar:password@127.0.0.1/statesman_test
98
119
  DATABASE_DEPENDENCY_PORT: "3306"
120
+ RAILS_VERSION: ${{ matrix.rails-version }}
99
121
  steps:
100
- - uses: actions/checkout@v3
122
+ - uses: actions/checkout@v5
101
123
  - name: Set up Ruby
102
124
  uses: ruby/setup-ruby@v1
103
125
  with:
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  --require spec_helper
2
+ --format progress
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ inherit_gem:
4
4
  gc_ruboconfig: rubocop.yml
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.7
7
+ TargetRubyVersion: 3.2
8
8
  NewCops: enable
9
9
 
10
10
  Metrics/AbcSize:
@@ -15,6 +15,3 @@ Metrics/CyclomaticComplexity:
15
15
 
16
16
  Metrics/PerceivedComplexity:
17
17
  Max: 11
18
-
19
- Gemspec/DevelopmentDependencies:
20
- Enabled: false
data/.rubocop_todo.yml CHANGED
@@ -1,56 +1,47 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2021-08-09 15:32:40 UTC using RuboCop version 1.18.4.
3
+ # on 2025-08-29 17:37:05 UTC using RuboCop version 1.80.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
9
  # Offense count: 1
10
- # Configuration parameters: Include.
11
- # Include: **/*.gemspec
12
- Gemspec/RequiredRubyVersion:
13
- Exclude:
14
- - 'statesman.gemspec'
15
-
16
- # Offense count: 1
10
+ # Configuration parameters: AllowedParentClasses.
17
11
  Lint/MissingSuper:
18
12
  Exclude:
19
13
  - 'lib/statesman/adapters/active_record_queries.rb'
20
14
 
21
- # Offense count: 5
22
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
23
- Metrics/AbcSize:
24
- Max: 20
15
+ # Offense count: 2
16
+ # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
17
+ # AllowedMethods: call
18
+ # WaywardPredicates: nonzero?
19
+ Naming/PredicateMethod:
20
+ Exclude:
21
+ - 'lib/statesman/callback.rb'
25
22
 
26
23
  # Offense count: 1
27
- # Configuration parameters: IgnoredMethods.
28
- Metrics/CyclomaticComplexity:
29
- Max: 8
30
-
31
- # Offense count: 3
32
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
33
- Metrics/MethodLength:
34
- Max: 14
24
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
25
+ # NamePrefix: is_, has_, have_, does_
26
+ # ForbiddenPrefixes: is_, has_, have_, does_
27
+ # AllowedMethods: is_a?
28
+ # MethodDefinitionMacros: define_method, define_singleton_method
29
+ Naming/PredicatePrefix:
30
+ Exclude:
31
+ - 'spec/**/*'
32
+ - 'lib/statesman/adapters/active_record.rb'
35
33
 
36
- # Offense count: 11
34
+ # Offense count: 15
37
35
  # Configuration parameters: CountAsOne.
38
36
  RSpec/ExampleLength:
39
37
  Max: 14
40
38
 
41
- # Offense count: 7
39
+ # Offense count: 5
42
40
  RSpec/ExpectInHook:
43
41
  Exclude:
44
42
  - 'spec/statesman/adapters/active_record_spec.rb'
45
43
  - 'spec/statesman/machine_spec.rb'
46
44
 
47
- # Offense count: 1
48
- # Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
49
- # Include: **/*_spec*rb*, **/spec/**/*
50
- RSpec/FilePath:
51
- Exclude:
52
- - 'spec/statesman/exceptions_spec.rb'
53
-
54
45
  # Offense count: 1
55
46
  # Configuration parameters: AssignmentOnly.
56
47
  RSpec/InstanceVariable:
@@ -80,11 +71,12 @@ RSpec/MessageSpies:
80
71
  Exclude:
81
72
  - 'spec/statesman/callback_spec.rb'
82
73
 
83
- # Offense count: 14
74
+ # Offense count: 20
84
75
  RSpec/MultipleExpectations:
85
76
  Max: 3
86
77
 
87
- # Offense count: 49
78
+ # Offense count: 64
79
+ # Configuration parameters: AllowedGroups.
88
80
  RSpec/NestedGroups:
89
81
  Max: 6
90
82
 
@@ -93,13 +85,6 @@ RSpec/RepeatedExampleGroupBody:
93
85
  Exclude:
94
86
  - 'spec/statesman/exceptions_spec.rb'
95
87
 
96
- # Offense count: 12
97
- RSpec/ScatteredSetup:
98
- Exclude:
99
- - 'spec/statesman/adapters/active_record_spec.rb'
100
- - 'spec/statesman/adapters/shared_examples.rb'
101
- - 'spec/statesman/machine_spec.rb'
102
-
103
88
  # Offense count: 7
104
89
  # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
105
90
  RSpec/VerifiedDoubles:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.2
1
+ 3.4.5