Project

speek

0.0
No release in over a year
convert schema for ridgepole to any schema(like: rbs, GraphQL, ...)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

Speek

Speek is a type generator using schemafiles for Rails.

Speek supports rbs and GraphQL.

For example

# cat example/schema/users.schema 
create_table "users", id: :bigint, unsigned: true, force: :cascade, options: "ENGINE=InnoDB" do |t|
  t.string "name", null: false
  t.text "desc", null: true
  t.datetime "deleted_at"
  t.integer "weight", null: false, default: 0, unsigned: true
  t.boolean "is_banned", null: false, default: false

  t.timestamps
end

# speek -i example/schema/users.schema -s rbs
class User
  attr_accessor id: Integer
  attr_accessor name: String
  attr_accessor desc: (String | nil)
  attr_accessor deleted_at: (Time | nil)
  attr_accessor weight: Integer
  attr_accessor is_banned: Boolean
  attr_accessor created_at: Time
  attr_accessor updated_at: Time
end

日本語の紹介記事はこちら: https://gist.github.com/funwarioisii/2a9fa5f3f782c3752612887ccbd7c5fc

Installation

$ gem install speek

Usage

License

The gem is available as open source under the terms of the MIT License.