nandi 0.11.1 → 0.11.3

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
  SHA256:
3
- metadata.gz: 6e1e64259650cb225c127f8a89c899464864a9d5ca76fb4abd58d48c6930e624
4
- data.tar.gz: 41ef391e7da05c3997a13adf87ff5aa032fd6a46762d4cc7263c691d179ed237
3
+ metadata.gz: 78ca004c815e5952f1fc51b44fa839afd81b1297fc3079e98202719eead8ac74
4
+ data.tar.gz: 3e19d0265b7e428298abb84c78f463756437c431a2757abe8d28ed232f7c6aab
5
5
  SHA512:
6
- metadata.gz: 1672112e9464d5f8cefd75477cd7cdbae2d05822b0544d9f9240140b55121171e8f7e4183b09a5fcb2ab0d240e701aa891faebb5e99bafd5e4e764e2079e4f9d
7
- data.tar.gz: 490135828100e636745efc67dfece39f04506ce18b135ab7487041b0929302b59973ae2848b7eef899dbd347050767c0f20fb3e1bdca73d0228d4e19c84e1279
6
+ metadata.gz: fa56e2901b20d88d59bd0cf05b4b78395fc39a3c8c0e7d80484fbc99045c3d8f099861b36a2220b5a183473a4de4f583f873510abe78f469ef700e5b1c6e5035
7
+ data.tar.gz: 91837a550c6deb7b724d5778300821cd73519cadc2e9b5999645d5884f7a1b17ea9810c24ce5ecfc3431e9fcf0ae260b1de283c6ccd0ea6828d33b7d1ffe33e0
@@ -8,7 +8,12 @@ module Nandi
8
8
  def initialize(table:, name:, **extra_args)
9
9
  @table = table
10
10
  @name = name
11
- @extra_args = extra_args if extra_args.any?
11
+ @extra_args =
12
+ if extra_args.any?
13
+ extra_args
14
+ else
15
+ {}
16
+ end
12
17
  end
13
18
 
14
19
  def procedure
@@ -357,9 +357,9 @@ module Nandi
357
357
  end.uniq
358
358
  end
359
359
 
360
- def method_missing(name, *args, &block)
360
+ def method_missing(name, *args, **kwargs, &block)
361
361
  if Nandi.config.custom_methods.key?(name)
362
- invoke_custom_method(name, *args, &block)
362
+ invoke_custom_method(name, *args, **kwargs, &block)
363
363
  else
364
364
  super
365
365
  end
@@ -381,9 +381,9 @@ module Nandi
381
381
  Nandi.config.access_exclusive_lock_timeout
382
382
  end
383
383
 
384
- def invoke_custom_method(name, *args, &block)
384
+ def invoke_custom_method(name, *args, **kwargs, &block)
385
385
  klass = Nandi.config.custom_methods[name]
386
- current_instructions << klass.new(*args, &block)
386
+ current_instructions << klass.new(*args, **kwargs, &block)
387
387
  end
388
388
  end
389
389
  end
data/lib/nandi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nandi
4
- VERSION = "0.11.1"
4
+ VERSION = "0.11.3"
5
5
  end
@@ -2,5 +2,5 @@ add_column(
2
2
  <%= table %>,
3
3
  <%= name %>,
4
4
  <%= type %>,
5
- <%= extra_args %>
5
+ **<%= extra_args || {} %>
6
6
  )
@@ -1,5 +1,5 @@
1
1
  add_foreign_key(
2
2
  <%= table %>,
3
3
  <%= target %>,
4
- <%= extra_args %>
4
+ **<%= extra_args || {} %>
5
5
  )
@@ -1,5 +1,5 @@
1
1
  add_index(
2
2
  <%= table %>,
3
3
  <%= fields %>,
4
- <%= extra_args %>
4
+ **<%= extra_args || {} %>
5
5
  )
@@ -1,5 +1,5 @@
1
1
  add_reference(
2
2
  <%= table %>,
3
3
  <%= ref_name %>,
4
- <%= extra_args %>
4
+ **<%= extra_args || {} %>
5
5
  )
@@ -1,5 +1,5 @@
1
1
  remove_column(
2
2
  <%= table %>,
3
3
  <%= name %>,
4
- <%= extra_args %>
4
+ **<%= extra_args || {} %>
5
5
  )
@@ -1,4 +1,4 @@
1
1
  remove_index(
2
2
  <%= table %>,
3
- <%= extra_args %>
3
+ **<%= extra_args || {} %>
4
4
  )
@@ -1,5 +1,5 @@
1
1
  remove_reference(
2
2
  <%= table %>,
3
3
  <%= ref_name %>,
4
- <%= extra_args %>
4
+ **<%= extra_args || {} %>
5
5
  )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nandi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-09 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport