TriviaMD 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trivia_md.rb +16 -1
  3. metadata +45 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01f6a69dcddc8b3180b7e01ebf2cf0514926f54d618aef0fcef1a402d1c77a78
4
- data.tar.gz: 70fb3d6f4d38affffb37fa86436396bd89d5a8700cb3e05bdbffa4fa7ed38c1a
3
+ metadata.gz: cb5c0aca381ec6eb42c430427f21bde8665dc0737d0d0f2aa319756706efa229
4
+ data.tar.gz: 0c7b644fdd2a304ed07c430485460e6b7ba86c5507fdf96627badc1c4517258c
5
5
  SHA512:
6
- metadata.gz: b03cbe0ae80a5a1cf8416385a41e291d000e75e2554f6977b2919329c288ba04d37121f489eed2d921f39470e56192ce49cb60e20523776a372cb13767349da7
7
- data.tar.gz: 49a26d6b87143c1abfa97b032f7b596025fc0b9688cc3d2999d960a8ab1d0f7f60a4e8af32bc983b1a9d9af7e1bf4da43406ca9a2b00e390339fedc7ab47aa6d
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,15 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TriviaMD
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
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-27 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-10-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.2.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: kramdown
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.4.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
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
13
55
  description: Parses markdown for trivia questions
14
56
  email: pjatacsuk@gmail.com
15
57
  executables: