arel-helpers 2.15.0 → 2.17.0
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/README.md +2 -2
 - data/arel-helpers.gemspec +1 -1
 - data/lib/arel-helpers/version.rb +1 -1
 - data/lib/arel-helpers.rb +1 -0
 - data/spec/join_association_spec.rb +18 -6
 - metadata +3 -12
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: aab615bd03832b10ba42c666d0245f83d6abe819133159ace8143643deffc12d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2d16903c9273d56f2fffe07bd7e71e98afa0b2bd3647708cd6216f8864e31c9b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ca5556444c535231c921728f77d631d1b4a333daad6dc012f6bf27b31168dbbce954a892382d09a17a1f5348e4070f0973662c905999803dbea636f1c6462a74
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 9fa974a71cd31a862669562617a5d1dc04b8c1d3cae14321c9343059ffa3868ba9831ca613fcabc22e5e05de62e66bfe88a86b255f4f0d7b682efef4b9fbe02c
         
     | 
    
        data/README.md
    CHANGED
    
    | 
         @@ -215,7 +215,7 @@ This can become repetitive, and as an alternative you can choose to prepend `not 
     | 
|
| 
       215 
215 
     | 
    
         | 
| 
       216 
216 
     | 
    
         
             
            ## Requirements
         
     | 
| 
       217 
217 
     | 
    
         | 
| 
       218 
     | 
    
         
            -
            Requires ActiveRecord >= 3.1.0, < 8. Depends on SQLite for testing purposes.
         
     | 
| 
      
 218 
     | 
    
         
            +
            Requires ActiveRecord >= 3.1.0, < 8.1. Depends on SQLite for testing purposes.
         
     | 
| 
       219 
219 
     | 
    
         | 
| 
       220 
220 
     | 
    
         
             
            ## Running Tests
         
     | 
| 
       221 
221 
     | 
    
         | 
| 
         @@ -223,4 +223,4 @@ Requires ActiveRecord >= 3.1.0, < 8. Depends on SQLite for testing purposes. 
     | 
|
| 
       223 
223 
     | 
    
         | 
| 
       224 
224 
     | 
    
         
             
            ## Authors
         
     | 
| 
       225 
225 
     | 
    
         | 
| 
       226 
     | 
    
         
            -
             
     | 
| 
      
 226 
     | 
    
         
            +
            - Cameron C. Dutro: http://github.com/camertron
         
     | 
    
        data/arel-helpers.gemspec
    CHANGED
    
    | 
         @@ -12,7 +12,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
              s.platform = Gem::Platform::RUBY
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
              s.add_dependency 'activerecord', '>= 3.1.0' 
     | 
| 
      
 15 
     | 
    
         
            +
              s.add_dependency 'activerecord', '>= 3.1.0'
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
              s.add_development_dependency 'appraisal'
         
     | 
| 
       18 
18 
     | 
    
         
             
              s.add_development_dependency 'combustion', '~> 1.3'
         
     | 
    
        data/lib/arel-helpers/version.rb
    CHANGED
    
    
    
        data/lib/arel-helpers.rb
    CHANGED
    
    
| 
         @@ -103,7 +103,11 @@ describe ArelHelpers do 
     | 
|
| 
       103 
103 
     | 
    
         
             
                      ArelHelpers.join_association(Post, :comments, Arel::Nodes::InnerJoin, aliases: [foo])
         
     | 
| 
       104 
104 
     | 
    
         
             
                    ).to_sql
         
     | 
| 
       105 
105 
     | 
    
         | 
| 
       106 
     | 
    
         
            -
                     
     | 
| 
      
 106 
     | 
    
         
            +
                    if ActiveRecord::VERSION::STRING < "8.1.0"
         
     | 
| 
      
 107 
     | 
    
         
            +
                      expect(sql).to eq 'SELECT "posts".* FROM "posts" INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"'
         
     | 
| 
      
 108 
     | 
    
         
            +
                    else
         
     | 
| 
      
 109 
     | 
    
         
            +
                      expect(sql).to eq 'SELECT "posts".* FROM "posts" INNER JOIN "comments" AS "foo" ON "foo"."post_id" = "posts"."id"'
         
     | 
| 
      
 110 
     | 
    
         
            +
                    end
         
     | 
| 
       107 
111 
     | 
    
         
             
                  end
         
     | 
| 
       108 
112 
     | 
    
         
             
                end
         
     | 
| 
       109 
113 
     | 
    
         | 
| 
         @@ -114,11 +118,19 @@ describe ArelHelpers do 
     | 
|
| 
       114 
118 
     | 
    
         
             
                        ArelHelpers.join_association(Post, %i[comments favorites], Arel::Nodes::InnerJoin, aliases: [foo, bar])
         
     | 
| 
       115 
119 
     | 
    
         
             
                      ).to_sql
         
     | 
| 
       116 
120 
     | 
    
         | 
| 
       117 
     | 
    
         
            -
                       
     | 
| 
       118 
     | 
    
         
            -
                         
     | 
| 
       119 
     | 
    
         
            -
                           
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
      
 121 
     | 
    
         
            +
                      if ActiveRecord::VERSION::STRING < "8.1.0"
         
     | 
| 
      
 122 
     | 
    
         
            +
                        expect(sql).to eq <<-SQL.squish
         
     | 
| 
      
 123 
     | 
    
         
            +
                          SELECT "posts".* FROM "posts"
         
     | 
| 
      
 124 
     | 
    
         
            +
                            INNER JOIN "comments" "foo" ON "foo"."post_id" = "posts"."id"
         
     | 
| 
      
 125 
     | 
    
         
            +
                            INNER JOIN "favorites" "bar" ON "bar"."post_id" = "posts"."id"
         
     | 
| 
      
 126 
     | 
    
         
            +
                        SQL
         
     | 
| 
      
 127 
     | 
    
         
            +
                      else
         
     | 
| 
      
 128 
     | 
    
         
            +
                        expect(sql).to eq <<-SQL.squish
         
     | 
| 
      
 129 
     | 
    
         
            +
                          SELECT "posts".* FROM "posts"
         
     | 
| 
      
 130 
     | 
    
         
            +
                            INNER JOIN "comments" AS "foo" ON "foo"."post_id" = "posts"."id"
         
     | 
| 
      
 131 
     | 
    
         
            +
                            INNER JOIN "favorites" AS "bar" ON "bar"."post_id" = "posts"."id"
         
     | 
| 
      
 132 
     | 
    
         
            +
                        SQL
         
     | 
| 
      
 133 
     | 
    
         
            +
                      end
         
     | 
| 
       122 
134 
     | 
    
         
             
                    end
         
     | 
| 
       123 
135 
     | 
    
         
             
                  end
         
     | 
| 
       124 
136 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: arel-helpers
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.17.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Cameron Dutro
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire:
         
     | 
| 
       9 
8 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
9 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 10 
     | 
    
         
            +
            date: 1980-01-02 00:00:00.000000000 Z
         
     | 
| 
       12 
11 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
12 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
13 
     | 
    
         
             
              name: activerecord
         
     | 
| 
         @@ -17,9 +16,6 @@ dependencies: 
     | 
|
| 
       17 
16 
     | 
    
         
             
                - - ">="
         
     | 
| 
       18 
17 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
18 
     | 
    
         
             
                    version: 3.1.0
         
     | 
| 
       20 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       21 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: '8'
         
     | 
| 
       23 
19 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
20 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
21 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -27,9 +23,6 @@ dependencies: 
     | 
|
| 
       27 
23 
     | 
    
         
             
                - - ">="
         
     | 
| 
       28 
24 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       29 
25 
     | 
    
         
             
                    version: 3.1.0
         
     | 
| 
       30 
     | 
    
         
            -
                - - "<"
         
     | 
| 
       31 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: '8'
         
     | 
| 
       33 
26 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
27 
     | 
    
         
             
              name: appraisal
         
     | 
| 
       35 
28 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -144,7 +137,6 @@ homepage: https://github.com/camertron/arel-helpers 
     | 
|
| 
       144 
137 
     | 
    
         
             
            licenses:
         
     | 
| 
       145 
138 
     | 
    
         
             
            - MIT
         
     | 
| 
       146 
139 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       147 
     | 
    
         
            -
            post_install_message:
         
     | 
| 
       148 
140 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       149 
141 
     | 
    
         
             
            require_paths:
         
     | 
| 
       150 
142 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -159,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       159 
151 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       160 
152 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       161 
153 
     | 
    
         
             
            requirements: []
         
     | 
| 
       162 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       163 
     | 
    
         
            -
            signing_key:
         
     | 
| 
      
 154 
     | 
    
         
            +
            rubygems_version: 3.6.7
         
     | 
| 
       164 
155 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       165 
156 
     | 
    
         
             
            summary: Useful tools to help construct database queries with ActiveRecord and Arel.
         
     | 
| 
       166 
157 
     | 
    
         
             
            test_files: []
         
     |