postmodern 0.0.1 → 0.0.2

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: a5c784229485ecec571c7877624b71d5513225a3
4
- data.tar.gz: 58a3f6b274a7311f3df6a9fa8ddabd38bb6bad24
3
+ metadata.gz: beb70176f9b6a2673c3b36ed4ca232890683d18f
4
+ data.tar.gz: c60027334210357bd684049bd09e5269e34c491e
5
5
  SHA512:
6
- metadata.gz: 01a23ef7ca4d48fe7d203848988c6ff88c26a8b763afd39603bb4c5e77bf989a93b32f0ab1d0a3a0397fa4b2aa861b9939427090c79f48bfd91a49e9b57d69b4
7
- data.tar.gz: e4281cb4f07e82cc45434c97f13507e6d123fc1266b8d9e77898cbde36f7b2ccd6f5ac9367e62046990ab60655703c342fda356e7f965d14b9b402589dbeeb03
6
+ metadata.gz: dffefefa12f86d9efb264c89c4ded2bc639d7f718f5c657cefef37219c318d652d4ef2b1eeb2c5876a9df34e21de5dfaf79eb4f564d8e53fa22f0304bd1fd753
7
+ data.tar.gz: 705628ee8b7e61baf35b1b2d503d949a9d9e84eb6a4f27dd4079e283fe171008bd9bc2fd099ad975fdab1d3698517f536a05f76a4fa40c0a2a6d5b1487a0caae
data/.travis.yml CHANGED
@@ -0,0 +1,8 @@
1
+ addons:
2
+ postgresql: "9.3"
3
+ language: ruby
4
+ rvm:
5
+ - 2.1.2
6
+ script: "bundle exec rspec"
7
+ notifications:
8
+ email: false
data/Gemfile CHANGED
@@ -9,6 +9,7 @@ end
9
9
 
10
10
  group :test do
11
11
  gem 'rspec'
12
+ gem 'aruba-rspec'
12
13
  gem 'guard-bundler'
13
14
  gem 'guard-rspec'
14
15
  gem 'terminal-notifier-guard', require: RUBY_PLATFORM.include?('darwin')
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Postmodern
2
2
  ==========
3
3
 
4
+ [![Build Status](https://travis-ci.org/wanelo/postmodern.svg?branch=master)](https://travis-ci.org/wanelo/postmodern)
5
+
4
6
  Tools for managing PostgreSQL databases.
5
7
 
6
8
  ## Installation
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ export WAL_ARCHIVE_FILE=$1
4
+ export WAL_ARCHIVE_PATH=$2
5
+
6
+ echo "Archiving file: ${WAL_ARCHIVE_FILE}"
7
+ echo "Archiving path: ${WAL_ARCHIVE_PATH}"
8
+
9
+ pg_wal_archive.local
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ pg_wal_restore.local $1 $2
@@ -1,3 +1,3 @@
1
1
  module Postmodern
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/postmodern.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.test_files = spec.files.grep(%r{^spec/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'pg_wal_archive' do
4
+ before do
5
+ double_cmd('pg_wal_archive.local')
6
+ end
7
+
8
+ it 'exports WAL_ARCHIVE_FILE' do
9
+ expect(`bin/pg_wal_archive filename filepath`).to include('Archiving file: filename')
10
+ end
11
+
12
+ it 'exports WAL_ARCHIVE_PATH' do
13
+ expect(`bin/pg_wal_archive filename filepath`).to include('Archiving path: filepath')
14
+ end
15
+
16
+ it 'calls a local file with file name and path' do
17
+ expect {
18
+ `bin/pg_wal_archive 11111 222222`
19
+ }.to shellout('pg_wal_archive.local')
20
+ end
21
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'pg_wal_restore' do
4
+ before do
5
+ double_cmd('pg_wal_restore.local')
6
+ end
7
+
8
+ it 'calls a local file with file name and path' do
9
+ expect {
10
+ `bin/pg_wal_restore 11111 222222`
11
+ }.to shellout('pg_wal_restore.local 11111 222222')
12
+ end
13
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,19 @@
1
+ require 'aruba/rspec'
2
+
1
3
  RSpec.configure do |config|
2
4
  config.treat_symbols_as_metadata_keys_with_true_values = true
3
5
  config.run_all_when_everything_filtered = true
4
6
  config.filter_run :focus
5
7
 
6
8
  config.order = 'random' # Use --seed NNNN to run in particular order
9
+
10
+ config.include ArubaDoubles
11
+
12
+ config.before :each do
13
+ Aruba::RSpec.setup
14
+ end
15
+
16
+ config.after :each do
17
+ Aruba::RSpec.teardown
18
+ end
7
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postmodern
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Saxby
@@ -41,7 +41,9 @@ dependencies:
41
41
  description: Tools for managing PostgreSQL
42
42
  email:
43
43
  - sax@livinginthepast.org
44
- executables: []
44
+ executables:
45
+ - pg_wal_archive
46
+ - pg_wal_restore
45
47
  extensions: []
46
48
  extra_rdoc_files: []
47
49
  files:
@@ -53,9 +55,13 @@ files:
53
55
  - LICENSE.txt
54
56
  - README.md
55
57
  - Rakefile
58
+ - bin/pg_wal_archive
59
+ - bin/pg_wal_restore
56
60
  - lib/postmodern.rb
57
61
  - lib/postmodern/version.rb
58
62
  - postmodern.gemspec
63
+ - spec/bin/pg_wal_archive_spec.rb
64
+ - spec/bin/pg_wal_restore_spec.rb
59
65
  - spec/spec_helper.rb
60
66
  homepage: https://github.com/wanelo/postmodern
61
67
  licenses:
@@ -82,5 +88,7 @@ signing_key:
82
88
  specification_version: 4
83
89
  summary: Tools for managing PostgreSQL
84
90
  test_files:
91
+ - spec/bin/pg_wal_archive_spec.rb
92
+ - spec/bin/pg_wal_restore_spec.rb
85
93
  - spec/spec_helper.rb
86
94
  has_rdoc: