swdyh-avaticon 0.0.3 → 0.0.4
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.
- data/Rakefile +1 -1
 - data/lib/avaticon.rb +2 -2
 - metadata +2 -2
 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -17,7 +17,7 @@ DESCRIPTION       = "A library for getting web service user icon." 
     | 
|
| 
       17 
17 
     | 
    
         
             
            RUBYFORGE_PROJECT = "avaticon"
         
     | 
| 
       18 
18 
     | 
    
         
             
            HOMEPATH          = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
         
     | 
| 
       19 
19 
     | 
    
         
             
            BIN_FILES         = %w(  )
         
     | 
| 
       20 
     | 
    
         
            -
            VERS              = "0.0. 
     | 
| 
      
 20 
     | 
    
         
            +
            VERS              = "0.0.4"
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            REV = File.read(".svn/entries")[/committed-rev="(d+)"/, 1] rescue nil
         
     | 
| 
       23 
23 
     | 
    
         
             
            CLEAN.include ['**/.*.sw?', '*.gem', '.config']
         
     | 
    
        data/lib/avaticon.rb
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'open-uri'
         
     | 
| 
       2 
2 
     | 
    
         
             
            require 'rubygems'
         
     | 
| 
       3 
     | 
    
         
            -
            require ' 
     | 
| 
      
 3 
     | 
    
         
            +
            require 'nokogiri'
         
     | 
| 
       4 
4 
     | 
    
         
             
            require 'json'
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            class Avaticon
         
     | 
| 
         @@ -39,7 +39,7 @@ class Avaticon 
     | 
|
| 
       39 
39 
     | 
    
         
             
                info = @siteinfo.find { |i| i['service_name'] == service }
         
     | 
| 
       40 
40 
     | 
    
         
             
                if info
         
     | 
| 
       41 
41 
     | 
    
         
             
                  url = info['iconPageUrl'].gsub('{user_id}', user_id)
         
     | 
| 
       42 
     | 
    
         
            -
                  icon =  
     | 
| 
      
 42 
     | 
    
         
            +
                  icon = Nokogiri::HTML(open(url)).at(info['iconImageElement'])
         
     | 
| 
       43 
43 
     | 
    
         
             
                  if icon
         
     | 
| 
       44 
44 
     | 
    
         
             
                    Avaticon.path2url url, icon['src']
         
     | 
| 
       45 
45 
     | 
    
         
             
                  end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: swdyh-avaticon
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - swdyh
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: "" 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2008- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2008-11-22 00:00:00 -08:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |