parity 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/README.md +23 -26
- data/bin/development +1 -1
- data/lib/parity/environment.rb +6 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29a05bf7ce1d570b73899bafe1d42d87112350b6
|
4
|
+
data.tar.gz: 6499bc99345cdbe6290eb4c9369aacf6f7fbb664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9623c964307a7e940a2c91ecaac530fabe70ab25ba13a769eeee608327279e50bc6cdb030bb72f6a27ca75e8f1ce5fd56abcabe54a334f58ac296dd507ced2
|
7
|
+
data.tar.gz: b5c885e1f50b58f24abf9b2fdfefdb24520d36332176a904ac96e92f84fccb28be6f5a67fe1da07451ced05122e82d99d492516f4e5891a6db54d719b82f9058
|
data/README.md
CHANGED
@@ -29,31 +29,6 @@ This installs three shell commands:
|
|
29
29
|
staging
|
30
30
|
production
|
31
31
|
|
32
|
-
Customization
|
33
|
-
-------------
|
34
|
-
|
35
|
-
If you have Heroku environments beyond staging and production (such as a feature
|
36
|
-
environment for each developer), you can add a [binstub] to the `bin` folder of
|
37
|
-
your application. Custom environments share behavior with staging: they can be
|
38
|
-
backed up and can restore from production.
|
39
|
-
|
40
|
-
[binstub]: https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs
|
41
|
-
|
42
|
-
Here's an example binstub for a 'feature-geoff' environment, hosted at
|
43
|
-
myapp-feature-geoff.herokuapp.com.
|
44
|
-
|
45
|
-
```ruby
|
46
|
-
#!/usr/bin/env ruby
|
47
|
-
|
48
|
-
require 'parity'
|
49
|
-
|
50
|
-
if ARGV.empty?
|
51
|
-
puts Parity::Usage.new
|
52
|
-
else
|
53
|
-
Parity::HerokuEnvironment.new('feature-geoff', ARGV).run
|
54
|
-
end
|
55
|
-
```
|
56
|
-
|
57
32
|
Usage
|
58
33
|
-----
|
59
34
|
|
@@ -109,7 +84,7 @@ Parity expects:
|
|
109
84
|
* The Heroku apps are named like `app-staging` and `app-production`
|
110
85
|
where `app` is equal to `basename $PWD`.
|
111
86
|
|
112
|
-
|
87
|
+
Customization
|
113
88
|
-------------
|
114
89
|
|
115
90
|
Override some of the conventions:
|
@@ -121,6 +96,28 @@ Parity.configure do |config|
|
|
121
96
|
end
|
122
97
|
```
|
123
98
|
|
99
|
+
If you have Heroku environments beyond staging and production (such as a feature
|
100
|
+
environment for each developer), you can add a [binstub] to the `bin` folder of
|
101
|
+
your application. Custom environments share behavior with staging: they can be
|
102
|
+
backed up and can restore from production.
|
103
|
+
|
104
|
+
[binstub]: https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs
|
105
|
+
|
106
|
+
Here's an example binstub for a 'feature-geoff' environment, hosted at
|
107
|
+
myapp-feature-geoff.herokuapp.com.
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
#!/usr/bin/env ruby
|
111
|
+
|
112
|
+
require 'parity'
|
113
|
+
|
114
|
+
if ARGV.empty?
|
115
|
+
puts Parity::Usage.new
|
116
|
+
else
|
117
|
+
Parity::Environment.new('feature-geoff', ARGV).run
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
124
121
|
Contributing
|
125
122
|
------------
|
126
123
|
|
data/bin/development
CHANGED
data/lib/parity/environment.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "parity/backup"
|
2
2
|
|
3
3
|
module Parity
|
4
4
|
class Environment
|
@@ -34,7 +34,8 @@ module Parity
|
|
34
34
|
|
35
35
|
def restore
|
36
36
|
if environment == "production"
|
37
|
-
$stdout.puts "Parity does not support restoring backups into your
|
37
|
+
$stdout.puts "Parity does not support restoring backups into your "\
|
38
|
+
"production environment."
|
38
39
|
else
|
39
40
|
Backup.new(from: arguments.first, to: environment).restore
|
40
41
|
end
|
@@ -56,7 +57,9 @@ module Parity
|
|
56
57
|
end
|
57
58
|
|
58
59
|
def tail
|
59
|
-
Kernel.system
|
60
|
+
Kernel.system(
|
61
|
+
"heroku logs --tail #{arguments.join(" ")} --remote #{environment}"
|
62
|
+
)
|
60
63
|
end
|
61
64
|
|
62
65
|
def heroku_app_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Croak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Devevelopment/staging/production parity is intended to decrease the time
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.4.1
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Shell commands for development, staging, and production parity.
|