job_interview 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,7 @@ module JobInterview
4
4
  include JobInterview::Fibonacci
5
5
  include JobInterview::FizzBuzz
6
6
  include JobInterview::Knapsack
7
+ include JobInterview::Quine
7
8
  end
8
9
 
9
10
 
@@ -0,0 +1,51 @@
1
+ require 'faker'
2
+ module JobInterview
3
+ module Questions
4
+
5
+ def in_5_years
6
+ "I'd like to " +
7
+ [
8
+ "have made",
9
+ "have enhanced shareholder value by creating",
10
+ "made someone else rich with my"
11
+ ].sample + " " +
12
+ Faker::Company.catch_phrase.downcase + "."
13
+ end
14
+
15
+ def leaving_current
16
+ "I'm " +
17
+ [
18
+ "seeking to",
19
+ "leaving because I can't" ,
20
+ "leaving because I have to",
21
+ "not happy with the oppertunities I have for"
22
+ ].sample + " " +
23
+ Faker::Company.bs + "."
24
+ end
25
+
26
+ def manhole_cover
27
+ [
28
+ "Because men are round.",
29
+ "Because manholes are round.",
30
+ "So they don't fall in.",
31
+ "Because Reuleaux Triangles are hard to manufacture."
32
+ ].sample
33
+
34
+ end
35
+
36
+ def greatest_weakness
37
+ ["Some times I", "I always"].sample + " " +
38
+ ["try too hard", "work too much", "care too much", "fail so rarely"].sample + " " +
39
+ "so I " +
40
+ ["make others jealous", "make too much money"].sample + "."
41
+ end
42
+
43
+ def why_here
44
+ "Your company " +
45
+ [ "is renowned for",
46
+ "is re-inventing",
47
+ "has revolutionized"
48
+ ].sample + " " + Faker::Company.catch_phrase.downcase + "."
49
+ end
50
+ end
51
+ end
data/lib/job_interview.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require File.expand_path('../job_interview/fizz_buzz', __FILE__)
2
2
  require File.expand_path('../job_interview/fibonacci', __FILE__)
3
3
  require File.expand_path('../job_interview/knapsack' , __FILE__)
4
+ require File.expand_path('../job_interview/quine' , __FILE__)
5
+ require File.expand_path('../job_interview/questions' , __FILE__)
4
6
  require File.expand_path('../job_interview/answer' , __FILE__)
5
7
  module JobInterview
6
8
  end
@@ -0,0 +1,15 @@
1
+ require "spec_helper.rb"
2
+ module QuineSpec
3
+
4
+ describe "When called" do
5
+ before(:each) do
6
+ @answer = JobInterview::Answer.new
7
+ end
8
+
9
+ it "should return the source of the calling file" do
10
+ @answer.quine(__FILE__).should == File.read(__FILE__)
11
+ end
12
+ end
13
+
14
+
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: job_interview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,9 +12,20 @@ bindir: bin
12
12
  cert_chain: []
13
13
  date: 2012-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: faker
17
+ requirement: &2156269940 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.5
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *2156269940
15
26
  - !ruby/object:Gem::Dependency
16
27
  name: rspec
17
- requirement: &2156290640 !ruby/object:Gem::Requirement
28
+ requirement: &2156269400 !ruby/object:Gem::Requirement
18
29
  none: false
19
30
  requirements:
20
31
  - - ~>
@@ -22,7 +33,7 @@ dependencies:
22
33
  version: 2.9.0
23
34
  type: :development
24
35
  prerelease: false
25
- version_requirements: *2156290640
36
+ version_requirements: *2156269400
26
37
  description: Programmer job interview answers, packaged for your convenience. Fibonacci,
27
38
  FizzBuzz, and more! A project from BohConf 2012.
28
39
  email:
@@ -37,8 +48,10 @@ files:
37
48
  - lib/job_interview/fizz_buzz.rb
38
49
  - lib/job_interview/knapsack.rb
39
50
  - lib/job_interview/answer.rb
51
+ - lib/job_interview/questions.rb
40
52
  - spec/fibonacci_spec.rb
41
53
  - spec/fizz_buzz_spec.rb
54
+ - spec/quine_spec.rb
42
55
  homepage: https://github.com/ruby-jokes/job_interview
43
56
  licenses:
44
57
  - GPLv3
@@ -67,3 +80,4 @@ summary: Programmer job interview answers, packaged for your convenience
67
80
  test_files:
68
81
  - spec/fibonacci_spec.rb
69
82
  - spec/fizz_buzz_spec.rb
83
+ - spec/quine_spec.rb