deploku 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.
- checksums.yaml +4 -4
- data/README.md +10 -4
- data/lib/deploku/control.rb +16 -2
- data/lib/deploku/remote.rb +1 -0
- data/lib/deploku/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94142cab90a94a372fec9dce8e2549e43aa3a7d9
|
4
|
+
data.tar.gz: 46f520ffcd139aab148bcb917ac75269d5d38731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd88b61935cd42c4ab6c801cb8aa32d3f38d499297c436a1e5139c2d4d30efc3a245d4fd5d429d594749b54a055b97eb5a59c1d9e38787b7e902013e5419c233
|
7
|
+
data.tar.gz: 4544a6a914d3548d00e2123f61757f70dffc03e646fe2ad71f37cb3fc9218c0fbd84bcb3a3da661eb02da4dadd3ecd720efaa02d0c7e077bec5ffb389cbc9970
|
data/README.md
CHANGED
@@ -31,16 +31,16 @@ production
|
|
31
31
|
staging
|
32
32
|
```
|
33
33
|
|
34
|
-
Then choose a remote and run it again
|
34
|
+
Then choose a remote and run it again to find its `status`:
|
35
35
|
|
36
36
|
```
|
37
|
-
[master]$ deploku production
|
37
|
+
[master]$ deploku production status
|
38
38
|
Heroku app my-app-production is running commit abcdef7
|
39
39
|
It is 3 commits behind your local master branch
|
40
40
|
There are no pending migrations
|
41
41
|
```
|
42
42
|
|
43
|
-
If you want to deploy then
|
43
|
+
If you want to deploy then use the `deploy` command instead:
|
44
44
|
|
45
45
|
```
|
46
46
|
[master]$ deploku production deploy
|
@@ -56,7 +56,7 @@ Proceed? (y/N):
|
|
56
56
|
|
57
57
|
Enter `y` to proceed or anything else to abort. Nothing will happen unless you enter `y`.
|
58
58
|
|
59
|
-
If there are migrations pending then you will be forced to
|
59
|
+
If there are migrations pending then you will be forced to pass in either the `maintenance` or `maintenance:skip` options.
|
60
60
|
|
61
61
|
```
|
62
62
|
[master]$ deploku production deploy maintenance
|
@@ -74,6 +74,12 @@ The following commands will be run:
|
|
74
74
|
Proceed? (y/N):
|
75
75
|
```
|
76
76
|
|
77
|
+
## Defaults
|
78
|
+
|
79
|
+
The default command is `deploy` since that always prompts you before doing anything anyway.
|
80
|
+
|
81
|
+
You can pick the remote just by choosing the first letter of the remote - as long as the initial letter for each remote is unique. For instance, if you have two remotes, `staging` and `production`, then you can just type `deploku s`.
|
82
|
+
|
77
83
|
## Contributing
|
78
84
|
|
79
85
|
1. Fork it ( https://github.com/billhorsman/deploku/fork )
|
data/lib/deploku/control.rb
CHANGED
@@ -5,7 +5,13 @@ module Deploku
|
|
5
5
|
|
6
6
|
def self.run(args)
|
7
7
|
matching_remotes = remotes & args
|
8
|
-
|
8
|
+
if matching_remotes.size == 0 && remote_index_uniq?
|
9
|
+
if key = (remote_index.keys & args)[0]
|
10
|
+
matching_remotes = [remote_index[key]]
|
11
|
+
args.delete key
|
12
|
+
end
|
13
|
+
end
|
14
|
+
case matching_remotes.compact.size
|
9
15
|
when 0
|
10
16
|
puts "#{remotes.size} Heroku remote#{'s' if remotes.size > 1} found:"
|
11
17
|
puts *remotes
|
@@ -14,7 +20,7 @@ module Deploku
|
|
14
20
|
remote = matching_remotes[0]
|
15
21
|
args.delete remote
|
16
22
|
commands = %w[status deploy] & args
|
17
|
-
commands << "
|
23
|
+
commands << "deploy" if commands.size == 0
|
18
24
|
if commands.size > 1
|
19
25
|
puts "Choose just one command"
|
20
26
|
exit 1
|
@@ -34,6 +40,14 @@ module Deploku
|
|
34
40
|
}
|
35
41
|
end
|
36
42
|
|
43
|
+
def self.remote_index_uniq?
|
44
|
+
remote_index.size == remotes.size
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.remote_index
|
48
|
+
@remote_index ||= Hash[remotes.map{|r| [r.slice(0, 1), r] }]
|
49
|
+
end
|
50
|
+
|
37
51
|
end
|
38
52
|
|
39
53
|
end
|
data/lib/deploku/remote.rb
CHANGED
data/lib/deploku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Horsman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|