Skip to content

Commit

Permalink
Support dry-configurable 0.10 - 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuk09 committed Sep 1, 2023
1 parent 7657399 commit 421858e
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 9 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Ruby

on:
push:
branches:
- master

pull_request:
on: push

jobs:
build:
Expand All @@ -18,6 +13,12 @@ jobs:
- '3.0'
- '3.1'
- '3.2'
gemfile:
- 'Gemfile.dry-config-0.12'
- 'Gemfile.dry-config-0.14'
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
RUBY_VERSION: ${{ matrix.ruby }}

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [Unreleased]

- Support dry-configuration version 0.10.x - 0.12.x

## [0.1.0] - 2023-04-11

- Initial release
16 changes: 16 additions & 0 deletions Gemfile.dry-config-0.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

source "https://rubygems.org"

# Specify your gem's dependencies in sequel-data-migrate.gemspec
gemspec

gem "rake", "~> 13.0"
gem "rbs"
gem "sqlite3"

gem "rspec"

gem "rubocop"
gem "rubocop-rspec"
gem "dry-configurable", "0.12"
16 changes: 16 additions & 0 deletions Gemfile.dry-config-0.14
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

source "https://rubygems.org"

# Specify your gem's dependencies in sequel-data-migrate.gemspec
gemspec

gem "rake", "~> 13.0"
gem "rbs"
gem "sqlite3"

gem "rspec"

gem "rubocop"
gem "rubocop-rspec"
gem "dry-configurable", "0.14"
8 changes: 7 additions & 1 deletion lib/sequel_data/migrate.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require "dry-configurable"
require "dry/configurable/version"
require "sequel_data/migrate/version"
require "sequel_data/migrate/errors"
require "sequel_data/migrate/migrator"
Expand All @@ -13,7 +14,12 @@ module Migrate
setting :db_configuration do
setting :host
end
setting :migration_path, default: "db/data"

if Dry::Configurable::VERSION >= "0.13.0"
setting :migration_path, default: "db/data"
else
setting :migration_path, "db/data"
end

def self.migrate
Migrator.new(config).migrate
Expand Down
2 changes: 1 addition & 1 deletion lib/sequel_data/migrate/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module SequelData
module Migrate
VERSION = "0.1.0"
VERSION = "0.1.1"
end
end
2 changes: 1 addition & 1 deletion sequel-data-migrate.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "dry-configurable", ">= 0.13.0"
spec.add_dependency "dry-configurable", ">= 0.10.0"
spec.add_dependency "sequel", ">= 4.0.0"
spec.metadata["rubygems_mfa_required"] = "true"
end

0 comments on commit 421858e

Please sign in to comment.