sequel-db_tasks 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa4f1f71edc8b104b15f64cded74d7cbe0d16029038763e7d4b23491292f3c25
4
- data.tar.gz: f07aebf68979b26281e503df1c715ef444e44e2e4950b0f971f7f68a18b8a5f7
3
+ metadata.gz: 07120f571b9a5471880434ec4692e9dee9aa56ef53d83f67f0cce762c7c2f293
4
+ data.tar.gz: d91b4921dfb30dbdf2c98a4a065addc77f8f431dada48ce9e988a76e4afa9d12
5
5
  SHA512:
6
- metadata.gz: 2120f3f8cd89095ce6e8aa2cd83d2e2a75539a51007d8e5f4c7a2baf52a18e98de4f54a0d93b2f787c604144a0e1391fe0d03104a27dcd0594c73296325ccdfa
7
- data.tar.gz: 94851bf553e1475ec1a4952dd9fbb30d4a2d95c8331bc9456ef561edd1aec4f417c961b5e3e10ae1d034d9d9bae945f6aa802d9e9be843bfd484d31c3dd9aa6e
6
+ metadata.gz: 1629f70792667443ceaa31a74605a823c67356e68769ad92b7d69f785e845dc7637fd079bcfcf87f5d8a859203c3bc3f609e7527c3bcdef1a7795b499c05fd8b
7
+ data.tar.gz: 3a4301e7ea1914e58e3d5d266d797f883eb8a2609089ecf36e61b5744c43b67c8faed30b4668c80da24ca99e0cd905f62fda1f194c40d53bede7f29a157a5c4a
data/README.md CHANGED
@@ -77,6 +77,8 @@ end
77
77
  after 'deploy:updated', 'deploy:migrate'
78
78
  ```
79
79
 
80
+ * Read more about Sequel migrations syntax here: https://github.com/jeremyevans/sequel/blob/master/doc/migration.rdoc
81
+
80
82
  ## License
81
83
 
82
84
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,12 +1,15 @@
1
1
  # All possible rails db tasks https://jacopretorius.net/2014/02/all-rails-db-rake-tasks-and-what-they-do.html
2
2
 
3
3
  namespace :db do
4
- task :preload do
4
+ task :preload, [:skip_adapter_validation] do |t, args|
5
5
  require 'uri'
6
6
 
7
7
  @url = Sequel::DbTasks.configuration.database_url
8
8
  uri = URI.parse(@url)
9
- raise "DB adapter is not postgres" if uri.scheme != "postgres"
9
+
10
+ unless args[:skip_adapter_validation]
11
+ raise "DB adapter is not postgres" if uri.scheme != "postgres"
12
+ end
10
13
  end
11
14
 
12
15
  ###
@@ -91,7 +94,7 @@ namespace :db do
91
94
  # https://github.com/jeremyevans/sequel/blob/master/doc/migration.rdoc#running-migrations-from-a-rake-task
92
95
  desc "Run migrations"
93
96
  task :migrate, [:version] do |t, args|
94
- Rake::Task["db:preload"].execute
97
+ Rake::Task["db:preload"].execute(skip_adapter_validation: true)
95
98
  require 'sequel/core'
96
99
  require 'logger'
97
100
 
@@ -105,7 +108,8 @@ namespace :db do
105
108
 
106
109
  # https://github.com/jeremyevans/sequel/blob/master/doc/migration.rdoc#dumping-the-current-schema-as-a-migration
107
110
  desc "Print current database schema"
108
- task :'schema:print' => :preload do
111
+ task :'schema:print' do
112
+ Rake::Task["db:preload"].execute(skip_adapter_validation: true)
109
113
  exec "bundle", "exec", "sequel", "-d", @url
110
114
  end
111
115
  end
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "sequel-db_tasks"
6
- spec.version = "0.2.0"
6
+ spec.version = "0.2.1"
7
7
  spec.authors = ["Victor Afanasev"]
8
8
  spec.email = ["vicfreefly@gmail.com"]
9
9
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "sequel"
23
- spec.add_dependency "postgressor"
23
+ spec.add_dependency "postgressor", ">= 0.3.1"
24
24
 
25
25
  spec.add_development_dependency "bundler", "~> 1.16"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-db_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Afanasev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-01 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.3.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.3.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.7.6
119
+ rubygems_version: 3.0.3
121
120
  signing_key:
122
121
  specification_version: 4
123
122
  summary: Rake database tasks for Sequel and Postgres