brick_ftp 0.3.7 → 0.3.8

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
  SHA1:
3
- metadata.gz: 79ccc04291b5b8b7f7f51257f844ee9061d11221
4
- data.tar.gz: 5dc14fa8240e3242aeac9f613760e1b28dd442df
3
+ metadata.gz: a7c48f0dbe9dcae8e1a850c64f07214a6537ee18
4
+ data.tar.gz: 296971fe21f4e09eec0991ed0ad623fa3dba7570
5
5
  SHA512:
6
- metadata.gz: d74ddc3854f64857abb6ee9655883df0f48c964a472f430be09c5fca4c6885ea4c20b0467f708606f1fd0ffc8a1263c0ff96c5504d050025278993487cbfec3b
7
- data.tar.gz: cc6eb4f0ef1b66cd33b05383f0225b485445da9d1c76562456ea2b794bdac2ca60b986ef77f554a049748e2ddf8129634f026f2a7397cdb300d75e4829d25954
6
+ metadata.gz: d51a198f2a54dd57fa7deea8f6ede25e9f3583a879cb85120cff35e558e771f37971fa802243d22696120a0030bf655a7505c3bfae13ae50220dc329ed0c2950
7
+ data.tar.gz: 4cd55009c9dc5b90c777f7f94391de5eddd554f335f73d43d937db37715f9115f3b8cba9c7e63b6ca5f110247ab12b5a403a69b0152c021255bb45fce84b6827
@@ -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.
@@ -1,3 +1,3 @@
1
1
  module BrickFTP
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
@@ -0,0 +1,4 @@
1
+ module BrickFTP
2
+ module Webhook
3
+ end
4
+ end
@@ -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.7
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-20 00:00:00.000000000 Z
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