capistrano-rpush 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +54 -7
- data/lib/capistrano/rpush/version.rb +1 -1
- data/lib/capistrano/tasks/rpush.rake +2 -4
- metadata +2 -4
- data/bin/console +0 -14
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60141bba843f6aff20a51b405cbc45b99107c039
|
4
|
+
data.tar.gz: 488e40a18d74149117e3bfc915456e1715ee0c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db7f414ed198c965d591feb8574713bd6deead9a84ca8b7d51eb02754ea2b88ffa6c9d8803f48d88e0d7f4c6a8ef7be85da81cc7117397859eec3123aa9706c
|
7
|
+
data.tar.gz: 50faebcc882f2be160a3020c0b7fccca439bc93768a7a4c6b22299956cfc9afc7de0c3b9a9c55ad088177d20acfc8cc0b79379c4f9c7a1fc691f2e640ad23200
|
data/README.md
CHANGED
@@ -1,8 +1,30 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/capistrano-rpush.svg)](https://badge.fury.io/rb/capistrano-rpush)
|
2
|
+
|
1
3
|
# Capistrano::Rpush
|
2
4
|
|
3
|
-
|
5
|
+
[Capistrano::Rpush](https://github.com/juicyparts/capistrano-rpush) adds [Rpush](https://rubygems.org/gems/rpush) tasks to your Capistrano deployment.
|
6
|
+
|
7
|
+
## Rpush
|
8
|
+
|
9
|
+
This gem was developed against version 2.7.0. Additionally it only provides tasks over a subset of available commands:
|
4
10
|
|
5
|
-
|
11
|
+
$ rpush --help
|
12
|
+
```
|
13
|
+
Commands:
|
14
|
+
rpush help [COMMAND] # Describe available commands or one specific command
|
15
|
+
rpush init # Initialize Rpush into the current directory
|
16
|
+
rpush push # Deliver all pending notifications and then exit
|
17
|
+
rpush start # Start Rpush
|
18
|
+
rpush status # Show the internal status of the running Rpush instance.
|
19
|
+
rpush stop # Stop Rpush
|
20
|
+
rpush version # Print Rpush version
|
21
|
+
|
22
|
+
Options:
|
23
|
+
-c, [--config=CONFIG]
|
24
|
+
# Default: config/initializers/rpush.rb
|
25
|
+
-e, [--rails-env=RAILS-ENV]
|
26
|
+
# Default: development
|
27
|
+
```
|
6
28
|
|
7
29
|
## Installation
|
8
30
|
|
@@ -22,17 +44,42 @@ Or install it yourself as:
|
|
22
44
|
|
23
45
|
## Usage
|
24
46
|
|
25
|
-
|
47
|
+
```ruby
|
48
|
+
# In Rails.root/Capfile
|
49
|
+
|
50
|
+
|
51
|
+
require 'capistrano/rpush'
|
52
|
+
```
|
53
|
+
|
54
|
+
Now you can use cap -T to list tasks:
|
55
|
+
|
56
|
+
```
|
57
|
+
cap rpush:restart # Restart rpush
|
58
|
+
cap rpush:start # Start rpush
|
59
|
+
cap rpush:status # Status rpush
|
60
|
+
cap rpush:stop # Stop rpush
|
61
|
+
```
|
62
|
+
|
63
|
+
### Configuration
|
64
|
+
|
65
|
+
The following configurable options are available, and listed with their defaults. Override them to suit your project's needs:
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
set :rpush_role, :app
|
69
|
+
set :rpush_env, -> { fetch(:rack_env, fetch(:rails_env, fetch(:stage))) }
|
70
|
+
set :rpush_conf, -> { File.join(shared_path, 'config', 'rpush.rb') }
|
71
|
+
set :rpush_log, -> { File.join(shared_path, 'log', 'rpush.log') }
|
72
|
+
set :rpush_pid, -> { File.join(shared_path, 'tmp', 'pids', 'rpush.pid') }
|
73
|
+
```
|
26
74
|
|
27
|
-
|
75
|
+
The options assume ```rpush.rb``` is defined in ```linked_files```. They also assume the following directories are listed in ```linked_dirs```:
|
28
76
|
|
29
|
-
|
77
|
+
tmp/pids log
|
30
78
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
79
|
|
33
80
|
## Contributing
|
34
81
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/juicyparts/capistrano-rpush. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
83
|
|
37
84
|
|
38
85
|
## License
|
@@ -22,7 +22,6 @@ namespace :rpush do
|
|
22
22
|
|
23
23
|
task :check do
|
24
24
|
on roles (fetch(:rpush_role)) do |role|
|
25
|
-
#Create rpush.rb for new deployments
|
26
25
|
unless test "[ -f #{fetch(:rpush_conf)} ]"
|
27
26
|
warn 'rpush.rb NOT FOUND!'
|
28
27
|
info 'Configure rpush for your project before attempting a deployment.'
|
@@ -103,11 +102,10 @@ namespace :rpush do
|
|
103
102
|
|
104
103
|
def rpush_user(role)
|
105
104
|
properties = role.properties
|
106
|
-
properties.fetch(:rpush_user) ||
|
105
|
+
properties.fetch(:rpush_user) || # local property for rpush only
|
107
106
|
fetch(:rpush_user) ||
|
108
|
-
properties.fetch(:run_as) ||
|
107
|
+
properties.fetch(:run_as) || # global property across multiple capistrano gems
|
109
108
|
role.user
|
110
109
|
end
|
111
110
|
|
112
111
|
end
|
113
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-rpush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mel Riffe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,8 +108,6 @@ files:
|
|
108
108
|
- LICENSE.txt
|
109
109
|
- README.md
|
110
110
|
- Rakefile
|
111
|
-
- bin/console
|
112
|
-
- bin/setup
|
113
111
|
- capistrano-rpush.gemspec
|
114
112
|
- lib/capistrano/rpush.rb
|
115
113
|
- lib/capistrano/rpush/version.rb
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "capistrano/rpush"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|