migration_queries 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 924c7b109aeaa64c8d881ddb9bcc410a9612557b10c268359b8e216e56ed9684
4
- data.tar.gz: 2f0eda48ac21380ca30fae1550be8cc99ded99f2a7119a6b0d9ca0b5e6f7fdaf
3
+ metadata.gz: 356aa56fbb9c867de2ff9a1ec41c1d4305031f65ba10e8ea50ea523b70896046
4
+ data.tar.gz: ec60f761a3f8a81aa4247ff3b4305843cde952951780e5a2c99cbc15b2b8c46a
5
5
  SHA512:
6
- metadata.gz: 297bb0aed0e27fdfe8cd66cb9c99d757326bdf6b01eb6bbe1be0be7a24cb448c525e11c7c3d4dfde712fd58beb2224f44e845bd0e0906e95efc9aa3fbd74bc9c
7
- data.tar.gz: d25eaac7efbd95b47836609b3637b71499f177b195a0f2ff92b03ed2b55784037330b86192862af8369bfb0e3d6914a26519dfdce00b32dc007dffb777abadaf
6
+ metadata.gz: d2572cb64efab92fcda737c55dda35c7cc1ce8b0786f23435538335d45dc5631663a89f1fba5f2a49b6d20b647ecfff6190309d04750f775bbd6a0d4ec2adb05
7
+ data.tar.gz: da96b269d7049e01c2289a8cbaae3ca7789eb78961bbb0fd6d3d233577d038ebb862545c7cf6b7dfd9d8b58fa1a07e4c78bf2cc51ad2dca3676a28fe663297de
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ load("lib/tasks/setup_migration_queries.rake")
4
+
3
5
  require "bundler/gem_tasks"
4
6
  require "rspec/core/rake_task"
5
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MigrationQueries
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -0,0 +1,24 @@
1
+ # lib/tasks/setup_migration_queries.rake
2
+
3
+ namespace :migration_queries do
4
+ desc "Create migration_queries.rb initializer"
5
+ task :setup do
6
+ initializer_path = Rails.root.join("config", "initializers", "migration_queries.rb")
7
+ content = <<~RUBY
8
+ # frozen_string_literal: true
9
+
10
+ if Rails.env.development?
11
+ require 'migration_queries'
12
+
13
+ MigrationQueries.init!
14
+ end
15
+ RUBY
16
+
17
+ if File.exist?(initializer_path)
18
+ puts "Initializer file already exists at #{initializer_path}"
19
+ else
20
+ File.write(initializer_path, content)
21
+ puts "Created initializer file at #{initializer_path}"
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migration_queries
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Szymon Lipka
@@ -46,6 +46,7 @@ files:
46
46
  - lib/migration_queries/gatherer.rb
47
47
  - lib/migration_queries/migrater.rb
48
48
  - lib/migration_queries/version.rb
49
+ - lib/tasks/setup_migration_queries.rake
49
50
  - sig/migration_queries.rbs
50
51
  - sig/migration_queries/data.rbs
51
52
  - sig/migration_queries/executer.rbs