bullet_train-incoming_webhooks 1.0.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d026de52ad0f695dbe2aa9a6da18c6cf3e1549ce369821159059121986a2e528
|
4
|
+
data.tar.gz: 510d7f1c1924c4f92433f68e1f88412749d06717407d3c3cba8c7aa53751ac2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 855611afa05145f97732887eaca228db15a5401572ddffccff3112b4b4b3e4c40bb446f8e6b3acc7654dd052ccba77210695445bb5a8bac887b1ae2c719e56fa
|
7
|
+
data.tar.gz: 3bd59eca0c922950cefb238709f623a22ff2715613b4d63a988e76aa0f15c8dcc2ec428f4a9379029074b4247774f565ce31590518e498885a093e6daeb959b4
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "scaffolding/incoming_webhooks_transformer"
|
2
|
+
require "bullet_train/super_scaffolding/scaffolder"
|
2
3
|
|
3
4
|
module BulletTrain
|
4
5
|
module IncomingWebhooks
|
@@ -14,7 +15,7 @@ module BulletTrain
|
|
14
15
|
puts ""
|
15
16
|
standard_protip
|
16
17
|
puts ""
|
17
|
-
return
|
18
|
+
return
|
18
19
|
end
|
19
20
|
|
20
21
|
provider_name = argv.shift
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require "scaffolding"
|
2
|
+
require "scaffolding/transformer"
|
3
|
+
|
1
4
|
class Scaffolding::IncomingWebhooksTransformer < Scaffolding::Transformer
|
2
5
|
attr_accessor :provider_name
|
3
6
|
|
@@ -20,11 +23,8 @@ class Scaffolding::IncomingWebhooksTransformer < Scaffolding::Transformer
|
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
23
|
-
# Rename files according to their provider name.
|
24
26
|
file_name_hook = "bullet_train_webhook"
|
25
|
-
new_model_file_name,
|
26
|
-
File.rename("./app/models/webhooks/incoming/bullet_train_webhook.rb", new_model_file_name)
|
27
|
-
File.rename("./app/controllers/webhooks/incoming/bullet_train_webhooks_controller.rb", new_controller_file_name)
|
27
|
+
new_model_file_name, _ = files.map { |file| file.gsub(file_name_hook, replacement_for(file_name_hook)) }
|
28
28
|
|
29
29
|
# Since we eject the model from this repository, we don't need the
|
30
30
|
# extra model generated by `rails g model` (just the migration).
|
@@ -78,6 +78,7 @@ class Scaffolding::IncomingWebhooksTransformer < Scaffolding::Transformer
|
|
78
78
|
|
79
79
|
def transform_string(string)
|
80
80
|
[
|
81
|
+
"bullet_train_webhook",
|
81
82
|
"Webhooks::Incoming::BulletTrainWebhook"
|
82
83
|
].each do |needle|
|
83
84
|
string = string.gsub(needle, replacement_for(needle))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-incoming_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 6.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bullet_train-super_scaffolding
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Bullet Train Incoming Webhooks
|
28
42
|
email:
|
29
43
|
- andrew.culver@gmail.com
|