Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '45 8 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
- name: Setup Ruby, JRuby and TruffleRuby
# You may pin to the exact commit or the version.
# uses: ruby/setup-ruby@3068fa83f9cbd7ae106cac45483635a2f3a195c9
uses: ruby/setup-ruby@v1.117.0
with:
bundler: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
pkg
Gemfile.lock
coverage
/.idea

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everybody uses Jetbrains editors.
While this does not hurt. its bad practice to clutter projects with local env settings.
best to put that in the home folder of the dev

$ grep ign ~/.gitconfig
        excludesfile = ~/.gitignore_global

my two cents on the topic

/gemfiles/*.gemfile.lock
38 changes: 38 additions & 0 deletions .travis.base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
os: linux

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

travis no longer offer supports for opensource project.
need to migrate this to Github Actions, or something else...

dist: xenial
language: ruby
cache: bundler
script: "bundle exec rake test"
rvm:
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
- head
- rbx
gemfile:
- gemfiles/rails_3.0.gemfile
- gemfiles/rails_3.1.gemfile
- gemfiles/rails_3.2.gemfile
- gemfiles/rails_4.0.gemfile
- gemfiles/rails_4.1.gemfile
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
- gemfiles/rails_6.1.gemfile
- gemfiles/rails_7_edge.gemfile
- gemfiles/datamapper.gemfile
- gemfiles/sequel.gemfile
jobs:
allow_failures:
- rvm: head
- gemfile: gemfiles/rails_7_edge.gemfile
- rvm: rbx
fast_finish: false
210 changes: 154 additions & 56 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,158 @@
sudo: false
---
os: linux
dist: xenial
language: ruby
cache: bundler
script: bundle exec rake test
rvm:
- 2.0
- 2.1
- 2.2.2
- 2.3.0
- 2.4.0
- 2.5.0
- rbx
env:
- ACTIVERECORD=3.0.0
- ACTIVERECORD=3.1.0
- ACTIVERECORD=3.2.0
- ACTIVERECORD=4.0.0
- ACTIVERECORD=4.1.0
- ACTIVERECORD=4.2.0
- ACTIVERECORD=5.0.0
- ACTIVERECORD=5.1.1
matrix:
exclude:
- rvm: 2.0
env: ACTIVERECORD=5.0.0
- rvm: 2.0
env: ACTIVERECORD=5.1.1
- rvm: 2.1
env: ACTIVERECORD=5.0.0
- rvm: 2.1
env: ACTIVERECORD=5.1.1
- rvm: 2.4.0
env: ACTIVERECORD=3.0.0
- rvm: 2.4.0
env: ACTIVERECORD=3.1.0
- rvm: 2.4.0
env: ACTIVERECORD=3.2.0
- rvm: 2.4.0
env: ACTIVERECORD=4.0.0
- rvm: 2.4.0
env: ACTIVERECORD=4.1.0
- rvm: 2.5.0
env: ACTIVERECORD=3.0.0
- rvm: 2.5.0
env: ACTIVERECORD=3.1.0
- rvm: 2.5.0
env: ACTIVERECORD=3.2.0
- rvm: 2.5.0
env: ACTIVERECORD=4.0.0
- rvm: 2.5.0
env: ACTIVERECORD=4.1.0
- rvm: rbx
env: ACTIVERECORD=5.0.0
- rvm: rbx
env: ACTIVERECORD=5.1.1
- 2.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
- 2.7
- 3.0
- head
- rbx
gemfile:
- gemfiles/rails_3.0.gemfile
- gemfiles/rails_3.1.gemfile
- gemfiles/rails_3.2.gemfile
- gemfiles/rails_4.0.gemfile
- gemfiles/rails_4.1.gemfile
- gemfiles/rails_4.2.gemfile
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
- gemfiles/rails_6.1.gemfile
- gemfiles/rails_7_edge.gemfile
- gemfiles/datamapper.gemfile
- gemfiles/sequel.gemfile
jobs:
allow_failures:
- rvm: rbx
fast_finish: true
addons:
code_climate:
repo_token: a90435ed4954dd6e9f3697a20c5bc3754f67d94703f870e8fc7b00f69f5b2d06
- rvm: head
- gemfile: gemfiles/rails_7_edge.gemfile
- rvm: rbx
- gemfile: gemfiles/rails_4.2.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_4.2.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_4.2.gemfile
rvm: '2.2'
- gemfile: gemfiles/rails_4.2.gemfile
rvm: '2.3'
- gemfile: gemfiles/rails_4.2.gemfile
rvm: '2.4'
fast_finish: false
exclude:
- gemfile: gemfiles/rails_3.0.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_3.0.gemfile
rvm: '2.5'
- gemfile: gemfiles/rails_3.0.gemfile
rvm: '2.6'
- gemfile: gemfiles/rails_3.0.gemfile
rvm: '2.7'
- gemfile: gemfiles/rails_3.0.gemfile
rvm: '3.0'
- gemfile: gemfiles/rails_3.0.gemfile
rvm: head
- gemfile: gemfiles/rails_3.1.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_3.1.gemfile
rvm: '2.5'
- gemfile: gemfiles/rails_3.1.gemfile
rvm: '2.6'
- gemfile: gemfiles/rails_3.1.gemfile
rvm: '2.7'
- gemfile: gemfiles/rails_3.1.gemfile
rvm: '3.0'
- gemfile: gemfiles/rails_3.1.gemfile
rvm: head
- gemfile: gemfiles/rails_3.2.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_3.2.gemfile
rvm: '2.5'
- gemfile: gemfiles/rails_3.2.gemfile
rvm: '2.6'
- gemfile: gemfiles/rails_3.2.gemfile
rvm: '2.7'
- gemfile: gemfiles/rails_3.2.gemfile
rvm: '3.0'
- gemfile: gemfiles/rails_3.2.gemfile
rvm: head
- gemfile: gemfiles/rails_4.0.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_4.0.gemfile
rvm: '2.5'
- gemfile: gemfiles/rails_4.0.gemfile
rvm: '2.6'
- gemfile: gemfiles/rails_4.0.gemfile
rvm: '2.7'
- gemfile: gemfiles/rails_4.0.gemfile
rvm: '3.0'
- gemfile: gemfiles/rails_4.0.gemfile
rvm: head
- gemfile: gemfiles/rails_4.1.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_4.1.gemfile
rvm: '2.5'
- gemfile: gemfiles/rails_4.1.gemfile
rvm: '2.6'
- gemfile: gemfiles/rails_4.1.gemfile
rvm: '2.7'
- gemfile: gemfiles/rails_4.1.gemfile
rvm: '3.0'
- gemfile: gemfiles/rails_4.1.gemfile
rvm: head
- gemfile: gemfiles/rails_5.0.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_5.0.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_5.1.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_5.1.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_5.2.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_5.2.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_5.2.gemfile
rvm: '2.2'
- gemfile: gemfiles/rails_5.2.gemfile
rvm: '2.3'
- gemfile: gemfiles/rails_5.2.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_6.0.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_6.0.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_6.0.gemfile
rvm: '2.2'
- gemfile: gemfiles/rails_6.0.gemfile
rvm: '2.3'
- gemfile: gemfiles/rails_6.0.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_6.1.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_6.1.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_6.1.gemfile
rvm: '2.2'
- gemfile: gemfiles/rails_6.1.gemfile
rvm: '2.3'
- gemfile: gemfiles/rails_6.1.gemfile
rvm: '2.4'
- gemfile: gemfiles/rails_7_edge.gemfile
rvm: '2.0'
- gemfile: gemfiles/rails_7_edge.gemfile
rvm: '2.1'
- gemfile: gemfiles/rails_7_edge.gemfile
rvm: '2.2'
- gemfile: gemfiles/rails_7_edge.gemfile
rvm: '2.3'
- gemfile: gemfiles/rails_7_edge.gemfile
rvm: '2.4'
32 changes: 32 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

SUPPORTED_RAILS_VERSIONS = %w[3.0 3.1 3.2 4.0 4.1 4.2 5.0 5.1 5.2 6.0 6.1]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably a good time to trash everything below 5.2


SUPPORTED_RAILS_VERSIONS.each do |rails_ver|
appraise "rails-#{rails_ver}" do
gem 'activerecord', "~> #{rails_ver}.x"
gem 'actionpack', "~> #{rails_ver}.x"

if %w[3.0 3.1 3.2].include?(rails_ver)
gem 'sqlite3'
#gem 'activerecord-sqlite3-adapter'
end

end
end

appraise 'rails-7-edge' do
gem 'activerecord', git: 'https://github.com/rails/rails', branch: 'main'
gem 'actionpack', git: 'https://github.com/rails/rails', branch: 'main'
end

appraise 'datamapper' do
gem 'datamapper'
gem 'dm-sqlite-adapter'
end

appraise 'sequel' do
gem 'sequel'
end



5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# attr_encrypted #

## 3.2.0 ##
* Added: Support Rails upto 6.2 and Ruby upto 3.0 (@mvastola)
* Added: `appraisal` gem to organize testing with different versions of dependencies (@mvastola)
* Changed: Outdated version dependencies in `gemspec` (@mvastola)

## 3.1.0 ##
* Added: Abitilty to encrypt empty values. (@tamird)
* Added: MIT license
Expand Down
Loading