asker-tool 2.3.1 → 2.3.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19f1b59f4c03c3860a9fee649625822e17d4a72e36a0e97e23094669a0a27f89
4
- data.tar.gz: 5f039c02f0af9573a780591ad3672dc0a88dd569f8321773b19606e5f7677100
3
+ metadata.gz: c928893a28d5c554456f150464435ee52fbef9cb7fd833684725ec8125eefae9
4
+ data.tar.gz: b3e48175853068804767ad312df8c795404dc8161e36bd9856581e912c9b9c2f
5
5
  SHA512:
6
- metadata.gz: 10a4be2178720682d5d9dddcce6d94ee0fa28deaed7f637bd4ed662d302ac8a5c3174ec6f16ac5cf5cc69c5e8eace73e7ae5ce7408d591af7ef4c0dccdf7542c
7
- data.tar.gz: 99b279f214b6ae3f9d3316e73958c30992727ff73e8f3082f4cb2c7b0ea225c139587dd6345442646e064389f76e29c3e687034aaf52063d2bd42060c095119c
6
+ metadata.gz: 4e30502bd72cd2a104655edce3d5263f1a1a710b859b3c3bde867bab9e48fac78f6ca8958798d9f05f22ddfacccf4700a22e1616953179c309a887c974efec10
7
+ data.tar.gz: 20264b770646e08cea9debdef442ec81cacdad4ff64b25725c3129234747f9dc58a30fcb8f5c17a38f207e003f0e61a9fae6eac33421f086871f1477f1ccc68d
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.5)
4
3
 
5
4
  # ASKER
6
5
 
@@ -17,11 +16,9 @@ ASKER helps trainers to create a huge amount of questions, from a definitions (_
17
16
  ## Installation
18
17
 
19
18
  1. Install Ruby on your system.
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.
19
+ 2. Install Asker on your system: `sudo gem install asker-tool`
23
20
 
24
- > To update Asker we do `sudo gem update asker-tool`
21
+ > REMEMBER: To update Asker execute `sudo gem update asker-tool`
25
22
 
26
23
  ## Usage
27
24
 
@@ -1,4 +1,3 @@
1
- # frozen_string_literal: true
2
1
 
3
2
  require_relative 'stage_d'
4
3
  require_relative 'stage_b'
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  require 'set'
4
2
 
5
3
  require_relative 'base_stage'
@@ -31,8 +29,6 @@ class StageB < BaseStage
31
29
 
32
30
  questions
33
31
  end
34
- # rubocop:enable Metrics/AbcSize
35
- # rubocop:enable Metrics/MethodLength
36
32
 
37
33
  ##
38
34
  # Process table data to generate match questions
@@ -61,19 +57,43 @@ class StageB < BaseStage
61
57
  q.matching << [e[1][:data][index1], e[1][:data][index2]]
62
58
  q.matching << [e[2][:data][index1], e[2][:data][index2]]
63
59
  q.matching << [e[3][:data][index1], e[3][:data][index2]]
64
- # Add an extra line
60
+ questions << q
61
+
65
62
  if list2.count.positive?
63
+ # Add an extra line
64
+ e.shuffle!
65
+ q = Question.new(:match)
66
+ q.name = "#{name}-#{num}-b1match4x5-#{p_table.name}"
67
+ q.tags << 'match'
68
+ q.tags << 'random'
69
+ q.text = random_image_for(name) \
70
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
71
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
72
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
73
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
74
+ q.matching << [e[3][:data][index1], e[3][:data][index2]]
66
75
  q.matching << ['', list2[0][:data][index2]]
76
+ questions << q
67
77
  else
68
- q.tags << 'misspell'
78
+ e.shuffle!
79
+ q = Question.new(:match)
80
+ q.name = "#{name}-#{num}-b1match4x5_1misspelled-#{p_table.name}"
81
+ q.tags << 'match'
82
+ q.tags << 'random'
83
+ q.text = random_image_for(name) \
84
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
85
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
86
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
87
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
88
+ q.matching << [e[3][:data][index1], e[3][:data][index2]]
69
89
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
90
+ questions << q
70
91
  end
71
- questions << q
72
92
 
73
93
  # Question type <b1match>: match 3 items from table-A and 1 item with error
74
94
  e.shuffle!
75
95
  q = Question.new(:match)
76
- q.name = "#{name}-#{num}-b1match3x1misspelled-#{p_table.name}"
96
+ q.name = "#{name}-#{num}-b1match4x4_1misspelled-#{p_table.name}"
77
97
  q.tags << 'match'
78
98
  q.tags << 'random'
79
99
  q.text = random_image_for(name) \
@@ -82,14 +102,40 @@ class StageB < BaseStage
82
102
  q.matching << [e[1][:data][index1], e[1][:data][index2]]
83
103
  q.matching << [e[2][:data][index1], e[2][:data][index2]]
84
104
  q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
85
- # Add an extra line
105
+ questions << q
106
+
86
107
  if list2.count.positive?
108
+ # Add an extra line error
109
+ e.shuffle!
110
+ q = Question.new(:match)
111
+ q.name = "#{name}-#{num}-b1match4x5_1misspelled_1error-#{p_table.name}"
112
+ q.tags << 'match'
113
+ q.tags << 'random'
114
+ q.text = random_image_for(name) \
115
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
116
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
117
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
118
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
119
+ q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
87
120
  q.matching << ['', list2[0][:data][index2]]
121
+ questions << q
88
122
  else
89
- q.tags << 'misspell'
123
+ # Add an extra line misspelled
124
+ e.shuffle!
125
+ q = Question.new(:match)
126
+ q.name = "#{name}-#{num}-b1match4x5_2misspelled-#{p_table.name}"
127
+ q.tags << 'match'
128
+ q.tags << 'random'
129
+ q.tags << 'misspelled'
130
+ q.text = random_image_for(name) \
131
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
132
+ q.matching << [e[0][:data][index1], e[0][:data][index2]]
133
+ q.matching << [e[1][:data][index1], e[1][:data][index2]]
134
+ q.matching << [e[2][:data][index1], e[2][:data][index2]]
135
+ q.matching << [lang.do_mistake_to(e[3][:data][index1]), lang.text_for(:misspelling)]
90
136
  q.matching << ['', lang.do_mistake_to(e[0][:data][index2])]
137
+ questions << q
91
138
  end
92
- questions << q
93
139
  end
94
140
  end
95
141
 
@@ -103,7 +149,19 @@ class StageB < BaseStage
103
149
  # Question 3 items from table-A, and 1 item from table-B
104
150
  if s.count > 3
105
151
  q = Question.new(:match)
106
- q.name = "#{name}-#{num}-b1match3x1-#{p_table.name}"
152
+ q.name = "#{name}-#{num}-b1match4x4_1error-#{p_table.name}"
153
+ q.tags << 'match'
154
+ q.tags << 'random'
155
+ q.text = random_image_for(name) \
156
+ + lang.text_for(:b1, name, p_table.fields[index1].capitalize, p_table.fields[index2].capitalize)
157
+ q.matching << [list1[0][:data][index1], list1[0][:data][index2]]
158
+ q.matching << [list1[1][:data][index1], list1[1][:data][index2]]
159
+ q.matching << [list1[2][:data][index1], list1[2][:data][index2]]
160
+ q.matching << [list2[0][:data][index1], lang.text_for(:error)]
161
+ questions << q
162
+
163
+ q = Question.new(:match)
164
+ q.name = "#{name}-#{num}-b1match4x5_1error_1misspelled-#{p_table.name}"
107
165
  q.tags << 'match'
108
166
  q.tags << 'random'
109
167
  q.text = random_image_for(name) \
@@ -119,10 +177,4 @@ class StageB < BaseStage
119
177
 
120
178
  questions
121
179
  end
122
- # rubocop:enable Metrics/AbcSize
123
- # rubocop:enable Metrics/MethodLength
124
- # rubocop:enable Metrics/CyclomaticComplexity
125
- # rubocop:enable Style/ConditionalAssignment
126
- # rubocop:enable Metrics/BlockLength
127
- # rubocop:enable Metrics/PerceivedComplexity
128
180
  end
@@ -1,16 +1,16 @@
1
- %map{ :lang => 'en', :context => 'music, band', :version => '1'}
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{ :fields => 'members'}
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{ :fields => 'attribute, value'}
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{ :fields => 'Albums', :sequence => 'Albums sorted by date'}
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
data/lib/asker/version.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  # Global parameters
3
3
  module Version
4
4
  MAJOR_NUMBER = '2.3'
5
- VERSION = "#{MAJOR_NUMBER}.1"
5
+ VERSION = "#{MAJOR_NUMBER}.4"
6
6
  NAME = 'asker'
7
7
  GEM = 'asker-tool'
8
8
  CONFIGFILE = 'asker.ini'
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.3.1
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-15 00:00:00.000000000 Z
11
+ date: 2022-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml
@@ -108,48 +108,6 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.20'
111
- - !ruby/object:Gem::Dependency
112
- name: minitest
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '5.11'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '5.11'
125
- - !ruby/object:Gem::Dependency
126
- name: pry-byebug
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '3.9'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '3.9'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.74'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.74'
153
111
  description: ASKER helps trainers to create a huge amount of questions, from a definitions
154
112
  input file.
155
113
  email: teuton.software@protonmail.com