rambling_hipster 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rambling_hipster.rb +3 -3
  2. metadata +3 -3
@@ -10,9 +10,9 @@ class RamblingHipster
10
10
  def self.speak
11
11
  response = HipsterJesus.get('http://hipsterjesus.com/api/?paras=20&type=hipster-centric')
12
12
 
13
- words = response['text'].split(' ')
14
- sentence = words.sample(5).collect {|x| x.gsub(/<\/?[^>]*>/,"").gsub(/\W/, "").downcase }.join(' ')
15
- final = words.keep_if { |w| /(?=.*^[a-z])(?=.*s$)/ =~ w }.sample
13
+ words = response['text'].split(' ').collect {|x| x.gsub(/<.*?>/,"").gsub(/\W/, "")}
14
+ sentence = words.sample(5).join(' ')
15
+ final = words.keep_if { |w| w == w.downcase and w.end_with? "s" }.sample
16
16
 
17
17
  potlucks = ["Thundercats","squid","whatever","tattooed","letterpress","skateboard","Williamsburg","Portland","freegan","lo-fi","Brooklyn","hoodie","leggings","mustache","food truck","raw denim","jean shorts","tofu","trust fund","beard","wolf moon","DIY","fixie","farm-to-table","seitan","put a bird on it","VHS","mixtape","photo booth","artisan","scenester"]
18
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rambling_hipster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-29 00:00:00.000000000 Z
12
+ date: 2013-07-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -34,7 +34,7 @@ extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - lib/rambling_hipster.rb
37
- homepage: https://github.com/agoddard/ramblinghipster
37
+ homepage: https://github.com/agoddard/rambling-hipster
38
38
  licenses: []
39
39
  post_install_message:
40
40
  rdoc_options: []