heroku_rake_tasks 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +35 -0
- data/README.md +28 -0
- data/lib/heroku_rake_tasks/version.rb +1 -1
- data/lib/tasks/heroku.rake +25 -5
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa5635cd6dc21d02508e4a275aecc931feb6febf
|
4
|
+
data.tar.gz: 46194e83a0131bb01303d730f55cf957a2071aeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20e85c678d3a2d2e4a310d1d582fd93be70591cb7d4816c31c9b8a076c3dc67cc7f35e22a8b1241c7b1c0a8a4972c4ad4af695765db153095816eea21af938b
|
7
|
+
data.tar.gz: d9e2f2d0c809b64ab1c22ad8b87dd53048c5516ee2746dcdf5b157f5771abbff6ab0b96201346b2feb104e66be12bdfc7a649508d6281aa4eb5f131835d9afd2
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
This project adheres to [Keep a Changelog](http://keepachangelog.com/) and [Semantic Versioning](http://semver.org/).
|
6
|
+
|
7
|
+
## [0.1.5]
|
8
|
+
# Added
|
9
|
+
- Postgresql console task
|
10
|
+
|
11
|
+
# Changed
|
12
|
+
- Updated heroku pgbackups addon commands into pg:backups (part of the Heroku Postgres namespace now)
|
13
|
+
- More flexibility in Heroku remote name
|
14
|
+
|
15
|
+
## [0.1.4]
|
16
|
+
# Added
|
17
|
+
- Ask user if he wants to delete a pg backup if the project reaches the limit
|
18
|
+
|
19
|
+
## [0.1.3]
|
20
|
+
# Added
|
21
|
+
- DB get task
|
22
|
+
|
23
|
+
## [0.1.2]
|
24
|
+
# Fixed
|
25
|
+
- Fixed enhance call issue for external rake tasks
|
26
|
+
|
27
|
+
## [0.1.1]
|
28
|
+
# Added
|
29
|
+
- DB tasks
|
30
|
+
- Git diff/log tasks
|
31
|
+
- Documentation
|
32
|
+
|
33
|
+
## [0.1.0]
|
34
|
+
# Added
|
35
|
+
- Initial version
|
data/README.md
CHANGED
@@ -42,6 +42,34 @@ rake h:logs # Display recent log output for the application
|
|
42
42
|
rake h:logs:tail # Tail the logs for the application
|
43
43
|
rake h:ps # List the application dynos
|
44
44
|
rake h:restart # Restart the application
|
45
|
+
rake h:psql # Start a PostgreSql console
|
46
|
+
```
|
47
|
+
|
48
|
+
### With a remote
|
49
|
+
|
50
|
+
```bash
|
51
|
+
rake h:config production
|
52
|
+
```
|
53
|
+
|
54
|
+
### Without a remote
|
55
|
+
|
56
|
+
If no remote is defined, the "heroku" remote used will be used by default
|
57
|
+
|
58
|
+
```bash
|
59
|
+
rake h:config # same as rake h:config heroku
|
60
|
+
```
|
61
|
+
|
62
|
+
If a "staging" remote is found, it will be used over "heroku".
|
63
|
+
|
64
|
+
```bash
|
65
|
+
rake h:config # same as rake h:config staging, if a staging remote is found
|
66
|
+
```
|
67
|
+
|
68
|
+
### Remote alias
|
69
|
+
|
70
|
+
```bash
|
71
|
+
rake h:config p # production remote
|
72
|
+
rake h:config s # staging remote
|
45
73
|
```
|
46
74
|
|
47
75
|
## Contributing
|
data/lib/tasks/heroku.rake
CHANGED
@@ -88,10 +88,30 @@ namespace :h do
|
|
88
88
|
bundlerize { sh "heroku ps -r #{remote}" }
|
89
89
|
end
|
90
90
|
|
91
|
+
desc 'Start a PostgreSql console'
|
92
|
+
task :psql do
|
93
|
+
bundlerize { sh "heroku pg:psql -r #{remote}" }
|
94
|
+
end
|
95
|
+
|
91
96
|
#--------------------------------------------------------------------------
|
92
97
|
|
93
98
|
def remote
|
94
|
-
ARGV.count
|
99
|
+
if ARGV.count > 1
|
100
|
+
remote = ARGV[1]
|
101
|
+
case remote
|
102
|
+
when "p"
|
103
|
+
"production"
|
104
|
+
when "s"
|
105
|
+
"staging"
|
106
|
+
when "t"
|
107
|
+
"test"
|
108
|
+
end
|
109
|
+
else
|
110
|
+
remote = "staging" if `git remote`.include?("staging")
|
111
|
+
remote = "heroku"
|
112
|
+
end
|
113
|
+
|
114
|
+
remote
|
95
115
|
end
|
96
116
|
|
97
117
|
def bundlerize
|
@@ -115,19 +135,19 @@ namespace :h do
|
|
115
135
|
|
116
136
|
def capture
|
117
137
|
bundlerize do
|
118
|
-
sh "heroku
|
138
|
+
sh "heroku pg:backups capture -r #{remote}" do |ok, res|
|
119
139
|
unless ok
|
120
|
-
sh "heroku
|
140
|
+
sh "heroku pg:backups -r #{remote}"
|
121
141
|
puts "Enter the backup id you want to delete :"
|
122
142
|
backup_id = $stdin.gets
|
123
|
-
sh "heroku
|
143
|
+
sh "heroku pg:backups delete #{backup_id.strip} -r #{remote}"
|
124
144
|
end
|
125
145
|
end
|
126
146
|
end
|
127
147
|
end
|
128
148
|
|
129
149
|
def download
|
130
|
-
bundlerize { sh "curl -o remote.dump $(heroku
|
150
|
+
bundlerize { sh "curl -o remote.dump $(heroku pg:backups public-url -q -r #{remote})" }
|
131
151
|
end
|
132
152
|
|
133
153
|
def restore
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_rake_tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Colon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -46,6 +46,7 @@ extensions: []
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- .gitignore
|
49
|
+
- CHANGELOG.md
|
49
50
|
- Gemfile
|
50
51
|
- LICENSE.txt
|
51
52
|
- README.md
|
@@ -74,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
75
|
version: '0'
|
75
76
|
requirements: []
|
76
77
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.0.14
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: Rake tasks to manage an Heroku Application
|