track_ballast 0.1.0.beta5 → 0.1.0.beta6

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: 0f1a04ffa017c95ce6198c9fef9f64da597bb16ff576b71377abf4ac715c428d
4
- data.tar.gz: b05fdc886ad5db09710caf6ed82690d19f719210fb0d6c9d43d61cb95a49c376
3
+ metadata.gz: 4eb1bf8026f035355c976bd1d356017c022dfd12ae0c9db32967d17c84ae19ac
4
+ data.tar.gz: 451487f526462eb61d15d9bd036a6070825b7c733d36b77f6957a40f086e0fa0
5
5
  SHA512:
6
- metadata.gz: 61095353e41bf8bf5b8f88cba94254eaa181ff8d8b11bf098a6c80bb390171d02c1b61fc5033c98099248e5d9948ec6b75e4ce3d6820539a15f45cbbfe59cea1
7
- data.tar.gz: 8fc983be5b685a43ab0931864e8357831809e9f5c295f20272f885f2d8f49af0ebf1a437c45a5e71db2b7ffbda854d0b6fccfa090c877da971b67b9dd42352b3
6
+ metadata.gz: ae6549bbe50faebd1c394f107e43de187029459d7f8afefd67d774a4c190d5ebaa3b5b0d7b8479f836ec7400462674c939927361f7830161a3e60f2aaba0bf89
7
+ data.tar.gz: 5b187742d7f330fb0405752919270fb20f9067ca62212638260e15f80fb5b146e839c3c41567b26e9d9887d3d03fc42c23f71920a3f1a294335389969b96d50e
@@ -0,0 +1,235 @@
1
+ ---
2
+ version: '2.1'
3
+
4
+ orbs:
5
+ ci-utils: doximity/ci-utils@2
6
+
7
+ executors:
8
+ base:
9
+ resource_class: small
10
+ docker:
11
+ - image: cimg/base:current-22.04
12
+ ruby:
13
+ parameters:
14
+ ruby-version:
15
+ type: string
16
+ default: 3.2.2
17
+ resource_class: small
18
+ docker:
19
+ - image: cimg/ruby:<< parameters.ruby-version >>
20
+
21
+ commands:
22
+ bundle_install:
23
+ steps:
24
+ - run:
25
+ name: Configure Bundler
26
+ command: |
27
+ bundle config set --local path 'vendor/bundle'
28
+ bundle config set --local jobs 4
29
+ bundle config set --local retry 3
30
+ - run:
31
+ name: Install Ruby Dependencies
32
+ command: |
33
+ if [ -d "vendor/cache" ]; then
34
+ bundle install --local --verbose
35
+ else
36
+ bundle install --verbose
37
+ fi
38
+ - run:
39
+ name: Did you run bundle install after changing Gemfile?
40
+ command: git diff --exit-code Gemfile.lock
41
+
42
+ install_gem_version:
43
+ parameters:
44
+ gem-version:
45
+ description: 'The name and version number (e.g. rails-7.0.3) you want installed, specified to the patch version.'
46
+ type: string
47
+ default: ''
48
+ steps:
49
+ - when:
50
+ condition: "<< parameters.gem-version >>"
51
+ steps:
52
+ - run:
53
+ name: Unfreeze Bundle
54
+ command: bundle config set --local frozen 'false'
55
+ - run:
56
+ name: Show prior gem version
57
+ command: |
58
+ read -r target_gemname target_version \<<< $( echo "<< parameters.gem-version >>" | sed 's/\(.*\)-\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)*\)/\1 \2/g')
59
+ version=$(bundle list | sed -n "s/[[:space:]]*\* $target_gemname (\(.*\))/\1/p")
60
+ if [[ -z "$version" ]]; then
61
+ echo "No prior version of ${target_gemname} found."
62
+ else
63
+ echo $version;
64
+ fi
65
+ - run:
66
+ name: Set gem version to << parameters.gem-version >>
67
+ command: |
68
+ cd
69
+ mkdir -p ~/project/vendor/cache
70
+ read -r target_gemname target_version \<<< $( echo "<< parameters.gem-version >>" | sed 's/\(.*\)-\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)*\)/\1 \2/g')
71
+ gem install $target_gemname -i /tmp/repo --no-document -v $target_version
72
+
73
+ echo 'Delete any gems matching the newly installed ones from the existing cache'
74
+ for line in $(ls /tmp/repo/cache | grep gem); do
75
+ read -r gemname version \<<< $( echo $line | sed 's/\(.*\)-\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)*\)[^0-9\.]*.*.gem/\1 \2/g')
76
+ if [ $gemname = 'bundler' ]; # skip bundler
77
+ then continue
78
+ fi
79
+ rm -f ~/project/vendor/cache/$gemname*.gem
80
+ done;
81
+
82
+ echo 'The following gems will be copied into the project: '
83
+ ls -l /tmp/repo/cache
84
+ cp /tmp/repo/cache/*.gem ~/project/vendor/cache
85
+
86
+ echo 'Showing gems in the project cache: ls -al ~/project/vendor/cache'
87
+ ls -al ~/project/vendor/cache
88
+
89
+ cd ~/project
90
+ echo 'Removing Gemfile.lock'
91
+ rm -f ./Gemfile.lock
92
+
93
+ echo 'Fancy replacement. Set all gems in the gemspec to what we currently have in the vendor/cache.'
94
+ for line in $(ls vendor/cache | grep gem); do
95
+ # we don't care about the .gem, get rid of it
96
+ trimmed_line=${line%%.gem}
97
+ # version to include anything after the gem name so we can pick up prerelease versions
98
+ read -r gemname version \<<< $( echo $trimmed_line | sed 's/\(.*\)-\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)*[^0-9\.]*.*\)/\1 \2/g' )
99
+
100
+ # leave bundler alone
101
+ if [ $gemname = 'bundler' ];
102
+ then continue
103
+ fi
104
+
105
+ # strip out platform info from version, we just want the number plus any prerelease identifiers
106
+ version=$(echo $version | cut -d "-" -f 1)
107
+
108
+ sed -i "s/\(.*_dependency \"$gemname\"\)".*"/\1, \"~> $version\"/g" *.gemspec
109
+
110
+ if [[ "$gemname" = "$target_gemname" ]]; then
111
+ if [[ -z "$(sed -n "s/\(.*_dependency \"$gemname\"\).*\"/\1/p" *.gemspec)" ]];
112
+ then
113
+ echo 'No pre-existing version, adding version';
114
+ replacement="spec\\.add_development_dependency \"$gemname\", \"~> $version\""
115
+ sed -e "0,/add.*dependency/{/add.*dependency/a\ $replacement" -e "}" -i -- *.gemspec
116
+ else
117
+ echo 'nothing to do';
118
+ fi;
119
+ fi;
120
+ done;
121
+
122
+ echo 'cat *.gemspec'
123
+ cat *.gemspec
124
+
125
+ echo 'bundle install --local --no-cache'
126
+ bundle install --local --no-cache
127
+ - run:
128
+ name: Gem version after upgrade
129
+ command: |
130
+ read -r target_gemname target_version \<<< $( echo "<< parameters.gem-version >>" | sed 's/\(.*\)-\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)*\)/\1 \2/g')
131
+ version=$(bundle list | sed -n "s/[[:space:]]*\* $target_gemname (\(.*\))/\1/p")
132
+ if [[ -z "$version" ]]; then
133
+ echo "${target_gemname} was somehow not installed."
134
+ exit 1
135
+ else
136
+ echo $version;
137
+ fi
138
+
139
+ run_rspec_tests:
140
+ parameters:
141
+ test_pattern:
142
+ default: "{$(ls -d spec/**/ | tr '\\n' ',' | sed -E 's/(spec\\/|factories|support|\\/|,$)//g' | sed 's/,\\{2,\\}/,/g')}"
143
+ type: string
144
+ test_files:
145
+ default: $(circleci tests glob "spec/$TEST_PATTERN/**/*_spec.rb" | circleci tests split --split-by=timings)
146
+ type: string
147
+ profile-specs:
148
+ type: integer
149
+ default: 0
150
+ steps:
151
+ - run:
152
+ name: Run RSpec Tests
153
+ command: |
154
+ shopt -s globstar
155
+ OUT_PATH=tmp/test-results
156
+ mkdir -p $OUT_PATH
157
+ TEST_PATTERN=<< parameters.test_pattern >>
158
+ TEST_FILES=<< parameters.test_files >>
159
+ PROFILE_COUNT=<< parameters.profile-specs >>
160
+ RSPEC_COMMAND="bundle exec rspec --profile $PROFILE_COUNT --format RspecJunitFormatter --out $OUT_PATH/results.xml --format progress --order defined $TEST_FILES"
161
+ printf "Executing specs with the following command:\n\n"
162
+ echo ${RSPEC_COMMAND}
163
+ printf "\n"
164
+ eval $RSPEC_COMMAND
165
+
166
+ jobs:
167
+ run_tests_ruby:
168
+ parameters:
169
+ executor:
170
+ type: string
171
+ default: ruby
172
+ parallelism:
173
+ type: integer
174
+ default: 1
175
+ resource_class:
176
+ type: string
177
+ default: small
178
+ gem-version:
179
+ description: 'The name and version number (e.g. rails-7.0.3) you want installed,specified to the patch version.'
180
+ type: string
181
+ default: ''
182
+ ruby-version:
183
+ type: string
184
+ default: '3.1'
185
+ pre-actions:
186
+ description: Steps to perform any necessary setup after dependencies are installed.
187
+ type: steps
188
+ default: []
189
+ actions:
190
+ description: The actions that fulfill the primary purpose of the CI job (tests/checks/etc.)
191
+ type: steps
192
+ default: []
193
+ post-actions:
194
+ description: Any artifacting/reporting/cleanup that must occur after the main actions.
195
+ type: steps
196
+ default: []
197
+ executor:
198
+ name: "<< parameters.executor >>"
199
+ ruby-version: "<< parameters.ruby-version >>"
200
+ resource_class: "<< parameters.resource_class >>"
201
+ parallelism: "<< parameters.parallelism >>"
202
+ steps:
203
+ - ci-utils/ci_checkout
204
+ - bundle_install
205
+ - install_gem_version:
206
+ gem-version: "<< parameters.gem-version >>"
207
+ - steps: "<< parameters.pre-actions >>"
208
+ - steps: "<< parameters.actions >>"
209
+ - steps: "<< parameters.post-actions >>"
210
+ - ci-utils/quietly_store_artifacts
211
+
212
+ workflows:
213
+ main:
214
+ jobs:
215
+ - run_tests_ruby:
216
+ name: ruby-<< matrix.ruby-version >>-<< matrix.gem-version>>
217
+ executor: ruby
218
+ parallelism: 1
219
+ actions:
220
+ - run_rspec_tests:
221
+ test_files: $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
222
+ post-actions:
223
+ - store_test_results:
224
+ path: tmp/test-results
225
+ matrix:
226
+ parameters:
227
+ ruby-version:
228
+ - '3.0'
229
+ - '3.1'
230
+ - '3.2'
231
+ - '3.3'
232
+ gem-version:
233
+ - rails-6.1.7
234
+ - rails-7.0.8
235
+ - rails-7.1.3
data/CHANGELOG.md CHANGED
@@ -1,8 +1,9 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- ## 0.1.0.beta1
4
+ ## 0.1.0
5
5
 
6
6
  * First external release
7
- * Add `Callable`
8
- * Add `UuidManagement`
7
+ * Added support for Ruby 3.0 - 3.3
8
+ * Added `Callable`
9
+ * Added `UuidManagement`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- track_ballast (0.1.0.beta5)
4
+ track_ballast (0.1.0.beta6)
5
5
  activerecord (>= 6.1, < 8.0)
6
6
  activesupport (>= 6.1, < 8.0)
7
7
 
@@ -114,7 +114,8 @@ GEM
114
114
  ruby-progressbar (1.13.0)
115
115
  ruby2_keywords (0.0.5)
116
116
  shellany (0.0.1)
117
- sqlite3 (1.6.8-arm64-darwin)
117
+ sqlite3 (1.7.2-arm64-darwin)
118
+ sqlite3 (1.7.2-x86_64-linux)
118
119
  standard (1.33.0)
119
120
  language_server-protocol (~> 3.17.0.2)
120
121
  lint_roller (~> 1.0)
@@ -135,7 +136,9 @@ GEM
135
136
  yard (0.9.34)
136
137
 
137
138
  PLATFORMS
139
+ arm64-darwin-21
138
140
  arm64-darwin-22
141
+ x86_64-linux
139
142
 
140
143
  DEPENDENCIES
141
144
  bundler
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![CircleCI](https://dl.circleci.com/status-badge/img/gh/doximity/track_ballast/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/doximity/track_ballast/tree/master)
2
+
1
3
  # TrackBallast
2
4
 
3
5
  TrackBallast contains small supporting units of Ruby to use with Rails. It is named after [the small supporting stones that you see alongside railway tracks](https://www.scienceabc.com/pure-sciences/why-are-there-stones-train-ballast-alongside-railway-tracks.html).
@@ -1,3 +1,3 @@
1
1
  module TrackBallast
2
- VERSION = "0.1.0.beta5"
2
+ VERSION = "0.1.0.beta6"
3
3
  end
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = "Small supporting units of Ruby to use with Rails"
14
14
  spec.homepage = "https://github.com/doximity/track_ballast"
15
15
  spec.license = "APACHE-2.0"
16
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
16
17
 
17
18
  spec.metadata["homepage_uri"] = spec.homepage
18
19
  spec.metadata["source_code_uri"] = spec.homepage
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: track_ballast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.beta5
4
+ version: 0.1.0.beta6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Oakes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-31 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -197,6 +197,7 @@ executables: []
197
197
  extensions: []
198
198
  extra_rdoc_files: []
199
199
  files:
200
+ - ".circleci/config.yml"
200
201
  - ".gitignore"
201
202
  - ".rspec"
202
203
  - ".ruby-version"
@@ -232,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
233
  requirements:
233
234
  - - ">="
234
235
  - !ruby/object:Gem::Version
235
- version: '0'
236
+ version: 3.0.0
236
237
  required_rubygems_version: !ruby/object:Gem::Requirement
237
238
  requirements:
238
239
  - - ">"