mina-rpush 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +22 -0
- data/README.md +49 -0
- data/Rakefile +2 -0
- data/lib/mina/rpush/tasks.rb +36 -0
- data/lib/mina/rpush/version.rb +5 -0
- data/lib/mina/rpush.rb +2 -0
- data/mina-rpush.gemspec +26 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ccd8c2ace19fa112be3b92df650198851e1b63b1
|
4
|
+
data.tar.gz: 8e095aaa1561925703217b1b8d41f4909312edc4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fb6de7988b1ab60e6ac4a4c6969cb8a2ac60463401be512a36b390ad037df51277c13d34a414d1da308ba8ac5e62c46da7c38a9a018aa9ad0b596af29a08b5c2
|
7
|
+
data.tar.gz: 94f316d4dc220c734bcc403f0512b2a0ffce18996476f860d5200a98d03450021a5bb6d857cd6a25c356c2d26e6affcbbcc283f7857c844ea4b220ce16d212ab
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Michał Matyas
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# mina-rpush
|
2
|
+
|
3
|
+
Mina tasks for [rpush](https://github.com/rpush/rpush) deployment.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
# Gemfile
|
9
|
+
gem 'mina-rpush', require: false
|
10
|
+
```
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
# config/deploy.rb
|
16
|
+
|
17
|
+
require 'mina/rpush'
|
18
|
+
|
19
|
+
task deploy: :environment do
|
20
|
+
deploy do
|
21
|
+
invoke 'rpush:stop'
|
22
|
+
invoke 'git:clone'
|
23
|
+
...
|
24
|
+
|
25
|
+
to :launch do
|
26
|
+
...
|
27
|
+
invoke 'rpush:start'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
## Tasks
|
34
|
+
|
35
|
+
```
|
36
|
+
mina rpush:restart # Restart rpush (stop + start)
|
37
|
+
mina rpush:start # Start rpush
|
38
|
+
mina rpush:stop # Stop rpush
|
39
|
+
mina rpush:push # Deliver all pending notifications
|
40
|
+
mina rpush:status # Shows status of the running Rpush instance
|
41
|
+
```
|
42
|
+
|
43
|
+
## Thanks
|
44
|
+
|
45
|
+
Thanks to the author of [mina-clockwork](https://github.com/907th/mina-clockwork) for giving me a starting point in developing this gem.
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Feel free to contribute!
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'mina/bundler'
|
2
|
+
|
3
|
+
namespace :rpush do
|
4
|
+
set_default :rpush_command, -> { "cd #{deploy_to}/#{current_path} && #{bundle_prefix} rpush" }
|
5
|
+
|
6
|
+
desc 'Start rpush'
|
7
|
+
task start: :environment do
|
8
|
+
queue %[echo '-----> Start rpush']
|
9
|
+
queue! "#{rpush_command} start -e #{rails_env}"
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Stop rpush'
|
13
|
+
task stop: :environment do
|
14
|
+
queue %[echo '-----> Start rpush']
|
15
|
+
queue! "#{rpush_command} stop -e #{rails_env}"
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'Restart rpush'
|
19
|
+
task restart: :environment do
|
20
|
+
queue %[echo '-----> Start rpush']
|
21
|
+
queue! "#{rpush_command} stop -e #{rails_env}; #{rpush_command} start -e #{rails_env}"
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Push pending notifications'
|
25
|
+
task push: :environment do
|
26
|
+
queue %[echo '-----> Pushing pending notifications']
|
27
|
+
queue! "#{rpush_command} push -e #{rails_env}"
|
28
|
+
end
|
29
|
+
|
30
|
+
desc 'Check rpush status'
|
31
|
+
task status: :environment do
|
32
|
+
queue %[echo '-----> Checking rpush status']
|
33
|
+
queue! "#{rpush_command} status -e #{rails_env}"
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
data/lib/mina/rpush.rb
ADDED
data/mina-rpush.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'mina/rpush/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'mina-rpush'
|
9
|
+
spec.version = Mina::Rpush::VERSION
|
10
|
+
spec.authors = ['Michał Matyas']
|
11
|
+
spec.email = ['michal@higher.lv']
|
12
|
+
spec.summary = 'Mina tasks for Rpush deployment.'
|
13
|
+
spec.description = ''
|
14
|
+
spec.homepage = 'https://github.com/d4rky-pl/mina-rpush'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
|
25
|
+
spec.add_dependency 'rpush'
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mina-rpush
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michał Matyas
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rpush
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: ''
|
56
|
+
email:
|
57
|
+
- michal@higher.lv
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE.txt
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- lib/mina/rpush.rb
|
68
|
+
- lib/mina/rpush/tasks.rb
|
69
|
+
- lib/mina/rpush/version.rb
|
70
|
+
- mina-rpush.gemspec
|
71
|
+
homepage: https://github.com/d4rky-pl/mina-rpush
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.4.6
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Mina tasks for Rpush deployment.
|
95
|
+
test_files: []
|