seed_dump 3.4.0 → 3.4.1

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.
data/find_ruby_compat.sh DELETED
@@ -1,237 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script to find the oldest supported MRI Ruby version using asdf and appraisal.
4
- # Iterates from the latest available MRI Ruby version downwards.
5
-
6
- set -uo pipefail # Exit on unset variables, error on pipeline failure
7
-
8
- # --- Configuration ---
9
- # Regex to match stable MRI Ruby versions (e.g., 3.3.0, 3.2.4, 2.7.8)
10
- # Excludes pre-releases, RCs, dev versions. Adjust if needed.
11
- MRI_VERSION_REGEX='^[0-9]+\.[0-9]+\.[0-9]+$'
12
-
13
- # --- Functions ---
14
- cleanup() {
15
- echo "Cleaning up..."
16
- # Remove .tool-versions if it exists
17
- if [[ -f ".tool-versions" ]]; then
18
- echo "Removing temporary .tool-versions file."
19
- rm -f ".tool-versions"
20
- fi
21
- echo "Cleanup finished."
22
- }
23
-
24
- # --- Main Script ---
25
-
26
- # Ensure asdf is available
27
- if ! command -v asdf &> /dev/null; then
28
- echo "Error: asdf command not found. Please install asdf."
29
- exit 1
30
- fi
31
-
32
- # Ensure appraisal is available (at least check the command)
33
- if ! command -v appraisal &> /dev/null; then
34
- echo "Warning: appraisal command not found. Ensure it's in the Gemfile and run 'bundle install' first."
35
- # Attempt bundle install once initially
36
- if ! bundle check &> /dev/null; then
37
- echo "Running initial 'bundle install'..."
38
- if ! bundle install; then
39
- echo "Error: Initial bundle install failed. Cannot proceed."
40
- exit 1
41
- fi
42
- fi
43
- fi
44
-
45
-
46
- # Set trap for cleanup on exit (normal or error)
47
- trap cleanup EXIT
48
-
49
- echo "Starting Ruby compatibility check..."
50
-
51
- # 1. Get currently installed Ruby versions to avoid uninstalling them
52
- echo "Detecting pre-installed Ruby versions..."
53
- pre_installed_rubies=$(asdf list ruby 2>/dev/null | xargs)
54
- echo "Found pre-installed: ${pre_installed_rubies:-None}"
55
-
56
- # 2. Get all available MRI Ruby versions and sort them latest first
57
- echo "Fetching available MRI Ruby versions from asdf..."
58
- # Use process substitution and handle potential errors reading the list
59
- available_versions_output=$(asdf list all ruby)
60
- if [[ $? -ne 0 ]]; then
61
- echo "Error: Failed to list all ruby versions from asdf."
62
- exit 1
63
- fi
64
-
65
- sorted_mri_versions=$(echo "$available_versions_output" | grep -E "$MRI_VERSION_REGEX" | sort -V -r)
66
- if [[ -z "$sorted_mri_versions" ]]; then
67
- echo "Error: Could not find any stable MRI Ruby versions matching regex '$MRI_VERSION_REGEX'."
68
- exit 1
69
- fi
70
-
71
- # 3. Initialize state variables
72
- last_successful_version=""
73
- first_failing_version=""
74
- tested_a_version=false # Flag to check if any version was actually tested
75
-
76
- # 4. Loop through sorted versions
77
- while IFS= read -r version; do
78
- echo ""
79
- echo "--------------------------------------------------"
80
- echo "Attempting tests with Ruby $version"
81
- echo "--------------------------------------------------"
82
- tested_a_version=true
83
- was_installed_by_script=false
84
-
85
- # Check if this version was already installed
86
- is_pre_installed=false
87
- for installed_version in $pre_installed_rubies; do
88
- if [[ "$installed_version" == "$version" ]]; then
89
- is_pre_installed=true
90
- break
91
- fi
92
- done
93
-
94
- # Install if not pre-installed
95
- if [[ "$is_pre_installed" == "false" ]]; then
96
- echo "Ruby $version is not pre-installed. Attempting installation..."
97
- if ! asdf install ruby "$version"; then
98
- echo "ERROR: Failed to install Ruby $version. Skipping."
99
- # Clean up potentially partially installed version
100
- asdf uninstall ruby "$version" || true
101
- continue
102
- fi
103
- was_installed_by_script=true
104
- else
105
- echo "Ruby $version is pre-installed."
106
- fi
107
-
108
- # Set local version (creates .tool-versions) using the correct syntax
109
- echo "Setting local Ruby version to $version using 'asdf set local'..."
110
- if ! asdf set local ruby "$version"; then
111
- echo "ERROR: Failed to set local Ruby version to $version. Skipping."
112
- if [[ "$was_installed_by_script" == "true" ]]; then
113
- echo "Uninstalling Ruby $version as it was installed by script."
114
- asdf uninstall ruby "$version" || true
115
- fi
116
- # Ensure .tool-versions is removed if setting failed
117
- rm -f ".tool-versions"
118
- continue
119
- fi
120
-
121
- # *** Explicitly reshim after setting local version ***
122
- echo "Reshimming Ruby $version executables..."
123
- if ! asdf reshim ruby "$version"; then
124
- # This might happen if the install was corrupted, but often it's okay.
125
- echo "WARNING: Failed to reshim Ruby $version. Proceeding, but executables might not be found."
126
- fi
127
-
128
- # Ensure bundler is available and install dependencies
129
- echo "Ensuring Bundler and installing gems for Ruby $version..."
130
- # Try installing bundler conservatively, update RubyGems if needed. Ignore errors somewhat.
131
- # Use 'asdf exec' to ensure we use the shimmed gem command
132
- if ! asdf exec gem install bundler --conservative; then
133
- echo "Conservative bundler install failed, trying RubyGems update..."
134
- if ! asdf exec gem update --system; then
135
- echo "WARNING: RubyGems update failed."
136
- fi
137
- echo "Retrying bundler install..."
138
- if ! asdf exec gem install bundler; then
139
- echo "ERROR: Failed to install bundler for Ruby $version even after attempts. Skipping."
140
- # Reset local ruby, cleanup, and continue
141
- rm -f ".tool-versions"
142
- if [[ "$was_installed_by_script" == "true" ]]; then
143
- echo "Uninstalling Ruby $version as it was installed by script."
144
- asdf uninstall ruby "$version" || true
145
- fi
146
- continue
147
- fi
148
- fi
149
-
150
- # Use 'asdf exec' to ensure we use the shimmed bundle command
151
- if ! asdf exec bundle install; then
152
- echo "ERROR: 'bundle install' failed for Ruby $version. Skipping."
153
- # Reset local ruby, cleanup, and continue
154
- rm -f ".tool-versions"
155
- if [[ "$was_installed_by_script" == "true" ]]; then
156
- echo "Uninstalling Ruby $version as it was installed by script."
157
- asdf uninstall ruby "$version" || true
158
- fi
159
- continue
160
- fi
161
-
162
- # Install gems via appraisal
163
- echo "Running 'bundle exec appraisal install' for Ruby $version..."
164
- # Use 'asdf exec' to ensure we use the shimmed bundle command
165
- if ! asdf exec bundle exec appraisal install; then
166
- echo "ERROR: 'bundle exec appraisal install' failed for Ruby $version. Skipping."
167
- rm -f ".tool-versions"
168
- if [[ "$was_installed_by_script" == "true" ]]; then
169
- echo "Uninstalling Ruby $version as it was installed by script."
170
- asdf uninstall ruby "$version" || true
171
- fi
172
- continue
173
- fi
174
-
175
- # Run the tests via appraisal
176
- echo "Running tests ('bundle exec appraisal rake spec') for Ruby $version..."
177
- test_passed=false
178
- # Use 'asdf exec' to ensure we use the shimmed bundle command
179
- if asdf exec bundle exec appraisal rake spec; then
180
- test_passed=true
181
- fi
182
-
183
- # Handle test results
184
- if [[ "$test_passed" == "true" ]]; then
185
- echo "SUCCESS: Tests PASSED for Ruby $version."
186
- last_successful_version="$version"
187
- # Uninstall if we installed it
188
- if [[ "$was_installed_by_script" == "true" ]]; then
189
- echo "Uninstalling Ruby $version as it passed and was installed by script."
190
- asdf uninstall ruby "$version" || true
191
- fi
192
- else
193
- echo "FAILURE: Tests FAILED for Ruby $version."
194
- first_failing_version="$version"
195
- # Uninstall if we installed it
196
- if [[ "$was_installed_by_script" == "true" ]]; then
197
- echo "Uninstalling Ruby $version as it failed and was installed by script."
198
- asdf uninstall ruby "$version" || true
199
- fi
200
- # Reset local ruby version immediately after failure detection
201
- rm -f ".tool-versions"
202
- # Stop searching further
203
- break
204
- fi
205
-
206
- # Reset local ruby version before next iteration or script end
207
- rm -f ".tool-versions"
208
-
209
- done <<< "$sorted_mri_versions" # Feed the sorted list into the loop
210
-
211
- # 5. Report results
212
- echo ""
213
- echo "--------------------------------------------------"
214
- echo "Compatibility Check Summary"
215
- echo "--------------------------------------------------"
216
-
217
- if [[ -n "$first_failing_version" ]]; then
218
- echo "The first version that FAILED tests was: $first_failing_version"
219
- if [[ -n "$last_successful_version" ]]; then
220
- echo "The oldest tested version that PASSED tests is likely: $last_successful_version"
221
- echo "(Suggest setting minimum required Ruby version >= $last_successful_version)"
222
- else
223
- echo "No tested Ruby version passed the tests."
224
- fi
225
- elif [[ "$tested_a_version" == "false" ]]; then
226
- echo "No matching Ruby versions were found or could be tested."
227
- elif [[ -n "$last_successful_version" ]]; then
228
- echo "All tested Ruby versions passed!"
229
- echo "The oldest tested version (which passed) was: $last_successful_version"
230
- else
231
- echo "No versions were successfully tested."
232
- fi
233
- echo "--------------------------------------------------"
234
-
235
- # Cleanup is handled by the trap EXIT
236
-
237
- exit 0
@@ -1,28 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activesupport", "~> 6.1.0"
6
- gem "activerecord", "~> 6.1.0"
7
- gem "sqlite3", ">= 1.3", "< 2.0"
8
-
9
- group :development, :test do
10
- gem "byebug", "~> 11.1"
11
- gem "factory_bot", "~> 6.1"
12
- gem "activerecord-import", "~> 0.28"
13
- end
14
-
15
- group :development do
16
- gem "jeweler", "~> 2.3"
17
- end
18
-
19
- group :test do
20
- gem "rspec", "~> 3.13.0"
21
- gem "database_cleaner-active_record", "~> 2.0"
22
- gem "appraisal", "~> 2.4"
23
- gem "mutex_m"
24
- gem "logger"
25
- gem "benchmark"
26
- end
27
-
28
- gemspec path: "../"
@@ -1,150 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- seed_dump (3.3.1)
5
- activerecord (>= 4)
6
- activesupport (>= 4)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activemodel (6.1.7.10)
12
- activesupport (= 6.1.7.10)
13
- activerecord (6.1.7.10)
14
- activemodel (= 6.1.7.10)
15
- activesupport (= 6.1.7.10)
16
- activerecord-import (0.28.2)
17
- activerecord (>= 3.2)
18
- activesupport (6.1.7.10)
19
- concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 1.6, < 2)
21
- minitest (>= 5.1)
22
- tzinfo (~> 2.0)
23
- zeitwerk (~> 2.3)
24
- addressable (2.4.0)
25
- appraisal (2.5.0)
26
- bundler
27
- rake
28
- thor (>= 0.14.0)
29
- base64 (0.2.0)
30
- benchmark (0.4.0)
31
- bigdecimal (3.1.9)
32
- builder (3.3.0)
33
- byebug (11.1.3)
34
- concurrent-ruby (1.3.5)
35
- database_cleaner-active_record (2.2.0)
36
- activerecord (>= 5.a)
37
- database_cleaner-core (~> 2.0.0)
38
- database_cleaner-core (2.0.1)
39
- date (3.4.1)
40
- descendants_tracker (0.0.4)
41
- thread_safe (~> 0.3, >= 0.3.1)
42
- diff-lcs (1.6.1)
43
- factory_bot (6.5.1)
44
- activesupport (>= 6.1.0)
45
- faraday (0.9.2)
46
- multipart-post (>= 1.2, < 3)
47
- git (1.11.0)
48
- rchardet (~> 1.8)
49
- github_api (0.16.0)
50
- addressable (~> 2.4.0)
51
- descendants_tracker (~> 0.0.4)
52
- faraday (~> 0.8, < 0.10)
53
- hashie (>= 3.4)
54
- mime-types (>= 1.16, < 3.0)
55
- oauth2 (~> 1.0)
56
- hashie (5.0.0)
57
- highline (3.1.2)
58
- reline
59
- i18n (1.14.7)
60
- concurrent-ruby (~> 1.0)
61
- io-console (0.8.0)
62
- jeweler (2.3.9)
63
- builder
64
- bundler
65
- git (>= 1.2.5)
66
- github_api (~> 0.16.0)
67
- highline (>= 1.6.15)
68
- nokogiri (>= 1.5.10)
69
- psych
70
- rake
71
- rdoc
72
- semver2
73
- jwt (2.10.1)
74
- base64
75
- logger (1.7.0)
76
- mime-types (2.99.3)
77
- mini_portile2 (2.8.8)
78
- minitest (5.25.5)
79
- multi_json (1.15.0)
80
- multi_xml (0.7.1)
81
- bigdecimal (~> 3.1)
82
- multipart-post (2.4.1)
83
- mutex_m (0.3.0)
84
- nokogiri (1.18.8)
85
- mini_portile2 (~> 2.8.2)
86
- racc (~> 1.4)
87
- nokogiri (1.18.8-arm64-darwin)
88
- racc (~> 1.4)
89
- oauth2 (1.4.8)
90
- faraday (>= 0.8, < 3.0)
91
- jwt (>= 1.0, < 3.0)
92
- multi_json (~> 1.3)
93
- multi_xml (~> 0.5)
94
- rack (>= 1.2, < 3)
95
- psych (5.2.3)
96
- date
97
- stringio
98
- racc (1.8.1)
99
- rack (2.2.13)
100
- rake (13.2.1)
101
- rchardet (1.9.0)
102
- rdoc (6.13.1)
103
- psych (>= 4.0.0)
104
- reline (0.6.1)
105
- io-console (~> 0.5)
106
- rspec (3.13.2)
107
- rspec-core (~> 3.13.0)
108
- rspec-expectations (~> 3.13.0)
109
- rspec-mocks (~> 3.13.0)
110
- rspec-core (3.13.6)
111
- rspec-support (~> 3.13.0)
112
- rspec-expectations (3.13.5)
113
- diff-lcs (>= 1.2.0, < 2.0)
114
- rspec-support (~> 3.13.0)
115
- rspec-mocks (3.13.7)
116
- diff-lcs (>= 1.2.0, < 2.0)
117
- rspec-support (~> 3.13.0)
118
- rspec-support (3.13.6)
119
- semver2 (3.4.2)
120
- sqlite3 (1.7.3)
121
- mini_portile2 (~> 2.8.0)
122
- stringio (3.1.7)
123
- thor (1.3.2)
124
- thread_safe (0.3.6)
125
- tzinfo (2.0.6)
126
- concurrent-ruby (~> 1.0)
127
- zeitwerk (2.7.2)
128
-
129
- PLATFORMS
130
- arm64-darwin-24
131
- ruby
132
-
133
- DEPENDENCIES
134
- activerecord (~> 6.1.0)
135
- activerecord-import (~> 0.28)
136
- activesupport (~> 6.1.0)
137
- appraisal (~> 2.4)
138
- benchmark
139
- byebug (~> 11.1)
140
- database_cleaner-active_record (~> 2.0)
141
- factory_bot (~> 6.1)
142
- jeweler (~> 2.3)
143
- logger
144
- mutex_m
145
- rspec (~> 3.13.0)
146
- seed_dump!
147
- sqlite3 (>= 1.3, < 2.0)
148
-
149
- BUNDLED WITH
150
- 2.6.2
@@ -1,28 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activesupport", "~> 7.0.0"
6
- gem "activerecord", "~> 7.0.0"
7
- gem "sqlite3", ">= 1.3", "< 2.0"
8
-
9
- group :development, :test do
10
- gem "byebug", "~> 11.1"
11
- gem "factory_bot", "~> 6.1"
12
- gem "activerecord-import", "~> 0.28"
13
- end
14
-
15
- group :development do
16
- gem "jeweler", "~> 2.3"
17
- end
18
-
19
- group :test do
20
- gem "rspec", "~> 3.13.0"
21
- gem "database_cleaner-active_record", "~> 2.0"
22
- gem "appraisal", "~> 2.4"
23
- gem "mutex_m"
24
- gem "logger"
25
- gem "benchmark"
26
- end
27
-
28
- gemspec path: "../"
@@ -1,148 +0,0 @@
1
- PATH
2
- remote: ..
3
- specs:
4
- seed_dump (3.3.1)
5
- activerecord (>= 4)
6
- activesupport (>= 4)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- activemodel (7.0.8.7)
12
- activesupport (= 7.0.8.7)
13
- activerecord (7.0.8.7)
14
- activemodel (= 7.0.8.7)
15
- activesupport (= 7.0.8.7)
16
- activerecord-import (0.28.2)
17
- activerecord (>= 3.2)
18
- activesupport (7.0.8.7)
19
- concurrent-ruby (~> 1.0, >= 1.0.2)
20
- i18n (>= 1.6, < 2)
21
- minitest (>= 5.1)
22
- tzinfo (~> 2.0)
23
- addressable (2.4.0)
24
- appraisal (2.5.0)
25
- bundler
26
- rake
27
- thor (>= 0.14.0)
28
- base64 (0.2.0)
29
- benchmark (0.4.0)
30
- bigdecimal (3.1.9)
31
- builder (3.3.0)
32
- byebug (11.1.3)
33
- concurrent-ruby (1.3.5)
34
- database_cleaner-active_record (2.2.0)
35
- activerecord (>= 5.a)
36
- database_cleaner-core (~> 2.0.0)
37
- database_cleaner-core (2.0.1)
38
- date (3.4.1)
39
- descendants_tracker (0.0.4)
40
- thread_safe (~> 0.3, >= 0.3.1)
41
- diff-lcs (1.6.1)
42
- factory_bot (6.5.1)
43
- activesupport (>= 6.1.0)
44
- faraday (0.9.2)
45
- multipart-post (>= 1.2, < 3)
46
- git (1.11.0)
47
- rchardet (~> 1.8)
48
- github_api (0.16.0)
49
- addressable (~> 2.4.0)
50
- descendants_tracker (~> 0.0.4)
51
- faraday (~> 0.8, < 0.10)
52
- hashie (>= 3.4)
53
- mime-types (>= 1.16, < 3.0)
54
- oauth2 (~> 1.0)
55
- hashie (5.0.0)
56
- highline (3.1.2)
57
- reline
58
- i18n (1.14.7)
59
- concurrent-ruby (~> 1.0)
60
- io-console (0.8.0)
61
- jeweler (2.3.9)
62
- builder
63
- bundler
64
- git (>= 1.2.5)
65
- github_api (~> 0.16.0)
66
- highline (>= 1.6.15)
67
- nokogiri (>= 1.5.10)
68
- psych
69
- rake
70
- rdoc
71
- semver2
72
- jwt (2.10.1)
73
- base64
74
- logger (1.7.0)
75
- mime-types (2.99.3)
76
- mini_portile2 (2.8.8)
77
- minitest (5.25.5)
78
- multi_json (1.15.0)
79
- multi_xml (0.7.1)
80
- bigdecimal (~> 3.1)
81
- multipart-post (2.4.1)
82
- mutex_m (0.3.0)
83
- nokogiri (1.18.8)
84
- mini_portile2 (~> 2.8.2)
85
- racc (~> 1.4)
86
- nokogiri (1.18.8-arm64-darwin)
87
- racc (~> 1.4)
88
- oauth2 (1.4.8)
89
- faraday (>= 0.8, < 3.0)
90
- jwt (>= 1.0, < 3.0)
91
- multi_json (~> 1.3)
92
- multi_xml (~> 0.5)
93
- rack (>= 1.2, < 3)
94
- psych (5.2.3)
95
- date
96
- stringio
97
- racc (1.8.1)
98
- rack (2.2.13)
99
- rake (13.2.1)
100
- rchardet (1.9.0)
101
- rdoc (6.13.1)
102
- psych (>= 4.0.0)
103
- reline (0.6.1)
104
- io-console (~> 0.5)
105
- rspec (3.13.2)
106
- rspec-core (~> 3.13.0)
107
- rspec-expectations (~> 3.13.0)
108
- rspec-mocks (~> 3.13.0)
109
- rspec-core (3.13.6)
110
- rspec-support (~> 3.13.0)
111
- rspec-expectations (3.13.5)
112
- diff-lcs (>= 1.2.0, < 2.0)
113
- rspec-support (~> 3.13.0)
114
- rspec-mocks (3.13.7)
115
- diff-lcs (>= 1.2.0, < 2.0)
116
- rspec-support (~> 3.13.0)
117
- rspec-support (3.13.6)
118
- semver2 (3.4.2)
119
- sqlite3 (1.7.3)
120
- mini_portile2 (~> 2.8.0)
121
- stringio (3.1.7)
122
- thor (1.3.2)
123
- thread_safe (0.3.6)
124
- tzinfo (2.0.6)
125
- concurrent-ruby (~> 1.0)
126
-
127
- PLATFORMS
128
- arm64-darwin-24
129
- ruby
130
-
131
- DEPENDENCIES
132
- activerecord (~> 7.0.0)
133
- activerecord-import (~> 0.28)
134
- activesupport (~> 7.0.0)
135
- appraisal (~> 2.4)
136
- benchmark
137
- byebug (~> 11.1)
138
- database_cleaner-active_record (~> 2.0)
139
- factory_bot (~> 6.1)
140
- jeweler (~> 2.3)
141
- logger
142
- mutex_m
143
- rspec (~> 3.13.0)
144
- seed_dump!
145
- sqlite3 (>= 1.3, < 2.0)
146
-
147
- BUNDLED WITH
148
- 2.6.2
@@ -1,28 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activesupport", "~> 7.1.0"
6
- gem "activerecord", "~> 7.1.0"
7
- gem "sqlite3", ">= 1.3", "< 2.0"
8
-
9
- group :development, :test do
10
- gem "byebug", "~> 11.1"
11
- gem "factory_bot", "~> 6.1"
12
- gem "activerecord-import", "~> 0.28"
13
- end
14
-
15
- group :development do
16
- gem "jeweler", "~> 2.3"
17
- end
18
-
19
- group :test do
20
- gem "rspec", "~> 3.13.0"
21
- gem "database_cleaner-active_record", "~> 2.0"
22
- gem "appraisal", "~> 2.4"
23
- gem "mutex_m"
24
- gem "logger"
25
- gem "benchmark"
26
- end
27
-
28
- gemspec path: "../"