ultra_light_wizard 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/.ruby-gemset +0 -0
- data/.ruby-version +0 -0
- data/Gemfile +0 -0
- data/Gemfile.lock +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +20 -4
- data/Rakefile +0 -0
- data/VERSION +1 -1
- data/lib/generators/templates/app/controllers/wizard_steps_controller.rb.erb +0 -0
- data/lib/generators/templates/app/helpers/wizard_steps_helper.rb.erb +12 -0
- data/lib/generators/templates/app/models/wizard_step_model.rb.erb +0 -0
- data/lib/generators/templates/app/views/wizard_step_navigation_view.html.erb +2 -2
- data/lib/generators/templates/app/views/wizard_step_view.html.erb +0 -0
- data/lib/generators/ultra_light_wizard/wizard_generator.rb +0 -0
- data/lib/ultra_light_wizard.rb +0 -0
- data/ruby187.Gemfile +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/ultra_light_wizard/ultra_light_wizard_spec.rb +0 -0
- data/ultra_light_wizard.gemspec +5 -5
- data/ultra_light_wizard.jpg +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a7686e94397788f96a568274332a0a96f191ff4
|
4
|
+
data.tar.gz: 228bd3ecb05c119f4c3201d8ef09bd754f022111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9eddccc6aec24c7d9fe45515d55ee5cdeecf1914652af1d20c0f946969f763ad49befbc2b569a7bb154523cf639c776cb3dedc02cebea6d4a270a6098a4081b
|
7
|
+
data.tar.gz: d8b8f082d200b22724ab090b5d1e39b07173b811dfe032da2c567d2f0ccb304f501335c2cb27aae9a9a5b5043d2f49854215835ba05b3a5c5b4486e95277a029
|
data/.ruby-gemset
CHANGED
File without changes
|
data/.ruby-version
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/Gemfile.lock
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -11,13 +11,13 @@ https://www.youtube.com/watch?v=muyfoiKHMMA
|
|
11
11
|
Instructions
|
12
12
|
============
|
13
13
|
|
14
|
-
rails generate ultra_light_wizard:wizard (resource) steps=(step1),(step2),(step3)
|
14
|
+
```rails generate ultra_light_wizard:wizard (resource) steps=(step1),(step2),(step3),...```
|
15
15
|
|
16
16
|
This will generate wizard step routes, controller, models, and views
|
17
17
|
|
18
18
|
Example:
|
19
19
|
|
20
|
-
rails generate ultra_light_wizard:wizard Project steps:basic_info,project_detail,file_uploads,preview
|
20
|
+
```rails generate ultra_light_wizard:wizard Project steps:basic_info,project_detail,file_uploads,preview```
|
21
21
|
|
22
22
|
Output:
|
23
23
|
|
@@ -40,7 +40,7 @@ If you'd like to customize the term "step", you can add a step_alias:(alias) opt
|
|
40
40
|
|
41
41
|
Example:
|
42
42
|
|
43
|
-
rails generate ultra_light_wizard:wizard Project steps:basic_info,project_detail,file_uploads,preview step_alias:part
|
43
|
+
```rails generate ultra_light_wizard:wizard Project steps:basic_info,project_detail,file_uploads,preview step_alias:part```
|
44
44
|
|
45
45
|
Output:
|
46
46
|
|
@@ -63,6 +63,20 @@ Once the files are generated, you can proceed to place your own code customizati
|
|
63
63
|
|
64
64
|
To learn more about the Ultra Light Wizard philosophy and function, please read this [Code Painter](http://www.codepainter.ca) blog post: [Ultra Light & Maintainable Wizard in Rails] (http://www.codepainter.ca/2013/10/ultra-light-maintainable-wizards-in.html)
|
65
65
|
|
66
|
+
Principles
|
67
|
+
==========
|
68
|
+
|
69
|
+
- REST: wizard steps are represented as REST nested resources under the model resource being built
|
70
|
+
- MVC: respects MVC separation of concerns
|
71
|
+
- OO: honors OO principles of low coupling and high cohesion
|
72
|
+
- Design Patterns: wizard is simply a model Builder
|
73
|
+
- DDD: supports domain concepts directly with customizable vocabulary
|
74
|
+
- Non-Functional Requirements:
|
75
|
+
- Productivity: minimum effort for adding wizards and wizard steps
|
76
|
+
- Maintainability: minimum code to maintain while adhering to other principles
|
77
|
+
- Performance: stateless design means scalability
|
78
|
+
- Security: stateless design is compatible with Rails security measures
|
79
|
+
|
66
80
|
Features
|
67
81
|
========
|
68
82
|
|
@@ -73,10 +87,12 @@ Features
|
|
73
87
|
+ [DONE] View parts
|
74
88
|
+ [DONE] View navigation
|
75
89
|
+ [DONE] Helper (or Controller SuperModule trait) for ultra light wizard support
|
90
|
+
+ [DONE] Route helper methods
|
76
91
|
- Forms
|
77
92
|
- Support for nested resources
|
78
93
|
- Modularize (perhaps extracting sub-generators)
|
79
|
-
|
94
|
+
+ [DONE] Customize name conventions
|
95
|
+
- Write automated tests
|
80
96
|
|
81
97
|
License
|
82
98
|
=======
|
data/Rakefile
CHANGED
File without changes
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
File without changes
|
@@ -20,5 +20,17 @@ module <%= class_name %><%= step_alias.pluralize.camelize %>Helper
|
|
20
20
|
previous_<%= step_alias %>_index = current_<%= step_alias %>_index-1
|
21
21
|
previous_<%= step_alias %>_index < 0 ? nil : <%= step_alias.pluralize.upcase %>[previous_<%= step_alias %>_index]
|
22
22
|
end
|
23
|
+
<% %w(path url).each do |route_term| %>
|
24
|
+
def next_<%= step_alias %>_<%= route_term %>
|
25
|
+
<%= file_path %>_<%= step_alias %>_model_<%= route_term %>(next_<%= step_alias %>)
|
26
|
+
end
|
27
|
+
|
28
|
+
def previous_<%= step_alias %>_<%= route_term %>
|
29
|
+
<%= file_path %>_<%= step_alias %>_model_<%= route_term %>(previous_<%= step_alias %>)
|
30
|
+
end
|
23
31
|
|
32
|
+
def <%= file_path %>_<%= step_alias %>_model_<%= route_term %>(<%= step_alias %>)
|
33
|
+
edit_<%= file_path %>_<%= file_path %>_<%= step_alias %>_<%= route_term %>(<%= file_path %>_<%= step_alias %>_model, <%= step_alias %>)
|
34
|
+
end
|
35
|
+
<% end %>
|
24
36
|
end
|
File without changes
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<ul>
|
2
2
|
<%% if <%= "previous_#{step_alias}" %>.present? %>
|
3
|
-
<li><%%= link_to "Previous <%= step_alias %>", edit_<%= file_path %>_<%= file_path %>_<%= step_alias %>_path(<%= file_path %>_<%= step_alias %>_model,
|
3
|
+
<li><%%= link_to "Previous <%= step_alias %>", edit_<%= file_path %>_<%= file_path %>_<%= step_alias %>_path(<%= file_path %>_<%= step_alias %>_model, previous_<%= step_alias %>) %></li>
|
4
4
|
<%% end %>
|
5
5
|
<%% if <%= "next_#{step_alias}" %>.present? %>
|
6
|
-
<li><%%= link_to "Next <%= step_alias %>", edit_<%= file_path %>_<%= file_path %>_<%= step_alias %>_path(<%= file_path %>_<%= step_alias %>_model,
|
6
|
+
<li><%%= link_to "Next <%= step_alias %>", edit_<%= file_path %>_<%= file_path %>_<%= step_alias %>_path(<%= file_path %>_<%= step_alias %>_model, next_<%= step_alias %>) %></li>
|
7
7
|
<%% else %>
|
8
8
|
<li><%%= link_to "Finish <%= step_alias %>", <%= file_path %>_path(<%= file_path %>_<%= step_alias %>_model) %></li>
|
9
9
|
<%% end %>
|
File without changes
|
File without changes
|
data/lib/ultra_light_wizard.rb
CHANGED
File without changes
|
data/ruby187.Gemfile
CHANGED
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
File without changes
|
data/ultra_light_wizard.gemspec
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ultra_light_wizard 0.0.
|
5
|
+
# stub: ultra_light_wizard 0.0.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ultra_light_wizard"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Andy Maleh"]
|
14
|
-
s.date = "2016-01-
|
14
|
+
s.date = "2016-01-29"
|
15
15
|
s.description = "Ultra light & maintainble wizards in Rails that honor REST, MVC, and OO with minimal writing of code involved and maximum flexibility"
|
16
16
|
s.email = "andy.am@gmail.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
]
|
43
43
|
s.homepage = "http://github.com/AndyObtiva/ultra_light_wizard"
|
44
44
|
s.licenses = ["MIT"]
|
45
|
-
s.rubygems_version = "2.4.
|
45
|
+
s.rubygems_version = "2.4.5.1"
|
46
46
|
s.summary = "Ultra Light & Maintainable Wizards In Rails"
|
47
47
|
|
48
48
|
if s.respond_to? :specification_version then
|
data/ultra_light_wizard.jpg
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultra_light_wizard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jeweler
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.4.
|
76
|
+
rubygems_version: 2.4.5.1
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Ultra Light & Maintainable Wizards In Rails
|