pg_saurus 2.4.1 → 2.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7a1e92934deea6ba975df2c5794d6cbbe018095
4
- data.tar.gz: 897243ea0241e00197b1bae4085d1401530e0fcc
3
+ metadata.gz: e7f0e180c96a321a71e1aa1757983a687772b225
4
+ data.tar.gz: 0a51ad8063f1f64470a1dbe30946d9dd915f5519
5
5
  SHA512:
6
- metadata.gz: fc76e020d12815030f5fcea206bb639c70a3f97c16e8deeb75acbcc6dca011b5d299f8c1027e7265c35dd9a8bfb4ed2aa6474d6dedbd603a6e61483c1a6ce0d9
7
- data.tar.gz: f255fb8349f53b7f7888486b841b8dcda64720032d3f27e010270f45903511430313ed37e0c054eba12224e5769dbf357ee50332a30f61e35470bf28835013ac
6
+ metadata.gz: 2ee54173853996fac5017ead346c9c42cd991d717905abc1f1d5c8c44d2d1b2b3f0e13d80d8f16ca198a312d63f57ddcdf3f8f48bc2ad6ac9292126606407805
7
+ data.tar.gz: 9ce8e72c2e41bf90bc5e17a435f2f007a1d039e6682fd23bcfd629bb9387cbf53b477a827a8e7b583b9afc9a47057b18f3104326ad6faf58ca6219e8519814b5
@@ -52,6 +52,20 @@ module PgSaurus::ConnectionAdapters::PostgreSQLAdapter::ExtensionMethods
52
52
  execute(sql)
53
53
  end
54
54
 
55
+ # Execute SQL to load a postgresql extension module into the current database
56
+ # if it does not already exist. Then reload the type map.
57
+ #
58
+ # @param [#to_s] extension_name Name of the extension module to load
59
+ # @param [Hash] options
60
+ # @option options [#to_s,nil] :schema_name The name of the schema in which to install the extension's objects
61
+ # @option options [#to_s,nil] :version The version of the extension to install
62
+ # @option options [#to_s,nil] :old_version Alternative installation script name
63
+ # that absorbs the existing objects into the extension, instead of creating new objects
64
+ def enable_extension(extension_name, options = {})
65
+ options[:if_not_exists] = true
66
+ create_extension(extension_name, options).tap { reload_type_map }
67
+ end
68
+
55
69
  # Execute SQL to remove a postgresql extension module from the current database.
56
70
  #
57
71
  # @param [#to_s] extension_name Name of the extension module to unload
@@ -1,4 +1,4 @@
1
1
  module PgSaurus
2
2
  # Version of pg_saurus gem.
3
- VERSION = "2.4.1"
3
+ VERSION = "2.4.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_saurus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Potapov Sergey
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  version: '0'
241
241
  requirements: []
242
242
  rubyforge_project:
243
- rubygems_version: 2.4.3
243
+ rubygems_version: 2.2.2
244
244
  signing_key:
245
245
  specification_version: 4
246
246
  summary: ActiveRecord extensions for PostgreSQL.