torque-postgresql 2.2.0 → 2.2.3
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/torque/postgresql/adapter/quoting.rb +8 -5
 - data/lib/torque/postgresql/associations/belongs_to_many_association.rb +2 -1
 - data/lib/torque/postgresql/config.rb +1 -0
 - data/lib/torque/postgresql/relation.rb +1 -1
 - data/lib/torque/postgresql/version.rb +1 -1
 - data/spec/models/question_select.rb +2 -0
 - data/spec/schema.rb +146 -147
 - data/spec/spec_helper.rb +7 -2
 - data/spec/tests/arel_spec.rb +13 -0
 - data/spec/tests/belongs_to_many_spec.rb +13 -0
 - data/spec/tests/enum_set_spec.rb +2 -1
 - data/spec/tests/enum_spec.rb +2 -1
 - data/spec/tests/interval_spec.rb +2 -1
 - metadata +17 -23
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3e9379e388022831a9441cb6b3b646ff8bdea7340cba61f0dd197bcdbf589f72
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: cfb88b94086027202e92a2120ad8ba1a5e939ef089aea5dcdfd85e05a7d122ea
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 809642eb8f6ee574e7b3b9557590baa58624fec54d1c69b6f341999dfc4217aea5010abc1b438119b3213f958918ce00ddd1af1df3a4714321b1f6153f8ee57d
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: e81cf089a977d964326548144b14dd4ab7ce4be0612f2e923e34add1aa951aa2e5467daaa544da42ac17773fb2cc047335a297f3807a1e72f8dc1942f1df4195
         
     | 
| 
         @@ -6,6 +6,8 @@ module Torque 
     | 
|
| 
       6 
6 
     | 
    
         
             
                  module Quoting
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                    Name = ActiveRecord::ConnectionAdapters::PostgreSQL::Name
         
     | 
| 
      
 9 
     | 
    
         
            +
                    Column = ActiveRecord::ConnectionAdapters::PostgreSQL::Column
         
     | 
| 
      
 10 
     | 
    
         
            +
                    ColumnDefinition = ActiveRecord::ConnectionAdapters::ColumnDefinition
         
     | 
| 
       9 
11 
     | 
    
         | 
| 
       10 
12 
     | 
    
         
             
                    # Quotes type names for use in SQL queries.
         
     | 
| 
       11 
13 
     | 
    
         
             
                    def quote_type_name(string, schema = nil)
         
     | 
| 
         @@ -20,11 +22,12 @@ module Torque 
     | 
|
| 
       20 
22 
     | 
    
         
             
                    end
         
     | 
| 
       21 
23 
     | 
    
         | 
| 
       22 
24 
     | 
    
         
             
                    def quote_default_expression(value, column)
         
     | 
| 
       23 
     | 
    
         
            -
                       
     | 
| 
       24 
     | 
    
         
            -
                         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                       
     | 
| 
      
 25 
     | 
    
         
            +
                      return super unless value.class <= Array &&
         
     | 
| 
      
 26 
     | 
    
         
            +
                        ((column.is_a?(ColumnDefinition) && column.dig(:options, :array)) ||
         
     | 
| 
      
 27 
     | 
    
         
            +
                        (column.is_a?(Column) && column.array?))
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                      type = column.is_a?(Column) ? column.sql_type_metadata.sql_type : column.sql_type
         
     | 
| 
      
 30 
     | 
    
         
            +
                      quote(value) + '::' + type
         
     | 
| 
       28 
31 
     | 
    
         
             
                    end
         
     | 
| 
       29 
32 
     | 
    
         | 
| 
       30 
33 
     | 
    
         
             
                    private
         
     | 
| 
         @@ -53,7 +53,8 @@ module Torque 
     | 
|
| 
       53 
53 
     | 
    
         | 
| 
       54 
54 
     | 
    
         
             
                    def load_target
         
     | 
| 
       55 
55 
     | 
    
         
             
                      if stale_target? || find_target?
         
     | 
| 
       56 
     | 
    
         
            -
                         
     | 
| 
      
 56 
     | 
    
         
            +
                        new_records = PostgreSQL::AR615 ? target.extract!(&:persisted?) : []
         
     | 
| 
      
 57 
     | 
    
         
            +
                        @target = merge_target_lists((find_target || []) + new_records, target)
         
     | 
| 
       57 
58 
     | 
    
         
             
                      end
         
     | 
| 
       58 
59 
     | 
    
         | 
| 
       59 
60 
     | 
    
         
             
                      loaded!
         
     | 
| 
         @@ -7,6 +7,7 @@ module Torque 
     | 
|
| 
       7 
7 
     | 
    
         
             
                # Stores a version check for compatibility purposes
         
     | 
| 
       8 
8 
     | 
    
         
             
                AR604 = (ActiveRecord.gem_version >= Gem::Version.new('6.0.4'))
         
     | 
| 
       9 
9 
     | 
    
         
             
                AR610 = (ActiveRecord.gem_version >= Gem::Version.new('6.1.0'))
         
     | 
| 
      
 10 
     | 
    
         
            +
                AR615 = (ActiveRecord.gem_version >= Gem::Version.new('6.1.5'))
         
     | 
| 
       10 
11 
     | 
    
         | 
| 
       11 
12 
     | 
    
         
             
                # Use the same logger as the Active Record one
         
     | 
| 
       12 
13 
     | 
    
         
             
                def self.logger
         
     | 
| 
         @@ -117,7 +117,7 @@ module Torque 
     | 
|
| 
       117 
117 
     | 
    
         
             
                  # because the type mapper may add new methods to the model. This happens
         
     | 
| 
       118 
118 
     | 
    
         
             
                  # for the given model Klass and its inheritances
         
     | 
| 
       119 
119 
     | 
    
         
             
                  module Initializer
         
     | 
| 
       120 
     | 
    
         
            -
                    def initialize(klass,  
     | 
| 
      
 120 
     | 
    
         
            +
                    def initialize(klass, *, **)
         
     | 
| 
       121 
121 
     | 
    
         
             
                      super
         
     | 
| 
       122 
122 
     | 
    
         | 
| 
       123 
123 
     | 
    
         
             
                      klass.superclass.send(:relation) if klass.define_attribute_methods &&
         
     | 
    
        data/spec/schema.rb
    CHANGED
    
    | 
         @@ -10,151 +10,150 @@ 
     | 
|
| 
       10 
10 
     | 
    
         
             
            #
         
     | 
| 
       11 
11 
     | 
    
         
             
            # It's strongly recommended that you check this file into your version control system.
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
               
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
             
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
                 
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
                 
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
             
     | 
| 
       45 
     | 
    
         
            -
             
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
                 
     | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
       51 
     | 
    
         
            -
             
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                 
     | 
| 
       54 
     | 
    
         
            -
             
     | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
                 
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
             
     | 
| 
       66 
     | 
    
         
            -
             
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
                 
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
             
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
             
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                 
     | 
| 
       76 
     | 
    
         
            -
             
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
             
     | 
| 
       79 
     | 
    
         
            -
             
     | 
| 
       80 
     | 
    
         
            -
             
     | 
| 
       81 
     | 
    
         
            -
             
     | 
| 
       82 
     | 
    
         
            -
             
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                 
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
       89 
     | 
    
         
            -
             
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
       92 
     | 
    
         
            -
             
     | 
| 
       93 
     | 
    
         
            -
                 
     | 
| 
       94 
     | 
    
         
            -
             
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
                 
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
             
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
             
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
                 
     | 
| 
       107 
     | 
    
         
            -
             
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
     | 
    
         
            -
             
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
             
     | 
| 
       113 
     | 
    
         
            -
                 
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
     | 
    
         
            -
             
     | 
| 
       117 
     | 
    
         
            -
             
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
       120 
     | 
    
         
            -
                 
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
             
     | 
| 
       125 
     | 
    
         
            -
             
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
             
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
                 
     | 
| 
       130 
     | 
    
         
            -
             
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
       135 
     | 
    
         
            -
                 
     | 
| 
       136 
     | 
    
         
            -
             
     | 
| 
       137 
     | 
    
         
            -
             
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
             
     | 
| 
       141 
     | 
    
         
            -
                 
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
             
     | 
| 
       144 
     | 
    
         
            -
             
     | 
| 
       145 
     | 
    
         
            -
             
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
     | 
    
         
            -
             
     | 
| 
       149 
     | 
    
         
            -
                 
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
     | 
    
         
            -
             
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
                add_foreign_key "posts", "authors"
         
     | 
| 
       158 
     | 
    
         
            -
              end
         
     | 
| 
       159 
     | 
    
         
            -
            rescue SystemExit
         
     | 
| 
      
 13 
     | 
    
         
            +
            version = 77
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            return if ActiveRecord::Migrator.current_version == version
         
     | 
| 
      
 16 
     | 
    
         
            +
            ActiveRecord::Schema.define(version: version) do
         
     | 
| 
      
 17 
     | 
    
         
            +
              self.verbose = false
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
              # These are extensions that must be enabled in order to support this database
         
     | 
| 
      
 20 
     | 
    
         
            +
              enable_extension "pgcrypto"
         
     | 
| 
      
 21 
     | 
    
         
            +
              enable_extension "plpgsql"
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              # These are user-defined types used on this database
         
     | 
| 
      
 24 
     | 
    
         
            +
              create_enum "content_status", ["created", "draft", "published", "archived"], force: :cascade
         
     | 
| 
      
 25 
     | 
    
         
            +
              create_enum "specialties", ["books", "movies", "plays"], force: :cascade
         
     | 
| 
      
 26 
     | 
    
         
            +
              create_enum "roles", ["visitor", "assistant", "manager", "admin"], force: :cascade
         
     | 
| 
      
 27 
     | 
    
         
            +
              create_enum "conflicts", ["valid", "invalid", "untrusted"], force: :cascade
         
     | 
| 
      
 28 
     | 
    
         
            +
              create_enum "types", ["A", "B", "C", "D"], force: :cascade
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
              create_table "geometries", force: :cascade do |t|
         
     | 
| 
      
 31 
     | 
    
         
            +
                t.point   "point"
         
     | 
| 
      
 32 
     | 
    
         
            +
                t.line    "line"
         
     | 
| 
      
 33 
     | 
    
         
            +
                t.lseg    "lseg"
         
     | 
| 
      
 34 
     | 
    
         
            +
                t.box     "box"
         
     | 
| 
      
 35 
     | 
    
         
            +
                t.path    "closed_path"
         
     | 
| 
      
 36 
     | 
    
         
            +
                t.path    "open_path"
         
     | 
| 
      
 37 
     | 
    
         
            +
                t.polygon "polygon"
         
     | 
| 
      
 38 
     | 
    
         
            +
                t.circle  "circle"
         
     | 
| 
      
 39 
     | 
    
         
            +
              end
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              create_table "time_keepers", force: :cascade do |t|
         
     | 
| 
      
 42 
     | 
    
         
            +
                t.daterange "available"
         
     | 
| 
      
 43 
     | 
    
         
            +
                t.tsrange   "period"
         
     | 
| 
      
 44 
     | 
    
         
            +
                t.tstzrange "tzperiod"
         
     | 
| 
      
 45 
     | 
    
         
            +
                t.interval  "th"
         
     | 
| 
      
 46 
     | 
    
         
            +
              end
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
              create_table "tags", force: :cascade do |t|
         
     | 
| 
      
 49 
     | 
    
         
            +
                t.string "name"
         
     | 
| 
      
 50 
     | 
    
         
            +
              end
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
              create_table "videos", force: :cascade do |t|
         
     | 
| 
      
 53 
     | 
    
         
            +
                t.bigint   "tag_ids", array: true
         
     | 
| 
      
 54 
     | 
    
         
            +
                t.string   "title"
         
     | 
| 
      
 55 
     | 
    
         
            +
                t.string   "url"
         
     | 
| 
      
 56 
     | 
    
         
            +
                t.enum     "type", subtype: :types
         
     | 
| 
      
 57 
     | 
    
         
            +
                t.enum     "conflicts", subtype: :conflicts, array: true
         
     | 
| 
      
 58 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 59 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 60 
     | 
    
         
            +
              end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
              create_table "authors", force: :cascade do |t|
         
     | 
| 
      
 63 
     | 
    
         
            +
                t.string   "name"
         
     | 
| 
      
 64 
     | 
    
         
            +
                t.string   "type"
         
     | 
| 
      
 65 
     | 
    
         
            +
                t.enum     "specialty", subtype: :specialties
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
              create_table "texts", force: :cascade do |t|
         
     | 
| 
      
 69 
     | 
    
         
            +
                t.integer  "user_id"
         
     | 
| 
      
 70 
     | 
    
         
            +
                t.string   "content"
         
     | 
| 
      
 71 
     | 
    
         
            +
                t.enum     "conflict",  subtype: :conflicts
         
     | 
| 
      
 72 
     | 
    
         
            +
              end
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
              create_table "comments", force: :cascade do |t|
         
     | 
| 
      
 75 
     | 
    
         
            +
                t.integer "user_id",    null: false
         
     | 
| 
      
 76 
     | 
    
         
            +
                t.integer "comment_id"
         
     | 
| 
      
 77 
     | 
    
         
            +
                t.integer "video_id"
         
     | 
| 
      
 78 
     | 
    
         
            +
                t.text    "content",    null: false
         
     | 
| 
      
 79 
     | 
    
         
            +
                t.string  "kind"
         
     | 
| 
      
 80 
     | 
    
         
            +
                t.index ["user_id"], name: "index_comments_on_user_id", using: :btree
         
     | 
| 
      
 81 
     | 
    
         
            +
                t.index ["comment_id"], name: "index_comments_on_comment_id", using: :btree
         
     | 
| 
      
 82 
     | 
    
         
            +
              end
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
              create_table "courses", force: :cascade do |t|
         
     | 
| 
      
 85 
     | 
    
         
            +
                t.string   "title",      null: false
         
     | 
| 
      
 86 
     | 
    
         
            +
                t.interval "duration"
         
     | 
| 
      
 87 
     | 
    
         
            +
                t.enum     "types", subtype: :types, array: true
         
     | 
| 
      
 88 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 89 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 90 
     | 
    
         
            +
              end
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
              create_table "images", force: :cascade, id: false do |t|
         
     | 
| 
      
 93 
     | 
    
         
            +
                t.string "file"
         
     | 
| 
      
 94 
     | 
    
         
            +
              end
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
              create_table "posts", force: :cascade do |t|
         
     | 
| 
      
 97 
     | 
    
         
            +
                t.integer  "author_id"
         
     | 
| 
      
 98 
     | 
    
         
            +
                t.integer  "activity_id"
         
     | 
| 
      
 99 
     | 
    
         
            +
                t.string   "title"
         
     | 
| 
      
 100 
     | 
    
         
            +
                t.text     "content"
         
     | 
| 
      
 101 
     | 
    
         
            +
                t.enum     "status",    subtype: :content_status
         
     | 
| 
      
 102 
     | 
    
         
            +
                t.index ["author_id"], name: "index_posts_on_author_id", using: :btree
         
     | 
| 
      
 103 
     | 
    
         
            +
              end
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
              create_table "items", force: :cascade do |t|
         
     | 
| 
      
 106 
     | 
    
         
            +
                t.string   "name"
         
     | 
| 
      
 107 
     | 
    
         
            +
                t.bigint   "tag_ids", array: true, default: "{1}"
         
     | 
| 
      
 108 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 109 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 110 
     | 
    
         
            +
              end
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
              create_table "users", force: :cascade do |t|
         
     | 
| 
      
 113 
     | 
    
         
            +
                t.string   "name",       null: false
         
     | 
| 
      
 114 
     | 
    
         
            +
                t.enum     "role",                    subtype: :roles, default: :visitor
         
     | 
| 
      
 115 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 116 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 117 
     | 
    
         
            +
              end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
              create_table "activities", force: :cascade do |t|
         
     | 
| 
      
 120 
     | 
    
         
            +
                t.integer  "author_id"
         
     | 
| 
      
 121 
     | 
    
         
            +
                t.string   "title"
         
     | 
| 
      
 122 
     | 
    
         
            +
                t.boolean  "active"
         
     | 
| 
      
 123 
     | 
    
         
            +
                t.enum     "kind",                    subtype: :types
         
     | 
| 
      
 124 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 125 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 126 
     | 
    
         
            +
              end
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
              create_table "questions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
         
     | 
| 
      
 129 
     | 
    
         
            +
                t.string   "title"
         
     | 
| 
      
 130 
     | 
    
         
            +
                t.datetime "created_at", null: false
         
     | 
| 
      
 131 
     | 
    
         
            +
                t.datetime "updated_at", null: false
         
     | 
| 
      
 132 
     | 
    
         
            +
              end
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
              create_table "activity_books", force: :cascade, inherits: :activities do |t|
         
     | 
| 
      
 135 
     | 
    
         
            +
                t.text     "description"
         
     | 
| 
      
 136 
     | 
    
         
            +
                t.string   "url"
         
     | 
| 
      
 137 
     | 
    
         
            +
                t.boolean  "activated"
         
     | 
| 
      
 138 
     | 
    
         
            +
              end
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
              create_table "activity_posts", force: :cascade, inherits: [:activities, :images] do |t|
         
     | 
| 
      
 141 
     | 
    
         
            +
                t.integer  "post_id"
         
     | 
| 
      
 142 
     | 
    
         
            +
                t.string   "url"
         
     | 
| 
      
 143 
     | 
    
         
            +
                t.integer  "activated"
         
     | 
| 
      
 144 
     | 
    
         
            +
              end
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
              create_table "activity_post_samples", force: :cascade, inherits: :activity_posts
         
     | 
| 
      
 147 
     | 
    
         
            +
             
     | 
| 
      
 148 
     | 
    
         
            +
              create_table "question_selects", force: :cascade, inherits: :questions do |t|
         
     | 
| 
      
 149 
     | 
    
         
            +
                t.string  "options", array: true
         
     | 
| 
      
 150 
     | 
    
         
            +
              end
         
     | 
| 
      
 151 
     | 
    
         
            +
             
     | 
| 
      
 152 
     | 
    
         
            +
              # create_table "activity_blanks", force: :cascade, inherits: :activities
         
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
              # create_table "activity_images", force: :cascade, inherits: [:activities, :images]
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
              add_foreign_key "posts", "authors"
         
     | 
| 
       160 
157 
     | 
    
         
             
            end
         
     | 
| 
      
 158 
     | 
    
         
            +
             
     | 
| 
      
 159 
     | 
    
         
            +
            ActiveRecord::Base.connection.schema_cache.clear!
         
     | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | 
         @@ -8,9 +8,13 @@ require 'byebug' 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            Dotenv.load
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
            ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] 
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
      
 11 
     | 
    
         
            +
            ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || {
         
     | 
| 
      
 12 
     | 
    
         
            +
              adapter: 'postgresql',
         
     | 
| 
      
 13 
     | 
    
         
            +
              username: 'travis',
         
     | 
| 
      
 14 
     | 
    
         
            +
              port: 5433,
         
     | 
| 
      
 15 
     | 
    
         
            +
            })
         
     | 
| 
       13 
16 
     | 
    
         | 
| 
      
 17 
     | 
    
         
            +
            cache = ActiveRecord::Base.connection.schema_cache
         
     | 
| 
       14 
18 
     | 
    
         
             
            cleaner = ->() do
         
     | 
| 
       15 
19 
     | 
    
         
             
              cache.instance_variable_set(:@inheritance_loaded, false)
         
     | 
| 
       16 
20 
     | 
    
         
             
              cache.instance_variable_set(:@inheritance_dependencies, {})
         
     | 
| 
         @@ -27,6 +31,7 @@ I18n.load_path << Pathname.pwd.join('spec', 'en.yml') 
     | 
|
| 
       27 
31 
     | 
    
         
             
            RSpec.configure do |config|
         
     | 
| 
       28 
32 
     | 
    
         
             
              config.extend Mocks::CreateTable
         
     | 
| 
       29 
33 
     | 
    
         
             
              config.include Mocks::CacheQuery
         
     | 
| 
      
 34 
     | 
    
         
            +
              config.include FactoryBot::Syntax::Methods
         
     | 
| 
       30 
35 
     | 
    
         | 
| 
       31 
36 
     | 
    
         
             
              config.formatter = :documentation
         
     | 
| 
       32 
37 
     | 
    
         
             
              config.color     = true
         
     | 
    
        data/spec/tests/arel_spec.rb
    CHANGED
    
    | 
         @@ -55,6 +55,12 @@ RSpec.describe 'Arel' do 
     | 
|
| 
       55 
55 
     | 
    
         
             
                after(:context) { Torque::PostgreSQL.config.use_extended_defaults = false }
         
     | 
| 
       56 
56 
     | 
    
         
             
                after { Author.reset_column_information }
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
      
 58 
     | 
    
         
            +
                it 'does not break the change column default value method' do
         
     | 
| 
      
 59 
     | 
    
         
            +
                  connection.add_column(:authors, :enabled, :boolean)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  expect { connection.change_column_default(:authors, :enabled, { from: nil, to: true }) }.not_to raise_error
         
     | 
| 
      
 61 
     | 
    
         
            +
                  expect(Author.columns_hash['enabled'].default).to eq('true')
         
     | 
| 
      
 62 
     | 
    
         
            +
                end
         
     | 
| 
      
 63 
     | 
    
         
            +
             
     | 
| 
       58 
64 
     | 
    
         
             
                it 'does not break jsonb' do
         
     | 
| 
       59 
65 
     | 
    
         
             
                  expect { connection.add_column(:authors, :profile, :jsonb, default: []) }.not_to raise_error
         
     | 
| 
       60 
66 
     | 
    
         
             
                  expect(Author.columns_hash['profile'].default).to eq('[]')
         
     | 
| 
         @@ -76,6 +82,13 @@ RSpec.describe 'Arel' do 
     | 
|
| 
       76 
82 
     | 
    
         
             
                  expect { connection.add_column(:authors, :tag_ids, :string, array: true, default: value) }.not_to raise_error
         
     | 
| 
       77 
83 
     | 
    
         
             
                  expect(Author.columns_hash['tag_ids'].default).to eq(value)
         
     | 
| 
       78 
84 
     | 
    
         
             
                end
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                it 'works with change column default value' do
         
     | 
| 
      
 87 
     | 
    
         
            +
                  value = ['2', '3']
         
     | 
| 
      
 88 
     | 
    
         
            +
                  connection.add_column(:authors, :tag_ids, :string, array: true)
         
     | 
| 
      
 89 
     | 
    
         
            +
                  expect { connection.change_column_default(:authors, :tag_ids, { from: nil, to: value }) }.not_to raise_error
         
     | 
| 
      
 90 
     | 
    
         
            +
                  expect(Author.columns_hash['tag_ids'].default).to eq(value)
         
     | 
| 
      
 91 
     | 
    
         
            +
                end
         
     | 
| 
       79 
92 
     | 
    
         
             
              end
         
     | 
| 
       80 
93 
     | 
    
         | 
| 
       81 
94 
     | 
    
         
             
              context 'on cast' do
         
     | 
| 
         @@ -339,6 +339,19 @@ RSpec.describe 'BelongsToMany' do 
     | 
|
| 
       339 
339 
     | 
    
         
             
                  expect(entries.first.tags.size).to be_eql(5)
         
     | 
| 
       340 
340 
     | 
    
         
             
                end
         
     | 
| 
       341 
341 
     | 
    
         | 
| 
      
 342 
     | 
    
         
            +
                it 'can preload records using ActiveRecord::Associations::Preloader' do
         
     | 
| 
      
 343 
     | 
    
         
            +
                  records = FactoryBot.create_list(:tag, 5)
         
     | 
| 
      
 344 
     | 
    
         
            +
                  subject.tags.concat(records)
         
     | 
| 
      
 345 
     | 
    
         
            +
             
     | 
| 
      
 346 
     | 
    
         
            +
                  entries = Video.all
         
     | 
| 
      
 347 
     | 
    
         
            +
                  ActiveRecord::Associations::Preloader.new.preload(entries, :tags, Tag.all)
         
     | 
| 
      
 348 
     | 
    
         
            +
                  entries = entries.load
         
     | 
| 
      
 349 
     | 
    
         
            +
             
     | 
| 
      
 350 
     | 
    
         
            +
                  expect(entries.size).to be_eql(1)
         
     | 
| 
      
 351 
     | 
    
         
            +
                  expect(entries.first.tags).to be_loaded
         
     | 
| 
      
 352 
     | 
    
         
            +
                  expect(entries.first.tags.size).to be_eql(5)
         
     | 
| 
      
 353 
     | 
    
         
            +
                end
         
     | 
| 
      
 354 
     | 
    
         
            +
             
     | 
| 
       342 
355 
     | 
    
         
             
                it 'can joins records' do
         
     | 
| 
       343 
356 
     | 
    
         
             
                  query = Video.all.joins(:tags)
         
     | 
| 
       344 
357 
     | 
    
         
             
                  expect(query.to_sql).to match(/INNER JOIN "tags"/)
         
     | 
    
        data/spec/tests/enum_set_spec.rb
    CHANGED
    
    | 
         @@ -3,6 +3,7 @@ require 'spec_helper' 
     | 
|
| 
       3 
3 
     | 
    
         
             
            RSpec.describe 'Enum' do
         
     | 
| 
       4 
4 
     | 
    
         
             
              let(:connection) { ActiveRecord::Base.connection }
         
     | 
| 
       5 
5 
     | 
    
         
             
              let(:attribute_klass) { Torque::PostgreSQL::Attributes::EnumSet }
         
     | 
| 
      
 6 
     | 
    
         
            +
              let(:table_definition) { ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition }
         
     | 
| 
       6 
7 
     | 
    
         | 
| 
       7 
8 
     | 
    
         
             
              def decorate(model, field, options = {})
         
     | 
| 
       8 
9 
     | 
    
         
             
                attribute_klass.include_on(model, :enum_set)
         
     | 
| 
         @@ -25,7 +26,7 @@ RSpec.describe 'Enum' do 
     | 
|
| 
       25 
26 
     | 
    
         
             
              end
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
28 
     | 
    
         
             
              context 'on table definition' do
         
     | 
| 
       28 
     | 
    
         
            -
                subject {  
     | 
| 
      
 29 
     | 
    
         
            +
                subject { table_definition.new(connection, 'articles') }
         
     | 
| 
       29 
30 
     | 
    
         | 
| 
       30 
31 
     | 
    
         
             
                it 'can be defined as an array' do
         
     | 
| 
       31 
32 
     | 
    
         
             
                  subject.enum(:content_status, array: true)
         
     | 
    
        data/spec/tests/enum_spec.rb
    CHANGED
    
    | 
         @@ -3,6 +3,7 @@ require 'spec_helper' 
     | 
|
| 
       3 
3 
     | 
    
         
             
            RSpec.describe 'Enum' do
         
     | 
| 
       4 
4 
     | 
    
         
             
              let(:connection) { ActiveRecord::Base.connection }
         
     | 
| 
       5 
5 
     | 
    
         
             
              let(:attribute_klass) { Torque::PostgreSQL::Attributes::Enum }
         
     | 
| 
      
 6 
     | 
    
         
            +
              let(:table_definition) { ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition }
         
     | 
| 
       6 
7 
     | 
    
         | 
| 
       7 
8 
     | 
    
         
             
              def decorate(model, field, options = {})
         
     | 
| 
       8 
9 
     | 
    
         
             
                attribute_klass.include_on(model, :pg_enum)
         
     | 
| 
         @@ -85,7 +86,7 @@ RSpec.describe 'Enum' do 
     | 
|
| 
       85 
86 
     | 
    
         
             
              end
         
     | 
| 
       86 
87 
     | 
    
         | 
| 
       87 
88 
     | 
    
         
             
              context 'on table definition' do
         
     | 
| 
       88 
     | 
    
         
            -
                subject {  
     | 
| 
      
 89 
     | 
    
         
            +
                subject { table_definition.new(connection, 'articles') }
         
     | 
| 
       89 
90 
     | 
    
         | 
| 
       90 
91 
     | 
    
         
             
                it 'has the enum method' do
         
     | 
| 
       91 
92 
     | 
    
         
             
                  expect(subject).to respond_to(:enum)
         
     | 
    
        data/spec/tests/interval_spec.rb
    CHANGED
    
    | 
         @@ -2,6 +2,7 @@ require 'spec_helper' 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            RSpec.describe 'Interval' do
         
     | 
| 
       4 
4 
     | 
    
         
             
              let(:connection) { ActiveRecord::Base.connection }
         
     | 
| 
      
 5 
     | 
    
         
            +
              let(:table_definition) { ActiveRecord::ConnectionAdapters::PostgreSQL::TableDefinition }
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
7 
     | 
    
         
             
              context 'on settings' do
         
     | 
| 
       7 
8 
     | 
    
         
             
                it 'must be set to ISO 8601' do
         
     | 
| 
         @@ -10,7 +11,7 @@ RSpec.describe 'Interval' do 
     | 
|
| 
       10 
11 
     | 
    
         
             
              end
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
       12 
13 
     | 
    
         
             
              context 'on table definition' do
         
     | 
| 
       13 
     | 
    
         
            -
                subject {  
     | 
| 
      
 14 
     | 
    
         
            +
                subject { table_definition.new(connection, 'articles') }
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
                it 'has the interval method' do
         
     | 
| 
       16 
17 
     | 
    
         
             
                  expect(subject).to respond_to(:interval)
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: torque-postgresql
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.2.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Carlos Silva
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire: 
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date:  
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-03-31 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -124,40 +124,34 @@ dependencies: 
     | 
|
| 
       124 
124 
     | 
    
         
             
                requirements:
         
     | 
| 
       125 
125 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       126 
126 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       127 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 127 
     | 
    
         
            +
                    version: '6.2'
         
     | 
| 
       128 
128 
     | 
    
         
             
                - - ">="
         
     | 
| 
       129 
129 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       130 
     | 
    
         
            -
                    version:  
     | 
| 
      
 130 
     | 
    
         
            +
                    version: 6.2.1
         
     | 
| 
       131 
131 
     | 
    
         
             
              type: :development
         
     | 
| 
       132 
132 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       133 
133 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       134 
134 
     | 
    
         
             
                requirements:
         
     | 
| 
       135 
135 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       136 
136 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       137 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 137 
     | 
    
         
            +
                    version: '6.2'
         
     | 
| 
       138 
138 
     | 
    
         
             
                - - ">="
         
     | 
| 
       139 
139 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       140 
     | 
    
         
            -
                    version:  
     | 
| 
      
 140 
     | 
    
         
            +
                    version: 6.2.1
         
     | 
| 
       141 
141 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       142 
142 
     | 
    
         
             
              name: faker
         
     | 
| 
       143 
143 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       144 
144 
     | 
    
         
             
                requirements:
         
     | 
| 
       145 
145 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       146 
146 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       147 
     | 
    
         
            -
                    version: ' 
     | 
| 
       148 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       149 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       150 
     | 
    
         
            -
                    version: 1.5.0
         
     | 
| 
      
 147 
     | 
    
         
            +
                    version: '2.20'
         
     | 
| 
       151 
148 
     | 
    
         
             
              type: :development
         
     | 
| 
       152 
149 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       153 
150 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       154 
151 
     | 
    
         
             
                requirements:
         
     | 
| 
       155 
152 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       156 
153 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       157 
     | 
    
         
            -
                    version: ' 
     | 
| 
       158 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       159 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       160 
     | 
    
         
            -
                    version: 1.5.0
         
     | 
| 
      
 154 
     | 
    
         
            +
                    version: '2.20'
         
     | 
| 
       161 
155 
     | 
    
         
             
            description: Add support to complex resources of PostgreSQL, like data types, array
         
     | 
| 
       162 
156 
     | 
    
         
             
              associations, and auxiliary statements (CTE)
         
     | 
| 
       163 
157 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -292,7 +286,7 @@ homepage: https://github.com/crashtech/torque-postgresql 
     | 
|
| 
       292 
286 
     | 
    
         
             
            licenses:
         
     | 
| 
       293 
287 
     | 
    
         
             
            - MIT
         
     | 
| 
       294 
288 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       295 
     | 
    
         
            -
            post_install_message: 
     | 
| 
      
 289 
     | 
    
         
            +
            post_install_message:
         
     | 
| 
       296 
290 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       297 
291 
     | 
    
         
             
            require_paths:
         
     | 
| 
       298 
292 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -300,15 +294,15 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       300 
294 
     | 
    
         
             
              requirements:
         
     | 
| 
       301 
295 
     | 
    
         
             
              - - ">="
         
     | 
| 
       302 
296 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       303 
     | 
    
         
            -
                  version: 2. 
     | 
| 
      
 297 
     | 
    
         
            +
                  version: '2.6'
         
     | 
| 
       304 
298 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       305 
299 
     | 
    
         
             
              requirements:
         
     | 
| 
       306 
300 
     | 
    
         
             
              - - ">="
         
     | 
| 
       307 
301 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       308 
302 
     | 
    
         
             
                  version: 1.8.11
         
     | 
| 
       309 
303 
     | 
    
         
             
            requirements: []
         
     | 
| 
       310 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       311 
     | 
    
         
            -
            signing_key: 
     | 
| 
      
 304 
     | 
    
         
            +
            rubygems_version: 3.2.15
         
     | 
| 
      
 305 
     | 
    
         
            +
            signing_key:
         
     | 
| 
       312 
306 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       313 
307 
     | 
    
         
             
            summary: ActiveRecord extension to access PostgreSQL advanced resources
         
     | 
| 
       314 
308 
     | 
    
         
             
            test_files:
         
     | 
| 
         @@ -325,8 +319,8 @@ test_files: 
     | 
|
| 
       325 
319 
     | 
    
         
             
            - spec/mocks/create_table.rb
         
     | 
| 
       326 
320 
     | 
    
         
             
            - spec/models/activity.rb
         
     | 
| 
       327 
321 
     | 
    
         
             
            - spec/models/activity_book.rb
         
     | 
| 
       328 
     | 
    
         
            -
            - spec/models/activity_post.rb
         
     | 
| 
       329 
322 
     | 
    
         
             
            - spec/models/activity_post/sample.rb
         
     | 
| 
      
 323 
     | 
    
         
            +
            - spec/models/activity_post.rb
         
     | 
| 
       330 
324 
     | 
    
         
             
            - spec/models/author.rb
         
     | 
| 
       331 
325 
     | 
    
         
             
            - spec/models/author_journalist.rb
         
     | 
| 
       332 
326 
     | 
    
         
             
            - spec/models/comment.rb
         
     | 
| 
         @@ -335,13 +329,14 @@ test_files: 
     | 
|
| 
       335 
329 
     | 
    
         
             
            - spec/models/guest_comment.rb
         
     | 
| 
       336 
330 
     | 
    
         
             
            - spec/models/item.rb
         
     | 
| 
       337 
331 
     | 
    
         
             
            - spec/models/post.rb
         
     | 
| 
      
 332 
     | 
    
         
            +
            - spec/models/question.rb
         
     | 
| 
      
 333 
     | 
    
         
            +
            - spec/models/question_select.rb
         
     | 
| 
       338 
334 
     | 
    
         
             
            - spec/models/tag.rb
         
     | 
| 
       339 
335 
     | 
    
         
             
            - spec/models/text.rb
         
     | 
| 
       340 
336 
     | 
    
         
             
            - spec/models/time_keeper.rb
         
     | 
| 
       341 
337 
     | 
    
         
             
            - spec/models/user.rb
         
     | 
| 
       342 
338 
     | 
    
         
             
            - spec/models/video.rb
         
     | 
| 
       343 
     | 
    
         
            -
            - spec/ 
     | 
| 
       344 
     | 
    
         
            -
            - spec/models/question_select.rb
         
     | 
| 
      
 339 
     | 
    
         
            +
            - spec/schema.rb
         
     | 
| 
       345 
340 
     | 
    
         
             
            - spec/spec_helper.rb
         
     | 
| 
       346 
341 
     | 
    
         
             
            - spec/tests/arel_spec.rb
         
     | 
| 
       347 
342 
     | 
    
         
             
            - spec/tests/auxiliary_statement_spec.rb
         
     | 
| 
         @@ -360,4 +355,3 @@ test_files: 
     | 
|
| 
       360 
355 
     | 
    
         
             
            - spec/tests/range_spec.rb
         
     | 
| 
       361 
356 
     | 
    
         
             
            - spec/tests/relation_spec.rb
         
     | 
| 
       362 
357 
     | 
    
         
             
            - spec/tests/table_inheritance_spec.rb
         
     | 
| 
       363 
     | 
    
         
            -
            - spec/schema.rb
         
     |