ridgepole 0.5.3.beta2 → 0.5.3.beta4

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: 7eb2da59b698d8028a88d187e3bdb51d9a2e1947
4
- data.tar.gz: a9f3355b8dac1b03970dfa414d53936813507b0c
3
+ metadata.gz: 4836232269876c37ac6d3c9bdcf2f1495d4620d4
4
+ data.tar.gz: f7e856a5c6de4b9ea7ba2e66ac9c9c277e97a2fb
5
5
  SHA512:
6
- metadata.gz: 73eacc99ba04fd98a0feaf3b648b15dd36ab526792fea0bdada1b1eed7a6406b1adf46e97bdadbfcae159ff2d80ffe45da72b3d37b2b05da198ca1db836ed50e
7
- data.tar.gz: d14691d0c2ed17afb698eaa0d5f746316f6d8145ae6c2a65cfda27c440feededc625890af10bc837fdee89568030f11f3635f9c05d7b25395d05031929ccd364
6
+ metadata.gz: 79e5383609e65c7847ebfcd48c76c86867a3efdb5c0274938febc79cfd73d079952b8738e81e57a3a152221277ad27d84f7b2779b7e5ef0daddbbe0659fd3ec9
7
+ data.tar.gz: 87232f87adb82294b2218b8b4b112ab10f54d9293208e305c0ae337cbbf6a0120c2caa4d478e656c3e5d3350fba91bdfb77f9e7a44030ceec43128fd26e50455
@@ -70,28 +70,31 @@ module ActiveRecord::ConnectionAdapters::SchemaStatements
70
70
  alias_method_chain :index_name_exists?, :noop
71
71
  end
72
72
 
73
- require 'active_record/connection_adapters/sqlite3_adapter'
73
+ begin
74
+ require 'active_record/connection_adapters/sqlite3_adapter'
74
75
 
75
- class ActiveRecord::ConnectionAdapters::SQLite3Adapter
76
- def exec_query_with_noop(sql, name = nil, binds = [])
77
- if Ridgepole::ExecuteExpander.noop
78
- if (callback = Ridgepole::ExecuteExpander.callback)
79
- callback.call(sql, name)
76
+ class ActiveRecord::ConnectionAdapters::SQLite3Adapter
77
+ def exec_query_with_noop(sql, name = nil, binds = [])
78
+ if Ridgepole::ExecuteExpander.noop
79
+ if (callback = Ridgepole::ExecuteExpander.callback)
80
+ callback.call(sql, name)
81
+ end
82
+ else
83
+ exec_query_without_noop(sql, name, binds)
80
84
  end
81
- else
82
- exec_query_without_noop(sql, name, binds)
83
85
  end
84
- end
85
- alias_method_chain :exec_query, :noop
86
+ alias_method_chain :exec_query, :noop
86
87
 
87
- def copy_table_with_noop(from, to, options = {})
88
- if Ridgepole::ExecuteExpander.noop
89
- if (callback = Ridgepole::ExecuteExpander.callback)
90
- callback.call("COPY TABLE #{from} TO #{to}")
88
+ def copy_table_with_noop(from, to, options = {})
89
+ if Ridgepole::ExecuteExpander.noop
90
+ if (callback = Ridgepole::ExecuteExpander.callback)
91
+ callback.call("COPY TABLE #{from} TO #{to}")
92
+ end
93
+ else
94
+ copy_table_without_noop(from, to, options)
91
95
  end
92
- else
93
- copy_table_without_noop(from, to, options)
94
96
  end
97
+ alias_method_chain :copy_table, :noop
95
98
  end
96
- alias_method_chain :copy_table, :noop
99
+ rescue LoadError
97
100
  end
@@ -3,6 +3,10 @@ class ActiveRecord::ConnectionAdapters::TableDefinition
3
3
  alias primary_key_without_unsigned primary_key
4
4
 
5
5
  def primary_key(name, type = :primary_key, options = {})
6
- primary_key_without_unsigned(name, type, options.merge(primary_key: true).reverse_merge(unsigned: true))
6
+ if options.has_key?(:id)
7
+ primary_key_without_unsigned(name, type, options)
8
+ else
9
+ primary_key_without_unsigned(name, type, options.merge(primary_key: true).reverse_merge(unsigned: true))
10
+ end
7
11
  end
8
12
  end
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.5.3.beta2'
2
+ VERSION = '0.5.3.beta4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3.beta2
4
+ version: 0.5.3.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-05 00:00:00.000000000 Z
11
+ date: 2015-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord