standalone_migrations 5.2.5 → 5.2.6

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
  SHA1:
3
- metadata.gz: 5a1e7dcd9d5df67c60398500f174035b8ca33474
4
- data.tar.gz: e66f06ac0406b0c043a90011cdbf8ccc248cbd1a
3
+ metadata.gz: 921355f09f57bf2ef34d4a1f33b926e47088ee43
4
+ data.tar.gz: bea687ca072060a59822f3b8c658bbe2be5fd754
5
5
  SHA512:
6
- metadata.gz: 3e9181b171630becd1244858b7b0f52b3fa9e2d3d99c0d560d6f638c2fe217b66d0ef914c282104786ddbf8782b7638eb518060c2d39698a9c03683b2975114c
7
- data.tar.gz: 39f32cdb7b1047f04adfd48acbd12026664c31f03c5a325630db1cd786672a1ad856674c47cdb8c8483c51acc4bf0812c9db9ac72c8a33d1907e063d030e09c5
6
+ metadata.gz: 3eb42ce11c8036f675e9640e10d7b580f217fbfda516f3ce7b05c96ecf420e82fdefd763c94863ec8280573188186593aa1408f06d773225d4d076ff5283b1b4
7
+ data.tar.gz: 4d255980616e59714fdef3cb74aff453953ffb6a40629a562bd9a62217631a4c6c91eb0c8038598b485874f7ea9046bf7edc04c6bbdae5ac615e5ab1ad5aed36
data/README.markdown CHANGED
@@ -12,7 +12,7 @@ CONTRIBUTE
12
12
 
13
13
  USAGE
14
14
  =====
15
- Install Ruby, RubyGems and a ruby-database driver (e.g. `gem install mysql`) then:
15
+ Install Ruby, RubyGems and a ruby-database driver (e.g. `gem install mysql` or `gem install mysql2`) then:
16
16
 
17
17
  $ gem install standalone_migrations
18
18
 
@@ -264,3 +264,4 @@ Contributors
264
264
  - [Yi Wen](https://github.com/ywen)
265
265
  - [Jonathan Rochkind](https://github.com/jrochkind)
266
266
  - [Michael Mikhailov](https://github.com/yohanson)
267
+ - [Benjamin Dobell](https://github.com/Benjamin-Dobell)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.2.5
1
+ 5.2.6
@@ -21,7 +21,6 @@ module StandaloneMigrations
21
21
 
22
22
  class Configurator
23
23
  def self.load_configurations
24
- self.new
25
24
  @env_config ||= Rails.application.config.database_configuration
26
25
  ActiveRecord::Base.configurations = @env_config
27
26
  @env_config
@@ -37,13 +36,16 @@ module StandaloneMigrations
37
36
  defaults = {
38
37
  :config => "db/config.yml",
39
38
  :migrate_dir => "db/migrate",
39
+ :root => Pathname.pwd,
40
40
  :seeds => "db/seeds.rb",
41
41
  :schema => default_schema
42
42
  }
43
43
  @options = load_from_file(defaults.dup) || defaults.merge(options)
44
44
 
45
- Rails.application.config.root = Pathname.pwd
45
+ Rails.application.config.root = root
46
46
  Rails.application.config.paths["config/database"] = config
47
+ Rails.application.config.paths["db/migrate"] = migrate_dir
48
+ Rails.application.config.paths["db/seeds.rb"] = seeds
47
49
  end
48
50
 
49
51
  def config
@@ -54,6 +56,10 @@ module StandaloneMigrations
54
56
  @options[:migrate_dir]
55
57
  end
56
58
 
59
+ def root
60
+ @options[:root]
61
+ end
62
+
57
63
  def seeds
58
64
  @options[:seeds]
59
65
  end
@@ -86,6 +92,7 @@ module StandaloneMigrations
86
92
  {
87
93
  :config => config["config"] ? config["config"]["database"] : defaults[:config],
88
94
  :migrate_dir => (config["db"] || {})["migrate"] || defaults[:migrate_dir],
95
+ :root => config["root"] || defaults[:root],
89
96
  :seeds => (config["db"] || {})["seeds"] || defaults[:seeds],
90
97
  :schema => (config["db"] || {})["schema"] || defaults[:schema]
91
98
  }
@@ -1,17 +1,13 @@
1
1
  module StandaloneMigrations
2
2
  class Tasks
3
3
  class << self
4
- def configure
4
+ def configure(options = {})
5
5
  Deprecations.new.call
6
- configurator = Configurator.new
7
- paths = Rails.application.config.paths
8
- paths.add "config/database", :with => configurator.config
9
- paths.add "db/migrate", :with => configurator.migrate_dir
10
- paths.add "db/seeds.rb", :with => configurator.seeds
6
+ configurator = Configurator.new options
11
7
  end
12
8
 
13
- def load_tasks
14
- configure
9
+ def load_tasks(options = {})
10
+ configure(options)
15
11
  Configurator.environments_config do |proxy|
16
12
  ActiveRecord::Tasks::DatabaseTasks.database_configuration = proxy.configurations
17
13
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: standalone_migrations 5.2.5 ruby lib
5
+ # stub: standalone_migrations 5.2.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "standalone_migrations"
9
- s.version = "5.2.5"
9
+ s.version = "5.2.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Todd Huss", "Michael Grosser"]
14
- s.date = "2018-03-26"
14
+ s.date = "2018-09-03"
15
15
  s.email = "thuss@gabrito.com"
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standalone_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.5
4
+ version: 5.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Huss
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-26 00:00:00.000000000 Z
12
+ date: 2018-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake