schema_dev 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema_dev/gemfile_selector.rb +7 -5
- data/lib/schema_dev/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 754027e0a7e4ea32f7ccb0152b430a176f148eb2
|
4
|
+
data.tar.gz: e50de2c41d4133912d8c3a7588383c3c29be17e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f2c2578b189951b5bb44d0536f135008c783707f48e8fcfe2f352b07cccef9e06d1737b398fb13d12eb1380a79e2fa9bbe50a1bfa85e6bccf6fd6ae4c72aedd
|
7
|
+
data.tar.gz: f41c69f581f273d1ffc9b585086073cb2eb7eaa43bde01bbd97490f2ef57bd8c9cd2083ca4e4cf83c8e5ccaa492345eb9cb941c02627cb358fc23fdd066cc6a8
|
@@ -4,17 +4,19 @@ module SchemaDev
|
|
4
4
|
GEMFILES_DIR = "gemfiles"
|
5
5
|
|
6
6
|
module GemfileSelector
|
7
|
-
def self.gemfile(
|
7
|
+
def self.gemfile(opts = {})
|
8
|
+
opts = opts.keyword_args(rails: :required, db: nil)
|
8
9
|
root = Pathname.new(GEMFILES_DIR)
|
9
10
|
if db
|
10
|
-
root.join("rails-#{rails}", "Gemfile.#{db}")
|
11
|
+
root.join("rails-#{opts.rails}", "Gemfile.#{opts.db}")
|
11
12
|
else
|
12
|
-
root.join("Gemfile.#{rails}")
|
13
|
+
root.join("Gemfile.#{opts.rails}")
|
13
14
|
end
|
14
15
|
end
|
15
16
|
|
16
|
-
def self.command(
|
17
|
-
|
17
|
+
def self.command(opts={})
|
18
|
+
opts = opts.keyword_args(rails: :required, db: nil)
|
19
|
+
"BUNDLE_GEMFILE=#{gemfile(rails: opts.rails, db: opts.db)}"
|
18
20
|
end
|
19
21
|
|
20
22
|
def self.infer_db
|
data/lib/schema_dev/version.rb
CHANGED