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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90fc8fb1692c31efa341b32f0eb011604fa23bea
4
- data.tar.gz: 4032938c101c77cc4f204fe5cb0952c6e170dd26
3
+ metadata.gz: 60141bba843f6aff20a51b405cbc45b99107c039
4
+ data.tar.gz: 488e40a18d74149117e3bfc915456e1715ee0c01
5
5
  SHA512:
6
- metadata.gz: 6c62a68360605cd25dfe438397b2204ff269c85f2327fc8fb5240abfefce7050e793540b5b5a952490adcc50d828133babf71461596476a77889813dc9ca9d5a
7
- data.tar.gz: 78c988fb1ff1d2e078484f8283569a9a051fbe8a872b2653d743934690cc754e4e668e638ab42ef674781a8a3550e364f5e32fa7fa90b667e949f38abeb79b37
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/rpush`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Delete this and the text above, and describe your gem
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
- TODO: Write usage instructions here
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
- ## Development
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
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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/[USERNAME]/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.
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
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rpush
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
@@ -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) || # local property for rpush only
105
+ properties.fetch(:rpush_user) || # local property for rpush only
107
106
  fetch(:rpush_user) ||
108
- properties.fetch(:run_as) || # global property across multiple capistrano gems
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.5
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-24 00:00:00.000000000 Z
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
@@ -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
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here