relation 0.3.2 → 0.3.8
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 +4 -4
- data/.github/workflows/rake.yml +24 -0
- data/.rubocop.yml +9 -0
- data/.ruby-gemset +1 -1
- data/.ruby-version +1 -1
- data/.watchr +15 -10
- data/Appraisals +10 -2
- data/Gemfile +2 -3
- data/MIT-LICENSE +1 -1
- data/README.md +5 -4
- data/Rakefile +8 -10
- data/app/models/dangling.rb +11 -14
- data/app/models/relation.rb +1 -3
- data/app/models/relation_ext.rb +4 -6
- data/gemfiles/{rails_5.2.gemfile → rails_6.0.gemfile} +3 -2
- data/gemfiles/rails_6.1.gemfile +13 -0
- data/lib/relation.rb +2 -0
- data/lib/relation/engine.rb +19 -18
- data/lib/relation/version.rb +11 -3
- data/relation.gemspec +4 -4
- data/test/support/database.rb +19 -21
- data/test/test_helper.rb +6 -5
- metadata +12 -23
- data/.travis.yml +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e1f65b86857cd18b3d25cee2c73dd2e6a8774a1e462ff4a014713a8aa14d623
|
4
|
+
data.tar.gz: b9a57c23c9a5e2c035f7745a9ef5738a0bedd84f1489b168cd8b4c8c1438c93e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805a350eb86db74b7e807432cf4915d5eb081c7adc0b50de26a17eee9126be6b92d47e0461f12b83d393f5c8620ba196aa27458d093fc443e5cec13f536e7b23
|
7
|
+
data.tar.gz: 39c06a31e6e590ed3e5d5a9ba11d955630852c9ba374ca8334e89ac09e3c416068ddf8ee4fd82495856b0812670a79f60e67ca279d5b149d557158a5f759f389
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Rake
|
2
|
+
|
3
|
+
#on: [push, pull_request]
|
4
|
+
on: [push]
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test:
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
# os: [ubuntu-latest, macos-latest]
|
12
|
+
os: [ubuntu-latest]
|
13
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
14
|
+
# ruby: [2.5, 2.6, 2.7, '3.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
|
15
|
+
ruby: [2.7]
|
16
|
+
runs-on: ${{ matrix.os }}
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
24
|
+
- run: bundle exec rake
|
data/.rubocop.yml
ADDED
data/.ruby-gemset
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rails-
|
1
|
+
rails-6.1
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.7.2
|
data/.watchr
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
TESTING = %w[test]
|
1
2
|
HH = '#' * 22 unless defined?(HH)
|
2
3
|
H = '#' * 5 unless defined?(H)
|
3
4
|
|
@@ -16,34 +17,38 @@ end
|
|
16
17
|
|
17
18
|
def run_it(type, file)
|
18
19
|
case type
|
19
|
-
when 'test'; run %
|
20
|
-
# when 'spec'; run %
|
20
|
+
when 'test'; run %(bundle exec ruby -I test #{file})
|
21
|
+
# when 'spec'; run %(rspec -X #{file})
|
21
22
|
else; puts "#{H} unknown type: #{type}, file: #{file}"
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
25
26
|
def run_all_tests
|
26
27
|
puts "\n#{HH} Running all tests #{HH}\n"
|
27
|
-
|
28
|
-
# %w{test}.each { |dir| run "spring rake #{dir} RAILS_ENV=test" if File.exists?(dir) }
|
29
|
-
%w{test}.each { |dir| run "rake #{dir} RAILS_ENV=test" if File.exists?(dir) }
|
28
|
+
TESTING.each { |dir| run "bundle exec rake #{dir}" if File.exist?(dir) }
|
30
29
|
end
|
31
30
|
|
32
31
|
def run_matching_files(base)
|
33
32
|
base = base.split('_').first
|
34
|
-
|
33
|
+
TESTING.each { |type|
|
35
34
|
files = Dir["#{type}/**/*.rb"].select { |file| file =~ /#{base}_.*\.rb/ }
|
36
35
|
run_it type, files.join(' ') unless files.empty?
|
37
36
|
}
|
38
37
|
end
|
39
38
|
|
40
|
-
|
39
|
+
TESTING.each { |type|
|
41
40
|
watch("#{type}/#{type}_helper\.rb") { run_all_tests }
|
41
|
+
watch('lib/.*\.rb') { run_all_tests }
|
42
42
|
watch("#{type}/.*/*_#{type}\.rb") { |match| run_it type, match[0] }
|
43
|
+
watch("#{type}/data/(.*)\.rb") { |match|
|
44
|
+
m1 = match[1]
|
45
|
+
run_matching_files("#{type}/#{m1}/#{m1}_#{type}.rb")
|
46
|
+
}
|
43
47
|
}
|
44
|
-
|
45
|
-
|
46
|
-
|
48
|
+
|
49
|
+
%w[rb erb haml slim].each { |type|
|
50
|
+
watch(".*/(.*)\.#{type}") { |match|
|
51
|
+
run_matching_files(match[1])
|
47
52
|
}
|
48
53
|
}
|
49
54
|
|
data/Appraisals
CHANGED
@@ -1,7 +1,15 @@
|
|
1
|
-
appraise 'rails-
|
2
|
-
gem 'rails', '~>
|
1
|
+
appraise 'rails-6.1' do
|
2
|
+
gem 'rails', '~> 6.1'
|
3
3
|
end
|
4
4
|
|
5
|
+
appraise 'rails-6.0' do
|
6
|
+
gem 'rails', '~> 6.0'
|
7
|
+
end
|
8
|
+
|
9
|
+
#appraise 'rails-5.2' do
|
10
|
+
# gem 'rails', '~> 5.2.0'
|
11
|
+
#end
|
12
|
+
#
|
5
13
|
#appraise 'rails-5.0' do
|
6
14
|
# gem 'rails', '~> 5.0.0'
|
7
15
|
#end
|
data/Gemfile
CHANGED
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Relation
|
2
2
|
[](http://badge.fury.io/rb/relation)
|
3
|
-
[](https://travis-ci.org/matique/relation)
|
4
3
|
|
5
4
|
AFAIK, Relation can replace all kind of relationships in a Rails database.
|
6
5
|
The gem stores the relationships in a additional table (named
|
@@ -49,7 +48,7 @@ The migration is then done, as usual, by:
|
|
49
48
|
|
50
49
|
## Usage
|
51
50
|
|
52
|
-
In short (order* and user* are ActiveRecords):
|
51
|
+
In short (order* and user* are instances of ActiveRecords):
|
53
52
|
|
54
53
|
Relation.add order, user
|
55
54
|
Relation.add order, user2
|
@@ -86,9 +85,11 @@ They may be used for relationships which can not be based on the
|
|
86
85
|
class name of the ActiveRecords.
|
87
86
|
Keep in mind that dangling relations must be handled by yourself.
|
88
87
|
|
89
|
-
## Rails
|
88
|
+
## Rails 6
|
89
|
+
|
90
|
+
This gem is intended for Rails 6.
|
91
|
+
Rails 5 should work fine.
|
90
92
|
|
91
|
-
This gem is intended for Rails 5.
|
92
93
|
Older Rails versions may use "gem 'relation', '= 0.1.1'".
|
93
94
|
|
94
95
|
## License MIT
|
data/Rakefile
CHANGED
@@ -1,13 +1,11 @@
|
|
1
|
-
|
2
|
-
require "rubygems"
|
3
|
-
require "bundler/setup"
|
1
|
+
require 'rake/testtask'
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
desc 'Run the tests.'
|
4
|
+
Rake::TestTask.new do |t|
|
5
|
+
t.libs << 'lib'
|
6
|
+
t.libs << 'test'
|
7
|
+
t.pattern = 'test/**/*_test.rb'
|
8
|
+
t.verbose = false
|
11
9
|
end
|
12
10
|
|
13
|
-
task :
|
11
|
+
task default: :test
|
data/app/models/dangling.rb
CHANGED
@@ -1,31 +1,28 @@
|
|
1
1
|
# extended Relation: extracts relation from rows
|
2
|
-
class Relation < ActiveRecord::Base
|
3
2
|
|
3
|
+
class Relation < ActiveRecord::Base
|
4
4
|
def self.dangling
|
5
5
|
names = Relation.pluck(:name).uniq
|
6
6
|
models = []
|
7
|
-
names.each { |name|
|
8
|
-
models |= name.split(' ')
|
9
|
-
}
|
7
|
+
names.each { |name| models |= name.split(' ') }
|
10
8
|
hsh = {}
|
11
|
-
models.each
|
9
|
+
models.each do |class_name|
|
12
10
|
klass = class_name.constantize
|
13
11
|
ids = klass.pluck(:id)
|
14
12
|
idx = Relation.where('name like ?', "#{class_name} %").pluck(:from_id)
|
15
13
|
idy = Relation.where('name like ?', "% #{class_name}").pluck(:to_id)
|
16
14
|
arr = (idx | idy) - ids
|
17
|
-
hsh[class_name] = arr
|
18
|
-
|
15
|
+
hsh[class_name] = arr if arr.length.positive?
|
16
|
+
end
|
19
17
|
hsh
|
20
18
|
end
|
21
19
|
|
22
20
|
def self.remove_dangling(hsh)
|
23
|
-
hsh.each
|
24
|
-
arr.each
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
hsh.each do |name, arr|
|
22
|
+
arr.each do |idx|
|
23
|
+
Relation.where(from_id: idx).where('name like ?', "#{name} %").delete_all
|
24
|
+
Relation.where(to_id: idx).where('name like ?', "% #{name}").delete_all
|
25
|
+
end
|
26
|
+
end
|
29
27
|
end
|
30
|
-
|
31
28
|
end
|
data/app/models/relation.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
class Relation < ActiveRecord::Base
|
2
|
-
|
3
2
|
def self.add_raw(name, from_id, to_id)
|
4
3
|
hsh = { name: name, from_id: from_id, to_id: to_id }
|
5
|
-
Relation.create!(hsh)
|
4
|
+
Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
6
5
|
end
|
7
6
|
|
8
7
|
def self.delete_raw(name, from_id, to_id)
|
@@ -17,5 +16,4 @@ class Relation < ActiveRecord::Base
|
|
17
16
|
def self.followers_raw(name, to_id)
|
18
17
|
Relation.where(name: name, to_id: to_id).pluck(:from_id)
|
19
18
|
end
|
20
|
-
|
21
19
|
end
|
data/app/models/relation_ext.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
# extended Relation: extracts relation from rows
|
2
2
|
class Relation < ActiveRecord::Base
|
3
|
-
|
4
3
|
def self.add(row_from, row_to)
|
5
4
|
hsh = normalize(row_from, row_to)
|
6
|
-
Relation.create!(hsh)
|
5
|
+
Relation.create!(hsh) if Relation.where(hsh).first.nil?
|
7
6
|
end
|
8
7
|
|
9
8
|
def self.delete(row_from, row_to)
|
@@ -25,9 +24,9 @@ class Relation < ActiveRecord::Base
|
|
25
24
|
klass.where(id: ids)
|
26
25
|
end
|
27
26
|
|
28
|
-
private
|
29
27
|
def self.name_id(resource)
|
30
|
-
raise 'missing resource'
|
28
|
+
raise 'missing resource' unless resource
|
29
|
+
|
31
30
|
[resource.class.name, resource.id]
|
32
31
|
end
|
33
32
|
|
@@ -40,9 +39,8 @@ class Relation < ActiveRecord::Base
|
|
40
39
|
|
41
40
|
def self.normalize2(kind, row)
|
42
41
|
klass = kind
|
43
|
-
klass = kind.constantize
|
42
|
+
klass = kind.constantize unless klass.is_a?(Class)
|
44
43
|
name, id = name_id(row)
|
45
44
|
[klass, name, id]
|
46
45
|
end
|
47
|
-
|
48
46
|
end
|
data/lib/relation.rb
CHANGED
data/lib/relation/engine.rb
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
+
# rubocop: disable all
|
2
|
+
|
1
3
|
module ModRelation
|
2
4
|
class Engine < Rails::Engine
|
3
5
|
isolate_namespace ModRelation
|
4
6
|
|
5
|
-
# # https://github.com/rails/rails/issues/22261
|
6
|
-
# initializer :append_migrations do |app|
|
7
|
-
# config.paths['db/migrate'].expanded.each do |path|
|
8
|
-
# app.config.paths['db/migrate'] << path
|
9
|
-
# ActiveRecord::Migrator.migrations_paths << path
|
10
|
-
# end
|
11
|
-
# end
|
7
|
+
# # https://github.com/rails/rails/issues/22261
|
8
|
+
# initializer :append_migrations do |app|
|
9
|
+
# config.paths['db/migrate'].expanded.each do |path|
|
10
|
+
# app.config.paths['db/migrate'] << path
|
11
|
+
# ActiveRecord::Migrator.migrations_paths << path
|
12
|
+
# end
|
13
|
+
# end
|
12
14
|
|
15
|
+
# # https://github.com/rails/rails/issues/22261
|
16
|
+
# module ActiveRecord
|
17
|
+
# #module ActiveRecord::Current
|
18
|
+
# class Schema < Migration
|
19
|
+
# def migrations_paths
|
20
|
+
# (ActiveRecord::Migrator.migrations_paths +
|
21
|
+
# Rails.application.paths['db/migrate'].to_a).uniq
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
# end
|
13
25
|
end
|
14
26
|
end
|
15
|
-
|
16
|
-
|
17
|
-
# # https://github.com/rails/rails/issues/22261
|
18
|
-
# module ActiveRecord
|
19
|
-
# #module ActiveRecord::Current
|
20
|
-
# class Schema < Migration
|
21
|
-
# def migrations_paths
|
22
|
-
# (ActiveRecord::Migrator.migrations_paths + Rails.application.paths['db/migrate'].to_a).uniq
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
# end
|
data/lib/relation/version.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
+
# rubocop: disable all
|
2
|
+
|
1
3
|
module ModRelation
|
2
|
-
VERSION = '0.3.
|
3
|
-
#
|
4
|
-
#
|
4
|
+
VERSION = '0.3.8' # 2021-06-22
|
5
|
+
# VERSION = '0.3.7' # 2020-07-14
|
6
|
+
# VERSION = '0.3.6' # 2020-04-27
|
7
|
+
# VERSION = '0.3.5' # 2020-03-03
|
8
|
+
# VERSION = '0.3.4' # 2019-10-04
|
9
|
+
# VERSION = '0.3.3' # 2019-03-23
|
10
|
+
# VERSION = '0.3.2' # 2019-03-05
|
11
|
+
# VERSION = '0.3.1' # 2018-08-05
|
12
|
+
# VERSION = '0.3.0' #
|
5
13
|
end
|
data/relation.gemspec
CHANGED
@@ -13,22 +13,22 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.authors = ['Dittmar Krall']
|
14
14
|
s.email = ['dittmar.krall@matique.de']
|
15
15
|
s.homepage = 'https://github.com/matique/relation'
|
16
|
-
|
17
16
|
s.license = 'MIT'
|
18
17
|
s.platform = Gem::Platform::RUBY
|
19
18
|
|
19
|
+
s.metadata['source_code_uri'] = 'https://github.com/matique/relation'
|
20
|
+
|
20
21
|
s.files = `git ls-files`.split("\n")
|
21
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
23
|
s.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
23
24
|
s.require_paths = ['lib', 'app']
|
24
25
|
|
25
|
-
s.add_dependency 'activerecord'
|
26
|
+
s.add_dependency 'activerecord'
|
26
27
|
|
27
|
-
s.add_development_dependency 'appraisal'
|
28
28
|
s.add_development_dependency 'bundler'
|
29
29
|
s.add_development_dependency 'rake'
|
30
|
+
s.add_development_dependency 'appraisal'
|
30
31
|
|
31
32
|
s.add_development_dependency 'minitest'
|
32
|
-
s.add_development_dependency 'simplecov'
|
33
33
|
s.add_development_dependency 'sqlite3'
|
34
34
|
end
|
data/test/support/database.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
class DB
|
2
|
-
ActiveRecord::Base.establish_connection adapter:
|
3
|
-
|
2
|
+
ActiveRecord::Base.establish_connection adapter: 'sqlite3',
|
3
|
+
database: ':memory:'
|
4
4
|
|
5
5
|
def self.setup
|
6
6
|
capture_stdout do
|
7
7
|
ActiveRecord::Base.logger
|
8
8
|
ActiveRecord::Schema.define(version: 1) do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
create_table :orders do |t|
|
10
|
+
t.column :name, :string
|
11
|
+
end
|
12
|
+
create_table :users do |t|
|
13
|
+
t.column :name, :string
|
14
|
+
end
|
15
|
+
create_table :relations, id: false do |t|
|
16
|
+
t.string :name
|
17
|
+
t.references :from, null: false
|
18
|
+
t.references :to, null: false
|
19
|
+
end
|
20
20
|
end
|
21
21
|
|
22
22
|
Order.reset_column_information
|
@@ -26,17 +26,16 @@ class DB
|
|
26
26
|
def self.teardown
|
27
27
|
if ActiveRecord::Base.connection.respond_to?(:data_sources)
|
28
28
|
ActiveRecord::Base.connection.data_sources.each do |table|
|
29
|
-
|
29
|
+
ActiveRecord::Base.connection.drop_table(table)
|
30
30
|
end
|
31
31
|
else
|
32
32
|
ActiveRecord::Base.connection.tables.each do |table|
|
33
|
-
|
33
|
+
ActiveRecord::Base.connection.drop_table(table)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
def self.capture_stdout(&block)
|
38
|
+
def self.capture_stdout
|
40
39
|
real_stdout = $stdout
|
41
40
|
|
42
41
|
$stdout = StringIO.new
|
@@ -45,7 +44,6 @@ class DB
|
|
45
44
|
ensure
|
46
45
|
$stdout = real_stdout
|
47
46
|
end
|
48
|
-
|
49
47
|
end
|
50
48
|
|
51
49
|
class Order < ActiveRecord::Base
|
@@ -54,6 +52,6 @@ end
|
|
54
52
|
class User < ActiveRecord::Base
|
55
53
|
end
|
56
54
|
|
57
|
-
require_relative
|
58
|
-
require_relative
|
59
|
-
require_relative
|
55
|
+
require_relative '../../app/models/relation'
|
56
|
+
require_relative '../../app/models/relation_ext'
|
57
|
+
require_relative '../../app/models/dangling'
|
data/test/test_helper.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
if ENV['COVERAGE']
|
2
|
+
require 'simplecov'
|
3
|
+
SimpleCov.start do
|
4
|
+
add_filter '/test/'
|
5
|
+
end
|
4
6
|
end
|
5
7
|
|
6
|
-
ENV["RAILS_ENV"] = "test"
|
7
8
|
require 'active_record'
|
8
9
|
require 'minitest/autorun'
|
9
10
|
|
10
11
|
# Load support files
|
11
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
12
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f }
|
12
13
|
|
13
14
|
class Minitest::Test
|
14
15
|
require 'active_support/testing/assertions'
|
metadata
CHANGED
@@ -1,37 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '5'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: appraisal
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
19
|
version: '0'
|
34
|
-
type: :
|
20
|
+
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
@@ -67,7 +53,7 @@ dependencies:
|
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
56
|
+
name: appraisal
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
@@ -81,7 +67,7 @@ dependencies:
|
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: minitest
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -116,10 +102,11 @@ executables: []
|
|
116
102
|
extensions: []
|
117
103
|
extra_rdoc_files: []
|
118
104
|
files:
|
105
|
+
- ".github/workflows/rake.yml"
|
119
106
|
- ".gitignore"
|
107
|
+
- ".rubocop.yml"
|
120
108
|
- ".ruby-gemset"
|
121
109
|
- ".ruby-version"
|
122
|
-
- ".travis.yml"
|
123
110
|
- ".watchr"
|
124
111
|
- Appraisals
|
125
112
|
- Gemfile
|
@@ -131,7 +118,8 @@ files:
|
|
131
118
|
- app/models/relation.rb
|
132
119
|
- app/models/relation_ext.rb
|
133
120
|
- db/migrate/20150810152808_relation.rb
|
134
|
-
- gemfiles/
|
121
|
+
- gemfiles/rails_6.0.gemfile
|
122
|
+
- gemfiles/rails_6.1.gemfile
|
135
123
|
- lib/relation.rb
|
136
124
|
- lib/relation/engine.rb
|
137
125
|
- lib/relation/version.rb
|
@@ -144,7 +132,8 @@ files:
|
|
144
132
|
homepage: https://github.com/matique/relation
|
145
133
|
licenses:
|
146
134
|
- MIT
|
147
|
-
metadata:
|
135
|
+
metadata:
|
136
|
+
source_code_uri: https://github.com/matique/relation
|
148
137
|
post_install_message:
|
149
138
|
rdoc_options: []
|
150
139
|
require_paths:
|
@@ -161,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
150
|
- !ruby/object:Gem::Version
|
162
151
|
version: '0'
|
163
152
|
requirements: []
|
164
|
-
rubygems_version: 3.
|
153
|
+
rubygems_version: 3.2.6
|
165
154
|
signing_key:
|
166
155
|
specification_version: 4
|
167
156
|
summary: Provides a simple directed relationship between active_record models.
|
data/.travis.yml
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
|
4
|
-
## speeding up
|
5
|
-
#env:
|
6
|
-
# - TEST_SUITE=units
|
7
|
-
# - TEST_SUITE=integration
|
8
|
-
#
|
9
|
-
#script: "bundle exec rake test:$TEST_SUITE"
|
10
|
-
|
11
|
-
#bundler_args: --without test
|
12
|
-
bundler_args: --without production
|
13
|
-
#bundler_args: --without development
|
14
|
-
|
15
|
-
rvm:
|
16
|
-
- 2.6.1 # 2019-03-05
|
17
|
-
# - 2.5.1 # 2018-04-27
|
18
|
-
# - 2.5.0 # 2018-02-22
|
19
|
-
# - 2.4.1 # tested: working for Rails 5
|
20
|
-
# - 2.3.1 # tested: working for Rails 5
|
21
|
-
# - 2.2.7 # tested: working for Rails 5
|
22
|
-
# - 2.2.0 # tested: failing for Rails 5
|
23
|
-
|
24
|
-
gemfile:
|
25
|
-
- gemfiles/rails_5.2.gemfile
|
26
|
-
# - gemfiles/rails_5.1.gemfile
|
27
|
-
# - gemfiles/rails_5.0.gemfile
|
28
|
-
# - gemfiles/rails_4.gemfile
|
29
|
-
|
30
|
-
notifications:
|
31
|
-
email: false
|
32
|
-
|
33
|
-
matrix:
|
34
|
-
# allow_failures:
|
35
|
-
# - gemfile: gemfiles/rails_5.0.gemfile
|
36
|
-
# rvm: 2.2.0
|
37
|
-
# - gemfile: gemfiles/rails_5.1.gemfile
|
38
|
-
# rvm: 2.2.0
|