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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bff430da87969874071112a49a479147019f10d
4
- data.tar.gz: 4aabbd5429de7e9f6e8f87a2ae0cef9636aeb797
3
+ metadata.gz: 754027e0a7e4ea32f7ccb0152b430a176f148eb2
4
+ data.tar.gz: e50de2c41d4133912d8c3a7588383c3c29be17e5
5
5
  SHA512:
6
- metadata.gz: b1696937308df04f9a70e5bade795dcfa443feea8f7eada329bf56dc726e72ae706279cadda8f25fee485f2e04b2ee112f0fd1449e6b217dda62277b4be4bb3a
7
- data.tar.gz: 7e6741d0e194916a0c3d8d8506d285de9b3433bdac4072fe5f61268ee19fc22d909ea776189688f709e29e41143a2e3853ee8ae675ad582c0411413f6244842e
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(rails:, db: nil)
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(rails:, db: nil)
17
- "BUNDLE_GEMFILE=#{gemfile(rails: rails, db: db)}"
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
@@ -1,3 +1,3 @@
1
1
  module SchemaDev
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel