yaddl 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,22 +3,22 @@ require 'yaddl'
3
3
  namespace :yaddl do
4
4
  desc "Print generated yaml ddl to console"
5
5
  task :review do
6
- y = Yaddl::Yaddl::load("#{Rails.root}/db/*.yaddl")
6
+ y = Yaddl::Generator::load("#{Rails.root}/db/*.yaddl")
7
7
  y.review()
8
8
  end
9
9
  desc "Scaffold controllers views and models, skips migrations"
10
10
  task :scaffold do
11
- y = Yaddl::Yaddl::load("#{Rails.root}/db/*.yaddl")
11
+ y = Yaddl::Generator::load("#{Rails.root}/db/*.yaddl")
12
12
  y.generate("--force --no-assets --skip-migration --helpers=false")
13
13
  end
14
14
  desc "Regenerate models, skips migrations"
15
15
  task :models do
16
- y = Yaddl::Yaddl::load("#{Rails.root}/db/*.yaddl")
16
+ y = Yaddl::Generator::load("#{Rails.root}/db/*.yaddl")
17
17
  y.generate("--no-scaffolds")
18
18
  end
19
19
  desc "Generate migrations, models, controllers and views"
20
20
  task :generate do
21
- y = Yaddl::Yaddl::load("#{Rails.root}/db/*.yaddl")
21
+ y = Yaddl::Generator::load("#{Rails.root}/db/*.yaddl")
22
22
  y.generate("--force --no-assets --helpers=false")
23
23
  end
24
24
  end
@@ -1,11 +1,12 @@
1
- class Yaddl::Yaddl
1
+ module Yaddl
2
+ class Generator
2
3
 
3
4
  attr_accessor :markup
4
5
  attr_accessor :models
5
6
  attr_accessor :quiet
6
7
 
7
8
  def self.load(filename)
8
- y = Yaddl.new
9
+ y = Yaddl::Generator.new
9
10
  if filename.include? "*"
10
11
  y.markup = ""
11
12
  Dir.glob(filename).each do |fn|
@@ -807,4 +808,5 @@ end.join } <td><%= link_to 'Show', #{name.underscore} %></td>
807
808
 
808
809
 
809
810
 
811
+ end
810
812
  end
@@ -1,3 +1,3 @@
1
1
  module Yaddl
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -5,7 +5,7 @@ class YaddlTest < ActiveSupport::TestCase
5
5
  assert_kind_of Module, Yaddl
6
6
  end
7
7
  test "create test model" do
8
- y = Yaddl::Yaddl.new
8
+ y = Yaddl::Generator.new
9
9
  y.markup = "TestModel(name:string)
10
10
  =to_s{name}
11
11
  *RelatedModel"
@@ -35,7 +35,7 @@ TestModel:
35
35
  name:
36
36
  type: string
37
37
  primary_ref:
38
- -
38
+ -
39
39
  methods:
40
40
  to_s:
41
41
  returns: string
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: