cmis-ruby 0.5.25 → 0.5.26
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.
- checksums.yaml +4 -4
 - data/lib/cmis/utils.rb +5 -1
 - data/lib/cmis/version.rb +1 -1
 - data/spec/cmis-ruby/utils_spec.rb +2 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 14ade84fe1ee6ef30371faa82711015ab07f93ea
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 143998529e35ddb87b70c101bf27221004a1daec
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: c24f0c936feff55988136bc40527b88345c47b04aaabf41573048efd1de7656bc3a21a9ed85bc9926bbd25c527016451798eec63e206d2ed60a723322bba03b0
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 88e31b6da5d7ccd59af2bf6f41b7b3460fd3023ab3d28edc55be747194efb999e3a14079dbbb9814a40b9513c7dcadf98bb3269924fa0f923ad4c620f17127cb
         
     | 
    
        data/lib/cmis/utils.rb
    CHANGED
    
    | 
         @@ -34,7 +34,8 @@ module CMIS 
     | 
|
| 
       34 
34 
     | 
    
         
             
                    '_lteq'   => ' <=',
         
     | 
| 
       35 
35 
     | 
    
         
             
                    '_gt'     => ' >',
         
     | 
| 
       36 
36 
     | 
    
         
             
                    '_gteq'   => ' >=',
         
     | 
| 
       37 
     | 
    
         
            -
                    '_eqany'  => ''
         
     | 
| 
      
 37 
     | 
    
         
            +
                    '_eqany'  => '',
         
     | 
| 
      
 38 
     | 
    
         
            +
                    '_in'     => ''
         
     | 
| 
       38 
39 
     | 
    
         
             
                  }
         
     | 
| 
       39 
40 
     | 
    
         
             
                  def build_predicate(k, v)
         
     | 
| 
       40 
41 
     | 
    
         
             
                    key = k.to_s.dup
         
     | 
| 
         @@ -44,6 +45,9 @@ module CMIS 
     | 
|
| 
       44 
45 
     | 
    
         
             
                    elsif key.end_with?('_eqany')
         
     | 
| 
       45 
46 
     | 
    
         
             
                      value = normalize(v)
         
     | 
| 
       46 
47 
     | 
    
         
             
                      "#{value} = ANY #{key[0..-7]}"
         
     | 
| 
      
 48 
     | 
    
         
            +
                    elsif key.end_with?('_in')
         
     | 
| 
      
 49 
     | 
    
         
            +
                      values = v.map { |vv| normalize(vv) } # v must be an array
         
     | 
| 
      
 50 
     | 
    
         
            +
                      "#{key[0..-4]} in (#{values.join(', ')})"
         
     | 
| 
       47 
51 
     | 
    
         
             
                    else
         
     | 
| 
       48 
52 
     | 
    
         
             
                      value = normalize(v)
         
     | 
| 
       49 
53 
     | 
    
         
             
                      re = Regexp.new(MAP.keys.map { |x| Regexp.escape(x) + '$' }.join('|'))
         
     | 
    
        data/lib/cmis/version.rb
    CHANGED
    
    
| 
         @@ -13,6 +13,8 @@ module CMIS 
     | 
|
| 
       13 
13 
     | 
    
         
             
                    expect(qs('T', bar: 'baz', pif: 'poef')).to eq "select * from T where bar = 'baz' and pif = 'poef'"
         
     | 
| 
       14 
14 
     | 
    
         
             
                    expect(qs(['T', 'foo'], bar: 'baz', pif: 'poef')).to eq "select * from T join foo as X on cmis:objectId = X.cmis:objectId where bar = 'baz' and pif = 'poef'"
         
     | 
| 
       15 
15 
     | 
    
         
             
                    expect(qs(['T', 'foo'], a: 'b', c: 'd', bar: 'baz', pif: 'poef')).to eq "select * from T join foo as X on cmis:objectId = X.cmis:objectId where a = 'b' and c = 'd' and bar = 'baz' and pif = 'poef'"
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
                    expect(qs('T', foo_in: %w(bar baz))).to eq "select * from T where foo in ('bar', 'baz')"
         
     | 
| 
       16 
18 
     | 
    
         
             
                  end
         
     | 
| 
       17 
19 
     | 
    
         
             
                end
         
     | 
| 
       18 
20 
     | 
    
         
             
              end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: cmis-ruby
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.5. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.5.26
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Kenneth Geerts
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2015-11- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2015-11-16 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: faraday
         
     |