asker-tool 2.2.5 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -12
- data/bin/asker +2 -0
- data/lib/asker/application.rb +5 -0
- data/lib/asker/files/asker.ini +5 -0
- data/lib/asker/files/example-concept.haml +4 -4
- data/lib/asker/formatter/moodle/multichoice.erb +0 -1
- data/lib/asker/formatter/question_moodle_formatter.rb +5 -1
- data/lib/asker/version.rb +3 -3
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6e1e4948869d81d5583b6355bdb242c1897bb2baa69bbb1f03f66cd9e63b3f
|
4
|
+
data.tar.gz: baf45eb5659c7524680389a3f42731421d39453a36259a048fd6b2dda86b692b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00cceabe5b82f6832723fcfdbe7dce48a17132d83098ea3e52915429ee9ac0b86372dfd0543da2846ad981be9cf11f6fee105c1b2294467215a5cabcb121818a
|
7
|
+
data.tar.gz: a96b6a08ce66e00be13dfc6eab638e6325d488d671f943befbf7010ecb25aa098c3ae24b87cff6a260c65a5d257ef832bf5ec634d75c91e785b14c2e5f34df11
|
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/asker-tool.svg)](https://badge.fury.io/rb/asker-tool)
|
2
2
|
![GitHub](https://img.shields.io/github/license/dvarrui/asker)
|
3
|
-
![Gem](https://img.shields.io/gem/dv/asker-tool/2.2.4)
|
4
3
|
|
5
4
|
# ASKER
|
6
5
|
|
@@ -10,20 +9,22 @@ Generate a lot of questions from an _input_ text file with on your own _definiti
|
|
10
9
|
|
11
10
|
ASKER helps trainers to create a huge amount of questions, from a definitions (_conceptual entities_) input file.
|
12
11
|
|
13
|
-
* Free Software [LICENSE](
|
12
|
+
* Free Software [LICENSE](LICENSE).
|
14
13
|
* Multiplatform.
|
15
|
-
* Ruby program.
|
14
|
+
* [Ruby program](https://rubygems.org/gems/asker-tool)
|
16
15
|
|
17
16
|
## Installation
|
18
17
|
|
19
18
|
1. Install Ruby on your system.
|
20
|
-
2. `gem install asker-tool`
|
19
|
+
2. Install Asker on your system: `sudo gem install asker-tool`
|
20
|
+
|
21
|
+
> REMEMBER: To update Asker execute `sudo gem update asker-tool`
|
21
22
|
|
22
23
|
## Usage
|
23
24
|
|
24
25
|
Steps:
|
25
26
|
|
26
|
-
1. Create an input file with your
|
27
|
+
1. Create an input file with your inputs (_conceptual map_).
|
27
28
|
1. Run _asker_ and get the results into `output` directory.
|
28
29
|
|
29
30
|
Example: Running `asker` with our example input file as argument (`acdc.haml`):
|
@@ -34,16 +35,17 @@ asker docs/examples/bands/acdc.haml
|
|
34
35
|
|
35
36
|
* Output files created into the `output` folder.
|
36
37
|
* More [example input files](./docs/examples).
|
37
|
-
* More asker input files at
|
38
|
+
* More asker input files at [github/dvarrui/asker-inputs](https://github.com/dvarrui/asker-inputs) repository.
|
38
39
|
|
39
40
|
## Documentation
|
40
41
|
|
41
|
-
* [Installation](
|
42
|
-
* [
|
43
|
-
* [
|
44
|
-
* [
|
45
|
-
* [
|
46
|
-
* [
|
42
|
+
* [Installation](docs/install/README.md)
|
43
|
+
* [Videos](docs/videos.md)
|
44
|
+
* [Inputs](docs/inputs/README.md)
|
45
|
+
* [Usage](docs/usage.md)
|
46
|
+
* [Contributions](docs/contributions.md)
|
47
|
+
* [Problem to solve](docs/idea.md)
|
48
|
+
* [History](docs/history.md)
|
47
49
|
|
48
50
|
## Contact
|
49
51
|
|
data/bin/asker
CHANGED
data/lib/asker/application.rb
CHANGED
@@ -31,6 +31,11 @@ class Application
|
|
31
31
|
end
|
32
32
|
stages = @config['questions']['stages'].split(',')
|
33
33
|
@config['questions']['stages'] = stages.map(&:to_sym)
|
34
|
+
|
35
|
+
fractions = @config['questions']['fractions'].split(',')
|
36
|
+
@config['questions']['fractions'] = fractions + Array.new(5, '0')
|
37
|
+
# require 'debug'; binding.break
|
38
|
+
|
34
39
|
Rainbow.enabled = false
|
35
40
|
Rainbow.enabled = true if @config['global']['color'].downcase == 'yes'
|
36
41
|
end
|
data/lib/asker/files/asker.ini
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
%map{ :
|
1
|
+
%map{ lang: 'en', context: 'music, band', version: '1'}
|
2
2
|
|
3
3
|
%concept
|
4
4
|
%names AC/DC, ACDC
|
5
5
|
%tags rock, band, australia
|
6
6
|
%def Australian rock band formed by Scottish-born brothers Malcolm and Angus Young
|
7
|
-
%table{ :
|
7
|
+
%table{ fields: 'members'}
|
8
8
|
%row Bon Scott
|
9
9
|
%row Angus Young
|
10
10
|
%row Malcolm Young
|
11
11
|
%row Phil Rudd
|
12
12
|
%row Cliff Williams
|
13
|
-
%table{ :
|
13
|
+
%table{ fields: 'attribute, value'}
|
14
14
|
%row
|
15
15
|
%col Genres
|
16
16
|
%col Hard rock blues rock rock and roll
|
@@ -20,7 +20,7 @@
|
|
20
20
|
%row
|
21
21
|
%col Formed in
|
22
22
|
%col Sydney
|
23
|
-
%table{ :
|
23
|
+
%table{ fields: 'Albums', sequence: 'Albums sorted by date'}
|
24
24
|
%row Albums High Voltage
|
25
25
|
%row Powerage
|
26
26
|
%row Highway to Hell
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
|
3
3
|
require 'erb'
|
4
|
+
require_relative '../application'
|
4
5
|
|
5
6
|
# Transform Questions into Gift format
|
6
7
|
module QuestionMoodleFormatter
|
@@ -11,7 +12,10 @@ module QuestionMoodleFormatter
|
|
11
12
|
def self.to_s(question)
|
12
13
|
case question.type
|
13
14
|
when :choice
|
14
|
-
|
15
|
+
fractions = Application.instance.config['questions']['fractions']
|
16
|
+
# penalties = ['', '-50', '-33.33333', '-25', '-20']
|
17
|
+
penalties = fractions
|
18
|
+
|
15
19
|
penalty = penalties[question.bads.size]
|
16
20
|
template = File.read(File.join(File.dirname(__FILE__), 'moodle', 'multichoice.erb'))
|
17
21
|
when :boolean
|
data/lib/asker/version.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
2
|
# Global parameters
|
3
3
|
module Version
|
4
|
-
MAJOR_NUMBER = '2.
|
5
|
-
VERSION = "#{MAJOR_NUMBER}.
|
4
|
+
MAJOR_NUMBER = '2.3'
|
5
|
+
VERSION = "#{MAJOR_NUMBER}.2"
|
6
6
|
NAME = 'asker'
|
7
7
|
GEM = 'asker-tool'
|
8
8
|
CONFIGFILE = 'asker.ini'
|
9
|
-
HOMEPAGE = "https://github.com/teuton-software/#{NAME}
|
9
|
+
HOMEPAGE = "https://github.com/teuton-software/#{NAME}"
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asker-tool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Vargas Ruiz
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -266,11 +266,11 @@ files:
|
|
266
266
|
- lib/asker/logger.rb
|
267
267
|
- lib/asker/skeleton.rb
|
268
268
|
- lib/asker/version.rb
|
269
|
-
homepage: https://github.com/teuton-software/asker
|
269
|
+
homepage: https://github.com/teuton-software/asker
|
270
270
|
licenses:
|
271
271
|
- GPL-3.0
|
272
272
|
metadata: {}
|
273
|
-
post_install_message:
|
273
|
+
post_install_message:
|
274
274
|
rdoc_options: []
|
275
275
|
require_paths:
|
276
276
|
- lib
|
@@ -285,9 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
285
|
- !ruby/object:Gem::Version
|
286
286
|
version: '0'
|
287
287
|
requirements: []
|
288
|
-
|
289
|
-
|
290
|
-
signing_key:
|
288
|
+
rubygems_version: 3.3.3
|
289
|
+
signing_key:
|
291
290
|
specification_version: 4
|
292
291
|
summary: Asker generates questions from input definitions file.
|
293
292
|
test_files: []
|