File tree 6 files changed +116
-11
lines changed
6 files changed +116
-11
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Tests
3
+
4
+ on :
5
+ push :
6
+ branches : [ "master" ]
7
+ pull_request :
8
+ branches : [ "**" ]
9
+
10
+ jobs :
11
+ test :
12
+ runs-on : ubuntu-20.04
13
+
14
+ services :
15
+ postgres :
16
+ image : " postgres:13"
17
+ ports : ["5432:5432"]
18
+ env :
19
+ POSTGRES_PASSWORD : postgres
20
+ POSTGRES_DB : closure_tree
21
+ options : >-
22
+ --health-cmd pg_isready
23
+ --health-interval 10s
24
+ --health-timeout 5s
25
+ --health-retries 5
26
+
27
+ strategy :
28
+ fail-fast : false
29
+ matrix :
30
+ ruby :
31
+ - " 3.2.5"
32
+ rails :
33
+ - activerecord_7.0
34
+ adapter :
35
+ - sqlite3
36
+ - mysql2
37
+ - postgresql
38
+
39
+ steps :
40
+ - name : Checkout
41
+ uses : actions/checkout@v4
42
+
43
+ - name : Setup Ruby
44
+ uses : ruby/setup-ruby@v1
45
+ with :
46
+ ruby-version : ${{ matrix.ruby }}
47
+
48
+ - name : Set DB Adapter
49
+ env :
50
+ RAILS_VERSION : ${{ matrix.rails }}
51
+ DB_ADAPTER : ${{ matrix.adapter }}
52
+
53
+ # See: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
54
+ run : |
55
+ if [ "${DB_ADAPTER}" = "mysql2" ]; then
56
+ sudo systemctl start mysql.service
57
+ mysql -u root -proot -e "create database closure_tree;"
58
+ fi
59
+
60
+ - name : Bundle
61
+ env :
62
+ RAILS_VERSION : ${{ matrix.rails }}
63
+ DB_ADAPTER : ${{ matrix.adapter }}
64
+ BUNDLE_GEMFILE : gemfiles/${{ matrix.rails }}.gemfile
65
+ run : |
66
+ gem install bundler
67
+ bundle config path vendor/bundle
68
+ bundle install --jobs 4 --retry 3
69
+
70
+ - name : RSpec
71
+ env :
72
+ RAILS_VERSION : ${{ matrix.rails }}
73
+ DB_ADAPTER : ${{ matrix.adapter }}
74
+ BUNDLE_GEMFILE : gemfiles/${{ matrix.rails }}.gemfile
75
+ WITH_ADVISORY_LOCK_PREFIX : ${{ github.run_id }}
76
+ run : bin/rake --trace spec:all
Original file line number Diff line number Diff line change @@ -89,6 +89,21 @@ appraise 'activerecord-6.1' do
89
89
end
90
90
end
91
91
92
+ appraise 'activerecord-7.0' do
93
+ gem 'activerecord' , '~> 7.0'
94
+ platforms :ruby do
95
+ gem 'mysql2'
96
+ gem 'pg'
97
+ gem 'sqlite3'
98
+ end
99
+
100
+ platforms :jruby do
101
+ gem 'activerecord-jdbcmysql-adapter'
102
+ gem 'activerecord-jdbcpostgresql-adapter'
103
+ gem 'activerecord-jdbcsqlite3-adapter'
104
+ end
105
+ end
106
+
92
107
appraise 'activerecord-edge' do
93
108
gem 'activerecord' , github : 'rails/rails'
94
109
platforms :ruby do
Original file line number Diff line number Diff line change @@ -26,12 +26,3 @@ namespace :spec do
26
26
task . pattern = 'spec/generators/*_spec.rb'
27
27
end
28
28
end
29
-
30
- require 'github_changelog_generator/task'
31
- GitHubChangelogGenerator ::RakeTask . new :changelog do |config |
32
- config . user = 'ClosureTree'
33
- config . project = 'closure_tree'
34
- config . issues = false
35
- config . future_release = '5.2.0'
36
- config . since_tag = 'v7.3.0'
37
- end
Original file line number Diff line number Diff line change
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "bump", "~> 0.10.0"
6
+ gem "github_changelog_generator", "~> 1.16"
7
+ gem "activerecord", "~> 7.0"
8
+
9
+ platforms :ruby do
10
+ gem "mysql2"
11
+ gem "pg"
12
+ gem "sqlite3"
13
+ end
14
+
15
+ platforms :jruby do
16
+ gem "activerecord-jdbcmysql-adapter"
17
+ gem "activerecord-jdbcpostgresql-adapter"
18
+ gem "activerecord-jdbcsqlite3-adapter"
19
+ end
20
+
21
+ gemspec path: "../"
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class ContractType < ActiveRecord::Base
78
78
has_many :contracts , inverse_of : :contract_type
79
79
end
80
80
81
- class Block < ApplicationRecord
81
+ class Block < ActiveRecord :: Base
82
82
acts_as_tree order : :column_whereby_ordering_is_inferred , # <- symbol, and not "sort_order"
83
83
numeric_order : true ,
84
84
dependent : :destroy ,
Original file line number Diff line number Diff line change 30
30
add_foreign_key ( :tag_hierarchies , :tags , :column => 'descendant_id' )
31
31
32
32
create_table "uuid_tags" , :id => false do |t |
33
- t . string "uuid" , :unique => true
33
+ t . string "uuid"
34
34
t . string "name"
35
35
t . string "title"
36
36
t . string "parent_uuid"
37
37
t . integer "sort_order"
38
38
t . timestamps null : false
39
39
end
40
40
41
+ add_index "uuid_tags" , :uuid , unique : true
42
+
41
43
create_table "uuid_tag_hierarchies" , :id => false do |t |
42
44
t . string "ancestor_id" , :null => false
43
45
t . string "descendant_id" , :null => false
You can’t perform that action at this time.
0 commit comments