Skip to content

Commit 3bdad2b

Browse files
authored
Merge pull request #6 from bubket/rails-7-support
adding rails 7 support
2 parents 15dade2 + 3574a65 commit 3bdad2b

File tree

6 files changed

+72
-31
lines changed

6 files changed

+72
-31
lines changed

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby-version: [2.5.8, 2.7.2]
20+
postgres-version: [15, 16, 17]
21+
services:
22+
postgres:
23+
image: postgres:${{ matrix.postgres-version }}-alpine
24+
ports:
25+
- 5432:5432
26+
env:
27+
POSTGRES_USER: postgres
28+
POSTGRES_PASSWORD: postgres
29+
POSTGRES_HOST_AUTH_METHOD: trust
30+
options: >-
31+
--health-cmd pg_isready
32+
--health-interval 10s
33+
--health-timeout 5s
34+
--health-retries 5
35+
steps:
36+
- name: Checkout Project
37+
uses: actions/checkout@v4
38+
- name: Set up Ruby
39+
uses: ruby/setup-ruby@v1
40+
with:
41+
ruby-version: ${{ matrix.ruby-version }}
42+
bundler-cache: true
43+
- name: Install PostgreSQL ${{ matrix.postgres-version }} Client
44+
run: |
45+
# Add PostgreSQL APT repository
46+
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
47+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
48+
sudo apt-get update
49+
# Install PostgreSQL client tools
50+
sudo apt-get install -y postgresql-client-${{ matrix.postgres-version }}
51+
- name: Setup Database
52+
run: |
53+
mkdir -p config
54+
cat <<EOF > config/database.yml
55+
test:
56+
adapter: postgresql
57+
encoding: unicode
58+
pool: 20
59+
database: prodder_test
60+
EOF
61+
- name: Test with RSpec
62+
env:
63+
PGHOST: localhost
64+
PGPORT: 5432
65+
PGUSER: postgres
66+
PGPASSWORD: postgres
67+
run: |
68+
export PATH="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin:$PATH"
69+
bundle exec rspec

.simplecov

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

.travis.yml

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

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ Obvious Data
22
============
33

44
[![Gem Version](https://badge.fury.io/rb/obvious_data.svg)](https://rubygems.org/gems/obvious_data)
5-
[![Build Status](https://travis-ci.org/enova/obvious_data.svg?branch=master)](https://travis-ci.org/enova/obvious_data)
6-
[![Coverage Status](https://coveralls.io/repos/github/enova/obvious_data/badge.svg?branch=master)](https://coveralls.io/github/enova/obvious_data?branch=master)
75

86
Rails gem to treat DB functions, triggers, etc more like code, and make them more discoverable
97

lib/obvious_data/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ObviousData
2-
VERSION = "0.2.1"
2+
VERSION = "0.3.0"
33
end

obvious_data.gemspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ Gem::Specification.new do |s|
1717
s.files = Dir['{app,config,db,lib}/**/*'] + ['LICENSE.txt', 'Rakefile', 'README.md']
1818
s.test_files = Dir['spec/**/*']
1919

20-
s.add_dependency 'railties', '>= 3.2.0', '< 7'
21-
s.add_dependency 'activerecord', '>= 3.2.0', '< 7'
20+
s.add_dependency 'railties', '>= 3.2.0', '< 8'
21+
s.add_dependency 'activerecord', '>= 3.2.0', '< 8'
2222

2323
s.add_development_dependency 'pg', '< 2'
2424
s.add_development_dependency 'rspec', '~> 3.4'
2525
s.add_development_dependency 'pry', '~> 0.10'
26-
s.add_development_dependency 'coveralls', '~> 0.8'
2726
end

0 commit comments

Comments
 (0)