ultra_light_wizard 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba76fbcd0ade6374d02dc6ec9a1cb27993bcc88e
4
- data.tar.gz: 956dda788823323818f4480af2fd884b3162ebaf
3
+ metadata.gz: 3a7686e94397788f96a568274332a0a96f191ff4
4
+ data.tar.gz: 228bd3ecb05c119f4c3201d8ef09bd754f022111
5
5
  SHA512:
6
- metadata.gz: 808ba91e959078bda15d1871e90b9fcc0892d89ae4b98ec0d794b561812fafd0e50ec7225dc179a142981452fb4cd2f9ba6770a280136694ef7c9dcdd4ef9cf8
7
- data.tar.gz: d98b21362e21e01232004de2154037e85a992c33977e9ffd1ea4f1844403c748c83af10c21a78306dd0c97266511708e5386c63414fc2e7c0daefd875c2f6d45
6
+ metadata.gz: a9eddccc6aec24c7d9fe45515d55ee5cdeecf1914652af1d20c0f946969f763ad49befbc2b569a7bb154523cf639c776cb3dedc02cebea6d4a270a6098a4081b
7
+ data.tar.gz: d8b8f082d200b22724ab090b5d1e39b07173b811dfe032da2c567d2f0ccb304f501335c2cb27aae9a9a5b5043d2f49854215835ba05b3a5c5b4486e95277a029
File without changes
File without changes
data/Gemfile CHANGED
File without changes
File without changes
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
- - [DONE] Customize name conventions
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.2
1
+ 0.0.3
@@ -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
@@ -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, previous_step) %></li>
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, next_step) %></li>
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
File without changes
@@ -1,17 +1,17 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: ultra_light_wizard 0.0.2 ruby lib
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.2"
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-27"
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.8"
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
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.2
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-27 00:00:00.000000000 Z
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.8
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