ridgepole 0.7.0.beta16 → 0.7.0.beta17

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: ff0a61ee907ec7034cb97d9824546eb6805ab082
4
- data.tar.gz: cd0110982818ca433f4b8c8f6cbf0b008ade166b
3
+ metadata.gz: 22bd54bbf6f3973c76cd90a657cc66c45314d522
4
+ data.tar.gz: dd777cd5d429760acb2dfcd112457bf2386da225
5
5
  SHA512:
6
- metadata.gz: eb544ea42ecfcee191059173c15ee6164123033bd79c6b7f118c6e7a4c516f7872a6d4c55866a5c6b522d4119896922f6c65feed336424c8f0a1b0ef6379c332
7
- data.tar.gz: ee1beccafb88c4cf1e65b357b771d34e7e28e4714a0d51901b97a3677e91a97627d5e0647cede2e12d71ef468125c0d0650520bf4e4e2224e55fd345a85ab720
6
+ metadata.gz: 66d089780040f476b842d7d7952a5fb302de466d150aaaa4cbae6bdc5959ec2c0f54acad375f9a5cc3f4c6e5023e167017d2723d61812318fe472f7e50789aed
7
+ data.tar.gz: ea785ab7d63996e1da322c6ea96dc9b32432297ea6d54e3d4361a93dc01c45df65b1f6e2c74c4428792d485840daf7043700f1fce0bc7feeac922b5cb30576c0
data/README.md CHANGED
@@ -9,7 +9,7 @@ It defines DB schema using [Rails DSL](http://guides.rubyonrails.org/migrations.
9
9
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.6)](https://travis-ci.org/winebarrel/ridgepole)
10
10
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.6)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.6)
11
11
 
12
- [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta16-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta16)
12
+ [![Edge Version](https://img.shields.io/badge/edge_version-0.7.0.beta17-brightgreen.svg)](https://rubygems.org/gems/ridgepole/versions/0.7.0.beta17)
13
13
  [![Build Status](https://travis-ci.org/winebarrel/ridgepole.svg?branch=0.7)](https://travis-ci.org/winebarrel/ridgepole)
14
14
  [![Coverage Status](https://coveralls.io/repos/github/winebarrel/ridgepole/badge.svg?branch=0.7)](https://coveralls.io/github/winebarrel/ridgepole?branch=0.7)
15
15
 
@@ -28,6 +28,11 @@ class Ridgepole::DSLParser
28
28
  if options[:primary_key] and options[:primary_key].is_a?(Symbol)
29
29
  options[:primary_key] = options[:primary_key].to_s
30
30
  end
31
+ if options[:id] and TableDefinition::ALIAS_TYPES.has_key?(options[:id])
32
+ type, type_default_opts = TableDefinition::ALIAS_TYPES[options[:id]]
33
+ options[:id] = type
34
+ options = type_default_opts.merge(options)
35
+ end
31
36
 
32
37
  yield(table_definition)
33
38
  @__definition[table_name] ||= {}
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.7.0.beta16'
2
+ VERSION = '0.7.0.beta17'
3
3
  end
@@ -4,7 +4,7 @@ describe 'Ridgepole::Client (with new text/blob types)' do
4
4
 
5
5
  it do
6
6
  delta = subject.diff(<<-EOS)
7
- create_table :foos do |t|
7
+ create_table :foos, id: :unsigned_integer do |t|
8
8
  t.blob :blob
9
9
  t.tinyblob :tiny_blob
10
10
  t.mediumblob :medium_blob
@@ -23,7 +23,7 @@ describe 'Ridgepole::Client (with new text/blob types)' do
23
23
  delta.migrate
24
24
 
25
25
  expect(subject.dump).to match_fuzzy erbh(<<-EOS)
26
- create_table "foos", force: :cascade do |t|
26
+ create_table "foos", id: :integer, unsigned: true, force: :cascade do |t|
27
27
  t.binary "blob", <%= i cond(5.0, limit: 65535) %>
28
28
  t.blob "tiny_blob", limit: 255
29
29
  t.binary "medium_blob", limit: 16777215
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.7.0.beta16
4
+ version: 0.7.0.beta17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-01 00:00:00.000000000 Z
11
+ date: 2017-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord