TriviaMD 0.0.5 → 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 +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4decefc0ad8c624d1a8cd9c2e64fe8bed95c73f6b3bc732217e678ee50a5e187
4
- data.tar.gz: dae5d76921d87059d79784aac66d4e86c5cb6e5493d64451f4851c9640482cca
3
+ metadata.gz: cb5c0aca381ec6eb42c430427f21bde8665dc0737d0d0f2aa319756706efa229
4
+ data.tar.gz: 0c7b644fdd2a304ed07c430485460e6b7ba86c5507fdf96627badc1c4517258c
5
5
  SHA512:
6
- metadata.gz: 582519c2f40f4e5c464440ca70d55ee911cb99fbddf207a240232e31bb4184fb83639f8de2129a1209ef07626d395f0ac4d869814ad309b85dbb633228fd4b7c
7
- data.tar.gz: 88a8c9e4bc94db3a3e5bdbd72b5be7c82b5bbb8eeb5d335f634a8d7b2f168cb0b3dc6e35504ceb0f8fdeda26c61a3afd695697e8f413685c4e9cf3be94b32aa7
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.5
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
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: