mina_ryver 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bd0eda79efc088119736dd3ce799ae10b9f4785f2cb104fcdbdc2cabf1a60d7b
4
+ data.tar.gz: f168ff19deb6ca22fca7f87142ebd27a4e8d354d448c6571289b0002536f71b8
5
+ SHA512:
6
+ metadata.gz: 1944762ef96dc605f2b26e47a7b1dd10bf1d22b996186aaed2e982d3b876c7dfb948012120bfd8b5576cacdd793289e77797fb8a741fef76c0ce4c22e5e4875c
7
+ data.tar.gz: f6aeac81bd1440e45f57aa4a593e51421c5221f26d9ab824d714b3ac9af88c14f86ebd80474128d0feb1e04d2a8e03b98bb22591db4d757b24f2febcce8770e9
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Declare your gem's dependencies in mina_ryver.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
6
+ gemspec
7
+
8
+ # Declare any dependencies that are still in development here instead of in
9
+ # your gemspec. These might include edge Rails or gems from your path or
10
+ # Git. Remember to move these dependencies to your gemspec before releasing
11
+ # your gem to rubygems.org.
12
+
13
+ # To use debugger
14
+ # gem 'debugger'
data/LICENSE ADDED
File without changes
data/MIT-LICENSE ADDED
File without changes
data/README.md ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'MinaRyver'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.rdoc')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+ Bundler::GemHelper.install_tasks
19
+
data/lib/mina_ryver.rb ADDED
@@ -0,0 +1,4 @@
1
+ require 'mina_ryver/version'
2
+
3
+ module MinaRyver
4
+ end
@@ -0,0 +1,53 @@
1
+ require 'json'
2
+
3
+ def _ryver_channels
4
+ fetch(:ryver_channels, [])
5
+ end
6
+
7
+ def _branch
8
+ fetch(:branch, "")
9
+ end
10
+
11
+ def _ryver_application
12
+ fetch(:ryver_application, "")
13
+ end
14
+
15
+ def _ryver_text_at_start
16
+ fetch(:ryver_text_at_start, "Start deploying branch \\\`#{_branch}\\\` to \\\`#{_ryver_application}\\\`.")
17
+ end
18
+
19
+ def _ryver_text_at_finished
20
+ text = fetch(:ryver_text_at_finished, "Finished deploying branch \\\`#{_branch}\\\` to \\\`#{_ryver_application}\\\`.")
21
+ text += " See it here: #{_ryver_domain}" if _ryver_domain != nil
22
+ text
23
+ end
24
+
25
+ def _ryver_domain
26
+ fetch(:ryver_domain, nil)
27
+ end
28
+
29
+ namespace :ryver do
30
+ # ## ryver:notify_deploy_started
31
+ desc "Send ryver notification about new deploy start"
32
+ task :notify_deploy_started => :environment do
33
+ command %[echo "-----> Sending start notification to Ryver"]
34
+
35
+ _ryver_channels.each do |channel|
36
+ send_msg(channel, _ryver_text_at_start)
37
+ end
38
+ end
39
+
40
+ # ## ryver:notify_deploy_finished
41
+ desc "Send ryver notification about deploy finish"
42
+ task :notify_deploy_finished => :environment do
43
+ command %[echo "-----> Sending finish notification to Ryver"]
44
+
45
+ _ryver_channels.each do |channel|
46
+ send_msg(channel, _ryver_text_at_finished)
47
+ end
48
+ end
49
+
50
+ def send_msg(channel, message)
51
+ command %[curl -X "POST" "https://scry.ryver.com/application/webhook/#{channel}" -H "Content-Type: text/plain; charset=utf-8" -d "#{message}"]
52
+ end
53
+ end
@@ -0,0 +1,3 @@
1
+ module MinaRyver
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,22 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "mina_ryver/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "mina_ryver"
9
+ s.version = MinaRyver::VERSION
10
+ s.authors = ["Conficker1805"]
11
+ s.email = ["conficker1805@gmail.com"]
12
+ s.homepage = "https://github.com/conficker1805/mina_ryver"
13
+ s.summary = "Mina bindings for Ryver"
14
+ s.description = "Adds tasks to aid in the Ryver notifications."
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_runtime_dependency "mina"
22
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mina_ryver
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Conficker1805
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-02-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: mina
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Adds tasks to aid in the Ryver notifications.
28
+ email:
29
+ - conficker1805@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitignore"
35
+ - Gemfile
36
+ - LICENSE
37
+ - MIT-LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - lib/mina_ryver.rb
41
+ - lib/mina_ryver/tasks.rb
42
+ - lib/mina_ryver/version.rb
43
+ - mina_ryver.gemspec
44
+ homepage: https://github.com/conficker1805/mina_ryver
45
+ licenses: []
46
+ metadata: {}
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubyforge_project:
63
+ rubygems_version: 2.7.8
64
+ signing_key:
65
+ specification_version: 4
66
+ summary: Mina bindings for Ryver
67
+ test_files: []