Generator 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2Q2MjA1MzhjYjZmYjY0MzMxYWM0MDdlMGUzN2U3YmViNDA0MzQzYQ==
5
+ data.tar.gz: !binary |-
6
+ NjljMzJiMGJmMWJjNjU2YmM4ZjY5ZmRjZTQwMTdmMDc3MDY2NDFhMg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ODExZDI4NjdhN2ZhNmVmY2Q4NzE1ZmZiZGJlNjI3MDc0ODRlYjJmMTYwMTky
10
+ ZmY1OTQ5N2M3NTI1MmY0YTY5Nzg5NTcwMTM3MTllM2NjMjBiMjQyNTQ1MWM5
11
+ ZDVjMzQ3NDIxYmEwN2E2MTE3MGZmZTI0ZmMxOWU0MDRkMjBhYjI=
12
+ data.tar.gz: !binary |-
13
+ YjY1ZGI0OWY1NjNhNDJjNTQ2MGNhMTViNTg0NTVlYzZlMzc4OTExNzVlZGJm
14
+ NzU5MWJkNDM5ZDE5YTZhODVjNDQxOTE3NjViMGU2MjdmYWY3MWJhODQ3OWFj
15
+ YmU4MzQ2NmEyY2VkNjUzODEzN2QyM2FmY2FkM2IyMjg4NWQ3YWY=
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate survey Thing
6
+
7
+ This will create:
8
+ what/will/it/create
@@ -0,0 +1,18 @@
1
+ $:.unshift File.dirname(__FILE__) + "/.."
2
+ $:.unshift File.dirname(__FILE__) + "."
3
+
4
+ require 'metamodels/survey_metamodel'
5
+ require 'models/survey_model'
6
+ require 'rgen/template_language'
7
+ require 'rgen/array_extensions'
8
+
9
+ class SurveyGenerator < Rails::Generators::Base
10
+ source_root File.expand_path('../templates', __FILE__)
11
+
12
+ def generate_survey
13
+ root = Rails.root.to_s
14
+ tc = RGen::TemplateLanguage::DirectoryTemplateContainer.new(SurveyMetamodel, root)
15
+ tc.load(root + '/gen/templates')
16
+ tc.expand('main::root', for: MODEL.first)
17
+ end
18
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Dkemp04
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-05-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Much longer explanation of the example!
14
+ email: dkemp04@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/generators/survey/survey_generator.rb
20
+ - lib/generators/survey/USAGE
21
+ homepage: http://rubygems.org/gems/generator
22
+ licenses: []
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.0.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: This is an example!
44
+ test_files: []