schema_monkey 0.2.0 → 0.3.0

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: 64213e6bb8ad8a77e11fb2f07d485297cfde3274
4
- data.tar.gz: e565725ac60a6c33273d17361a298e645c75534c
3
+ metadata.gz: 70f1b0e3a5166344eabe57dfbd7918ceee3a0181
4
+ data.tar.gz: 2ee94aa81f7e5a6101e591aca2cbb4c4cb26adad
5
5
  SHA512:
6
- metadata.gz: 7db8563d4c8d9c15b3be4ba2e8f81b1a0bcdfb3ce438591984e6157891957ca6bbd09734116b6f044a061c883bca2ff8b53a03035f693f1615d4cb08adf874c1
7
- data.tar.gz: 1132f8762ff275080817795e6744348352dbed392f9ac742a7ddeece6e9d39973b3c30ef9e1e9cae34bc82467a2679cb0ac53743aa76758b7a8aa2204c64b883
6
+ metadata.gz: 10fc06c64059abbd27c0700f092c85d1161e28a8be8fdb87e530f3e18ac7ffd5d4a04551a1d1477e289274356ce4e14ba8e1da394d126ea1e063a0a2ca754fcc
7
+ data.tar.gz: 11f0cae618fc0e9952bef9cdb3a3405b14e4fd1e3245b932d49f2a8786865ba74f45536d913a7566518b8d769f034ff5e5311898fca1d368fd1bcd345e21ede0
@@ -69,11 +69,9 @@ module SchemaMonkey
69
69
  alias_method_chain :add_index, :schema_monkey
70
70
  end
71
71
  end
72
- def add_index_with_schema_monkey(table_name, column_names, options={})
73
- if column_names.is_a? Hash and options.empty?
74
- options = column_names
75
- column_names = nil
76
- end
72
+ def add_index_with_schema_monkey(*args)
73
+ options = args.extract_options!
74
+ table_name, column_names = args
77
75
  Middleware::Migration::Index.start caller: self, operation: :add, table_name: table_name, column_names: column_names, options: options.deep_dup do |env|
78
76
  add_index_without_schema_monkey env.table_name, env.column_names, env.options
79
77
  end
@@ -29,7 +29,9 @@ module SchemaMonkey
29
29
  end
30
30
  end
31
31
 
32
- def index_with_schema_monkey(column_name, options = {})
32
+ def index_with_schema_monkey(*args)
33
+ options = args.extract_options!
34
+ column_name = args.first
33
35
  Middleware::Migration::Index.start caller: self, operation: :define, table_name: self.name, column_names: column_name, options: options.deep_dup do |env|
34
36
  index_without_schema_monkey env.column_names, env.options
35
37
  end
@@ -1,3 +1,3 @@
1
1
  module SchemaMonkey
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_monkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronen barzel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-25 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord