job_interview 0.1.1 → 0.1.2

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::Primes
7
8
  include JobInterview::Quine
8
9
  end
9
10
 
@@ -1,6 +1,6 @@
1
1
  module JobInterview
2
2
  module Knapsack
3
- def knapsack
3
+ def knapsack(coll)
4
4
 
5
5
  end
6
6
  end
@@ -18,7 +18,7 @@ module JobInterview
18
18
  "seeking to",
19
19
  "leaving because I can't" ,
20
20
  "leaving because I have to",
21
- "not happy with the oppertunities I have for"
21
+ "not happy with the oppertunities I have to"
22
22
  ].sample + " " +
23
23
  Faker::Company.bs + "."
24
24
  end
@@ -37,7 +37,10 @@ module JobInterview
37
37
  ["Some times I", "I always"].sample + " " +
38
38
  ["try too hard", "work too much", "care too much", "fail so rarely"].sample + " " +
39
39
  "so I " +
40
- ["make others jealous", "make too much money"].sample + "."
40
+ [ "make others jealous",
41
+ "make too much money",
42
+ "shift too many paradigms",
43
+ "innovate too hard"].sample + "."
41
44
  end
42
45
 
43
46
  def why_here
@@ -47,5 +50,24 @@ module JobInterview
47
50
  "has revolutionized"
48
51
  ].sample + " " + Faker::Company.catch_phrase.downcase + "."
49
52
  end
53
+
54
+ def what_experience(thing)
55
+ "I am " +
56
+ [
57
+ "a world-renowned expert in ",
58
+ "highly proficient with ",
59
+ "exquisitely competent at ",
60
+ "known as an ultimate authority on "
61
+ ].sample + thing + "."
62
+ end
63
+
64
+ def p_equals_np
65
+ [
66
+ "If it does, we can kiss encryption goodbye.",
67
+ "With our current models of computation, answering that question remains infeasible.",
68
+ "I doubt it, but it would make life easier for traveling salesmen."
69
+ ].sample
70
+ end
71
+
50
72
  end
51
73
  end
data/lib/job_interview.rb CHANGED
@@ -2,6 +2,7 @@ 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
4
  require File.expand_path('../job_interview/quine' , __FILE__)
5
+ require File.expand_path('../job_interview/primes' , __FILE__)
5
6
  require File.expand_path('../job_interview/questions' , __FILE__)
6
7
  require File.expand_path('../job_interview/answer' , __FILE__)
7
8
  module JobInterview
@@ -0,0 +1,15 @@
1
+ module PrimesSpec
2
+
3
+ describe "when called" do
4
+ before(:each) do
5
+ @answer = JobInterview::Answer.new
6
+ end
7
+
8
+
9
+ it "should return the first n primes" do
10
+ @answer.primes(10).should == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
11
+ end
12
+
13
+ end
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.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-04-23 00:00:00.000000000 Z
13
+ date: 2012-04-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faker
17
- requirement: &2156269940 !ruby/object:Gem::Requirement
17
+ requirement: &2152051700 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.9.5
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156269940
25
+ version_requirements: *2152051700
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &2156269400 !ruby/object:Gem::Requirement
28
+ requirement: &2152050980 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 2.9.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2156269400
36
+ version_requirements: *2152050980
37
37
  description: Programmer job interview answers, packaged for your convenience. Fibonacci,
38
38
  FizzBuzz, and more! A project from BohConf 2012.
39
39
  email:
@@ -51,6 +51,7 @@ files:
51
51
  - lib/job_interview/questions.rb
52
52
  - spec/fibonacci_spec.rb
53
53
  - spec/fizz_buzz_spec.rb
54
+ - spec/primes_spec.rb
54
55
  - spec/quine_spec.rb
55
56
  homepage: https://github.com/ruby-jokes/job_interview
56
57
  licenses:
@@ -80,4 +81,5 @@ summary: Programmer job interview answers, packaged for your convenience
80
81
  test_files:
81
82
  - spec/fibonacci_spec.rb
82
83
  - spec/fizz_buzz_spec.rb
84
+ - spec/primes_spec.rb
83
85
  - spec/quine_spec.rb