activerecord_scoping_with_assoc 0.1.0 → 0.1.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: 287b18d59c6d64dc1ec94d77dcfc9439ec569fa7964d69e3ada39b7b2c4a990d
4
- data.tar.gz: dcf39059fd6e2a75c9594d54e746faa22b04f620c3dfb194ce5961a8f531c78a
3
+ metadata.gz: 6002d22bb43256296d2b818cbf1a0cc6c7350a6de26898848c84fd5d2c8c3caf
4
+ data.tar.gz: 187698f5b4613d147f17a4993dd4ad10bec0cbb075de4a46dd509cb45c26c214
5
5
  SHA512:
6
- metadata.gz: 58cb8a5da82b2eec54ad89ec151720c75b09241e3af704dd860bb74cb4908bf5b20197f5279676ecfa34788914575a98f1287e28cd2e789799142f5e5d79c372
7
- data.tar.gz: 1e5322a3ec3ae949a18ebe8315a4c7b42f5e988e39f4b4b844e8d3aba29680cb0492145320f4ed37991ba46b862e1e0b2b93ed9a578fd686595fae42e48fd1b2
6
+ metadata.gz: 2e3b1891fba505957ef3257324f6ba6777cc971a9c342ea799ab0eb02c039a2c3ddbcbec46cc8ba2375c577a5fc665a146869b0c38d25847cc609f3d5b94a335
7
+ data.tar.gz: e8b527b2fb55cd16e4fed9a37da95e2437b0d82b3914b4157a928f36d42ab84e3f4782b430d0c7b90aad0392c9aa0757da2379c393c68368a1ae3a6b52ac7070
@@ -0,0 +1,61 @@
1
+ name: CI
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-22.04
8
+ services:
9
+ postgres:
10
+ image: postgres:15
11
+ env:
12
+ POSTGRES_USER: postgres
13
+ POSTGRES_PASSWORD: postgres
14
+ ports:
15
+ - 5432:5432
16
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
17
+ mysql:
18
+ image: mysql:5.7
19
+ env:
20
+ MYSQL_ALLOW_EMPTY_PASSWORD: yes
21
+ ports:
22
+ - 3306:3306
23
+ options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ ruby: [2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3]
28
+ gemfile: ['rails60', 'rails61', 'rails70', 'rails71']
29
+ database: ['sqlite', 'mysql', 'postgresql']
30
+ exclude:
31
+ - ruby: 2.5
32
+ gemfile: rails70
33
+ - ruby: 2.5
34
+ gemfile: rails71
35
+ - ruby: 2.6
36
+ gemfile: rails70
37
+ - ruby: 2.6
38
+ gemfile: rails71
39
+
40
+ name: ruby ${{ matrix.ruby }}, ${{ matrix.gemfile }}, ${{ matrix.database }}
41
+
42
+ env:
43
+ DATABASE: ${{ matrix.database }}
44
+ POSTGRES_USER: postgres
45
+ POSTGRES_PASSWORD: postgres
46
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: ruby/setup-ruby@v1
51
+ with:
52
+ ruby-version: ${{ matrix.ruby }}
53
+ bundler-cache: true
54
+ - name: Prepare test
55
+ run: |
56
+ cd spec/dummy
57
+ BUNDLE_GEMFILE=../../${{ env.BUNDLE_GEMFILE }} RAILS_ENV=test bundle exec rake db:create db:migrate db:seed
58
+ cd ../..
59
+ - name: Run test
60
+ run: |
61
+ bundle exec rspec
data/.gitignore CHANGED
@@ -2,10 +2,11 @@
2
2
  .project
3
3
  Gemfile.lock
4
4
  coverage/
5
+ gemfiles/*.lock
5
6
  pkg/
6
7
  spec/dummy/config/database.yml
7
8
  spec/dummy/db/schema*.rb
8
- spec/dummy/db/*.sqlite3
9
+ spec/dummy/db/*.sqlite3*
9
10
  spec/dummy/log/*.log
10
11
  spec/dummy/tmp/*
11
12
  tmp/
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # CHANGELOG
2
+
3
+ ## 0.1.1
4
+
5
+ * Add `frozen_string_literal: true`.
6
+
7
+ ## 0.1.0
8
+
9
+ * First release.
@@ -1,5 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem "rails", "~> 6.0.0"
4
+ gem "sqlite3", "~> 1.4.0"
5
+ gem "psych", "~> 3.3.0"
4
6
 
5
7
  gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 6.1.0"
4
+ gem "sqlite3", "~> 1.4.0"
5
+
6
+ gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 7.0.1"
4
+ gem "sqlite3", "~> 1.4.0"
5
+
6
+ gemspec path: "../"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem "rails", "~> 7.1.0"
4
+ gem "sqlite3", "~> 1.6.6"
5
+
6
+ gemspec path: "../"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecordScopingWithAssoc
2
4
  module Association
3
5
  def target_scope
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecordScopingWithAssoc
2
4
  class Railtie < Rails::Railtie
3
5
  ActiveSupport.on_load :active_record do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecordScopingWithAssoc
2
4
  KEY = :_activerecord_scoping_with_assoc
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecordScopingWithAssoc
2
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activerecord_scoping_with_assoc/version'
2
4
  require 'activerecord_scoping_with_assoc/association'
3
5
  require 'activerecord_scoping_with_assoc/relation'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_scoping_with_assoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-09 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -115,15 +115,19 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/ci.yml"
118
119
  - ".gitignore"
119
120
  - ".rspec"
120
- - ".travis.yml"
121
+ - CHANGELOG.md
121
122
  - Gemfile
122
123
  - LICENSE
123
124
  - README.md
124
125
  - Rakefile
125
126
  - activerecord_scoping_with_assoc.gemspec
126
127
  - gemfiles/rails60.gemfile
128
+ - gemfiles/rails61.gemfile
129
+ - gemfiles/rails70.gemfile
130
+ - gemfiles/rails71.gemfile
127
131
  - lib/activerecord_scoping_with_assoc.rb
128
132
  - lib/activerecord_scoping_with_assoc/association.rb
129
133
  - lib/activerecord_scoping_with_assoc/railtie.rb
@@ -132,7 +136,7 @@ files:
132
136
  homepage: https://github.com/kanety/activerecord_scoping_with_assoc
133
137
  licenses: []
134
138
  metadata: {}
135
- post_install_message:
139
+ post_install_message:
136
140
  rdoc_options: []
137
141
  require_paths:
138
142
  - lib
@@ -147,8 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
151
  - !ruby/object:Gem::Version
148
152
  version: '0'
149
153
  requirements: []
150
- rubygems_version: 3.0.3
151
- signing_key:
154
+ rubygems_version: 3.3.3
155
+ signing_key:
152
156
  specification_version: 4
153
157
  summary: Merge scoping to associations
154
158
  test_files: []
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.5
4
- - 2.6
5
- services:
6
- - mysql
7
- - postgresql
8
- addons:
9
- postgresql: "9.5"
10
- env:
11
- - DATABASE=sqlite
12
- - DATABASE=mysql
13
- - DATABASE=postgresql
14
- gemfile:
15
- - gemfiles/rails60.gemfile
16
- before_script:
17
- - cd spec/dummy
18
- - bundle exec rake db:create db:migrate db:seed RAILS_ENV=test
19
- - cd ../..
20
- script:
21
- - bundle exec rspec