survey_on_rails 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2QwNWZhMjU5ODMxMDJkYjBhMmMzNTdlMzVkYjVmMmJmNDQ5NzE4MQ==
4
+ MGJhN2M5ODQ1MzcyNDg1MzljNTI4NDU4ZmJiM2EzNDhjYmZkYzg4OA==
5
5
  data.tar.gz: !binary |-
6
- YTZlNWNmZGMyOGM5YmRjNDEzYTI4MzdlZGZjMWQ5NmYwZTM0ZWZjYw==
6
+ OGJhODY3YTllZmUwMjAwYmY2Njk0ODdjMmI4Y2Q5NjY0MGExN2EyYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MWMwYTkxNmYxZGRhNmUxNzVmYTZmMjZhMzU1NDg5NjQ1NjA3YmNlMGQ4Y2Mz
10
- OWRiYTMyZDlhYmNjYzlkMDM0NzhiMmZhZDVlN2E0NmU2YzBhYmFmNTQzYmY0
11
- YzJiMjgyMjkyNmYyNDE4MTRiMDAxZDdkOTk1MTRmNmE0NzRhZmM=
9
+ MGI5Yjk0YmFiZWQwZTA3ZWVhNTZiYWYzOGE2NzMxOWI2NDYxODQ3MTkxMzkx
10
+ NjlmMGZhZDk0NmIzNTRjZDc2YjZmNzA2NzE4ZjI1YTIxNjI2YTVhMDM3MDY0
11
+ M2EyNjcxMzY3MmFjNDJiMTdlNjM2ODI2NThhNzUxYWNiZGU5ODc=
12
12
  data.tar.gz: !binary |-
13
- MTI0NDg3Y2U2YjQ2OGM0OGU5MGY4MzA3NzNkM2QwNzAxOTgwYWE1NmNhMGRj
14
- NTFhOTExYzEyZTUxOGJlYzQxODAyMGVhZDhkMWI4ZmU4Y2IyOGU4NWEwN2M2
15
- NmI0NDkwMTRhZjUwOWE4Njk3ZDFhYzA3NjAzOGIyOTBmYzRkNjU=
13
+ YzRkNmNhMDFiMDBlZWFlNDhlMjUwMGNiYjY1YzU5YmFkY2JhYzcwMGNkZmI3
14
+ ZTEyZDAzYzM3ZDZkODQzYzA3ODNjNmI2N2EzMmYzYjE3ZjMwZmVhMGYzYmNi
15
+ ZWMwNWRlZGQwNmZlMjU3ODk4MjY3MjA2OTdhNTg3YjI3Yzc1Mjk=
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ <% provide(:title, 'About Us') %>
2
+ <h1>About Us</h1>
3
+
4
+ <p>
5
+ The <a href="https://github.com/Dkemp04/Generator">Survey on Rails</a>
6
+ project is the master thesis of Daniel Kemper in Information Systems
7
+ based on model-driven development with <a href="http://ruby-gen.org/">RGen</a>
8
+ in <a href="http://rubyonrails.org/">Ruby on Rails</a>.
9
+ This is the sample application for the project.
10
+ </p>
@@ -0,0 +1,7 @@
1
+ <% provide(:title, 'Contact') %>
2
+ <h1>Contact</h1>
3
+
4
+ <p>
5
+ Contact the 'Survey on Rails' project about the sample app at the
6
+ <a href="https://github.com/Dkemp04/Generator">contact page</a>.
7
+ </p>
@@ -0,0 +1,8 @@
1
+ <% provide(:title, 'Help') %>
2
+ <h1>Help</h1>
3
+
4
+ <p>
5
+ Get help on the Survey on Rails at the
6
+ <a href="https://github.com/Dkemp04/Generator/blob/master/README.rdoc">help page</a>.
7
+ To get help on this sample app, see the <a href="https://github.com/Dkemp04/Demo">Demo</a>.
8
+ </p>
@@ -0,0 +1,11 @@
1
+ <div class="center hero-unit">
2
+ <h1>Welcome to the Sample App</h1>
3
+ <h2>
4
+ This is the home page for the
5
+ <a href="https://github.com/Dkemp04/Generator">Survey on Rails</a> sample application.
6
+ </h2>
7
+
8
+ <% if !signed_in? %>
9
+ <%= link_to "Sign up now!", signup_path, class: "btn btn-large btn-primary" %>
10
+ <% end %>
11
+ </div>
data/gen/models/app.rb ADDED
@@ -0,0 +1,9 @@
1
+ Dir["#{File.dirname(__FILE__)}/*.rb"].each { |file| require file }
2
+
3
+ APPLICATION = SurveyOnRails::Builder::build do
4
+ application("app_1", :title => "Survey on Rails") do
5
+ model(:surveys => SURVEYS)
6
+
7
+ view(:static_pages => STATIC_PAGES, :header => HEADER.first, :footer => FOOTER.first, :styles => STYLES, :forms => FORMS)
8
+ end
9
+ end
@@ -0,0 +1,108 @@
1
+ SURVEYS = SurveyOnRails::Builder::build do
2
+ survey("survey_1", :author => "Daniel Kemper", :title => "Test survey") do
3
+ text :name => "textfield_1", :title => "A normal textfield"
4
+ text name: "textfield_2", :title => "A textfield with prefix"
5
+ text(:title => "A textfield with suffix and color", :name => "textfield_3")
6
+ text "textfield_4", :title => "A small textfield"
7
+ text "textfield_5", :title => "A multiline textfield"
8
+ text "textfield_6", :title => "A textfield with color"
9
+ text "textfield_6_1", :title => "A textfield with number rule." do numberRule end
10
+ text "textfield_7", :title => "A textfield with info text" do presenceRule end
11
+
12
+ multipleChoice "multiple_choice_1", :title => "A multiple choice." do
13
+ choice "choice_11", :title => "First choice"
14
+ choice "choice_12", :title => "Second choice"
15
+ choice "choice_13", :title => "Third choice"
16
+ end
17
+ singleChoice "single_choice_1", :title => "A single choice." do
18
+ choice "choice_21", :title => "First choice"
19
+ choice "choice_22", :title => "Second choice"
20
+ choice "choice_23", :title => "Third choice"
21
+ end
22
+
23
+ multipleChoice "multiple_choice_2", :title => "A multiple choice with dropdown." do
24
+ choice "choice_112", :title => "First choice"
25
+ choice "choice_122", :title => "Second choice"
26
+ choice "choice_132", :title => "Third choice"
27
+ choice "choice_142", :title => "Fourth choice"
28
+ choice "choice_152", :title => "Fifth choice"
29
+ end
30
+ text "textfield_7_1", :title => "A textfield with dependency." do dependency :requires => "textfield_5", :value => "Test" end
31
+ singleChoice "single_choice_2", :title => "A single choice with dropdown." do
32
+ choice "choice_212", :title => "First choice"
33
+ choice "choice_222", :title => "Second choice"
34
+ choice "choice_232", :title => "Third choice"
35
+ end
36
+ ratingScale "rating_scale_1", :title => "A normal rating scale" do
37
+ choice "choice_31", :title => "1"
38
+ choice "choice_32", :title => "2"
39
+ choice "choice_33", :title => "3"
40
+ choice "choice_34", :title => "4"
41
+ choice "choice_35", :title => "5"
42
+ end
43
+
44
+ ratingScale "rating_scale_2", :title => "A rating scale with a range." do
45
+ (1..10).each do |i|
46
+ choice "choice_4#{i}", :title => "#{i}"
47
+ end
48
+ end
49
+
50
+ singleChoice "single_choice_3", :title => "A single choice with an array." do
51
+ ['First choice', 'Second choice', 'Third choice'].each do |choice|
52
+ choice "radio_button_3_choice", :title => "#{choice}"
53
+ end
54
+ end
55
+
56
+ ratingScale "rating_scale_3", :title => "A numerical rating scale.", :type => :numerical, :min => 1, :max => 8
57
+ ratingScale "rating_scale_4", :title => "A likert rating scale.", :type => :likert
58
+ singleChoice "single_choice_4", :title => "A single choice with a string.", :choices_s => "First choice, Second choice, Third choice"
59
+ multipleChoice "multiple_choice_3", :title => "A multiple choice with a whitespace string.", :choices_s => " First choice, Second choice, Third choice "
60
+ ratingScale "rating_scale_5", :title => "A likert rating scale.", :type => :likert
61
+
62
+ matrix "table_1", :title => "A table with radio buttons.", :type => :singleChoice do
63
+ row "row_11", :title => "First row"
64
+ row "row_21", :title => "Second row"
65
+ column "col_11", :title => "First column"
66
+ column "col_21", :title => "Second column"
67
+ end
68
+ matrix "table_2", :title => "A table with checkboxes.", :type => :multipleChoice do
69
+ row "row_12", :title => "First row"
70
+ row "row_22", :title => "Second row"
71
+ column "col_12", :title => "First column"
72
+ column "col_22", :title => "Second column"
73
+ end
74
+ matrix "table_3", :title => "A table with comboboxes.", :type => :singleChoice do
75
+ choice "choice_31", :title => "1"
76
+ choice "choice_32", :title => "2"
77
+ choice "choice_33", :title => "3"
78
+
79
+ row "row_13", :title => "First row"
80
+ row "row_23", :title => "Second row"
81
+ column "col_13", :title => "First column"
82
+ column "col_23", :title => "Second column"
83
+ end
84
+ matrix "table_4", :title => "A table with dropdowns and strings.", :type => :multipleChoice, :choices_s => "1, 2, 3", :rows_s => "First row, Second row", :columns_s => "First column, Second column"
85
+ matrix "table_5", :title => "A table with a string.", :type => :singleChoice, :rows_s => "First row, Second row", :columns_s => "First column, Second column"
86
+ matrix "table_6", :title => "A likert table.", :type => :likert, :rows_s => "First row, Second row"
87
+ matrix "table_7", :title => "A table with textfields.", :type => :text, :rows_s => "First row, Second row", :columns_s => "First column, Second column"
88
+
89
+ text "textfield_8", :title => "A textfield after a page break."
90
+ text "textfield_9", :title => "A textfield after a page break."
91
+ text "textfield_10", :title => "Another textfield after a page break."
92
+
93
+ text "textfield_11", :title => "A textfield after another page break."
94
+ text "textfield_12", :title => "Another textfield after another page break."
95
+
96
+ text "textfield_13", :title => "A normal textfield."
97
+ multipleChoice "multiple_choice_4", :title => "A normal multiple choice.", :choices_s => "First choice, Second choice, Third choice"
98
+ matrix "table_8", :title => "An image table with strings.", :type => :singleChoice, :rows_s => "First row, Second row", :columns_s => "First column, Second column"
99
+ end
100
+
101
+ survey("survey_2", :author => "Max Mustermann", :title => "Another survey") do
102
+ text "textfield_14", :title => "A normal textfield"
103
+ end
104
+
105
+ survey("product_survey", :author => "Max Mustermann", :title => "Product survey") do
106
+ text :name => "comment_1", :title => "How would you comment the new product?"
107
+ end
108
+ end
@@ -0,0 +1,27 @@
1
+ STATIC_PAGES = SurveyOnRails::Builder::build do
2
+ staticPage "home", :title => "Home", :root => true
3
+ staticPage "about", :title => "About"
4
+ staticPage "contact", :title => "Contact"
5
+ staticPage "help", :title => "Help", :file => "gen/assets/static_pages/help.html.erb"
6
+ end
7
+
8
+ HEADER = SurveyOnRails::Builder::build do
9
+ header do
10
+ link "link_2", :title => "Home", :url => "root_path", :path => true
11
+ link "link_3", :title => "Help", :url => "help_path", :path => true
12
+ link "link_4", :title => "Users", :url => "users_path", :path => true
13
+ link "link_5", :title => "Ruby on Rails", :url => "http://rubyonrails.org/"
14
+ surveyManagement
15
+ userManagement
16
+ end
17
+ end
18
+
19
+ FOOTER = SurveyOnRails::Builder::build do
20
+ footer do
21
+ link "link_6", :title => "Survey on Rails", :url => "https://github.com/Dkemp04/Generator" do elementStyle :foreground => :lightGray end
22
+ label "label_1", :title => "by Daniel Kemper" do elementStyle :foreground => :lightGray end
23
+ link "link_7", :title => "About", :url => "about_path", :path => true
24
+ link "link_8", :title => "Contact", :url => "contact_path", :path => true
25
+ link "link_9", :title => "News", :url => "http://weblog.rubyonrails.org/"
26
+ end
27
+ end
@@ -0,0 +1,15 @@
1
+ STYLES = SurveyOnRails::Builder::build do
2
+ staticStyle :element_names => "textfield_3", :foreground => :gray, :background => :blue, :font_style => :italic
3
+ staticStyle :element_names => "textfield_6", :foreground => :gray, :background => :red
4
+ staticStyle :element_names => "radio_button_1", :foreground => :darkGray, :background => :lightGray
5
+ staticStyle :element_names => "choice_12", :foreground => :white, :background => :black
6
+ staticStyle :element_names => "choice_23", :foreground => :blue, :background => :red
7
+ staticStyle :element_names => "group_1, group_2, table_5", :foreground => :black, :background => :white
8
+
9
+ staticStyle :element_types => "radio_button_group, horizontal_radio_button_group", :background => :lightGray, :font_style => :italic
10
+
11
+ staticStyle(:element_names => "textfield_21", :margin => 10, :padding => 5, :background => :lightGray, :foreground => :white, :font_size => 20, :font_style => :oblique, :font_weight => :bold,
12
+ :horizontal_alignment => :center, :vertical_alignment => :middle) do
13
+ customStyle :property => "overflow", :value => "auto"
14
+ end
15
+ end
@@ -0,0 +1,82 @@
1
+ FORMS = SurveyOnRails::Builder::build do
2
+ form("survey_1") do
3
+ page("page_1", :title => "First page") do
4
+ textfield :for => textfield_1, :title => "New title"
5
+ textfield_2 :prefix => "@"
6
+ textfield_3 :title => "A textfield without suffix and with color.", :suffix => "Euro"
7
+ textfield "textfield_4", :type => :small
8
+ textfield "textfield_5", :type => :multiLine
9
+ textfield "textfield_6"
10
+ textfield "textfield_6_1"
11
+ textfield "textfield_7", :info => "Nullam eros mi, mollis in sollicitudin non, tincidunt sed enim. Sed et felis metus, rhoncus ornare nibh. Ut at magna leo. Suspendisse egestas est ac dolor imperdiet pretium. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porttitor, erat sit amet venenatis luctus, augue libero ultrices quam, ut congue nisi risus eu purus. Cras semper consectetur elementum. Nulla vel aliquet libero. Vestibulum eget felis nec purus commodo convallis. Aliquam erat volutpat."
12
+
13
+ checkboxGroup "multiple_choice_1"
14
+ radioButtonGroup "single_choice_1"
15
+ end
16
+
17
+ page("page_2", :title => "Second page") do
18
+ textfield "textfield_7_1"
19
+ multiple_choice_2 :dropdown => true
20
+ radioButtonGroup "single_choice_2", :dropdown => true
21
+
22
+ rating_scale_1
23
+
24
+ image("image_1", :source => "rails.png")
25
+ image("image_2", :source => "rails.png", :url => "http://rubyonrails.org/")
26
+ image("image_3", :source => "nature.jpg")
27
+
28
+ horizontalRadioButtonGroup "rating_scale_2" do
29
+ elementStyle :foreground => :blue, :background => :lightGray
30
+ end
31
+
32
+ radioButtonGroup "single_choice_3"
33
+
34
+ horizontalRadioButtonGroup "rating_scale_3"
35
+ horizontalRadioButtonGroup "rating_scale_4"
36
+ radioButtonGroup "single_choice_4"
37
+ checkboxGroup "multiple_choice_3"
38
+ end
39
+
40
+ page("page_3", :title => "Third page") do
41
+ horizontalRadioButtonGroup "rating_scale_5", :info => "Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test"
42
+
43
+ table_1
44
+ table_2
45
+ table "table_3", :dropdown => true
46
+ table "table_4", :dropdown => true
47
+ end
48
+
49
+ page("page_4", :title => "Fourth page") do
50
+ table "table_5"
51
+ table_6
52
+ table "table_7"
53
+
54
+ group("group_1", :title => "Some textfields.") do
55
+ textfield "textfield_8"
56
+ textfield "textfield_9"
57
+ textfield "textfield_10"
58
+ end
59
+
60
+ group("group_2", :title => "Some other textfields.") do
61
+ textfield "textfield_11"
62
+ textfield "textfield_12"
63
+ end
64
+ end
65
+
66
+ page("page_5", :title => "Fifth page") do
67
+ group("group_3", :title => "A group of different elements") do
68
+ textfield "textfield_13"
69
+ checkboxGroup "multiple_choice_4", :info => "Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test"
70
+ table "table_8", :images_s => "rails.png, nature.jpg, star_none.png, star_full.png", :info => "Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test Info-Test"
71
+ end
72
+ end
73
+ end
74
+
75
+ form("survey_2") do
76
+ textfield_14
77
+ end
78
+
79
+ form("product_survey") do
80
+ comment_1
81
+ end
82
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: survey_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kemper
@@ -92,6 +92,20 @@ files:
92
92
  - lib/survey_on_rails/utils/string.rb
93
93
  - lib/app_template.rb
94
94
  - lib/survey_on_rails.rb
95
+ - gen/assets/images/info.png
96
+ - gen/assets/images/nature.jpg
97
+ - gen/assets/images/rails.png
98
+ - gen/assets/images/star_full.png
99
+ - gen/assets/images/star_none.png
100
+ - gen/assets/static_pages/about.html.erb
101
+ - gen/assets/static_pages/contact.html.erb
102
+ - gen/assets/static_pages/help.html.erb
103
+ - gen/assets/static_pages/home.html.erb
104
+ - gen/models/app.rb
105
+ - gen/models/model.rb
106
+ - gen/models/static.rb
107
+ - gen/models/styles.rb
108
+ - gen/models/view.rb
95
109
  homepage: https://github.com/Dkemp04/Generator
96
110
  licenses: []
97
111
  metadata: {}