README.md in armg-0.8.1 vs README.md in armg-0.9.0

- old
+ new

@@ -1,12 +1,13 @@ # Armg Add MySQL geometry type to Active Record. [![Gem Version](https://badge.fury.io/rb/armg.svg)](https://badge.fury.io/rb/armg) -[![Build Status](https://travis-ci.org/winebarrel/armg.svg?branch=master)](https://travis-ci.org/winebarrel/armg) +[![Build Status](https://github.com/winebarrel/armg/workflows/test/badge.svg?branch=master)](https://github.com/winebarrel/armg/actions) + ## Installation Add this line to your application's Gemfile: ```ruby @@ -117,20 +118,25 @@ You need to extend the TableDefinition class. ```ruby # ridgepole-geo.rb -module Ridgepole - class DSLParser - class TableDefinition - def geometry(*args) - options = args.extract_options! - column_names = args - column_names.each { |name| column(name, :geometry, options) } - end - end +module TableDefinitionExtForGeometry + def geometry(*args) + options = args.extract_options! + column_names = args + column_names.each { |name| column(name, :geometry, options) } end end +Ridgepole::DSLParser::TableDefinition.prepend(TableDefinitionExtForGeometry) + +module DiffExtForGeometry + def normalize_index_options!(opts) + super + opts.delete(:length) if opts[:type] == :spatial + end +end +Ridgepole::Diff.prepend(DiffExtForGeometry) ``` ```sh $ ridgepole -c 'mysql2://root@127.0.0.1:10057/armg_test' -r armg -e > Schemafile