mina_notify 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mina_notify/version.rb +1 -1
- data/lib/mina_notify.rb +18 -1
- data/mina_notify.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94f16b17fec96e12f411499dcb48b9f1c4010442
|
4
|
+
data.tar.gz: 1834917837b202793efae5a757b4aab8e9191117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7ed5daab94c166f4afc81467558fb054eefc145b837369ca93b4a22d9af8a55a5e7dbc540e62044c0a0419fbe71121e31b301c4efeb2d4004a7c3232db1f14b
|
7
|
+
data.tar.gz: b36bd5e5a33eb81cb6b9a4313ae653990a0810a97ad61533cdc22347eee8c6fb9aafe0791751d63bf0d833c904459362e04fea30b7268bcd90c14f3b345bb65e
|
data/lib/mina_notify/version.rb
CHANGED
data/lib/mina_notify.rb
CHANGED
@@ -1,10 +1,27 @@
|
|
1
1
|
require "mina_notify/version"
|
2
2
|
require 'mina'
|
3
|
+
require 'faraday'
|
3
4
|
|
4
5
|
module MinaNotify
|
5
6
|
module_function
|
6
7
|
|
7
8
|
def trigger_event(mina_self, event_name)
|
8
|
-
|
9
|
+
begin
|
10
|
+
mina = {
|
11
|
+
operator: `whoami`,
|
12
|
+
domain: mina_self.domain,
|
13
|
+
task_name: event_name,
|
14
|
+
code_src: mina_self.repository,
|
15
|
+
code_branch: mina_self.branch
|
16
|
+
}
|
17
|
+
response = Faraday.new(:url => 'http://dev.tanliani.com').post do |req|
|
18
|
+
req.url '/api/minas'
|
19
|
+
req.headers['Content-Type'] = 'application/json'
|
20
|
+
req.body = {mina: mina}.to_json
|
21
|
+
end
|
22
|
+
response.body
|
23
|
+
rescue Exception => e
|
24
|
+
end
|
25
|
+
|
9
26
|
end
|
10
27
|
end
|
data/mina_notify.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mina_notify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saxer
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: faraday
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.9.1
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.9.1
|
69
83
|
description: mina deploy deploys
|
70
84
|
email:
|
71
85
|
- 15201280641@qq.com
|