multi_ar 3.0.0 → 3.0.1

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
  SHA1:
3
- metadata.gz: ddca927bb85acd0927fbbb32fd106c4cec271599
4
- data.tar.gz: 23c27a219dabde8b49097c5d489dc521bab4b991
3
+ metadata.gz: 683850097d7d56382d703875856dedae616bb388
4
+ data.tar.gz: 4479f3ff5d6b978bd1be01eca6c9a8830b2dce03
5
5
  SHA512:
6
- metadata.gz: e39bf6f882fd16d1db06160b2303a1dad5a86a2c04be032a95b03b070fc9f0226e71593f0837a6c42600122a4ee32a0842a27e1024b490a1545f931d20bb6466
7
- data.tar.gz: 4dfbee17f427dc1295c86a7cb4d5822892e578624114abbfa1550f097579aaf597a5a05083dd28966fe6b7edccf0554708b9a977f0c5db8c3e7d0ff75e504d96
6
+ metadata.gz: 97a91ee67a7097eee785e1ef84e5b207dc4795de458b41de1a553231921dbe51281acc375630a6e5d6c4e7d945028886e15071928b0ec11273ca389123182a66
7
+ data.tar.gz: 382874e37419b7608295e196760b5507ddbc452b8de5100ef4f61c9dce2806fe1e3dfc7016ac0c17a457b8fe64c81f3049cd78f80d5ab801479262e99c4e7c31
checksums.yaml.gz.sig CHANGED
Binary file
@@ -140,6 +140,7 @@ module MultiAR
140
140
  opts[:config] = @opts["config"] unless @opts["config"].nil?
141
141
  opts[:databases] = @opts["databases"]
142
142
  opts[:environment] = @opts["environment"]
143
+ opts[:verbose] = @opts["verbose"]
143
144
  @multi_ar = MultiAR.new opts
144
145
  end
145
146
 
@@ -1,4 +1,4 @@
1
1
 
2
2
  module MultiAR
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
4
4
  end
data/lib/multi_ar.rb CHANGED
@@ -29,7 +29,7 @@ module MultiAR
29
29
 
30
30
  # @param databases array of available databases
31
31
  # @todo config file is overriding parameters passed here... I think it should be other way around, but need more custom logic for that :/
32
- def initialize databases:, environment: "development", config: "config/settings.yaml", db_config: "config/database.yaml", migration_dirs: []
32
+ def initialize databases:, environment: "development", config: "config/settings.yaml", db_config: "config/database.yaml", migration_dirs: [], verbose: false
33
33
 
34
34
  # first load config
35
35
  if not config.nil? and File.exist? config
@@ -65,6 +65,8 @@ module MultiAR
65
65
  Rake::Tasks.environment = environment
66
66
  Rake::Tasks.define
67
67
 
68
+ @@verbose = verbose
69
+
68
70
  MultiAR.app = self
69
71
  end
70
72
 
@@ -74,6 +76,12 @@ module MultiAR
74
76
  return @@migration_dirs
75
77
  end
76
78
 
79
+ # Outputs contents if verbose flag has been passed.
80
+ def self.verb str
81
+ return unless @@verbose
82
+ puts str
83
+ end
84
+
77
85
  # Add a path to a directory where migrations resides. For standard Rails setup, this would be “db/migrate”.
78
86
  #
79
87
  # The directory structure of how MultiAR uses the path is a bit different from traditional way: for each
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_ar
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samu Voutilainen
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Ws73WZ+F+DOnfopIMUaeYUzKyUG+59p17ls//xzTouiLjcC9ee5ZaC9e+TzYsp4t
30
30
  ofnwRrqEHVW+zRWs/VIwm70F2Jnl5eSc3MjyhpWIC0eGFXtBY1XYCrHeCdQ=
31
31
  -----END CERTIFICATE-----
32
- date: 2016-07-21 00:00:00.000000000 Z
32
+ date: 2016-08-29 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: trollop
metadata.gz.sig CHANGED
Binary file