Skip to content

Commit bcbeb5a

Browse files
PG 1.0.0 Compatability (ValiMail#8)
* Create Appraisals to differentiate between 0.2 and 1.0 PG tests * Relax gemspec requirements * Compatability with AR 5.2 (and backwards) * Correct spec on update scripts * Bump version and update Readme to reflect * CircleCI update * Update Appraisals to 5.2 * Updated Appraisals
1 parent 03a2f9e commit bcbeb5a

17 files changed

+472
-63
lines changed

.circleci/config.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
version: 2.0
2+
3+
defaults: &defaults
4+
working_directory: ~/postshift
5+
environment:
6+
CC_TEST_REPORTER_ID: '709f763c91a65c17f11b90e2d08aae4886ac6a4208760a30c692232a5b098555'
7+
docker:
8+
- image: circleci/ruby:2.4.3
9+
environment:
10+
- RAILS_ENV=test
11+
- RACK_ENV=test
12+
13+
jobs:
14+
build:
15+
<<: *defaults
16+
steps:
17+
- checkout
18+
test-ar-5.0:
19+
<<: *defaults
20+
steps:
21+
- run:
22+
name: Run RSpec
23+
command: |
24+
./cc-test-reporter before-build
25+
bundle exec appraisal ar-5.0 rake spec:isolated
26+
./cc-test-reporter after-build --exit-code $?
27+
- store_artifacts:
28+
path: coverage
29+
test-ar-5.1:
30+
<<: *defaults
31+
steps:
32+
- run:
33+
name: Run RSpec
34+
command: |
35+
./cc-test-reporter before-build
36+
bundle exec appraisal ar-5.1 rake spec:isolated
37+
./cc-test-reporter after-build --exit-code $?
38+
- store_artifacts:
39+
path: coverage
40+
test-ar-5.2:
41+
<<: *defaults
42+
steps:
43+
- run:
44+
name: Run RSpec
45+
command: |
46+
./cc-test-reporter before-build
47+
bundle exec appraisal ar-5.2 rake spec:isolated
48+
./cc-test-reporter after-build --exit-code $?
49+
- store_artifacts:
50+
path: coverage
51+
52+
workflows:
53+
version: 2
54+
run-tests:
55+
jobs:
56+
- test-ar-5.0:
57+
requires:
58+
- build
59+
- test-ar-5.1:
60+
requires:
61+
- build
62+
- test-ar-5.2:
63+
requires:
64+
- build

Appraisals

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
appraise 'ar-5.0' do
2+
gem 'pg', '~> 0.20.0'
23
gem 'activerecord', '5.0.2'
34
gem 'activesupport', '5.0.2'
45
end
56

67
appraise 'ar-5.1' do
8+
gem 'pg', '~> 0.20.0'
79
gem 'activerecord', '5.1.0'
810
gem 'activesupport', '5.1.0'
911
end
12+
13+
appraise 'ar-5.2' do
14+
gem 'pg', '~> 1.0.0'
15+
gem 'activerecord', '5.2.0'
16+
gem 'activesupport', '5.2.0'
17+
end

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Amazon Redshift extension for ActiveRecord 5 (Rails 5) PostgreSQL adapter based
44

55
1. Function as an extension of the PostgreSQL ActiveRecord adapter. Overriding or extending as needed to properly account for the differences between PostgreSQL and Redshift.
66
2. Create a functioning test suite.
7-
3. Operate within both ActiveRecord 5 and 5.1.
7+
3. Support the following versions of ActiveRecord:
8+
* 5.0
9+
* 5.1
10+
* 5.2
811

912
<https://github.com/ConsultingMD/activerecord5-redshift-adapter>
1013

@@ -117,6 +120,7 @@ Additionally, there is multi-version test support through [Appraisal](https://gi
117120
appraisal install
118121
appraisal ar-5.0 rake spec
119122
appraisal ar-5.1 rake spec
123+
appraisal ar-5.2 rake spec
120124
```
121125

122126
## Contributing

circle.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

gemfiles/ar_5.0.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
source "https://rubygems.org"
44

5+
gem "pg", "~> 0.20.0"
56
gem "activerecord", "5.0.2"
67
gem "activesupport", "5.0.2"
78

gemfiles/ar_5.0.gemfile.lock

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PATH
22
remote: ..
33
specs:
4-
postshift (0.1.0)
5-
activerecord (>= 5.0)
6-
activesupport (>= 5.0)
7-
pg (~> 0.20.0)
4+
postshift (0.2.1)
5+
activerecord (~> 5.0)
6+
activesupport (~> 5.0)
7+
pg (>= 0.20.0)
88

99
GEM
1010
remote: https://rubygems.org/
@@ -26,30 +26,31 @@ GEM
2626
thor (>= 0.14.0)
2727
arel (7.1.4)
2828
concurrent-ruby (1.0.5)
29-
database_cleaner (1.6.1)
29+
database_cleaner (1.7.0)
3030
diff-lcs (1.3)
31-
factory_girl (4.8.0)
31+
factory_bot (4.8.2)
3232
activesupport (>= 3.0.0)
33-
i18n (0.8.1)
34-
minitest (5.10.2)
33+
i18n (0.9.1)
34+
concurrent-ruby (~> 1.0)
35+
minitest (5.11.1)
3536
pg (0.20.0)
3637
rake (10.5.0)
37-
rspec (3.6.0)
38-
rspec-core (~> 3.6.0)
39-
rspec-expectations (~> 3.6.0)
40-
rspec-mocks (~> 3.6.0)
41-
rspec-core (3.6.0)
42-
rspec-support (~> 3.6.0)
43-
rspec-expectations (3.6.0)
38+
rspec (3.7.0)
39+
rspec-core (~> 3.7.0)
40+
rspec-expectations (~> 3.7.0)
41+
rspec-mocks (~> 3.7.0)
42+
rspec-core (3.7.1)
43+
rspec-support (~> 3.7.0)
44+
rspec-expectations (3.7.0)
4445
diff-lcs (>= 1.2.0, < 2.0)
45-
rspec-support (~> 3.6.0)
46-
rspec-mocks (3.6.0)
46+
rspec-support (~> 3.7.0)
47+
rspec-mocks (3.7.0)
4748
diff-lcs (>= 1.2.0, < 2.0)
48-
rspec-support (~> 3.6.0)
49-
rspec-support (3.6.0)
50-
thor (0.19.4)
49+
rspec-support (~> 3.7.0)
50+
rspec-support (3.7.0)
51+
thor (0.20.0)
5152
thread_safe (0.3.6)
52-
tzinfo (1.2.3)
53+
tzinfo (1.2.4)
5354
thread_safe (~> 0.1)
5455

5556
PLATFORMS
@@ -58,13 +59,14 @@ PLATFORMS
5859
DEPENDENCIES
5960
activerecord (= 5.0.2)
6061
activesupport (= 5.0.2)
61-
appraisal (~> 2.2.0)
62+
appraisal (~> 2.2)
6263
bundler (~> 1.14)
63-
database_cleaner (~> 1.6.0)
64-
factory_girl (~> 4.8.0)
64+
database_cleaner (~> 1.7)
65+
factory_bot (~> 4.8)
66+
pg (~> 0.20.0)
6567
postshift!
6668
rake (~> 10.0)
6769
rspec (~> 3.0)
6870

6971
BUNDLED WITH
70-
1.14.6
72+
1.16.1

gemfiles/ar_5.1.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
source "https://rubygems.org"
44

5+
gem "pg", "~> 0.20.0"
56
gem "activerecord", "5.1.0"
67
gem "activesupport", "5.1.0"
78

gemfiles/ar_5.1.gemfile.lock

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PATH
22
remote: ..
33
specs:
4-
postshift (0.1.0)
5-
activerecord (>= 5.0)
6-
activesupport (>= 5.0)
7-
pg (~> 0.20.0)
4+
postshift (0.2.1)
5+
activerecord (~> 5.0)
6+
activesupport (~> 5.0)
7+
pg (>= 0.20.0)
88

99
GEM
1010
remote: https://rubygems.org/
@@ -26,30 +26,31 @@ GEM
2626
thor (>= 0.14.0)
2727
arel (8.0.0)
2828
concurrent-ruby (1.0.5)
29-
database_cleaner (1.6.1)
29+
database_cleaner (1.7.0)
3030
diff-lcs (1.3)
31-
factory_girl (4.8.0)
31+
factory_bot (4.8.2)
3232
activesupport (>= 3.0.0)
33-
i18n (0.8.1)
34-
minitest (5.10.2)
33+
i18n (0.9.1)
34+
concurrent-ruby (~> 1.0)
35+
minitest (5.11.1)
3536
pg (0.20.0)
3637
rake (10.5.0)
37-
rspec (3.6.0)
38-
rspec-core (~> 3.6.0)
39-
rspec-expectations (~> 3.6.0)
40-
rspec-mocks (~> 3.6.0)
41-
rspec-core (3.6.0)
42-
rspec-support (~> 3.6.0)
43-
rspec-expectations (3.6.0)
38+
rspec (3.7.0)
39+
rspec-core (~> 3.7.0)
40+
rspec-expectations (~> 3.7.0)
41+
rspec-mocks (~> 3.7.0)
42+
rspec-core (3.7.1)
43+
rspec-support (~> 3.7.0)
44+
rspec-expectations (3.7.0)
4445
diff-lcs (>= 1.2.0, < 2.0)
45-
rspec-support (~> 3.6.0)
46-
rspec-mocks (3.6.0)
46+
rspec-support (~> 3.7.0)
47+
rspec-mocks (3.7.0)
4748
diff-lcs (>= 1.2.0, < 2.0)
48-
rspec-support (~> 3.6.0)
49-
rspec-support (3.6.0)
50-
thor (0.19.4)
49+
rspec-support (~> 3.7.0)
50+
rspec-support (3.7.0)
51+
thor (0.20.0)
5152
thread_safe (0.3.6)
52-
tzinfo (1.2.3)
53+
tzinfo (1.2.4)
5354
thread_safe (~> 0.1)
5455

5556
PLATFORMS
@@ -58,13 +59,14 @@ PLATFORMS
5859
DEPENDENCIES
5960
activerecord (= 5.1.0)
6061
activesupport (= 5.1.0)
61-
appraisal (~> 2.2.0)
62+
appraisal (~> 2.2)
6263
bundler (~> 1.14)
63-
database_cleaner (~> 1.6.0)
64-
factory_girl (~> 4.8.0)
64+
database_cleaner (~> 1.7)
65+
factory_bot (~> 4.8)
66+
pg (~> 0.20.0)
6567
postshift!
6668
rake (~> 10.0)
6769
rspec (~> 3.0)
6870

6971
BUNDLED WITH
70-
1.14.6
72+
1.16.1

gemfiles/ar_5.2.beta.gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "pg", "~> 1.0.0"
6+
gem "activerecord", "5.2.0.beta2"
7+
gem "activesupport", "5.2.0.beta2"
8+
9+
gemspec path: "../"

gemfiles/ar_5.2.beta.gemfile.lock

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
PATH
2+
remote: ..
3+
specs:
4+
postshift (0.2.0)
5+
activerecord (~> 5.0)
6+
activesupport (~> 5.0)
7+
pg (>= 0.20.0)
8+
9+
GEM
10+
remote: https://rubygems.org/
11+
specs:
12+
activemodel (5.2.0.beta2)
13+
activesupport (= 5.2.0.beta2)
14+
activerecord (5.2.0.beta2)
15+
activemodel (= 5.2.0.beta2)
16+
activesupport (= 5.2.0.beta2)
17+
arel (>= 9.0)
18+
activesupport (5.2.0.beta2)
19+
concurrent-ruby (~> 1.0, >= 1.0.2)
20+
i18n (~> 0.7)
21+
minitest (~> 5.1)
22+
tzinfo (~> 1.1)
23+
appraisal (2.2.0)
24+
bundler
25+
rake
26+
thor (>= 0.14.0)
27+
arel (9.0.0)
28+
concurrent-ruby (1.0.5)
29+
database_cleaner (1.6.2)
30+
diff-lcs (1.3)
31+
factory_girl (4.9.0)
32+
activesupport (>= 3.0.0)
33+
i18n (0.9.1)
34+
concurrent-ruby (~> 1.0)
35+
minitest (5.11.1)
36+
pg (1.0.0)
37+
rake (10.5.0)
38+
rspec (3.7.0)
39+
rspec-core (~> 3.7.0)
40+
rspec-expectations (~> 3.7.0)
41+
rspec-mocks (~> 3.7.0)
42+
rspec-core (3.7.1)
43+
rspec-support (~> 3.7.0)
44+
rspec-expectations (3.7.0)
45+
diff-lcs (>= 1.2.0, < 2.0)
46+
rspec-support (~> 3.7.0)
47+
rspec-mocks (3.7.0)
48+
diff-lcs (>= 1.2.0, < 2.0)
49+
rspec-support (~> 3.7.0)
50+
rspec-support (3.7.0)
51+
thor (0.20.0)
52+
thread_safe (0.3.6)
53+
tzinfo (1.2.4)
54+
thread_safe (~> 0.1)
55+
56+
PLATFORMS
57+
ruby
58+
59+
DEPENDENCIES
60+
activerecord (= 5.2.0.beta2)
61+
activesupport (= 5.2.0.beta2)
62+
appraisal (~> 2.2)
63+
bundler (~> 1.14)
64+
database_cleaner (~> 1.6)
65+
factory_girl (~> 4.8)
66+
pg (~> 1.0.0)
67+
postshift!
68+
rake (~> 10.0)
69+
rspec (~> 3.0)
70+
71+
BUNDLED WITH
72+
1.16.1

0 commit comments

Comments
 (0)