rules_engine 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/views/re_plans/template.html.erb +1 -1
- data/generators/manifests/templates/app/rules/simple.rb +1 -1
- data/generators/manifests/templates/config/initializers/rules_engine.rb +4 -4
- data/generators/manifests/templates/public/stylesheets/rules_engine/rules_engine.css +42 -0
- data/generators/manifests/templates/public/stylesheets/rules_engine/screen.css +14 -17
- data/generators/manifests/templates/spec/lib/rules/complex_spec.rb +2 -1
- data/generators/manifests/templates/spec/lib/rules/simple_spec.rb +10 -18
- data/lib/rules_engine/process/auditor/db_auditor.rb +1 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
@@ -108,7 +108,7 @@
|
|
108
108
|
<%= re_text_field("TEXT FIELD 5", "text_field_1", "text_field_1", :span => '5', :class => "showgrid")%>
|
109
109
|
<%= re_text_field("TEXT FIELD", "text_field_1", "text_field_1", :error => "error message")%>
|
110
110
|
<%= re_text_field("TEXT FIELD", "text_field_1", "text_field_1", :hint => "hint message")%>
|
111
|
-
<%= re_text_field("TEXT FIELD", "text_field_1", "text_field_1", :text => "TEXT MESSAGE")%>
|
111
|
+
<%= re_text_field("TEXT FIELD", "text_field_1", "text_field_1", :span => '4x16', :text => "TEXT MESSAGE")%>
|
112
112
|
<%= re_text_field("REQUIRED", "text_field_1", "text_field_1", :required => true)%>
|
113
113
|
<%= re_text_field("DISABLED", "text_field_1", "text_field_1", :disabled => true)%>
|
114
114
|
<div class="clear"></div>
|
@@ -5,13 +5,13 @@ RulesEngine::Process.runner = :db_runner
|
|
5
5
|
RulesEngine::Process.auditor = :db_auditor
|
6
6
|
RulesEngine::Process.auditor.audit_level = RulesEngine::Process::AUDIT_INFO
|
7
7
|
|
8
|
+
RulesEngineView::Config.layout = nil
|
9
|
+
RulesEngineView::Config.prefix_breadcrumbs = nil
|
10
|
+
|
8
11
|
RulesEngine::Cache.cache_store = nil
|
9
12
|
# RulesEngine::Cache.cache_store = :mem_cache_store, "localhost:11210"
|
10
13
|
# RulesEngine::Cache.cache_store = :memory_store
|
11
14
|
# RulesEngine::Cache.cache_store = :file_store, "/path/to/cache/directory"
|
12
15
|
# RulesEngine::Cache.cache_store = :drb_store, "druby://localhost:9192"
|
13
16
|
# RulesEngine::Cache.cache_store = :mem_cache_store, "localhost"
|
14
|
-
# RulesEngine::Cache.cache_store = MyOwnStore.new("parameter")
|
15
|
-
|
16
|
-
RulesEngineView::Config.layout = nil
|
17
|
-
RulesEngineView::Config.prefix_breadcrumbs = nil
|
17
|
+
# RulesEngine::Cache.cache_store = MyOwnStore.new("parameter")
|
@@ -1,3 +1,45 @@
|
|
1
|
+
.re_container {
|
2
|
+
min-height: 700px;
|
3
|
+
}
|
4
|
+
|
5
|
+
.re_container h1, #re_content h1 {
|
6
|
+
font-size:36px;
|
7
|
+
line-height:42px;
|
8
|
+
margin: 0px 6px;
|
9
|
+
}
|
10
|
+
.re_container h2, #re_content h2 {
|
11
|
+
font-size:30px;
|
12
|
+
line-height:36px;
|
13
|
+
margin: 0px 6px;
|
14
|
+
}
|
15
|
+
.re_container h3, #re_content h3 {
|
16
|
+
font-size:24px;
|
17
|
+
line-height:30px;
|
18
|
+
margin: 0px 6px;
|
19
|
+
}
|
20
|
+
.re_container h4, #re_content h4 {
|
21
|
+
font-size:20px;
|
22
|
+
line-height:24px;
|
23
|
+
margin: 0px 6px;
|
24
|
+
}
|
25
|
+
.re_container h5, #re_content h5 {
|
26
|
+
font-size:18px;
|
27
|
+
line-height:22px;
|
28
|
+
margin: 0px 6px;
|
29
|
+
}
|
30
|
+
.re_container h6, #re_content h6 {
|
31
|
+
font-size:16px;
|
32
|
+
line-height:20px;
|
33
|
+
margin: 0px 6px;
|
34
|
+
}
|
35
|
+
.re_container p, #re_content p {
|
36
|
+
font-size:14px;
|
37
|
+
line-height:16px;
|
38
|
+
padding-top:4px;
|
39
|
+
padding-bottom:2px;
|
40
|
+
margin: 0px 6px;
|
41
|
+
}
|
42
|
+
|
1
43
|
.re-code{
|
2
44
|
font-size: 14px;
|
3
45
|
line-height: 16px;
|
@@ -3,7 +3,7 @@ html, body {
|
|
3
3
|
margin: 0px;
|
4
4
|
padding: 0px;
|
5
5
|
font-size: 14px;
|
6
|
-
color: #
|
6
|
+
color: #333;
|
7
7
|
background: #2F323C;
|
8
8
|
font-family: "Lucida Grande","Lucida Sans Unicode",verdana,arial,helvetica,sans-serif;
|
9
9
|
}
|
@@ -12,50 +12,46 @@ html, body {
|
|
12
12
|
background: #fff;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
16
|
-
min-height: 700px;
|
17
|
-
}
|
18
|
-
|
19
|
-
h1, h2, h3, h4, h5, h6 {
|
15
|
+
h1, h2, h3, h4, h5, h6, p {
|
20
16
|
font-weight:normal;
|
21
17
|
color: #222;
|
22
18
|
}
|
23
19
|
h1 {
|
24
20
|
font-size:36px;
|
25
21
|
line-height:42px;
|
26
|
-
margin:
|
22
|
+
margin: 18px 6px 6px 6px;
|
27
23
|
}
|
28
24
|
h2 {
|
29
25
|
font-size:30px;
|
30
26
|
line-height:36px;
|
31
|
-
margin:
|
27
|
+
margin: 16px 6px 6px 6px;
|
32
28
|
}
|
33
29
|
h3 {
|
34
30
|
font-size:24px;
|
35
31
|
line-height:30px;
|
36
|
-
margin:
|
32
|
+
margin: 12px 6px 6px 6px;
|
37
33
|
}
|
38
34
|
h4 {
|
39
35
|
font-size:20px;
|
40
36
|
line-height:24px;
|
41
|
-
margin:
|
37
|
+
margin: 8px 6px 6px 6px;
|
42
38
|
}
|
43
39
|
h5 {
|
44
40
|
font-size:18px;
|
45
41
|
line-height:22px;
|
46
|
-
margin:
|
42
|
+
margin: 8px 6px 6px 6px;
|
47
43
|
}
|
48
44
|
h6 {
|
49
45
|
font-size:16px;
|
50
46
|
line-height:20px;
|
51
|
-
margin:
|
47
|
+
margin: 8px 6px 6px 6px;
|
52
48
|
}
|
53
49
|
p {
|
54
50
|
font-size:14px;
|
55
|
-
line-height:
|
51
|
+
line-height:20px;
|
56
52
|
padding-top:4px;
|
57
53
|
padding-bottom:2px;
|
58
|
-
margin:
|
54
|
+
margin: 6px;
|
59
55
|
}
|
60
56
|
hr {margin:0 0 2px;}
|
61
57
|
|
@@ -461,10 +457,10 @@ table.data-line tr.odd td {
|
|
461
457
|
}
|
462
458
|
.re-form-data .form-text{
|
463
459
|
display:inline-block;
|
464
|
-
font-size:
|
460
|
+
font-size: 16px;
|
465
461
|
line-height: 20px;
|
466
462
|
color: #222;
|
467
|
-
padding:
|
463
|
+
padding: 6px 5px 0 5px;
|
468
464
|
}
|
469
465
|
|
470
466
|
.re-form-data .form-error-message,
|
@@ -508,7 +504,8 @@ select{
|
|
508
504
|
float:left;
|
509
505
|
}
|
510
506
|
.re-form-field-checkbox .form-text{
|
511
|
-
margin-top:
|
507
|
+
margin-top: 0px;
|
508
|
+
padding-top: 4px;
|
512
509
|
}
|
513
510
|
|
514
511
|
.re-form-field-checkbox .form-text .re-form-label,
|
@@ -382,7 +382,8 @@ describe ReWorkflowRulesController do
|
|
382
382
|
|
383
383
|
describe "edit" do
|
384
384
|
it "show the edit form" do
|
385
|
-
re_rule = ReRule.create!(:re_workflow_id => @re_workflow.id,
|
385
|
+
re_rule = ReRule.create!(:re_workflow_id => @re_workflow.id,
|
386
|
+
:rule_class_name => "RulesEngine::Rule::<%=rule_class%>",
|
386
387
|
:data => valid_<%=rule_name%>_rule_data)
|
387
388
|
ReRule.stub!(:find).and_return(re_rule)
|
388
389
|
|
@@ -66,27 +66,19 @@ describe RulesEngine::Rule::<%=rule_class%> do
|
|
66
66
|
@<%=rule_name%>.title.should be_nil
|
67
67
|
end
|
68
68
|
|
69
|
-
it "should set the description to nil" do
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
end
|
69
|
+
# it "should set the description to nil" do
|
70
|
+
# @<%=rule_name%>.description.should_not be_nil
|
71
|
+
# @<%=rule_name%>.data = nil
|
72
|
+
# @<%=rule_name%>.description.should be_nil
|
73
|
+
# end
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
77
|
describe "the summary" do
|
78
|
-
describe "description set" do
|
79
|
-
it "should be the rule description" do
|
80
|
-
<%=rule_name%> = RulesEngine::Rule::<%=rule_class%>.new
|
81
|
-
<%=rule_name%>.should_receive(:description).and_return("mock description")
|
82
|
-
<%=rule_name%>.summary.should == "mock description"
|
83
|
-
end
|
84
|
-
end
|
85
78
|
describe "description not set" do
|
86
|
-
it "should be
|
79
|
+
it "should be Summary Required" do
|
87
80
|
<%=rule_name%> = RulesEngine::Rule::<%=rule_class%>.new
|
88
|
-
<%=rule_name%>.
|
89
|
-
<%=rule_name%>.summary.should == "Does Nothing"
|
81
|
+
<%=rule_name%>.summary.should == "Summary Required"
|
90
82
|
end
|
91
83
|
end
|
92
84
|
end
|
@@ -180,7 +172,7 @@ describe ReWorkflowRulesController do
|
|
180
172
|
controller.stub!(:rules_engine_reader_access_required).and_return(true)
|
181
173
|
controller.stub!(:rules_engine_editor_access_required).and_return(true)
|
182
174
|
|
183
|
-
@re_workflow = ReWorkflow.create!(:code => "valid code", :title => 'Valid title'
|
175
|
+
@re_workflow = ReWorkflow.create!(:code => "valid code", :title => 'Valid title')
|
184
176
|
ReWorkflow.stub!(:find).and_return(@re_workflow)
|
185
177
|
end
|
186
178
|
|
@@ -196,7 +188,7 @@ describe ReWorkflowRulesController do
|
|
196
188
|
get :new, :re_workflow_id => @re_workflow.id, :rule_class_name => "RulesEngine::Rule::<%=rule_class%>"
|
197
189
|
response.should have_selector("form#re_rule_new_form") do |form|
|
198
190
|
form.should have_selector("input#<%=rule_name%>_title")
|
199
|
-
form.should have_selector("input#<%=rule_name%>_description")
|
191
|
+
# form.should have_selector("input#<%=rule_name%>_description")
|
200
192
|
end
|
201
193
|
end
|
202
194
|
end
|
@@ -210,7 +202,7 @@ describe ReWorkflowRulesController do
|
|
210
202
|
get :edit, :re_workflow_id => @re_workflow.id, :id => 1001, :rule_class_name => "RulesEngine::Rule::<%=rule_class%>"
|
211
203
|
response.should have_selector("form#re_rule_edit_form") do |form|
|
212
204
|
form.should have_selector("input#<%=rule_name%>_title", :value => 'Rule Title')
|
213
|
-
form.should have_selector("input#<%=rule_name%>_description", :value => 'Rule Description')
|
205
|
+
# form.should have_selector("input#<%=rule_name%>_description", :value => 'Rule Description')
|
214
206
|
end
|
215
207
|
end
|
216
208
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rules_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Douglas
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-29 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|