asker-tool 2.2.5 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -12
- data/bin/asker +2 -0
- data/lib/asker/application.rb +4 -0
- data/lib/asker/files/asker.ini +4 -0
- data/lib/asker/formatter/question_moodle_formatter.rb +4 -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: 426d13cb48d1dc13c0363945a5e22a4e3228983e616f3f4e2f56a3e2bab9dd53
|
4
|
+
data.tar.gz: b39f0e3e55643503d40de9f965e09f32a7ee612f6adc6a306b02d25779c5d904
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 224bdd9d8ee79ce875375165d55a761b27d532be298bf593c71f43957caf26fb25d8a8f89fb5aea164538017c4f071c36d0d763784f706dc577de73b1cd3938e
|
7
|
+
data.tar.gz: 8328b35acbd8962726a8f5ff5104f22e08b884b5de002aeba01654609bbeaa9901d6fc10aff5bca1bc49970ea43b65b8df1e9b4e7d7c6e3d6a8f65fce935fc41
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
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.
|
3
|
+
![Gem](https://img.shields.io/gem/dv/asker-tool/2.2.5)
|
4
4
|
|
5
5
|
# ASKER
|
6
6
|
|
@@ -10,20 +10,24 @@ Generate a lot of questions from an _input_ text file with on your own _definiti
|
|
10
10
|
|
11
11
|
ASKER helps trainers to create a huge amount of questions, from a definitions (_conceptual entities_) input file.
|
12
12
|
|
13
|
-
* Free Software [LICENSE](
|
13
|
+
* Free Software [LICENSE](LICENSE).
|
14
14
|
* Multiplatform.
|
15
|
-
* Ruby program.
|
15
|
+
* [Ruby program](https://rubygems.org/gems/asker-tool)
|
16
16
|
|
17
17
|
## Installation
|
18
18
|
|
19
19
|
1. Install Ruby on your system.
|
20
|
-
2.
|
20
|
+
2. Install Asker on your system. Two ways:
|
21
|
+
* (a) `sudo gem install asker-tool` as superuser (root) or
|
22
|
+
* (b) `gem install --user-install asker-tool` as regular user.
|
23
|
+
|
24
|
+
> To update Asker we do `sudo gem update asker-tool`
|
21
25
|
|
22
26
|
## Usage
|
23
27
|
|
24
28
|
Steps:
|
25
29
|
|
26
|
-
1. Create an input file with your
|
30
|
+
1. Create an input file with your inputs (_conceptual map_).
|
27
31
|
1. Run _asker_ and get the results into `output` directory.
|
28
32
|
|
29
33
|
Example: Running `asker` with our example input file as argument (`acdc.haml`):
|
@@ -34,16 +38,17 @@ asker docs/examples/bands/acdc.haml
|
|
34
38
|
|
35
39
|
* Output files created into the `output` folder.
|
36
40
|
* More [example input files](./docs/examples).
|
37
|
-
* More asker input files at
|
41
|
+
* More asker input files at [github/dvarrui/asker-inputs](https://github.com/dvarrui/asker-inputs) repository.
|
38
42
|
|
39
43
|
## Documentation
|
40
44
|
|
41
|
-
* [Installation](
|
42
|
-
* [
|
43
|
-
* [
|
44
|
-
* [
|
45
|
-
* [
|
46
|
-
* [
|
45
|
+
* [Installation](docs/install/README.md)
|
46
|
+
* [Videos](docs/videos.md)
|
47
|
+
* [Inputs](docs/inputs/README.md)
|
48
|
+
* [Usage](docs/usage.md)
|
49
|
+
* [Contributions](docs/contributions.md)
|
50
|
+
* [Problem to solve](docs/idea.md)
|
51
|
+
* [History](docs/history.md)
|
47
52
|
|
48
53
|
## Contact
|
49
54
|
|
data/bin/asker
CHANGED
data/lib/asker/application.rb
CHANGED
@@ -31,6 +31,10 @@ 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
|
37
|
+
|
34
38
|
Rainbow.enabled = false
|
35
39
|
Rainbow.enabled = true if @config['global']['color'].downcase == 'yes'
|
36
40
|
end
|
data/lib/asker/files/asker.ini
CHANGED
@@ -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,9 @@ 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
|
15
18
|
penalty = penalties[question.bads.size]
|
16
19
|
template = File.read(File.join(File.dirname(__FILE__), 'moodle', 'multichoice.erb'))
|
17
20
|
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}.0"
|
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.
|
4
|
+
version: 2.3.0
|
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-15 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: []
|