ananke 1.0.0 → 1.0.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.
- data/lib/ananke/linking.rb +1 -1
 - data/lib/ananke/routing.rb +5 -10
 - data/lib/version.rb +1 -1
 - metadata +3 -3
 
    
        data/lib/ananke/linking.rb
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ module Ananke 
     | 
|
| 
       2 
2 
     | 
    
         
             
              def build_links(link_list, link_to_list, path, id, mod)
         
     | 
| 
       3 
3 
     | 
    
         
             
                return if !Ananke.settings[:links]
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
                links = build_link_self(path, id)
         
     | 
| 
      
 5 
     | 
    
         
            +
                links = id ? build_link_self(path, id) : []
         
     | 
| 
       6 
6 
     | 
    
         
             
                links += build_link_list(path, id, mod, link_list)
         
     | 
| 
       7 
7 
     | 
    
         
             
                links += build_link_to_list(path, id, link_to_list)
         
     | 
| 
       8 
8 
     | 
    
         | 
    
        data/lib/ananke/routing.rb
    CHANGED
    
    | 
         @@ -30,17 +30,12 @@ module Ananke 
     | 
|
| 
       30 
30 
     | 
    
         
             
              end
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
              def make_response_item(path, mod, link_list, link_to_list, obj, key)
         
     | 
| 
       33 
     | 
    
         
            -
                item = nil
         
     | 
| 
       34 
33 
     | 
    
         
             
                id = get_id(obj, key)
         
     | 
| 
       35 
     | 
    
         
            -
                if !id 
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                else
         
     | 
| 
       41 
     | 
    
         
            -
                  out :info, "#{path} - Cannot find key(#{key}) on object #{obj}"
         
     | 
| 
       42 
     | 
    
         
            -
                end
         
     | 
| 
       43 
     | 
    
         
            -
                item
         
     | 
| 
      
 34 
     | 
    
         
            +
                out :info, "#{path} - Cannot find key(#{key}) on object #{obj}" if !id
         
     | 
| 
      
 35 
     | 
    
         
            +
                dic = {path.to_sym => obj}
         
     | 
| 
      
 36 
     | 
    
         
            +
                links = build_links(link_list, link_to_list, path, id, mod) if Ananke.settings[:links]
         
     | 
| 
      
 37 
     | 
    
         
            +
                dic[:links] = links if links && !links.empty?
         
     | 
| 
      
 38 
     | 
    
         
            +
                dic
         
     | 
| 
       44 
39 
     | 
    
         
             
              end
         
     | 
| 
       45 
40 
     | 
    
         | 
| 
       46 
41 
     | 
    
         
             
              def make_response(path, mod, link_list, link_to_list, obj, key)
         
     | 
    
        data/lib/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            name: ananke
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
4 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       5 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 5 
     | 
    
         
            +
              version: 1.0.1
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors: 
         
     | 
| 
       8 
8 
     | 
    
         
             
            - Andries Coetzee
         
     | 
| 
         @@ -129,7 +129,7 @@ licenses: [] 
     | 
|
| 
       129 
129 
     | 
    
         
             
            post_install_message: |
         
     | 
| 
       130 
130 
     | 
    
         
             
              **************************************************
         
     | 
| 
       131 
131 
     | 
    
         | 
| 
       132 
     | 
    
         
            -
                Thank you for installing ananke-1.0. 
     | 
| 
      
 132 
     | 
    
         
            +
                Thank you for installing ananke-1.0.1
         
     | 
| 
       133 
133 
     | 
    
         | 
| 
       134 
134 
     | 
    
         
             
                Please be sure to look at README.rdoc to see what might have changed
         
     | 
| 
       135 
135 
     | 
    
         
             
                since the last release and how to use this GEM.
         
     | 
| 
         @@ -158,7 +158,7 @@ rubyforge_project: 
     | 
|
| 
       158 
158 
     | 
    
         
             
            rubygems_version: 1.5.0
         
     | 
| 
       159 
159 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       160 
160 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       161 
     | 
    
         
            -
            summary: ananke-1.0. 
     | 
| 
      
 161 
     | 
    
         
            +
            summary: ananke-1.0.1
         
     | 
| 
       162 
162 
     | 
    
         
             
            test_files: 
         
     | 
| 
       163 
163 
     | 
    
         
             
            - spec/nice_formatter.rb
         
     | 
| 
       164 
164 
     | 
    
         
             
            - spec/call_chain.rb
         
     |