urban 0.1.0 → 0.1.1

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.
@@ -43,18 +43,10 @@ With git and local working copy
43
43
 
44
44
  == To Do
45
45
 
46
+ * Refactor cli.rb
46
47
  * Document with {YARD}[http://yardoc.org]
47
48
  * Print better looking output
48
- * Test problem words below with new parser
49
49
 
50
- == Test words for formatting
51
-
52
- The first definitions on these words were show to
53
- have problems displaying in the terminal. They are to be used to write tests.
54
-
55
- * {mina}[http://www.urbandictionary.com/define.php?term=minal]
56
- * {ugly-hot}[http://www.urbandictionary.com/define.php?term=ugly-hot]
57
- * {bolen}[http://www.urbandictionary.com/define.php?term=bolen]
58
- * {chinalian}[http://www.urbandictionary.com/define.php?term=chinalian]
50
+ ---
59
51
 
60
52
  Copyright (c) 2011 Thomas Miller. See LICENSE for details.
@@ -23,7 +23,6 @@ module Urban
23
23
  end
24
24
 
25
25
  private
26
-
27
26
  def process(document)
28
27
  OpenStruct.new({
29
28
  word: document.at_xpath('//td[@class="word"][1]').content.strip,
@@ -34,8 +33,7 @@ module Urban
34
33
  definitions = document.xpath('//td/div[@class="definition"]').map do |node|
35
34
  node.xpath('//br').each { |br| br.replace(Nokogiri::XML::Text.new("\n", node.document)) };
36
35
  node.content.strip
37
- end
38
- definitions || []
36
+ end || []
39
37
  end
40
38
  end
41
39
  end
@@ -1,3 +1,3 @@
1
1
  module Urban
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urban
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:
@@ -13,7 +13,7 @@ date: 2011-09-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: &2153564560 !ruby/object:Gem::Requirement
16
+ requirement: &2152219860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.5.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153564560
24
+ version_requirements: *2152219860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &2153564060 !ruby/object:Gem::Requirement
27
+ requirement: &2152358420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.8.7
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2153564060
35
+ version_requirements: *2152358420
36
36
  description: ! "Urban is a command line tool that allows you to look up definitions\n
37
37
  \ or pull a random definition from Urban Dictionary."
38
38
  email: