pgbundle 0.0.16 → 0.0.17

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: c6ade210a8dde8dcdbdacc39434ba2fa11ff0e92
4
- data.tar.gz: 7e364dac3b3dfa809a770f39661d4c32bf46f7bd
3
+ metadata.gz: b6dfb5ae5fa7cfada0d93af0458f33b09bcb8bc0
4
+ data.tar.gz: 0c6bb1509dd73dd0c71882b74a2390552aafa313
5
5
  SHA512:
6
- metadata.gz: 294bafbc788b72b7c9cbc621ea447d951c028b99dc2e791d6fef5730d45a6eb2037b278408c75d6f557fb33498651ac34b55e40f0ca8d904ab50d8957c456e63
7
- data.tar.gz: 186fbf3e1cf15be94c2b72eff4cf00e34b8dec4dceaa067638abe54e94f758961ccb836b1cc8e484e0ce29af14d97bc7ba8a5a1727228b34db3a4450bf270e34
6
+ metadata.gz: c622ac0f673b6b05acdf66fac252c772707fec7860f85426d36c8ea3b6c04dad69f368fc5aa5ab4ba42165ed7e44bf0854a8d3c14d3576188b7bb68426211206
7
+ data.tar.gz: 621b7c3d94ebaaa97c40b35fbef14a004402af9bb091565113a302519e418816efe99386a375a31ae6635ae9494f86ab69233cdf386b72b8b238a76dd95d516c
data/.travis.yml CHANGED
@@ -1,9 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - rbx-2
5
4
  - 2.0.0
6
5
  - 2.1.1
6
+ - 2.2.3
7
7
  matrix:
8
8
  allow_failures:
9
9
  - rvm: rbx-2
data/README.md CHANGED
@@ -54,6 +54,7 @@ branch | an optional branch name for git or github sources defaults to `mas
54
54
  requires | an optional extension that the extension depends on
55
55
  path | any absolute or relative local path e.g. './foo/bar'
56
56
  pgxn | any repository available on http://pgxn.org/
57
+ flags | optional string used for make results in "make flags && make flags install"
57
58
 
58
59
 
59
60
  Some Extensions may require other Extensions to allow `pgbundle` to resolve dependencies
@@ -60,20 +60,20 @@ module PgBundle
60
60
  end
61
61
 
62
62
  # loads the source, runs make install and removes the source afterwards
63
- def make_install(source, ext_name)
63
+ def make_install(source, ext_name, flags)
64
64
  run("mkdir -p -m 0777 /tmp/pgbundle/")
65
65
  remove_source(ext_name)
66
66
  source.load(host, system_user, load_destination(ext_name))
67
- run(make_install_cmd(ext_name))
67
+ run(make_install_cmd(ext_name, flags))
68
68
  remove_source(ext_name)
69
69
  source.clean
70
70
  end
71
71
 
72
72
  # loads the source and runs make uninstall
73
- def make_uninstall(source, ext_name)
73
+ def make_uninstall(source, ext_name, flags)
74
74
  remove_source(ext_name)
75
75
  source.load(host, system_user, load_destination(ext_name))
76
- run(make_uninstall_cmd(ext_name))
76
+ run(make_uninstall_cmd(ext_name, flags))
77
77
  remove_source(ext_name)
78
78
  source.clean
79
79
  end
@@ -101,17 +101,17 @@ module PgBundle
101
101
  run("rm -rf #{load_destination(name)}")
102
102
  end
103
103
 
104
- def make_install_cmd(name)
104
+ def make_install_cmd(name, flags)
105
105
  <<-CMD.gsub(/\s+/, ' ').strip
106
106
  cd #{load_destination(name)} &&
107
- #{sudo} make clean &&
108
- #{sudo} make &&
109
- #{sudo} make install
107
+ #{sudo} make #{flags} clean &&
108
+ #{sudo} make #{flags} &&
109
+ #{sudo} make #{flags} install
110
110
  CMD
111
111
  end
112
112
 
113
- def make_uninstall_cmd(name)
114
- "cd #{load_destination(name)} && #{sudo} make uninstall"
113
+ def make_uninstall_cmd(name, flags)
114
+ "cd #{load_destination(name)} && #{sudo} make #{flags} uninstall"
115
115
  end
116
116
 
117
117
  def run(cmd)
@@ -10,12 +10,13 @@ module PgBundle
10
10
  # or install it along with it's dependencies
11
11
  # extension.install(database)
12
12
  class Extension
13
- attr_accessor :name, :version, :source, :resolving_dependencies
13
+ attr_accessor :name, :version, :source, :resolving_dependencies,:flags
14
14
  def initialize(*args)
15
15
  opts = args.last.is_a?(Hash) ? args.pop : {}
16
16
  @name, @version = args
17
17
  validate(opts)
18
18
  self.dependencies = opts[:requires]
19
+ self.flags = opts[:flags]
19
20
  set_source(opts)
20
21
  end
21
22
 
@@ -187,6 +188,7 @@ module PgBundle
187
188
  opts = opts.clone
188
189
  opts.delete(:requires)
189
190
  opts.delete(:branch)
191
+ opts.delete(:flags)
190
192
  if opts.size > 1
191
193
  fail PgfileError.new "multiple sources given for #{name} #{opts}"
192
194
  end
@@ -233,7 +235,7 @@ module PgBundle
233
235
  # loads the source and runs make uninstall
234
236
  # returns: self
235
237
  def make_uninstall(database)
236
- database.make_uninstall(source, name)
238
+ database.make_uninstall(source, name, flags)
237
239
  self
238
240
  end
239
241
 
@@ -248,7 +250,7 @@ module PgBundle
248
250
 
249
251
  fail SourceNotFound, name if source.nil?
250
252
 
251
- database.make_install(source, name)
253
+ database.make_install(source, name, flags)
252
254
  self
253
255
  end
254
256
 
@@ -1,3 +1,3 @@
1
1
  module Pgbundle
2
- VERSION = '0.0.16'
2
+ VERSION = '0.0.17'
3
3
  end
data/spec/Pgfile CHANGED
@@ -5,3 +5,4 @@ pgx 'bar', path: './spec/sample_extensions/bar', requires: 'ltree'
5
5
  pgx 'baz', '0.0.2', path: './spec/sample_extensions/baz', requires: 'foo'
6
6
  pgx 'foo', '0.0.1', path: './spec/sample_extensions/foo'
7
7
  pgx 'myext', github: 'adjust/numhstore', branch: 'topic'
8
+ pgx 'jsquery', github: 'postgrespro/jsquery', flags: 'USE_PGXS=1'
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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Kniep
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-22 00:00:00.000000000 Z
11
+ date: 2015-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor