smartdown 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. data/README.md +13 -10
  2. data/lib/smartdown/version.rb +1 -1
  3. metadata +77 -77
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Smartdown
1
+ # Smartdown [![Build Status](https://travis-ci.org/alphagov/smartdown.svg?branch=master)](https://travis-ci.org/alphagov/smartdown)
2
2
 
3
3
  Smartdown is an [external
4
4
  DSL](http://www.martinfowler.com/bliki/DomainSpecificLanguage.html) for
@@ -10,6 +10,8 @@ The language is designed to look like
10
10
  to allow expression of logical rules, questions and conditional blocks of
11
11
  text.
12
12
 
13
+ It's a work-in-progress so some of the features described in this readme haven't been implemented yet. These are indicated with (tbd).
14
+
13
15
  ## Overview
14
16
 
15
17
  A single smartdown flow has a cover sheet, a set of questions, a set of
@@ -89,7 +91,7 @@ to your outbound flight.
89
91
  * no: No
90
92
  ```
91
93
 
92
- ### Country
94
+ ### Country (tbd)
93
95
 
94
96
  ```markdown
95
97
  # What passport do you have?
@@ -108,7 +110,7 @@ include_countries: {country3: "Country 3", country4: "Country 4"}
108
110
  [country]
109
111
  ```
110
112
 
111
- ### Date
113
+ ### Date (tbd)
112
114
 
113
115
  ```markdown
114
116
  # What is the baby’s due date?
@@ -118,7 +120,7 @@ include_countries: {country3: "Country 3", country4: "Country 4"}
118
120
 
119
121
  Asks for a specific date in the given range. Ranges can be expressed as a relative number of years or absolute dates in YYYY-MM-DD format.
120
122
 
121
- ### Value
123
+ ### Value (tbd)
122
124
 
123
125
  ```markdown
124
126
  [value]
@@ -126,7 +128,7 @@ Asks for a specific date in the given range. Ranges can be expressed as a relati
126
128
 
127
129
  Asks for an arbitrary text input.
128
130
 
129
- ### Money
131
+ ### Money (tbd)
130
132
 
131
133
  ```markdown
132
134
  [money]
@@ -134,7 +136,7 @@ Asks for an arbitrary text input.
134
136
 
135
137
  Asks for a numerical input which can have decimals and optional thousand-separating commas.
136
138
 
137
- ### Salary
139
+ ### Salary (tbd)
138
140
 
139
141
  ```markdown
140
142
  [salary]
@@ -142,7 +144,7 @@ Asks for a numerical input which can have decimals and optional thousand-separat
142
144
 
143
145
  Asks for salary which can be expressed as either a weekly or monthly money amount. The user chooses between weekly/monthly
144
146
 
145
- ### Checkbox
147
+ ### Checkbox (tbd)
146
148
 
147
149
  ```markdown
148
150
  # Will you pass through UK Border Control?
@@ -179,19 +181,20 @@ defines nested rules.
179
181
 
180
182
  ```
181
183
  variable_name is 'string'
184
+ variable_name in {this that the-other}
182
185
  ```
183
186
 
184
- ## Conditional blocks in outcomes
187
+ ## Conditional blocks in outcomes (tbd)
185
188
 
186
189
  ## Processing model
187
190
 
188
191
  Each response to a question is assigned to a variable which corresponds to the question name (as determined by the filename).
189
192
 
190
- ## Named predicates
193
+ ## Named predicates (tbd)
191
194
 
192
195
  Named predicates
193
196
 
194
- ## Plugin API
197
+ ## Plugin API (tbd)
195
198
 
196
199
  A plugin API will be provided to allow more complex calculations to be defined
197
200
  in an external ruby class.
@@ -1,3 +1,3 @@
1
1
  module Smartdown
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -82,75 +82,75 @@ executables:
82
82
  extensions: []
83
83
  extra_rdoc_files: []
84
84
  files:
85
- - lib/smartdown/engine/errors.rb
86
- - lib/smartdown/engine/predicate_evaluator.rb
87
- - lib/smartdown/engine/state.rb
88
- - lib/smartdown/engine/transition.rb
85
+ - lib/smartdown.rb
89
86
  - lib/smartdown/engine.rb
90
- - lib/smartdown/model/element/markdown_heading.rb
91
- - lib/smartdown/model/element/markdown_paragraph.rb
92
- - lib/smartdown/model/element/multiple_choice.rb
93
- - lib/smartdown/model/element/start_button.rb
94
- - lib/smartdown/model/flow.rb
95
- - lib/smartdown/model/front_matter.rb
96
- - lib/smartdown/model/nested_rule.rb
97
- - lib/smartdown/model/next_node_rules.rb
98
- - lib/smartdown/model/node.rb
99
- - lib/smartdown/model/predicate/equality.rb
100
- - lib/smartdown/model/predicate/named.rb
101
- - lib/smartdown/model/predicate/set_membership.rb
102
- - lib/smartdown/model/rule.rb
87
+ - lib/smartdown/parser/predicates.rb
88
+ - lib/smartdown/parser/node_transform.rb
89
+ - lib/smartdown/parser/node_interpreter.rb
103
90
  - lib/smartdown/parser/base.rb
104
91
  - lib/smartdown/parser/directory_input.rb
105
- - lib/smartdown/parser/element/front_matter.rb
106
- - lib/smartdown/parser/element/markdown_heading.rb
92
+ - lib/smartdown/parser/rules.rb
93
+ - lib/smartdown/parser/node_parser.rb
107
94
  - lib/smartdown/parser/element/markdown_paragraph.rb
108
- - lib/smartdown/parser/element/multiple_choice_question.rb
109
95
  - lib/smartdown/parser/element/start_button.rb
96
+ - lib/smartdown/parser/element/front_matter.rb
97
+ - lib/smartdown/parser/element/multiple_choice_question.rb
98
+ - lib/smartdown/parser/element/markdown_heading.rb
110
99
  - lib/smartdown/parser/flow_interpreter.rb
111
- - lib/smartdown/parser/node_interpreter.rb
112
- - lib/smartdown/parser/node_parser.rb
113
- - lib/smartdown/parser/node_transform.rb
114
- - lib/smartdown/parser/predicates.rb
115
- - lib/smartdown/parser/rules.rb
116
100
  - lib/smartdown/version.rb
117
- - lib/smartdown.rb
101
+ - lib/smartdown/engine/state.rb
102
+ - lib/smartdown/engine/transition.rb
103
+ - lib/smartdown/engine/predicate_evaluator.rb
104
+ - lib/smartdown/engine/errors.rb
105
+ - lib/smartdown/model/flow.rb
106
+ - lib/smartdown/model/predicate/named.rb
107
+ - lib/smartdown/model/predicate/set_membership.rb
108
+ - lib/smartdown/model/predicate/equality.rb
109
+ - lib/smartdown/model/node.rb
110
+ - lib/smartdown/model/front_matter.rb
111
+ - lib/smartdown/model/element/markdown_paragraph.rb
112
+ - lib/smartdown/model/element/start_button.rb
113
+ - lib/smartdown/model/element/markdown_heading.rb
114
+ - lib/smartdown/model/element/multiple_choice.rb
115
+ - lib/smartdown/model/next_node_rules.rb
116
+ - lib/smartdown/model/nested_rule.rb
117
+ - lib/smartdown/model/rule.rb
118
118
  - bin/smartdown
119
119
  - LICENSE.md
120
120
  - README.md
121
121
  - spec/acceptance/parsing_spec.rb
122
122
  - spec/acceptance/smartdown_cli_spec.rb
123
- - spec/engine/predicate_evaluator_spec.rb
123
+ - spec/parser/directory_input_spec.rb
124
+ - spec/parser/integration/cover_sheet_spec.rb
125
+ - spec/parser/base_spec.rb
126
+ - spec/parser/rules_spec.rb
127
+ - spec/parser/predicates_spec.rb
128
+ - spec/parser/element/multiple_choice_question_spec.rb
129
+ - spec/parser/element/start_button_parser_spec.rb
130
+ - spec/parser/element/markdown_paragraph_spec.rb
131
+ - spec/parser/element/markdown_heading_spec.rb
132
+ - spec/parser/element/front_matter_spec.rb
133
+ - spec/parser/node_parser_spec.rb
134
+ - spec/support/model_builder.rb
135
+ - spec/spec_helper.rb
124
136
  - spec/engine/state_spec.rb
137
+ - spec/engine/predicate_evaluator_spec.rb
125
138
  - spec/engine/transition_spec.rb
126
- - spec/engine_spec.rb
139
+ - spec/fixtures/directory_input/scenarios/s1.txt
140
+ - spec/fixtures/directory_input/outcomes/o1.txt
141
+ - spec/fixtures/directory_input/questions/q1.txt
142
+ - spec/fixtures/directory_input/cover-sheet.txt
143
+ - spec/fixtures/acceptance/question-and-outcome/question-and-outcome.txt
144
+ - spec/fixtures/acceptance/question-and-outcome/outcomes/o1.txt
145
+ - spec/fixtures/acceptance/question-and-outcome/questions/q1.txt
127
146
  - spec/fixtures/acceptance/cover-sheet/cover-sheet.txt
128
147
  - spec/fixtures/acceptance/one-question/one-question.txt
129
148
  - spec/fixtures/acceptance/one-question/questions/q1.txt
130
- - spec/fixtures/acceptance/question-and-outcome/outcomes/o1.txt
131
- - spec/fixtures/acceptance/question-and-outcome/question-and-outcome.txt
132
- - spec/fixtures/acceptance/question-and-outcome/questions/q1.txt
133
- - spec/fixtures/directory_input/cover-sheet.txt
134
- - spec/fixtures/directory_input/outcomes/o1.txt
135
- - spec/fixtures/directory_input/questions/q1.txt
136
- - spec/fixtures/directory_input/scenarios/s1.txt
137
149
  - spec/fixtures/example.sd
138
- - spec/model/flow_spec.rb
139
- - spec/model/node_spec.rb
140
- - spec/parser/base_spec.rb
141
- - spec/parser/directory_input_spec.rb
142
- - spec/parser/element/front_matter_spec.rb
143
- - spec/parser/element/markdown_heading_spec.rb
144
- - spec/parser/element/markdown_paragraph_spec.rb
145
- - spec/parser/element/multiple_choice_question_spec.rb
146
- - spec/parser/element/start_button_parser_spec.rb
147
- - spec/parser/integration/cover_sheet_spec.rb
148
- - spec/parser/node_parser_spec.rb
149
- - spec/parser/predicates_spec.rb
150
- - spec/parser/rules_spec.rb
151
- - spec/spec_helper.rb
152
- - spec/support/model_builder.rb
153
150
  - spec/support_specs/model_builder_spec.rb
151
+ - spec/engine_spec.rb
152
+ - spec/model/node_spec.rb
153
+ - spec/model/flow_spec.rb
154
154
  homepage: https://github.com/alphagov/smartdown
155
155
  licenses:
156
156
  - MIT
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  segments:
168
168
  - 0
169
- hash: -12783946781873341
169
+ hash: -3653828789997533623
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  segments:
177
177
  - 0
178
- hash: -12783946781873341
178
+ hash: -3653828789997533623
179
179
  requirements: []
180
180
  rubyforge_project:
181
181
  rubygems_version: 1.8.23
@@ -185,34 +185,34 @@ summary: Interactive question-answer flows using markdown-like external DSL
185
185
  test_files:
186
186
  - spec/acceptance/parsing_spec.rb
187
187
  - spec/acceptance/smartdown_cli_spec.rb
188
- - spec/engine/predicate_evaluator_spec.rb
188
+ - spec/parser/directory_input_spec.rb
189
+ - spec/parser/integration/cover_sheet_spec.rb
190
+ - spec/parser/base_spec.rb
191
+ - spec/parser/rules_spec.rb
192
+ - spec/parser/predicates_spec.rb
193
+ - spec/parser/element/multiple_choice_question_spec.rb
194
+ - spec/parser/element/start_button_parser_spec.rb
195
+ - spec/parser/element/markdown_paragraph_spec.rb
196
+ - spec/parser/element/markdown_heading_spec.rb
197
+ - spec/parser/element/front_matter_spec.rb
198
+ - spec/parser/node_parser_spec.rb
199
+ - spec/support/model_builder.rb
200
+ - spec/spec_helper.rb
189
201
  - spec/engine/state_spec.rb
202
+ - spec/engine/predicate_evaluator_spec.rb
190
203
  - spec/engine/transition_spec.rb
191
- - spec/engine_spec.rb
204
+ - spec/fixtures/directory_input/scenarios/s1.txt
205
+ - spec/fixtures/directory_input/outcomes/o1.txt
206
+ - spec/fixtures/directory_input/questions/q1.txt
207
+ - spec/fixtures/directory_input/cover-sheet.txt
208
+ - spec/fixtures/acceptance/question-and-outcome/question-and-outcome.txt
209
+ - spec/fixtures/acceptance/question-and-outcome/outcomes/o1.txt
210
+ - spec/fixtures/acceptance/question-and-outcome/questions/q1.txt
192
211
  - spec/fixtures/acceptance/cover-sheet/cover-sheet.txt
193
212
  - spec/fixtures/acceptance/one-question/one-question.txt
194
213
  - spec/fixtures/acceptance/one-question/questions/q1.txt
195
- - spec/fixtures/acceptance/question-and-outcome/outcomes/o1.txt
196
- - spec/fixtures/acceptance/question-and-outcome/question-and-outcome.txt
197
- - spec/fixtures/acceptance/question-and-outcome/questions/q1.txt
198
- - spec/fixtures/directory_input/cover-sheet.txt
199
- - spec/fixtures/directory_input/outcomes/o1.txt
200
- - spec/fixtures/directory_input/questions/q1.txt
201
- - spec/fixtures/directory_input/scenarios/s1.txt
202
214
  - spec/fixtures/example.sd
203
- - spec/model/flow_spec.rb
204
- - spec/model/node_spec.rb
205
- - spec/parser/base_spec.rb
206
- - spec/parser/directory_input_spec.rb
207
- - spec/parser/element/front_matter_spec.rb
208
- - spec/parser/element/markdown_heading_spec.rb
209
- - spec/parser/element/markdown_paragraph_spec.rb
210
- - spec/parser/element/multiple_choice_question_spec.rb
211
- - spec/parser/element/start_button_parser_spec.rb
212
- - spec/parser/integration/cover_sheet_spec.rb
213
- - spec/parser/node_parser_spec.rb
214
- - spec/parser/predicates_spec.rb
215
- - spec/parser/rules_spec.rb
216
- - spec/spec_helper.rb
217
- - spec/support/model_builder.rb
218
215
  - spec/support_specs/model_builder_spec.rb
216
+ - spec/engine_spec.rb
217
+ - spec/model/node_spec.rb
218
+ - spec/model/flow_spec.rb