politician_salad 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f75d0a62a589c6980f5a39dc15bccdf4531bcec2
4
- data.tar.gz: 4a0bd25e905f5fcf4ef16ac05088c17d5de8fb12
3
+ metadata.gz: a8ab1a20b665f80379a48fd658ab73fb640bdb44
4
+ data.tar.gz: 05946070d9257e1921cd6e20c3de0d7fe54f699c
5
5
  SHA512:
6
- metadata.gz: 451ad42789bb281081b04131a0a3c34915143c6118022ad034d94450b0ac7dd028c5cc41caa900b9967a27887145251ae90b32999bfacf25159d129fd35baf2f
7
- data.tar.gz: de8567339544d349969037920ad2a262426f119719c406c4bdb1bded28743d958ff34a120337f9b6f2a2dea49cdb52e9f2dcc5d7ab838bbdb62d7d184fe6fe5a
6
+ metadata.gz: 4b7044cd425902e860fa3bd70f3609305694c986e63733e0e87bb3fa709bd955b03523d6a79367cb1e79ecabf8f84492aa2545af59be7caf96595e2929be481d
7
+ data.tar.gz: d72668d3b651d0efb413992f0253415b034bbd6a410bb2428bf15caabb2a9b81b3c1336a33ed893e35f5e8b2f145ca52de8aa86a55cc221f6fdf14e00df5a7e8
data/lib/barack_obama.rb CHANGED
@@ -3,7 +3,7 @@ require_relative './base.rb'
3
3
  module PoliticianSalad
4
4
  class BarackObama < PoliticianSalad::Base
5
5
  def warehouse_path
6
- '../warehouse/barack_obama.txt'
6
+ 'warehouse/barack_obama.txt'
7
7
  end
8
8
  end
9
9
  end
data/lib/base.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'marky_markov'
2
+ require 'pry'
2
3
 
3
4
  module PoliticianSalad
4
5
  class Base
@@ -20,7 +21,7 @@ module PoliticianSalad
20
21
  markov = MarkyMarkov::TemporaryDictionary.new
21
22
  candidate_path = File.join(File.dirname(__FILE__), warehouse_path)
22
23
  file = File.open(candidate_path)
23
- markov.parse_string file
24
+ markov.parse_file file
24
25
 
25
26
  markov
26
27
  end
data/lib/donald_trump.rb CHANGED
@@ -3,7 +3,7 @@ require_relative './base.rb'
3
3
  module PoliticianSalad
4
4
  class DonaldTrump < PoliticianSalad::Base
5
5
  def warehouse_path
6
- '../warehouse/donald_trump.txt'
6
+ 'warehouse/donald_trump.txt'
7
7
  end
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@ require_relative './base.rb'
3
3
  module PoliticianSalad
4
4
  class HillaryClinton < PoliticianSalad::Base
5
5
  def warehouse_path
6
- '../warehouse/hillary_clinton.txt'
6
+ 'warehouse/hillary_clinton.txt'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: politician_salad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Fleury