dm-rails-gae 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/dm-rails-gae.gemspec +1 -5
- data/generators/dm_model/templates/model.rb +0 -2
- metadata +1 -5
- data/generators/data_mapper/USAGE +0 -8
- data/generators/data_mapper/model/model_generator.rb +0 -38
- data/generators/data_mapper/model/templates/model.rb +0 -8
- data/generators/data_mapper/templates/model.rb +0 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/dm-rails-gae.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-rails-gae}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["joshsmoore"]
|
@@ -24,10 +24,6 @@ Gem::Specification.new do |s|
|
|
24
24
|
"Rakefile",
|
25
25
|
"VERSION",
|
26
26
|
"dm-rails-gae.gemspec",
|
27
|
-
"generators/data_mapper/USAGE",
|
28
|
-
"generators/data_mapper/model/model_generator.rb",
|
29
|
-
"generators/data_mapper/model/templates/model.rb",
|
30
|
-
"generators/data_mapper/templates/model.rb",
|
31
27
|
"generators/dm_model/dm_model_generator.rb",
|
32
28
|
"generators/dm_model/templates/model.rb",
|
33
29
|
"generators/dm_model/templates/unit_test.rb",
|
@@ -5,8 +5,6 @@
|
|
5
5
|
|
6
6
|
Array(DataMapper::Property::PRIMITIVES).collect{|i| i.to_s}|DataMapper::Types.constants
|
7
7
|
unless (Array(DataMapper::Property::PRIMITIVES).collect{|i| i.to_s}|DataMapper::Types.constants).include? attribute.type.to_s
|
8
|
-
puts "I am here"
|
9
|
-
|
10
8
|
raise "unknown property type '#{attribute.type}'"
|
11
9
|
end
|
12
10
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-rails-gae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joshsmoore
|
@@ -39,10 +39,6 @@ files:
|
|
39
39
|
- Rakefile
|
40
40
|
- VERSION
|
41
41
|
- dm-rails-gae.gemspec
|
42
|
-
- generators/data_mapper/USAGE
|
43
|
-
- generators/data_mapper/model/model_generator.rb
|
44
|
-
- generators/data_mapper/model/templates/model.rb
|
45
|
-
- generators/data_mapper/templates/model.rb
|
46
42
|
- generators/dm_model/dm_model_generator.rb
|
47
43
|
- generators/dm_model/templates/model.rb
|
48
44
|
- generators/dm_model/templates/unit_test.rb
|
@@ -1,38 +0,0 @@
|
|
1
|
-
#require 'data_mapper/data_mapper_generator'
|
2
|
-
require 'rails/generators/named_base'
|
3
|
-
|
4
|
-
module DataMapper
|
5
|
-
module Generators
|
6
|
-
class ModelGenerator < Rails::Generators::NamedBase #DataMapperGenerator
|
7
|
-
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
|
8
|
-
|
9
|
-
check_class_collision
|
10
|
-
|
11
|
-
#class_option :migration, :type => :boolean
|
12
|
-
class_option :timestamps, :type => :boolean
|
13
|
-
#class_option :parent, :type => :string, :desc => "The parent class for the generated model"
|
14
|
-
|
15
|
-
#def create_migration_file
|
16
|
-
# return unless options[:migration] && options[:parent].nil?
|
17
|
-
# migration_template "migration.rb", "db/migrate/create_#{table_name}.rb"
|
18
|
-
#end
|
19
|
-
|
20
|
-
def create_model_file
|
21
|
-
puts "I am creating a datamapper model"
|
22
|
-
template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb")
|
23
|
-
end
|
24
|
-
|
25
|
-
#hook_for :test_framework
|
26
|
-
|
27
|
-
#protected
|
28
|
-
|
29
|
-
#def parent_class_name
|
30
|
-
# options[:parent] || "ActiveRecord::Base"
|
31
|
-
#end
|
32
|
-
def self.source_root
|
33
|
-
puts File.expand_path('../templates', __FILE__)
|
34
|
-
@source_root ||= File.expand_path('../templates', __FILE__)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|