Sha256: 2d19cca63b9a5e478b192cdff8d38c96e5ed582ab307578dfe75693fc29bac5e

Contents?: true

Size: 456 Bytes

Versions: 4

Compression:

Stored size: 456 Bytes

Contents

#!/usr/bin/env ruby
#
# A one file test to show ...
require 'rubygems'

gem('dm-core', '~> 0.9.8')
require 'dm-core'


# setup the logger
DataMapper::Logger.new(STDOUT, :debug)

# connect to the DB
DataMapper.setup(:default, 'sqlite3::memory:')

class <%= model_name %>
  include DataMapper::Resource

  # properties
  property :id, Serial
<% properties.each do |name, type| -%>
  property :<%= name %>, <%= type %>
<% end %>
end

DataMapper.auto_migrate!

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
namelessjon-dm-gen-0.0.4 lib/templates/one_file.rb
namelessjon-dm-gen-0.1.0 lib/templates/one_file.rb
namelessjon-dm-gen-0.2.0 lib/templates/one_file.rb
namelessjon-dm-gen-0.2.1 lib/templates/one_file.rb