brick_ftp 0.3.7 → 0.3.8
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 +4 -4
- data/lib/brick_ftp.rb +34 -0
- data/lib/brick_ftp/version.rb +1 -1
- data/lib/brick_ftp/webhook.rb +4 -0
- data/lib/brick_ftp/webhook/request.rb +28 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7c48f0dbe9dcae8e1a850c64f07214a6537ee18
|
4
|
+
data.tar.gz: 296971fe21f4e09eec0991ed0ad623fa3dba7570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d51a198f2a54dd57fa7deea8f6ede25e9f3583a879cb85120cff35e558e771f37971fa802243d22696120a0030bf655a7505c3bfae13ae50220dc329ed0c2950
|
7
|
+
data.tar.gz: 4cd55009c9dc5b90c777f7f94391de5eddd554f335f73d43d937db37715f9115f3b8cba9c7e63b6ca5f110247ab12b5a403a69b0152c021255bb45fce84b6827
|
data/lib/brick_ftp.rb
CHANGED
@@ -33,8 +33,42 @@ require 'brick_ftp/api/file_operation/move'
|
|
33
33
|
require 'brick_ftp/api/file_operation/copy'
|
34
34
|
require 'brick_ftp/api/file_operation/upload'
|
35
35
|
require 'brick_ftp/api/site_usage'
|
36
|
+
require 'brick_ftp/webhook'
|
37
|
+
require 'brick_ftp/webhook/request'
|
36
38
|
|
37
39
|
module BrickFTP
|
40
|
+
# https://brickftp.com/redundancy/
|
41
|
+
IP_ADDRESSES = %w(
|
42
|
+
54.193.69.72
|
43
|
+
54.193.69.200
|
44
|
+
54.193.65.189
|
45
|
+
54.193.69.198
|
46
|
+
54.208.20.30
|
47
|
+
54.209.242.244
|
48
|
+
54.209.231.233
|
49
|
+
54.208.198.60
|
50
|
+
54.209.231.99
|
51
|
+
54.209.246.178
|
52
|
+
54.209.91.52
|
53
|
+
54.208.63.151
|
54
|
+
54.209.246.217
|
55
|
+
54.209.222.205
|
56
|
+
54.208.169.75
|
57
|
+
52.8.210.89
|
58
|
+
52.74.166.120
|
59
|
+
52.64.2.88
|
60
|
+
52.17.96.203
|
61
|
+
52.28.101.76
|
62
|
+
54.232.253.47
|
63
|
+
54.64.240.152
|
64
|
+
52.74.188.115
|
65
|
+
52.64.6.120
|
66
|
+
52.18.87.39
|
67
|
+
52.29.176.178
|
68
|
+
54.207.27.239
|
69
|
+
52.68.4.44
|
70
|
+
).freeze
|
71
|
+
|
38
72
|
# Return configuration.
|
39
73
|
# If it has not been configured yet, initialize configuration.
|
40
74
|
# @return [BrickFTP::Configuration] configuration object.
|
data/lib/brick_ftp/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module BrickFTP
|
4
|
+
module Webhook
|
5
|
+
class Request
|
6
|
+
attr_reader :action, :interface, :path, :destination, :at, :username, :type
|
7
|
+
|
8
|
+
def self.from_query_string(query_string)
|
9
|
+
params = query_string.split('&').each_with_object({}) do |pair, res|
|
10
|
+
key, value = pair.split('=').map { |x| CGI.unescape(x) }
|
11
|
+
res[key.to_sym] = value
|
12
|
+
end
|
13
|
+
|
14
|
+
new(params)
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize(action: nil, interface: nil, path: nil, destination: nil, at: nil, username: nil, type: nil)
|
18
|
+
@action = action
|
19
|
+
@interface = interface
|
20
|
+
@path = path
|
21
|
+
@destination = destination
|
22
|
+
@at = at
|
23
|
+
@username = username
|
24
|
+
@type = type
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brick_ftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- koshigoe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -160,6 +160,8 @@ files:
|
|
160
160
|
- lib/brick_ftp/http_client.rb
|
161
161
|
- lib/brick_ftp/log_formatter.rb
|
162
162
|
- lib/brick_ftp/version.rb
|
163
|
+
- lib/brick_ftp/webhook.rb
|
164
|
+
- lib/brick_ftp/webhook/request.rb
|
163
165
|
homepage: https://github.com/koshigoe/brick_ftp
|
164
166
|
licenses:
|
165
167
|
- MIT
|