duple 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -16,4 +16,5 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  scratch
19
- config
19
+ /config
20
+
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.0.3 (October 21, 2012) - Fixed missing template file
2
+
3
+ * Fixed missing template file
4
+
1
5
  ## 0.0.2 (October 21, 2012) - Fix local db config
2
6
 
3
7
  * Load db connection details from the config file.
@@ -1,3 +1,3 @@
1
1
  module Duple
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,35 @@
1
+ dump_dir: tmp
2
+
3
+ environments:
4
+ development:
5
+ type: local
6
+ default_target: true
7
+ database: duple_development
8
+
9
+ stage:
10
+ type: heroku
11
+ appname: duple-stage
12
+ default_source: true
13
+
14
+ production:
15
+ type: heroku
16
+ appname: duple-production
17
+ allow_target: false
18
+
19
+ groups:
20
+ all:
21
+ include_all: true # Include all tables
22
+
23
+ minimal:
24
+ include_tables: # Include only the listed tables
25
+ - categories
26
+ - links
27
+
28
+ all_but_comments: # Note: This behaves identically to the no_comments group.
29
+ include_all: true
30
+ exclude_tables:
31
+ - comments
32
+
33
+ no_comments:
34
+ exclude_tables: # Include all but the listed tables
35
+ - comments
@@ -0,0 +1,11 @@
1
+ === duple-stage Config Vars
2
+ BUNDLE_WITHOUT: development:test
3
+ DATABASE_URL: postgres://pg-user:pg-pass@pg-host:6022/pg-db
4
+ GEM_PATH: vendor/bundle/ruby/1.9.1
5
+ HEROKU_POSTGRESQL_COPPER_URL: postgres://pg-user:pg-pass@pg-host:6022/pg-db
6
+ LANG: en_US.UTF-8
7
+ PATH: bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
8
+ PGBACKUPS_URL: https://pgb-user:pgb-pass@pgbackups.heroku.com/client
9
+ RACK_ENV: stage
10
+ RAILS_ENV: stage
11
+ TZ: America/Los_Angeles
@@ -0,0 +1,21 @@
1
+ ID Backup Time Size Database
2
+ ---- ------------------- ------- -----------------------------------------
3
+ b001 2012/05/17 19:38.41 74.7MB HEROKU_POSTGRESQL_BRONZE
4
+ b008 2012/05/23 15:35.47 77.7MB HEROKU_POSTGRESQL_JADE
5
+ b009 2012/05/23 16:03.48 68.9MB HEROKU_POSTGRESQL_JADE
6
+ b012 2012/05/25 09:23.30 69.6MB HEROKU_POSTGRESQL_JADE
7
+ b108 2012/08/29 11:42.26 127.1MB HEROKU_POSTGRESQL_JADE (DATABASE_URL)
8
+ a113 2012/09/07 20:02.09 133.0MB DATABASE_URL
9
+ b123 2012/09/12 15:47.53 136.9MB HEROKU_POSTGRESQL_JADE (DATABASE_URL)
10
+ a120 2012/09/14 20:02.10 139.1MB DATABASE_URL
11
+ a127 2012/09/21 20:04.39 143.8MB DATABASE_URL
12
+ a134 2012/09/28 20:06.11 148.5MB DATABASE_URL
13
+ a141 2012/10/06 20:01.02 153.4MB DATABASE_URL
14
+ a148 2012/10/13 03:17.12 157.7MB DATABASE_URL
15
+ a149 2012/10/14 03:10.06 157.8MB DATABASE_URL
16
+ a150 2012/10/15 03:16.00 158.0MB DATABASE_URL
17
+ a151 2012/10/16 03:07.30 159.3MB DATABASE_URL
18
+ b158 2012/10/16 21:18.39 160.0MB HEROKU_POSTGRESQL_JADE_URL (DATABASE_URL)
19
+ a152 2012/10/17 03:08.05 160.1MB DATABASE_URL
20
+ a153 2012/10/18 08:25.08 160.8MB DATABASE_URL
21
+ a154 2012/10/19 03:09.30 161.4MB DATABASE_URL
@@ -0,0 +1 @@
1
+ "https://s3.amazonaws.com/hkpgbackups/app1234567@heroku.com/a152.dump?AWSAccessKeyId=AWS_ACCESS_KEY&Expires=1350509032&Signature=xxXpNx8GSTFv%2BW48thrUaAtPszk%3D"
@@ -0,0 +1,71 @@
1
+ dump_dir: tmp
2
+ postgres_user: <%= ENV['POSTGRES_DEV_USER'] || 'postgres' %>
3
+
4
+ environments:
5
+ development:
6
+ type: local
7
+ default_target: true
8
+
9
+ backstage:
10
+ type: heroku
11
+ appname: duple-backstage
12
+
13
+ stage:
14
+ type: heroku
15
+ appname: duple-stage
16
+ default_source: true
17
+
18
+ production:
19
+ type: heroku
20
+ appname: duple-production
21
+ allow_target: false
22
+
23
+ pre_refresh:
24
+ disable_target:
25
+ - subject: target
26
+ command_type: heroku
27
+ command: maintenance:on
28
+ - subject: target
29
+ command_type: heroku
30
+ command: ps:scale worker=0
31
+
32
+ post_refresh:
33
+ enable_target:
34
+ - subject: target
35
+ command_type: heroku
36
+ command: restart
37
+ - subject: target
38
+ command_type: heroku
39
+ command: maintenance:off
40
+ - subject: target
41
+ command_type: heroku
42
+ command: ps:scale worker=1
43
+ migrate:
44
+ - subject: target
45
+ command_type: rake
46
+ command: db:migrate
47
+ scrub_data:
48
+ - subject: target
49
+ command_type: rake
50
+ command: snapshot:scrub
51
+ test_data:
52
+ - subject: target
53
+ command_type: rake
54
+ command: snapshot:setup_testers
55
+
56
+ groups:
57
+ all:
58
+ include_all: true # Include all tables
59
+
60
+ structure:
61
+ exclude_all: true # Exclude all tables (structure only)
62
+
63
+ minimal:
64
+ include_tables: # Include only the listed tables
65
+ - categories
66
+ - links
67
+
68
+ no_comments:
69
+ exclude_tables: # Include all but the listed tables
70
+ - comments
71
+ - comments_posts
@@ -0,0 +1,17 @@
1
+ dump_dir: tmp
2
+
3
+ environments:
4
+ development:
5
+ type: local
6
+ default_target: true
7
+ database: duple_development
8
+
9
+ stage:
10
+ type: heroku
11
+ appname: duple-stage
12
+ default_source: true
13
+
14
+ production:
15
+ type: heroku
16
+ appname: duple-production
17
+ allow_target: false
@@ -0,0 +1,45 @@
1
+ dump_dir: tmp
2
+
3
+ environments:
4
+ development:
5
+ type: local
6
+ default_target: true
7
+ database: duple_development
8
+
9
+ stage:
10
+ type: heroku
11
+ appname: duple-stage
12
+ default_source: true
13
+
14
+ production:
15
+ type: heroku
16
+ appname: duple-production
17
+ allow_target: false
18
+
19
+ pre_refresh:
20
+ prepare_source:
21
+ - subject: source
22
+ command_type: shell
23
+ command: rake refresh:prepare
24
+
25
+ prepare_target:
26
+ - subject: target
27
+ command_type: heroku
28
+ command: maintenance:on
29
+ - subject: target
30
+ command_type: shell
31
+ command: rake refresh:prepare
32
+
33
+ post_refresh:
34
+ finish_source:
35
+ - subject: source
36
+ command_type: shell
37
+ command: rake refresh:finish
38
+
39
+ finish_target:
40
+ - subject: target
41
+ command_type: heroku
42
+ command: maintenance:off
43
+ - subject: target
44
+ command_type: shell
45
+ command: rake refresh:finish
@@ -4,7 +4,7 @@ describe Duple::CLI::Config do
4
4
  it 'prints the configuration' do
5
5
  result = capture_stdout do
6
6
  script = Duple::CLI::Config.new
7
- script.invoke(:all, [], {})
7
+ script.invoke(:all, [], {config: 'spec/config/kitchensink.yml'})
8
8
  end
9
9
 
10
10
  result.should =~ /Environments/
@@ -0,0 +1,71 @@
1
+ dump_dir: tmp
2
+ postgres_user: <%= ENV['POSTGRES_DEV_USER'] || 'postgres' %>
3
+
4
+ environments:
5
+ development:
6
+ type: local
7
+ default_target: true
8
+
9
+ backstage:
10
+ type: heroku
11
+ appname: duple-backstage
12
+
13
+ stage:
14
+ type: heroku
15
+ appname: duple-stage
16
+ default_source: true
17
+
18
+ production:
19
+ type: heroku
20
+ appname: duple-production
21
+ allow_target: false
22
+
23
+ pre_refresh:
24
+ disable_target:
25
+ - subject: target
26
+ command_type: heroku
27
+ command: maintenance:on
28
+ - subject: target
29
+ command_type: heroku
30
+ command: ps:scale worker=0
31
+
32
+ post_refresh:
33
+ enable_target:
34
+ - subject: target
35
+ command_type: heroku
36
+ command: restart
37
+ - subject: target
38
+ command_type: heroku
39
+ command: maintenance:off
40
+ - subject: target
41
+ command_type: heroku
42
+ command: ps:scale worker=1
43
+ migrate:
44
+ - subject: target
45
+ command_type: rake
46
+ command: db:migrate
47
+ scrub_data:
48
+ - subject: target
49
+ command_type: rake
50
+ command: snapshot:scrub
51
+ test_data:
52
+ - subject: target
53
+ command_type: rake
54
+ command: snapshot:setup_testers
55
+
56
+ groups:
57
+ all:
58
+ include_all: true # Include all tables
59
+
60
+ structure:
61
+ exclude_all: true # Exclude all tables (structure only)
62
+
63
+ minimal:
64
+ include_tables: # Include only the listed tables
65
+ - categories
66
+ - links
67
+
68
+ no_comments:
69
+ exclude_tables: # Include all but the listed tables
70
+ - comments
71
+ - comments_posts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -139,6 +139,13 @@ files:
139
139
  - lib/duple/pg_runner.rb
140
140
  - lib/duple/runner.rb
141
141
  - lib/duple/version.rb
142
+ - spec/config/groups.yml
143
+ - spec/config/heroku_config.txt
144
+ - spec/config/heroku_pgbackups.txt
145
+ - spec/config/heroku_pgbackups_url.txt
146
+ - spec/config/kitchensink.yml
147
+ - spec/config/simple.yml
148
+ - spec/config/tasks.yml
142
149
  - spec/duple/cli/config_spec.rb
143
150
  - spec/duple/cli/copy_spec.rb
144
151
  - spec/duple/cli/init_spec.rb
@@ -151,6 +158,7 @@ files:
151
158
  - spec/support/duple.rb
152
159
  - spec/support/io_spec_helpers.rb
153
160
  - spec/support/rspec_fire.rb
161
+ - templates/config/duple.yml
154
162
  homepage: https://github.com/subakva/duple
155
163
  licenses: []
156
164
  post_install_message:
@@ -176,6 +184,13 @@ signing_key:
176
184
  specification_version: 3
177
185
  summary: Moves PostgreSQL data from here to there.
178
186
  test_files:
187
+ - spec/config/groups.yml
188
+ - spec/config/heroku_config.txt
189
+ - spec/config/heroku_pgbackups.txt
190
+ - spec/config/heroku_pgbackups_url.txt
191
+ - spec/config/kitchensink.yml
192
+ - spec/config/simple.yml
193
+ - spec/config/tasks.yml
179
194
  - spec/duple/cli/config_spec.rb
180
195
  - spec/duple/cli/copy_spec.rb
181
196
  - spec/duple/cli/init_spec.rb