postgresinator 0.0.3 → 0.0.4

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.
@@ -6,7 +6,7 @@ namespace :pg do
6
6
  desc 'Write example config files'
7
7
  task :write_example_configs do
8
8
  run_locally do
9
- execute "mkdir -p ./templates"
9
+ execute "mkdir -p ./templates/postgresql"
10
10
 
11
11
  # example postgresinator.rb
12
12
  config = File.read(File.dirname(__FILE__) + '/examples/postgresinator_example.rb')
@@ -16,21 +16,21 @@ namespace :pg do
16
16
 
17
17
  # example postgresql.conf.erb
18
18
  config = File.read(File.dirname(__FILE__) + '/examples/postgresql_example.conf.erb')
19
- File.open('./templates/postgresql_example.conf.erb', 'w') { |f| f.write(config) }
20
- info "Wrote './templates/postgres_example.conf.erb'"
21
- info "Run `mv templates/postgresql_example.conf.erb templates/postgresql.conf.erb` or diff those files and add the needed lines."
19
+ File.open('./templates/postgresql/postgresql_example.conf.erb', 'w') { |f| f.write(config) }
20
+ info "Wrote './templates/postgresql/postgres_example.conf.erb'"
21
+ info "Run `mv templates/postgresql/postgresql_example.conf.erb templates/postgresql/postgresql.conf.erb` or diff those files and add the needed lines."
22
22
 
23
23
  # example pg_hba.conf.erb
24
24
  config = File.read(File.dirname(__FILE__) + '/examples/pg_hba_example.conf.erb')
25
- File.open('./templates/pg_hba_example.conf.erb', 'w') { |f| f.write(config) }
26
- info "Wrote './templates/pg_hba_example.conf.erb'"
27
- info "Run `mv templates/pg_hba_example.conf.erb templates/pg_hba.conf.erb` or diff those files and add the needed lines."
25
+ File.open('./templates/postgresql/pg_hba_example.conf.erb', 'w') { |f| f.write(config) }
26
+ info "Wrote './templates/postgresql/pg_hba_example.conf.erb'"
27
+ info "Run `mv templates/postgresql/pg_hba_example.conf.erb templates/postgresql/pg_hba.conf.erb` or diff those files and add the needed lines."
28
28
 
29
29
  # example recovery.conf.erb
30
30
  config = File.read(File.dirname(__FILE__) + '/examples/recovery_example.conf.erb')
31
- File.open('./templates/recovery_example.conf.erb', 'w') { |f| f.write(config) }
32
- info "Wrote './templates/recovery_example.conf.erb'"
33
- info "Run `mv templates/recovery_example.conf.erb templates/recovery.conf.erb` or diff those files and add the needed lines."
31
+ File.open('./templates/postgresql/recovery_example.conf.erb', 'w') { |f| f.write(config) }
32
+ info "Wrote './templates/postgresql/recovery_example.conf.erb'"
33
+ info "Run `mv templates/postgresql/recovery_example.conf.erb templates/postgresql/recovery.conf.erb` or diff those files and add the needed lines."
34
34
  end
35
35
  end
36
36
 
@@ -98,8 +98,8 @@ namespace :config do
98
98
  config_file_found = true
99
99
  end
100
100
  fatal "Config file #{args.config_file} not found in the configuration" and raise unless config_file_found
101
- config_template_found = test("ls", "-A", "templates/#{args.config_file}.erb")
102
- fatal "Config template file templates/#{args.config_file}.erb not found locally" and raise unless config_template_found
101
+ config_template_found = test("ls", "-A", "templates/postgresql/#{args.config_file}.erb")
102
+ fatal "Config template file templates/postgresql/#{args.config_file}.erb not found locally" and raise unless config_template_found
103
103
  end
104
104
  end
105
105
 
@@ -1,6 +1,6 @@
1
1
  require 'erb'
2
2
 
3
- require './postgresinator.rb'
3
+ require './postgresinator.rb' if File.exists?('./postgresinator.rb')
4
4
 
5
5
  ## NOTES:
6
6
  # tasks without 'desc' description lines are for manual debugging of this
@@ -444,7 +444,7 @@ namespace :pg do
444
444
  def pg_generate_config_file(cluster, server, config_file)
445
445
  @cluster = cluster # needed for ERB
446
446
  @server = server # needed for ERB
447
- template_path = File.expand_path("templates/#{config_file}.erb")
447
+ template_path = File.expand_path("templates/postgresql/#{config_file}.erb")
448
448
  ERB.new(File.new(template_path).read).result(binding)
449
449
  end
450
450
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgresinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - david amick
@@ -13,6 +14,7 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rake
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - '='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - '='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: sshkit
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - '='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - '='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: hashie
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - '='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - '='
53
60
  - !ruby/object:Gem::Version
@@ -68,25 +75,26 @@ files:
68
75
  homepage: https://github.com/snarlysodboxer/postgresinator
69
76
  licenses:
70
77
  - GNU
71
- metadata: {}
72
78
  post_install_message:
73
79
  rdoc_options: []
74
80
  require_paths:
75
81
  - lib
76
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
77
84
  requirements:
78
- - - '>='
85
+ - - ! '>='
79
86
  - !ruby/object:Gem::Version
80
87
  version: 1.9.3
81
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
+ none: false
82
90
  requirements:
83
- - - '>='
91
+ - - ! '>='
84
92
  - !ruby/object:Gem::Version
85
93
  version: '0'
86
94
  requirements: []
87
95
  rubyforge_project:
88
- rubygems_version: 2.0.2
96
+ rubygems_version: 1.8.23.2
89
97
  signing_key:
90
- specification_version: 4
98
+ specification_version: 3
91
99
  summary: Deploy PostgreSQL
92
100
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 67dc7fc295b063ab6ed315426cf30f5b2d5d9735
4
- data.tar.gz: 9d23816e865134f11596cc1a4f84ac46b61bacbf
5
- SHA512:
6
- metadata.gz: 0f813adf14fdce2ff7216d7dbdc21145f5120c9a643ab329a7af992d1f275e1a72b561a939d2b33bbe12f5c1f71ccbe3a52e9f0d7b1103852b044bc81fbc1d89
7
- data.tar.gz: 8a740ce1afe9a1abec656ad566f8b9eda2c5d2f524178b25743d266f2db9e0e31757b66101baa8d74e867ea41bceccee5749c6cd556c5040def3d84c8827ea3d