mina-whenever-hanami 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: dcc6a26e00e3f65ffdb5e49ef65ab4967a0ee1f587eff620d04d833a4910e70f
4
+ data.tar.gz: e88c1c20badda5e9e837e9bcbfe5e0677c5624b8c925d25db00bd15bae3ffd87
5
+ SHA512:
6
+ metadata.gz: a7ca87149969fd0981e6e3565590617f0a560a70592db68f6eaaaeb4c4fbeef27a0ea9c09b83a2a824761511695dab50830ccaa94aedbbfdbb332695f077d138
7
+ data.tar.gz: 712b1b176937425076fe887680d3399148a6425b05221b34b7611414ac253d57ba089bf03c46b01f1ad94a02505db700d898e19b0769c05b28a3d838a8729d92
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ /.bundle/
2
+ /Gemfile.lock
3
+ /tmp/
4
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in mina-whenever.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Stjepan Hadjic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # Mina::Whenever::Hanami
2
+
3
+ This is a whenever plugin for [mina](https://github.com/mina-deploy/mina), adapted for [Hanami](https://hanamirb.org/) ruby framework.
4
+ This gem was developed starting from [mgrachev mina-whenever](https://github.com/mgrachev/mina-hanami) gem, huge thanks to him!
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'mina-whenever-hanami'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install mina-whenever-hanami
21
+
22
+ ## Usage
23
+
24
+ in `deploy.rb`
25
+
26
+ require 'mina/whenever/hanami'
27
+
28
+ set :hanami_env, '<your-env>'
29
+
30
+ task deploy: :environment do
31
+ deploy do
32
+ ...
33
+ on :launch do
34
+ invoke :'whenever:update'
35
+ end
36
+ end
37
+ end
38
+
39
+ ## Configuration
40
+
41
+ These are the settings you can set:
42
+
43
+ set :whenever_name # default: "#{domain}_#{hanami_env}"
44
+
45
+ ## Maintenance and Contribution
46
+ I'll be rarely maintaining this source code due to lack of time, but i will do as much as i can to resolve any open issues.
47
+ If you want to contribute, feel free to fork it, branch it and to create a pull request.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,29 @@
1
+ set :whenever_name, -> { "#{fetch(:domain)}_#{fetch(:hanami_env)}" }
2
+ set :environment_variable, "HANAMI_ENV"
3
+ set :bundle_command, "#{fetch(:environment_variable)}='#{fetch(:hanami_env)}' bundle exec"
4
+
5
+ namespace :whenever do
6
+ desc 'Clear crontab'
7
+ task :clear do
8
+ comment "Clear contrab for #{fetch(:whenever_name)}"
9
+ in_path fetch(:current_path) do
10
+ command "#{fetch(:bundle_bin)} exec whenever --clear-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:hanami_env)}&path=#{fetch(:current_path)}'"
11
+ end
12
+ end
13
+
14
+ desc 'Update crontab'
15
+ task :update do
16
+ comment "Update crontab for #{fetch(:whenever_name)}"
17
+ in_path fetch(:current_path) do
18
+ command "#{fetch(:bundle_bin)} exec whenever --update-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:hanami_env)}&path=#{fetch(:current_path)}'"
19
+ end
20
+ end
21
+
22
+ desc 'Write crontab'
23
+ task :write do
24
+ comment "Write crontab for #{fetch(:whenever_name)}"
25
+ in_path fetch(:current_path) do
26
+ command "#{fetch(:bundle_bin)} exec whenever --write-crontab #{fetch(:whenever_name)} --set 'environment=#{fetch(:hanami_env)}&path=#{fetch(:current_path)}'"
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,7 @@
1
+ module Mina
2
+ module Whenever
3
+ module Hanami
4
+ VERSION = '0.6.0'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ require 'mina/whenever/hanami/tasks'
2
+ require 'mina/whenever/hanami/version'
3
+
4
+ module Mina
5
+ module Whenever
6
+ module Hanami
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'mina/whenever/hanami/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "mina-whenever-hanami"
8
+ spec.version = Mina::Whenever::Hanami::VERSION
9
+ spec.authors = ["apontini"]
10
+ spec.email = ["alberto.pontini@gmail.com"]
11
+
12
+ spec.summary = %q{Mina plugin for whenever, adapted for Hanami ruby framework}
13
+ spec.description = %q{Mina plugin for whenever, adapted for Hanami ruby framework}
14
+ spec.homepage = "https://github.com/apontini/mina-whenever-hanami"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_development_dependency "bundler", "~> 1.11"
21
+ spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency "rspec", "~> 3.0"
23
+ spec.add_dependency "mina", "~> 1.0"
24
+ spec.add_dependency "hanami", "~> 1.3"
25
+ end
metadata ADDED
@@ -0,0 +1,124 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mina-whenever-hanami
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.0
5
+ platform: ruby
6
+ authors:
7
+ - apontini
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-21 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.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mina
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: hanami
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.3'
83
+ description: Mina plugin for whenever, adapted for Hanami ruby framework
84
+ email:
85
+ - alberto.pontini@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - Gemfile
93
+ - LICENSE
94
+ - README.md
95
+ - Rakefile
96
+ - lib/mina/whenever/hanami.rb
97
+ - lib/mina/whenever/hanami/tasks.rb
98
+ - lib/mina/whenever/hanami/version.rb
99
+ - mina-whenever-hanami.gemspec
100
+ homepage: https://github.com/apontini/mina-whenever-hanami
101
+ licenses:
102
+ - MIT
103
+ metadata: {}
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubyforge_project:
120
+ rubygems_version: 2.7.6
121
+ signing_key:
122
+ specification_version: 4
123
+ summary: Mina plugin for whenever, adapted for Hanami ruby framework
124
+ test_files: []