Module: Grapethor::Utils

Included in:
Api, CLI, Endpoint, New, Resource
Defined in:
lib/grapethor/utils/utils.rb

Constant Summary collapse

CONFIG_FILENAME =
'.grapethor.yml'
ATTRS_MAP =
{
  activerecord: {
    bigint: {
      type: 'Integer',
      sample: 123456789
    },
    # binary: {
    #   type: '',
    #   sample:
    # },
    boolean: {
      type: 'Boolean',
      sample: true
    },
    date: {
      type: 'Date',
      sample: Date.today
    },
    datetime: {
      type: 'DateTime',
      sample: DateTime.now
    },
    decimal: {
      type: 'BigDecimal',
      sample: BigDecimal(123.45, 2)
    },
    float: {
      type: 'Float',
      sample: 123.45
    },
    integer: {
      type: 'Integer',
      sample: 123
    },
    numeric: {
      type: 'Numeric',
      sample: 123
    },
    string: {
      type: 'String',
      sample: 'MyString'
    },
    text: {
      type: 'String',
      sample: "MyText"
    },
    time: {
      type: 'Time',
      sample: Time.now
    }
  }
}
TEST_FRAMEWORK_DIRNAME =
{
  minitest: 'test',
  rspec: 'spec'
}