fourchette 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fourchette.gemspec +1 -0
- data/lib/fourchette.rb +3 -2
- data/lib/fourchette/heroku.rb +2 -2
- data/lib/fourchette/version.rb +1 -1
- data/spec/lib/fourchette/heroku_spec.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80792e1bd7068c821be389021a9f5fed508fa191
|
4
|
+
data.tar.gz: 6339113cc97d55bba92d78f8682d1536e6dab04c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0461c8fd5f5d17525ac2d53517708debf373abd46e316678448fd33e96b994f1bafcdcd3ab4e85052a926698d7b3832e5782c10005782b86073296d25c48a62b
|
7
|
+
data.tar.gz: 63c99b34b08815f143d9a0b034067e5aa2d2652cc759b429435c685e7262c5395d17e665352af0029da04f0c0c31d6e503640ce48d9cf7255b4285867f0aaa6b
|
data/fourchette.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency "octokit"
|
25
25
|
spec.add_dependency "git"
|
26
26
|
spec.add_dependency "heroku", "~> 3.9" # Deprecated, but best/easiest solution for pgbackups...
|
27
|
+
spec.add_dependency "rest-client" # required for phbackups
|
27
28
|
spec.add_dependency 'platform-api', '~> 0.2.0'
|
28
29
|
spec.add_dependency "sucker_punch"
|
29
30
|
spec.add_dependency "thor"
|
data/lib/fourchette.rb
CHANGED
@@ -5,18 +5,19 @@ require 'platform-api'
|
|
5
5
|
require 'octokit'
|
6
6
|
require 'git'
|
7
7
|
require 'sucker_punch'
|
8
|
+
require 'rest-client'
|
8
9
|
|
9
10
|
# TODO: Extract this to development.rb and production.rb
|
10
11
|
if development?
|
11
12
|
require "sinatra/reloader"
|
12
|
-
|
13
|
+
|
13
14
|
begin
|
14
15
|
require "pry"
|
15
16
|
rescue LoadError => ex
|
16
17
|
# That's ok, we don't care...it was probably loaded from another project
|
17
18
|
# and not to hack on Fourchette anyways!
|
18
19
|
end
|
19
|
-
|
20
|
+
|
20
21
|
FOURCHETTE_CONFIG = {
|
21
22
|
env_name: 'fourchette-dev'
|
22
23
|
}
|
data/lib/fourchette/heroku.rb
CHANGED
@@ -67,7 +67,7 @@ class Fourchette::Heroku
|
|
67
67
|
if pg_enabled?(from)
|
68
68
|
logger.info "Copying Postgres's data from #{from} to #{to}"
|
69
69
|
backup = Fourchette::Pgbackups.new
|
70
|
-
backup.copy(from, to)
|
70
|
+
logger.info backup.copy(from, to)
|
71
71
|
else
|
72
72
|
logger.info "Postgres not enabled on #{from}. Skipping data copy."
|
73
73
|
end
|
@@ -92,7 +92,7 @@ class Fourchette::Heroku
|
|
92
92
|
|
93
93
|
def pg_enabled?(app)
|
94
94
|
client.addon.list(app).any? do |addon|
|
95
|
-
addon['addon_service']['name'] == '
|
95
|
+
addon['addon_service']['name'] == 'Heroku Postgres'
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
data/lib/fourchette/version.rb
CHANGED
@@ -123,7 +123,7 @@ describe Fourchette::Heroku do
|
|
123
123
|
end
|
124
124
|
|
125
125
|
context 'when a heroku-postgresql addon is enabled' do
|
126
|
-
let(:addon_list) { [{ 'addon_service' => { 'name' => '
|
126
|
+
let(:addon_list) { [{ 'addon_service' => { 'name' => 'Heroku Postgres' } }] }
|
127
127
|
|
128
128
|
it 'calls Fourchette::Pgbackups#copy' do
|
129
129
|
Fourchette::Pgbackups.any_instance.should_receive(:copy).with(from_app_name, to_app_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fourchette
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Philippe Boily
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.9'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rest-client
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: platform-api
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|