survey_generator 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZmI4OGRhNWI0ZDMyZmI4ZWI4NzRhY2VkM2U0NzhiNmM0Y2M3ZTI3YQ==
5
+ data.tar.gz: !binary |-
6
+ MDM3YjYyNTVjMjYxZGFmMDRkN2NhY2RiMDg4NDEzMjI4MGY0MTM2Mg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ NDM3ZDAyNTIxMmVjMjZhM2I1ZDIwYTk1MDkwODJhM2EzYjljNTdjZGEyYjVk
10
+ YTcxNzE5Y2JlOGU5ZDM0OWE5NzFiMGJkNjczOTEwNTY0MzgyOWVhNmJlOTEw
11
+ MDc4MjkxMzRkYThkZmM0MmE3ZTcxY2ZiMjllNjgyYzkxNGNjYWI=
12
+ data.tar.gz: !binary |-
13
+ ODRmY2FmOTRjZTRlOWEyNWU1NGNhMDczN2U1MWY2NzZkMjkyOWFhMzFlMTM3
14
+ MmNlNGRmY2E3NjI5YTdkNWRkYThhYjdmOGFhNGExYjRmOGEyNTg1MzdhNGI3
15
+ Y2IxODk3YmVjZTg3MTAwNDc1NGIyNjY0YjVlNTY1NjAwMWVmZWM=
@@ -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: survey_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
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/survey_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: []