relation_to_struct 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bb8b931d89b6d73791900b6e8103442856413d8bead16b0f006b28163765ae9
4
- data.tar.gz: '01867db9481ad85af27892312f23a5f9ceb7687bc7b3232e1c952324be98ab81'
3
+ metadata.gz: 6ebd7741a088cfbc209a2013e1c6feac68233029bbdb72d8141ba3f711414c8b
4
+ data.tar.gz: 668edbe5050f12f20dab89ea891e062a4f8ab7b2e11775dd57162d4a58f94b80
5
5
  SHA512:
6
- metadata.gz: 6a9aa775119c2e6de109e000591b7dcdd149d5caccc5e3dc145cab69f7e22bc1d142a83bcbb47ccf55f0d2ea9109d44973a7ea6f87226ae46d300b6b6f87e49b
7
- data.tar.gz: 701affeecbfbce06009babd6d48f6b98622f7de98d7fce6bb3a701c0587845940057ded3661c6e0574a7b7a46ff8003c0f0b7837705263f1377725dae44dd553
6
+ metadata.gz: d58bc5eab67aa7ea28efed4d48365216dcb50f5c48b40b97056dc664ed64da33643f2e5a057ac4ea4c54c4074f81980ef1fa244ae4c4e1ea4d03346da4481bbd
7
+ data.tar.gz: 1fdaef138830916143a5731893e274aa0d9a3769821829b848074f39917d1d782804b5c78baf92e5570d396f89463c7e883ed737d6c3a466c2615fd0003b1735
@@ -12,22 +12,21 @@ jobs:
12
12
  - 15
13
13
  - 16
14
14
  ruby:
15
- - "3.0"
16
15
  - "3.1"
17
16
  - "3.2"
18
17
  gemfile:
19
18
  - rails_6_1
20
19
  - rails_7_0
21
20
  - rails_7_1
21
+ - rails_7_2
22
22
  name: PostgreSQL ${{ matrix.pg }} - Ruby ${{ matrix.ruby }} - ${{ matrix.gemfile }}
23
23
  runs-on: ubuntu-latest
24
24
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
25
25
  BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
26
- ImageOS: ubuntu20
27
26
  steps:
28
27
  - uses: actions/checkout@v3
29
28
  - name: Start the postgres container
30
- run: docker-compose up -d
29
+ run: docker compose up -d
31
30
  env:
32
31
  PGVERSION: ${{ matrix.pg }}
33
32
  - name: Setup Ruby using .ruby-version file
@@ -42,18 +41,17 @@ jobs:
42
41
  strategy:
43
42
  matrix:
44
43
  ruby:
45
- - "3.0"
46
44
  - "3.1"
47
45
  - "3.2"
48
46
  gemfile:
49
47
  - rails_6_1
50
48
  - rails_7_0
51
49
  - rails_7_1
50
+ - rails_7_2
52
51
  name: SQLite - Ruby ${{ matrix.ruby }} - ${{ matrix.gemfile }}
53
52
  runs-on: ubuntu-latest
54
53
  env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
55
54
  BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
56
- ImageOS: ubuntu20
57
55
  steps:
58
56
  - uses: actions/checkout@v3
59
57
  - name: Setup Ruby using .ruby-version file
data/.gitignore CHANGED
@@ -12,5 +12,4 @@
12
12
  *.so
13
13
  *.o
14
14
  *.a
15
- .ruby-version
16
15
  mkmf.log
data/.pryrc ADDED
@@ -0,0 +1,21 @@
1
+ require "pry-byebug"
2
+
3
+ Pry.commands.alias_command 'c', 'continue'
4
+ Pry.commands.alias_command 's', 'step'
5
+ Pry.commands.alias_command 'n', 'next'
6
+ Pry.commands.alias_command 'f', 'finish'
7
+
8
+ # https://github.com/pry/pry/issues/1275#issuecomment-131969510
9
+ # Prevent issue where text input does not display on screen in container after typing Ctrl-C in a pry repl
10
+ at_exit do
11
+ exit!(1)
12
+ end
13
+
14
+ trap('INT') do
15
+ begin
16
+ Pry.run_command "continue", :show_output => true, :target => Pry.current
17
+ rescue
18
+ exit
19
+ end
20
+ end
21
+ # End pry Ctrl-C workaround
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.2
data/Appraisals CHANGED
@@ -1,4 +1,4 @@
1
- %w(6.1 7.0 7.1).each do |version|
1
+ %w(6.1 7.0 7.1 7.2).each do |version|
2
2
  appraise "rails-#{version.gsub(/\./, "-")}" do
3
3
  gem "rails", "~> #{version}.0"
4
4
  end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # RelationToStruct
2
2
 
3
- [![Build Status](https://semaphoreci.com/api/v1/jcoleman/relation_to_struct/branches/master/badge.svg)](https://semaphoreci.com/jcoleman/relation_to_struct)
3
+ [![Build Status](https://github.com/jcoleman/relation_to_struct/actions/workflows/ci.yml/badge.svg)](https://github.com/jcoleman/relation_to_struct/actions/workflows/ci.yml?query=branch%3Amaster+)
4
4
 
5
5
  When one needs to use ActiveRecord to fetch specific values (whether subset columns of a model or arbitrary calculated columns), it's desirable to avoid the overhead of model instances and any associated callbacks.
6
6
 
@@ -100,14 +100,15 @@ For this reason, **all methods added to `ActiveRecord::Base` explicitly disable
100
100
  ## Contributing
101
101
 
102
102
  1. Fork it ( https://github.com/jcoleman/relation_to_struct/fork )
103
- 2. Create your feature branch (`git checkout -b my-new-feature`)
104
- 3. Test your changes (`bundle install && bundle exec appraisal install && bundle exec rake`)
105
- 4. Commit your changes (`git commit -am 'Add some feature'`)
106
- 5. Push to the branch (`git push origin my-new-feature`)
107
- 6. Create a new Pull Request
103
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
104
+ 1. Install gems and spin up a PostgreSQL container (`bin/setup`)
105
+ 1. Test your changes (`bundle exec appraisal rake && DATABASE=postgresql bundle exec appraisal rake`)
106
+ 1. Commit your changes (`git commit -am 'Add some feature'`)
107
+ 1. Push to the branch (`git push origin my-new-feature`)
108
+ 1. Create a new Pull Request
108
109
 
109
110
  ## Releasing
110
111
 
111
112
  1. Bump version in `lib/relation_to_struct/version.rb` and commit.
112
- 2. Run `rake build` to build the `*.gem` file.
113
- 3. Run `rake release` to publish the gem to Rubygems. Note: if while releasing the gem you get the error ``Your rubygems.org credentials aren't set. Run `gem push` to set them.`` you can more simply run `gem signin`.
113
+ 1. Run `rake build` to build the `*.gem` file.
114
+ 1. Run `rake release` to publish the gem to Rubygems. Note: if while releasing the gem you get the error ``Your rubygems.org credentials aren't set. Run `gem push` to set them.`` you can more simply run `gem signin`.
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 7.2.0"
6
+
7
+ gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  module RelationToStruct
2
- VERSION = "1.9.0"
2
+ VERSION = "1.9.1"
3
3
  end
@@ -18,14 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "appraisal", ">= 2.1"
21
+ spec.add_development_dependency "appraisal", ">= 2.5"
22
22
  spec.add_development_dependency "bundler", ">= 1.7"
23
23
  spec.add_development_dependency "rake", ">= 10.0"
24
- spec.add_development_dependency "sqlite3", ">= 1.4"
24
+ spec.add_development_dependency "sqlite3", "~> 1.4"
25
25
  spec.add_development_dependency "rspec", ">= 3.2"
26
26
  spec.add_development_dependency "pry-byebug"
27
27
  spec.add_development_dependency "pg"
28
28
 
29
- spec.add_dependency "activerecord", ">= 6.1", "< 7.2"
30
- spec.add_dependency "activesupport", ">= 6.1", "< 7.2"
29
+ spec.add_dependency "activerecord", ">= 6.1", "< 7.3"
30
+ spec.add_dependency "activesupport", ">= 6.1", "< 7.3"
31
31
  end
data/spec/spec_helper.rb CHANGED
@@ -3,7 +3,6 @@ require 'active_record'
3
3
  require 'active_support'
4
4
  require 'relation_to_struct'
5
5
  require 'active_record_helper/setup'
6
- require 'pry-byebug'
7
6
 
8
7
  def active_record_supports_arrays?
9
8
  if defined?(@active_record_supports_arrays)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relation_to_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coleman
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-10 00:00:00.000000000 Z
11
+ date: 2024-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.1'
19
+ version: '2.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.1'
26
+ version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -56,14 +56,14 @@ dependencies:
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.4'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.4'
69
69
  - !ruby/object:Gem::Dependency
@@ -117,7 +117,7 @@ dependencies:
117
117
  version: '6.1'
118
118
  - - "<"
119
119
  - !ruby/object:Gem::Version
120
- version: '7.2'
120
+ version: '7.3'
121
121
  type: :runtime
122
122
  prerelease: false
123
123
  version_requirements: !ruby/object:Gem::Requirement
@@ -127,7 +127,7 @@ dependencies:
127
127
  version: '6.1'
128
128
  - - "<"
129
129
  - !ruby/object:Gem::Version
130
- version: '7.2'
130
+ version: '7.3'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: activesupport
133
133
  requirement: !ruby/object:Gem::Requirement
@@ -137,7 +137,7 @@ dependencies:
137
137
  version: '6.1'
138
138
  - - "<"
139
139
  - !ruby/object:Gem::Version
140
- version: '7.2'
140
+ version: '7.3'
141
141
  type: :runtime
142
142
  prerelease: false
143
143
  version_requirements: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ dependencies:
147
147
  version: '6.1'
148
148
  - - "<"
149
149
  - !ruby/object:Gem::Version
150
- version: '7.2'
150
+ version: '7.3'
151
151
  description: ''
152
152
  email:
153
153
  - jtc331@gmail.com
@@ -158,7 +158,9 @@ extra_rdoc_files: []
158
158
  files:
159
159
  - ".github/workflows/ci.yml"
160
160
  - ".gitignore"
161
+ - ".pryrc"
161
162
  - ".rspec"
163
+ - ".ruby-version"
162
164
  - Appraisals
163
165
  - Gemfile
164
166
  - LICENSE.txt
@@ -169,6 +171,7 @@ files:
169
171
  - gemfiles/rails_6_1.gemfile
170
172
  - gemfiles/rails_7_0.gemfile
171
173
  - gemfiles/rails_7_1.gemfile
174
+ - gemfiles/rails_7_2.gemfile
172
175
  - lib/relation_to_struct.rb
173
176
  - lib/relation_to_struct/active_record_base_extension.rb
174
177
  - lib/relation_to_struct/active_record_connection_adapter_extension.rb
@@ -188,7 +191,7 @@ homepage: ''
188
191
  licenses:
189
192
  - MIT
190
193
  metadata: {}
191
- post_install_message:
194
+ post_install_message:
192
195
  rdoc_options: []
193
196
  require_paths:
194
197
  - lib
@@ -203,8 +206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
206
  - !ruby/object:Gem::Version
204
207
  version: '0'
205
208
  requirements: []
206
- rubygems_version: 3.1.6
207
- signing_key:
209
+ rubygems_version: 3.5.9
210
+ signing_key:
208
211
  specification_version: 4
209
212
  summary: Return struct results from ActiveRecord relation queries
210
213
  test_files: