pgbundle 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cff94f537fb6f373b28d7e6ff01f448366c8524
4
- data.tar.gz: 3299cc561b8af266b0c6c184700a57fba1813efa
3
+ metadata.gz: f8104bd137b95484e743490a46e0af37fa161b55
4
+ data.tar.gz: 63938a172dd9a82910f88b4974920e829315bc9f
5
5
  SHA512:
6
- metadata.gz: 7fdb90bb57db89073e3da35f8058cb26d58989612b43224d580dedebb735bf12c18e7252153789f294204503cb9edd61a1b0dca35672796fb8017917d926d532
7
- data.tar.gz: 719f623d6982d7d7e10d14b74bc292b6f09b80fcc1b30a0fe7d70b1026a19275499303a8550573cc154bec0fa1a7880eabbe1137d7d5ff9c87eef428e80cd6d9
6
+ metadata.gz: fc2a1f9ae77f4ae3e02ee0212573802d2eedc939baa79bceb142d716d47a4a49ffe689f48c84082dd5ef247e001066eb2e2edbdf083a663637ca2ad304d9aff1
7
+ data.tar.gz: f316acf106cf3ea2d27c310491384668894636d586096d73f94b7dbbacae3075779f432c8ca09a22fa9479467ce7171c88a20534f270dbac06e7ccb392b2a95a
@@ -101,13 +101,15 @@ module PgBundle
101
101
  end
102
102
 
103
103
  # installs extension and all dependencies using make install
104
+ # if optional parameter force is true the extension will be installed
105
+ # even if it's already there
104
106
  # returns true if Extension can successfully be created using CREATE EXTENSION
105
- def install(database)
107
+ def install(database, force = false)
106
108
  unless dependencies.empty?
107
- install_dependencies(database)
109
+ install_dependencies(database, force)
108
110
  end
109
111
 
110
- make_install(database)
112
+ make_install(database, force)
111
113
  raise ExtensionNotFound.new(name, version) unless installed?(database)
112
114
 
113
115
  add_missing_required_dependencies(database)
@@ -196,8 +198,8 @@ module PgBundle
196
198
 
197
199
  # loads the source and runs make install
198
200
  # returns: self
199
- def make_install(database)
200
- return self if installed?(database)
201
+ def make_install(database, force = false)
202
+ return self if installed?(database) && !force
201
203
 
202
204
  fail SourceNotFound, name if source.nil?
203
205
 
@@ -212,10 +214,10 @@ module PgBundle
212
214
  stmt
213
215
  end
214
216
 
215
- def install_dependencies(database)
217
+ def install_dependencies(database, force = false)
216
218
  begin
217
219
  dependencies.each do |_, d|
218
- d.install(database)
220
+ d.install(database, force)
219
221
  end
220
222
  rescue InstallError, ExtensionCreateError => e
221
223
  raise DependencyNotFound.new(name, e.message)
@@ -1,3 +1,3 @@
1
1
  module Pgbundle
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgbundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Kniep
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-04 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.2.2
188
+ rubygems_version: 2.2.1
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: bundling postgres extension