battleroom 0.0.76 → 0.0.77
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 +7 -0
- data/lib/battleroom/battleroom_machinery.rb +1 -0
- data/lib/battleroom/data/array_questions.rb +6 -4
- data/lib/battleroom/data/hash_questions.rb +0 -5
- data/lib/battleroom/data/variable_assignment_questions.rb +3 -1
- data/lib/battleroom/data_generation_machinery.rb +0 -23
- data/lib/battleroom/models/array_assignment_question.rb +1 -3
- data/lib/battleroom/models/data_structure_access_question.rb +3 -3
- data/lib/battleroom/models/data_structure_assignment_question.rb +22 -15
- data/lib/battleroom/models/hash_assignment_question.rb +1 -3
- data/lib/battleroom/models/method_definition_question.rb +106 -0
- data/lib/battleroom/models/question.rb +52 -34
- data/lib/battleroom/models/variable_question.rb +3 -3
- data/lib/battleroom.rb +24 -13
- metadata +49 -30
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 78134191850d5bf42304b7497bd5527c58cfd809
|
4
|
+
data.tar.gz: be9f91bfce496f06f2888eab9f8ef334df47a78f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5074ee39cc786d5cddbd6c2503df1069dba6dfb22305b1b9ca7e66750ed7952ed1475edeb080adbaf7b3d9fd7a343620fab06f7f69fa52587901a346674ba07b
|
7
|
+
data.tar.gz: 05eda85829dbadd7996fc6f93d44fd175fcd5f2e9f83b9fd8356c8f727373f0edf0961c3296bbdbcd8612821cc3bf1aa04b3bf6f35352f1e564529d439e0cfb4
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require_relative '../data_generation_machinery'
|
2
|
+
include DataGenerationMachinery
|
3
|
+
|
1
4
|
$random_names_array = gen_random_names_array
|
2
5
|
|
3
6
|
ARRAY_QUESTIONS = [
|
@@ -30,8 +33,7 @@ ARRAY_QUESTIONS = [
|
|
30
33
|
possible_variable_names: [
|
31
34
|
'sci_fi_books',
|
32
35
|
'sci_fi_novels',
|
33
|
-
'
|
34
|
-
'science_fiction_titles',
|
36
|
+
'sci_fi_titles',
|
35
37
|
'books',
|
36
38
|
'paperback_titles',
|
37
39
|
].shuffle,
|
@@ -57,8 +59,8 @@ ARRAY_QUESTIONS = [
|
|
57
59
|
'fav_nums',
|
58
60
|
'lotto_nums',
|
59
61
|
'ages_of_children',
|
60
|
-
'
|
61
|
-
'
|
62
|
+
'fav_ages',
|
63
|
+
'jersey_numbers',
|
62
64
|
'lucky_numbers',
|
63
65
|
'unlucky_numbers'
|
64
66
|
].shuffle,
|
@@ -28,29 +28,6 @@ module DataGenerationMachinery
|
|
28
28
|
possible_chars.shuffle[0, rand(6..8)].join
|
29
29
|
end
|
30
30
|
|
31
|
-
def gen_app
|
32
|
-
|
33
|
-
author_or_creator = [:author, :creator].sample
|
34
|
-
release_or_stable_release = [:release, :stable_release].sample
|
35
|
-
name_or_title = [:name, :title, :app_name].sample
|
36
|
-
name = Faker::App.name
|
37
|
-
app = {
|
38
|
-
version: Faker::App.version,
|
39
|
-
author_or_creator => Faker::App.author,
|
40
|
-
name_or_title => name,
|
41
|
-
release_or_stable_release => rand(2004..2014),
|
42
|
-
open_source: [true, false].sample
|
43
|
-
}
|
44
|
-
data = {
|
45
|
-
data_structure: app,
|
46
|
-
possible_variable_names: [
|
47
|
-
snake_case(name),
|
48
|
-
'app',
|
49
|
-
'application'
|
50
|
-
].shuffle
|
51
|
-
}
|
52
|
-
end
|
53
|
-
|
54
31
|
def gen_user
|
55
32
|
password_or_pw = [:password, :pw].sample
|
56
33
|
admin_or_is_admin = [:admin, :is_admin].sample
|
@@ -43,9 +43,7 @@ class ArrayAssignmentQuestion < DataStructureAssignmentQuestion
|
|
43
43
|
else
|
44
44
|
puts "Use an array method to add the #{assignment_value_class} value ".blue + "#{formatted_assignment_value}".yellow + " to the ".blue + "end".blue.underline + " of the Array below.\n".blue
|
45
45
|
end
|
46
|
-
|
47
|
-
ap(data_structure, { indent: -2, index: false, multiline: true, plain: true })
|
48
|
-
puts ''
|
46
|
+
print_data_structure
|
49
47
|
end
|
50
48
|
|
51
49
|
def handle_replacement_of_array_value_input(user_input)
|
@@ -20,13 +20,13 @@ class DataStructureAccessQuestion < DataStructureQuestion
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def evaluate_data_structure_access_input
|
23
|
-
enter_evaluation_loop do |
|
23
|
+
enter_evaluation_loop do |user_submission|
|
24
24
|
begin
|
25
25
|
# provides the evaluation scope with variable assignment necessary for answer eval
|
26
26
|
evaluation_scope.eval("#{variable_name} = #{data_structure.to_s}")
|
27
|
-
if evaluation_scope.eval(
|
27
|
+
if evaluation_scope.eval(user_submission) == answer_value && user_submission.include?(variable_name)
|
28
28
|
# this last returned value of 'true' within the block is vital;
|
29
|
-
# within the
|
29
|
+
# within the evaluation_loop method, the return value of yield is used
|
30
30
|
true
|
31
31
|
else
|
32
32
|
puts "Remember, #{hint} Try again.\n".red
|
@@ -7,23 +7,30 @@ class DataStructureAssignmentQuestion < DataStructureQuestion
|
|
7
7
|
:value_to_replace_formatted, :replacement_index,
|
8
8
|
:replacement_value_class_formatted
|
9
9
|
|
10
|
+
POSSIBLE_INTRO_CONGRATULATIONS = [
|
11
|
+
'Brilliant',
|
12
|
+
'Wonderful',
|
13
|
+
'Jackpot',
|
14
|
+
'Impressive work',
|
15
|
+
'Bang-up job',
|
16
|
+
'Dynamite',
|
17
|
+
'Premier work',
|
18
|
+
'Quality work',
|
19
|
+
'Terrific'
|
20
|
+
]
|
21
|
+
|
10
22
|
def initialize(eval_scope)
|
11
23
|
super(eval_scope)
|
12
24
|
end
|
13
25
|
|
26
|
+
def print_data_structure
|
27
|
+
print "#{variable_name} = ".green
|
28
|
+
ap(data_structure, { indent: -2, index: false, multiline: true, plain: true })
|
29
|
+
puts ''
|
30
|
+
end
|
31
|
+
|
14
32
|
def print_resulting_data_structure
|
15
|
-
|
16
|
-
'Brilliant',
|
17
|
-
'Wonderful',
|
18
|
-
'Jackpot',
|
19
|
-
'Impressive work',
|
20
|
-
'Bang-up job',
|
21
|
-
'Dynamite',
|
22
|
-
'Premier work',
|
23
|
-
'Quality work',
|
24
|
-
'Terrific'
|
25
|
-
]
|
26
|
-
intro_congrat = possible_intro_congratulations.sample
|
33
|
+
intro_congrat = POSSIBLE_INTRO_CONGRATULATIONS.sample
|
27
34
|
puts "\n#{intro_congrat}. Here's the resulting data structure:\n".green
|
28
35
|
sleep 1.0
|
29
36
|
resulting_data_structure = evaluation_scope.eval(variable_name)
|
@@ -33,12 +40,12 @@ class DataStructureAssignmentQuestion < DataStructureQuestion
|
|
33
40
|
end
|
34
41
|
|
35
42
|
def evaluate_data_structure_assignment_input
|
36
|
-
enter_evaluation_loop do |
|
43
|
+
enter_evaluation_loop do |user_submission|
|
37
44
|
begin
|
38
45
|
# provides the evaluation scope with variable assignment necessary for answer eval
|
39
46
|
evaluation_scope.eval("#{variable_name} = #{data_structure.to_s}")
|
40
|
-
evaluation_scope.eval(
|
41
|
-
evaluate_user_input(
|
47
|
+
evaluation_scope.eval(user_submission)
|
48
|
+
evaluate_user_input(user_submission)
|
42
49
|
rescue NoMethodError, NameError => e
|
43
50
|
print_colorized_error_prompt(e)
|
44
51
|
rescue TypeError => e
|
@@ -21,9 +21,7 @@ class HashAssignmentQuestion < DataStructureAssignmentQuestion
|
|
21
21
|
|
22
22
|
def print_data_structure_assignment_prompt
|
23
23
|
puts 'Given the Hash below, add a key of '.blue + assignment_key.yellow + " that points to the #{assignment_value_class} value of ".blue + "#{formatted_assignment_value}".yellow + ".\n\n"
|
24
|
-
|
25
|
-
ap(data_structure, { indent: -2, index: false, multiline: true, plain: true })
|
26
|
-
puts ''
|
24
|
+
print_data_structure
|
27
25
|
end
|
28
26
|
|
29
27
|
def evaluate_user_input(user_input)
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require_relative '../data/method_questions'
|
2
|
+
require_relative './question'
|
3
|
+
|
4
|
+
class MethodDefinitionQuestion < Question
|
5
|
+
|
6
|
+
attr_accessor :method_name, :arg_count, :spec, :eval_string, :eval_answer,
|
7
|
+
:return_value
|
8
|
+
|
9
|
+
@questions = METHOD_QUESTONS.shuffle
|
10
|
+
|
11
|
+
def initialize(scope)
|
12
|
+
super(scope)
|
13
|
+
@method_name = data[:method_name]
|
14
|
+
@arg_count = data[:arg_count]
|
15
|
+
@spec = data[:spec]
|
16
|
+
@eval_string = data[:eval_string]
|
17
|
+
@eval_answer = data[:eval_answer]
|
18
|
+
@input_mechanism = 'pry'
|
19
|
+
end
|
20
|
+
|
21
|
+
def print_prompt
|
22
|
+
puts [
|
23
|
+
'Define a method called '.blue,
|
24
|
+
method_name.yellow,
|
25
|
+
' that takes '.blue,
|
26
|
+
arg_count.to_s.yellow,
|
27
|
+
' argument(s) and '.blue,
|
28
|
+
spec.blue,
|
29
|
+
].join + "\n\n"
|
30
|
+
end
|
31
|
+
|
32
|
+
def handle_name_error_exceptions(error, user_submission)
|
33
|
+
if user_submission.include?('def') == false
|
34
|
+
print_no_method_error_prompt
|
35
|
+
else
|
36
|
+
print_colorized_error_prompt(error)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def handle_incorrect_method_definition(return_value)
|
41
|
+
puts 'When calling '.red + eval_string + ", your method returned #{return_value || 'nil'}. It should have returned #{eval_answer}. Try again.\n".red
|
42
|
+
end
|
43
|
+
|
44
|
+
def print_puts_explanation
|
45
|
+
puts 'The last line of your method definition uses Ruby\'s "puts" method. The "puts" method is helpful for logging errors and statuses to the console, but its actual '.red + "return".red.underline + " value is always nil, and thus your method returns nil. Try again, this time without using \"puts\".\n".red
|
46
|
+
end
|
47
|
+
|
48
|
+
def print_no_method_error_prompt
|
49
|
+
puts "\nYou just trigged a common Ruby error that reads: \n".red
|
50
|
+
puts "\tundefined method \'WHATEVER_METHOD_YOU_TRIED_TO_INVOKE\'\n".green
|
51
|
+
puts "Basically, you tried to use a method before you defined it, and Ruby said, \"You haven't told me how to do that yet.\" To let Ruby know that you're defining a method, you'll use the the \"def\" keyword, and end your method definition with the \"end\" keyword.\n".red
|
52
|
+
end
|
53
|
+
|
54
|
+
def fresh_binding
|
55
|
+
binding
|
56
|
+
end
|
57
|
+
|
58
|
+
def print_wrong_method_error(error, user_submission)
|
59
|
+
definition_pattern = Regexp.new("def\s*#{method_name}")
|
60
|
+
if user_submission.match(definition_pattern)
|
61
|
+
handle_incorrect_method_definition(user_submission)
|
62
|
+
else
|
63
|
+
puts "\nYou defined the wrong method, probably as the result of a mispelling. Try again.\n".red
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def print_argument_error_prompt(e)
|
68
|
+
e.message.match(/wrong number of arguments \((\d) for (\d)\)/)
|
69
|
+
passed_arg_count = $1.to_i
|
70
|
+
expected_arg_count = $2.to_i
|
71
|
+
puts "Looks like you defined #{method_name} to take #{expected_arg_count} argument(s), when it should take #{arg_count}. Try again.\n".red
|
72
|
+
end
|
73
|
+
|
74
|
+
def clean_eval_scope_of_method_definition
|
75
|
+
if evaluation_scope.eval "respond_to?(:#{method_name}, true)"
|
76
|
+
evaluation_scope.eval 'Object.class_eval("remove_method :' + method_name + '")'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def evaluate_method_definition_input
|
81
|
+
enter_evaluation_loop do |user_submission|
|
82
|
+
begin
|
83
|
+
clean_eval_scope_of_method_definition
|
84
|
+
# I want to make sure that the user's method isn't invoked if it uses the puts method
|
85
|
+
if user_submission.include?('puts')
|
86
|
+
print_puts_explanation
|
87
|
+
else
|
88
|
+
evaluation_scope.eval(user_submission)
|
89
|
+
return_value = evaluation_scope.eval(eval_string)
|
90
|
+
if (return_value == eval_answer)
|
91
|
+
true
|
92
|
+
else
|
93
|
+
handle_incorrect_method_definition(return_value)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
rescue ArgumentError => e
|
97
|
+
print_argument_error_prompt(e)
|
98
|
+
rescue NoMethodError => e
|
99
|
+
print_wrong_method_error(e, user_submission)
|
100
|
+
rescue NameError => e
|
101
|
+
handle_name_error_exceptions(e, user_submission)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
@@ -1,44 +1,62 @@
|
|
1
1
|
class Question
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
attr_reader :data
|
3
|
+
attr_accessor :variable_name, :variable_value, :data_structure,
|
4
|
+
:data_structure_class, :answer_value, :explanation,
|
5
|
+
:evaluation_scope, :input_mechanism
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
def initialize(evaluation_scope)
|
8
|
+
@evaluation_scope = evaluation_scope
|
9
|
+
@data = self.class.generate_question
|
10
|
+
@variable_name = rotate_array(data[:possible_variable_names] || []).first
|
11
|
+
@input_mechanism = 'readline'
|
12
|
+
end
|
13
|
+
|
14
|
+
# retrieves question from front of the array and rotates it to the back
|
15
|
+
# to avoid immediate re-sampling of questions
|
16
|
+
def self.generate_question
|
17
|
+
# calls upon *class instance* variable assigned in the subclasses
|
18
|
+
question = @questions.shift
|
19
|
+
@questions.push(question)
|
20
|
+
question
|
21
|
+
end
|
22
|
+
|
23
|
+
def congratulation_sequence(duration)
|
24
|
+
print_congratulation
|
25
|
+
sleep(duration)
|
26
|
+
clear_display
|
27
|
+
end
|
28
|
+
|
29
|
+
def handle_syntax_error_exceptions(error)
|
30
|
+
if error.message.match /unexpected end-of-input/
|
31
|
+
print_unexpected_end_of_input_explanation
|
32
|
+
elsif error.message.include?('unterminated string meets end of file')
|
33
|
+
puts 'Blurg! You neglected to provide closing quotes for your string. Try again!'.red
|
11
34
|
end
|
35
|
+
end
|
12
36
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
question
|
37
|
+
def get_input
|
38
|
+
if input_mechanism == 'readline'
|
39
|
+
Readline.readline('> '.blue, true)
|
40
|
+
else
|
41
|
+
Pry.start_without_pry_debugger(evaluation_scope)
|
42
|
+
$input
|
20
43
|
end
|
44
|
+
end
|
21
45
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
clear_display
|
32
|
-
answered_correctly = true
|
33
|
-
end
|
34
|
-
rescue SyntaxError => e
|
35
|
-
if e.message.match /unexpected end-of-input/
|
36
|
-
print_unexpected_end_of_input_explanation
|
37
|
-
elsif e.message.include?('unterminated string meets end of file')
|
38
|
-
puts 'Blurg! You neglected to provide closing quotes for your string. Try again!'.red
|
39
|
-
end
|
46
|
+
def enter_evaluation_loop(&block)
|
47
|
+
answered_correctly = false
|
48
|
+
until answered_correctly
|
49
|
+
begin
|
50
|
+
user_input = get_input
|
51
|
+
abort('Goodbye!'.green) if user_input.match(/^(q|exit|!!!\s?)\z/i)
|
52
|
+
if !naughty_input?(user_input) && yield(user_input)
|
53
|
+
congratulation_sequence(1.6)
|
54
|
+
answered_correctly = true
|
40
55
|
end
|
56
|
+
rescue SyntaxError => e
|
57
|
+
handle_syntax_error_exceptions(e)
|
41
58
|
end
|
42
59
|
end
|
60
|
+
end
|
43
61
|
|
44
|
-
|
62
|
+
end # Question
|
@@ -39,9 +39,9 @@ class VariableQuestion < Question
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def evaluate_variable_assignment_input
|
42
|
-
enter_evaluation_loop do |
|
42
|
+
enter_evaluation_loop do |user_submission|
|
43
43
|
begin
|
44
|
-
evaluation_scope.eval(
|
44
|
+
evaluation_scope.eval(user_submission)
|
45
45
|
if evaluation_scope.eval("#{variable_name} == #{formatted_value}")
|
46
46
|
# this last returned value of 'true' is vital;
|
47
47
|
# the return value of yield is used in a conditional
|
@@ -50,7 +50,7 @@ class VariableQuestion < Question
|
|
50
50
|
puts "You mis-assigned #{variable_name}. Try again!".red
|
51
51
|
end
|
52
52
|
rescue NameError => e
|
53
|
-
reveal_name_error_follies_to_user(
|
53
|
+
reveal_name_error_follies_to_user(user_submission)
|
54
54
|
rescue Exception => e
|
55
55
|
if e.message.match(/unterminated string/)
|
56
56
|
puts 'Blurg! You neglected to provide closing quotes for your string. Try again!'.red
|
data/lib/battleroom.rb
CHANGED
@@ -3,22 +3,14 @@
|
|
3
3
|
require 'readline'
|
4
4
|
require 'faker'
|
5
5
|
require 'awesome_print'
|
6
|
-
|
6
|
+
require 'pry'
|
7
7
|
require 'colorize'
|
8
|
-
|
9
|
-
I18n.config.enforce_available_locales = false
|
8
|
+
require 'coderay'
|
10
9
|
|
11
|
-
|
12
|
-
# path = File.expand_path("./battleroom/models/*.rb", File.dirname(__FILE__))
|
13
|
-
# Dir[path].each { |file| require file }
|
10
|
+
require_relative './battleroom/config/pry_config'
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
require_relative './battleroom/models/hash_access_question'
|
18
|
-
require_relative './battleroom/models/hash_assignment_question'
|
19
|
-
require_relative './battleroom/models/array_access_question'
|
20
|
-
require_relative './battleroom/models/array_assignment_question'
|
21
|
-
require_relative './battleroom/models/variable_question'
|
12
|
+
path = File.expand_path("./battleroom/models/*.rb", File.dirname(__FILE__))
|
13
|
+
Dir[path].each { |file| require file }
|
22
14
|
|
23
15
|
require_relative 'battleroom/battleroom_machinery'
|
24
16
|
include BattleroomMachinery
|
@@ -60,6 +52,25 @@ loop do
|
|
60
52
|
q.print_data_structure_access_prompt
|
61
53
|
q.evaluate_data_structure_access_input
|
62
54
|
end
|
55
|
+
when '5'
|
56
|
+
# 5.times do
|
57
|
+
# q = MethodDefinitionQuestion.new(b)
|
58
|
+
# q.print_prompt
|
59
|
+
# q.evaluate_method_definition_input
|
60
|
+
# end
|
61
|
+
|
62
|
+
#========================================
|
63
|
+
# Method Defintiion Follow Up Development
|
64
|
+
#========================================
|
65
|
+
2.times do
|
66
|
+
q = MethodDefinitionQuestion.new(b)
|
67
|
+
q.print_prompt
|
68
|
+
q.evaluate_method_definition_input
|
69
|
+
follow_up_question = MethodDefinitionFollowUpQuestion.new(b, q)
|
70
|
+
follow_up_question.print_method_invocation_prompt
|
71
|
+
follow_up_question.evaluate_user_input
|
72
|
+
end
|
73
|
+
|
63
74
|
else
|
64
75
|
puts 'You entered a non-option. Try again.'.red
|
65
76
|
end
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: battleroom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.77
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Travis Vander Hoop
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: faker
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - '='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - '='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: colorize
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - '='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - '='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: awesome_print
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - '='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - '='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: activesupport
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - '='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,63 +62,90 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - '='
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 4.1.6
|
78
|
-
|
79
|
-
|
80
|
-
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coderay
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.1.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.1.0
|
97
|
+
description: A command-line REPL designed to give novice Ruby programmers countless
|
98
|
+
reps doing simple tasks like assigning variables, working with data structures,
|
99
|
+
and defining and invoking methods.
|
81
100
|
email: vanderhoop@me.com
|
82
101
|
executables:
|
83
102
|
- battleroom
|
84
103
|
extensions: []
|
85
104
|
extra_rdoc_files: []
|
86
105
|
files:
|
106
|
+
- bin/battleroom
|
87
107
|
- lib/battleroom.rb
|
88
108
|
- lib/battleroom/battleroom_machinery.rb
|
89
|
-
- lib/battleroom/data_generation_machinery.rb
|
90
109
|
- lib/battleroom/data/array_questions.rb
|
91
110
|
- lib/battleroom/data/hash_questions.rb
|
92
111
|
- lib/battleroom/data/nested_data_structure_access_questions.rb
|
93
112
|
- lib/battleroom/data/variable_assignment_questions.rb
|
94
|
-
- lib/battleroom/
|
95
|
-
- lib/battleroom/models/
|
96
|
-
- lib/battleroom/models/
|
113
|
+
- lib/battleroom/data_generation_machinery.rb
|
114
|
+
- lib/battleroom/models/array_access_question.rb
|
115
|
+
- lib/battleroom/models/array_assignment_question.rb
|
97
116
|
- lib/battleroom/models/data_structure_access_question.rb
|
98
117
|
- lib/battleroom/models/data_structure_assignment_question.rb
|
118
|
+
- lib/battleroom/models/data_structure_question.rb
|
99
119
|
- lib/battleroom/models/hash_access_question.rb
|
100
120
|
- lib/battleroom/models/hash_assignment_question.rb
|
101
|
-
- lib/battleroom/models/
|
102
|
-
- lib/battleroom/models/
|
121
|
+
- lib/battleroom/models/method_definition_question.rb
|
122
|
+
- lib/battleroom/models/nested_data_structure_access_question.rb
|
123
|
+
- lib/battleroom/models/question.rb
|
103
124
|
- lib/battleroom/models/variable_question.rb
|
104
|
-
- bin/battleroom
|
105
125
|
homepage: https://github.com/vanderhoop/battleroom
|
106
126
|
licenses:
|
107
127
|
- MIT
|
128
|
+
metadata: {}
|
108
129
|
post_install_message:
|
109
130
|
rdoc_options: []
|
110
131
|
require_paths:
|
111
132
|
- lib
|
112
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
134
|
requirements:
|
115
|
-
- -
|
135
|
+
- - ">="
|
116
136
|
- !ruby/object:Gem::Version
|
117
137
|
version: 1.9.3
|
118
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
139
|
requirements:
|
121
|
-
- -
|
140
|
+
- - ">="
|
122
141
|
- !ruby/object:Gem::Version
|
123
142
|
version: '0'
|
124
143
|
requirements: []
|
125
144
|
rubyforge_project:
|
126
|
-
rubygems_version:
|
145
|
+
rubygems_version: 2.2.2
|
127
146
|
signing_key:
|
128
|
-
specification_version:
|
129
|
-
summary: A
|
130
|
-
simple tasks like assigning variables
|
131
|
-
|
147
|
+
specification_version: 4
|
148
|
+
summary: A command-line REPL designed to give novice Ruby programmers countless reps
|
149
|
+
doing simple tasks like assigning variables, working with data structures, and defining
|
150
|
+
and invoking methods.
|
132
151
|
test_files: []
|