affogata_love_muffins 0.6.9 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/affogata_love_muffins/version.rb +1 -1
- data/lib/affogata_love_muffins.rb +7 -1
- data/lib/tasks/affogata.rake +12 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6756fb3ebe2ee626e40a67b671364157906c12cce36e885d4779a3139559c9dc
|
4
|
+
data.tar.gz: 39f448297a0e8933ba07482330f46640528686b19c1bc1b848edad796ba177d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4a09190d27845f7afccc056574c70bca472a9ea9cd397212c1028a3e597cad33aea9b94e20366fba707acd0a0929ce075a0e8f6a3fdfdc32aebf0a2e24752da
|
7
|
+
data.tar.gz: 2ae45e5e8bfab8aff4fb8cf366af0114bdacd151eebec1730670a5aa4f4d136fa296cc173c10ad18963141a7038cc911227949a2dce179c531d7d1579a210c40
|
@@ -2,6 +2,8 @@ module AffogataLoveMuffins
|
|
2
2
|
class Config
|
3
3
|
attr_accessor :herochestrator_url
|
4
4
|
attr_accessor :data
|
5
|
+
attr_accessor :slack_url
|
6
|
+
|
5
7
|
def initialize
|
6
8
|
@herochestrator_url = ENV['HEROCHESTRATOR_URL']
|
7
9
|
end
|
@@ -15,7 +17,11 @@ module AffogataLoveMuffins
|
|
15
17
|
app_name: ENV['HEROKU_APP_NAME'],
|
16
18
|
dyno_id: ENV['HEROKU_DYNO_ID'],
|
17
19
|
parent_app_name: ENV['HEROKU_PARENT_APP_NAME'],
|
18
|
-
|
20
|
+
pr_number: ENV['HEROKU_PR_NUMBER'],
|
21
|
+
branch: ENV['HEROKU_BRANCH'],
|
22
|
+
rails_env: ENV['RAILS_ENV'],
|
23
|
+
repo_url: json['repository'],
|
24
|
+
slack_url: slack_url
|
19
25
|
}
|
20
26
|
end
|
21
27
|
end
|
data/lib/tasks/affogata.rake
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
require 'net/http'
|
2
2
|
require 'uri'
|
3
3
|
|
4
|
+
|
4
5
|
namespace :affogata do
|
6
|
+
def handle(step)
|
7
|
+
puts "affogata:#{step} has been invoked"
|
8
|
+
uri = URI("#{AffogataLoveMuffins.config.herochestrator_url}/webhooks/apps?step=#{step}")
|
9
|
+
res = Net::HTTP.post_form(uri, AffogataLoveMuffins.config.data.map { |k,v| [k.to_s, v] }.to_h)
|
10
|
+
puts "affogata:#{step} was sent #{res.code}: #{res.body.inspect}"
|
11
|
+
end
|
12
|
+
|
5
13
|
desc "Fires when the initial app is created"
|
6
14
|
task created: :environment do
|
7
|
-
|
8
|
-
res = Net::HTTP.post_form(uri, AffogataLoveMuffins.config.data.map { |k,v| [k.to_s, v] }.to_h)
|
9
|
-
puts res.body
|
15
|
+
handle(:created)
|
10
16
|
end
|
11
17
|
|
12
18
|
desc "Fires when the app has all platform-specific settings configured"
|
13
19
|
task provisioned: :environment do
|
14
|
-
|
15
|
-
res = Net::HTTP.post_form(uri, AffogataLoveMuffins.config.data.map { |k,v| [k.to_s, v] }.to_h)
|
16
|
-
puts res.body
|
20
|
+
handle(:provisioned)
|
17
21
|
end
|
18
22
|
|
19
23
|
desc "Idk when this fires but it seems like a good idea to have it"
|
20
24
|
task post_setup: :environment do
|
21
|
-
|
22
|
-
res = Net::HTTP.post_form(uri, AffogataLoveMuffins.config.data.map { |k,v| [k.to_s, v] }.to_h)
|
23
|
-
puts res.body
|
25
|
+
handle(:post_setup)
|
24
26
|
end
|
25
27
|
|
26
28
|
desc "Fires when this instance is being removed from the platform"
|
27
29
|
task destroyed: :environment do
|
28
|
-
|
29
|
-
res = Net::HTTP.post_form(uri, AffogataLoveMuffins.config.data.map { |k,v| [k.to_s, v] }.to_h)
|
30
|
-
puts res.body
|
30
|
+
handle(:destroyed)
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: affogata_love_muffins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Partytray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|