TriviaMD 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trivia_md.rb +16 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb5c0aca381ec6eb42c430427f21bde8665dc0737d0d0f2aa319756706efa229
|
4
|
+
data.tar.gz: 0c7b644fdd2a304ed07c430485460e6b7ba86c5507fdf96627badc1c4517258c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf80c938e5921e87a6a0eb93e8d1ab94dbec0c86b3f84b692bbfef99bc6830eb13b80b588593988aee6d3876f72de22419ff471d2357f40f8535d02f79966818
|
7
|
+
data.tar.gz: 11c6b2b5c8a523321ae0a108804272adff924a280793e81e92e0526ce82d2bd6d2dea92a7b890827beae891061d61c1e8f6018479e56217f4d7f19cc89ed05ee
|
data/lib/trivia_md.rb
CHANGED
@@ -2,8 +2,10 @@
|
|
2
2
|
require "rubygems" # ruby1.9 doesn't "require" it though
|
3
3
|
require 'thor'
|
4
4
|
require 'kramdown'
|
5
|
-
require_relative './trivia_parser'
|
6
5
|
require 'json'
|
6
|
+
require_relative './trivia_parser'
|
7
|
+
require_relative './quizzes_v1'
|
8
|
+
|
7
9
|
|
8
10
|
class SubCommandBase < Thor
|
9
11
|
def self.banner(command, namespace = nil, subcommand = false)
|
@@ -26,9 +28,22 @@ module App
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
31
|
+
class Quizzes < SubCommandBase
|
32
|
+
include Thor::Actions
|
33
|
+
|
34
|
+
desc "create", 'create quiz from trivias'
|
35
|
+
option :trivias
|
36
|
+
def create_from_trivia(trivias)
|
37
|
+
QuizzesV1.new(ENV.fetch("COURSE_ID")).create_from_trivia(trivias)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
29
41
|
class CLI < Thor
|
30
42
|
desc "trivia", "parse trivias"
|
31
43
|
subcommand "trivia", Trivia
|
44
|
+
|
45
|
+
desc "quizzes", "create quizzes"
|
46
|
+
subcommand "quizzes", Quizzes
|
32
47
|
end
|
33
48
|
end
|
34
49
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: TriviaMD
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bence Pjatacsuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: httparty
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.20.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.20.0
|
41
55
|
description: Parses markdown for trivia questions
|
42
56
|
email: pjatacsuk@gmail.com
|
43
57
|
executables:
|