files.com 1.0.195 → 1.0.199

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: dfd2b87e6b2899068127a47e5fc6ddbd87588145008666cbb590b2fb76fd58ab
4
- data.tar.gz: dd2e605258357b602b9c61e2800b0558d24a2e11908be6c2093f502b5703fb43
3
+ metadata.gz: 32d713ace64748f4f73a183149c609a95fe5e67792277ee42c143d2950957c40
4
+ data.tar.gz: 3435b1f1fa52866274de6ca5c16aa25ab4b84264a7fc2b92eff7f7563647f9e3
5
5
  SHA512:
6
- metadata.gz: acc6265109d04edf138edc5f9437ec5694fa12b3d4c87eae42ed9275c134bb773d9a404cc6b50090173aeaa0f77de5818950d3a1f4a1504aed351cf83941a653
7
- data.tar.gz: 9692d7bec084adddb8ab1c151141698447c7327b15ffd6a27f06824c81a911076931b415cd378281852d89ed5ee7e30726339ccb833dc1a799d0eabdbbd985b4
6
+ metadata.gz: 4cb5667647a037399a4a9c48985dae4852ee87fbf2d1772e51b4dadbb1287833b792930c186f85bfd1c6dca00e6a6dc1b747c61133c0c63fde5bfc11d78c11e9
7
+ data.tar.gz: d2e58784f707c0d785ee35aebd0e257b20e7ede12a524f5587113ef0d320b202baf8939a526e0ea492035205bfe4fbeeed4a63ae2f22cb568f1b5452e7ac69ba
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.195
1
+ 1.0.199
data/docs/automation.md CHANGED
@@ -8,7 +8,6 @@
8
8
  "automation": "create_folder",
9
9
  "trigger": "realtime",
10
10
  "interval": "week",
11
- "next_process_on": "2020-01-01",
12
11
  "schedule": {
13
12
  "days_of_week": [
14
13
  0,
@@ -48,7 +47,6 @@
48
47
  * `automation` (string): Automation type
49
48
  * `trigger` (string): How this automation is triggered to run. One of: `realtime`, `daily`, `custom_schedule`, `webhook`, `email`, or `action`.
50
49
  * `interval` (string): If trigger is `daily`, this specifies how often to run this automation. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
51
- * `next_process_on` (string): If trigger is `daily`, date this automation will next run.
52
50
  * `schedule` (object): If trigger is `custom_schedule`, Custom schedule description for when the automation should be run.
53
51
  * `source` (string): Source Path
54
52
  * `destinations` (string): Destination Path
@@ -8,6 +8,7 @@
8
8
  "name": "account",
9
9
  "company": "Action Verb",
10
10
  "email": "john.doe@files.com",
11
+ "ip": "10.1.1.1",
11
12
  "inbox_code": "abc123",
12
13
  "clickwrap_body": "",
13
14
  "form_field_set_id": 1,
@@ -19,6 +20,7 @@
19
20
  * `name` (string): Registrant name
20
21
  * `company` (string): Registrant company name
21
22
  * `email` (string): Registrant email address
23
+ * `ip` (string): Registrant IP Address
22
24
  * `inbox_code` (string): InboxRegistration cookie code, if there is an associated InboxRegistration
23
25
  * `clickwrap_body` (string): Clickwrap text that was shown to the registrant
24
26
  * `form_field_set_id` (int64): Id of associated form field set
data/docs/user.md CHANGED
@@ -109,6 +109,7 @@
109
109
  * `change_password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `change_password`.
110
110
  * `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
111
111
  * `group_id` (int64): Group ID to associate this user with.
112
+ * `imported_password_hash` (string): Pre-calculated hash of the user's password.
112
113
  * `password` (string): User password.
113
114
  * `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
114
115
  * `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
@@ -213,6 +214,7 @@ Files::User.create(
213
214
  * `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
214
215
  * `group_id` (int64): Group ID to associate this user with.
215
216
  * `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
217
+ * `imported_password_hash` (string): Pre-calculated hash of the user's password.
216
218
  * `password` (string): User password.
217
219
  * `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
218
220
  * `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
@@ -344,6 +346,7 @@ Files::User.update(id,
344
346
  * `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
345
347
  * `group_id` (int64): Group ID to associate this user with.
346
348
  * `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
349
+ * `imported_password_hash` (string): Pre-calculated hash of the user's password.
347
350
  * `password` (string): User password.
348
351
  * `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
349
352
  * `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
@@ -496,6 +499,7 @@ user.update(
496
499
  * `grant_permission` (string): Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
497
500
  * `group_id` (int64): Group ID to associate this user with.
498
501
  * `group_ids` (string): A list of group ids to associate this user with. Comma delimited.
502
+ * `imported_password_hash` (string): Pre-calculated hash of the user's password.
499
503
  * `password` (string): User password.
500
504
  * `password_confirmation` (string): Optional, but if provided, we will ensure that it matches the value sent in `password`.
501
505
  * `announcements_read` (boolean): Signifies that the user has read all the announcements in the UI.
@@ -45,15 +45,6 @@ module Files
45
45
  @attributes[:interval] = value
46
46
  end
47
47
 
48
- # string - If trigger is `daily`, date this automation will next run.
49
- def next_process_on
50
- @attributes[:next_process_on]
51
- end
52
-
53
- def next_process_on=(value)
54
- @attributes[:next_process_on] = value
55
- end
56
-
57
48
  # object - If trigger is `custom_schedule`, Custom schedule description for when the automation should be run.
58
49
  def schedule
59
50
  @attributes[:schedule]
@@ -29,6 +29,11 @@ module Files
29
29
  @attributes[:email]
30
30
  end
31
31
 
32
+ # string - Registrant IP Address
33
+ def ip
34
+ @attributes[:ip]
35
+ end
36
+
32
37
  # string - InboxRegistration cookie code, if there is an associated InboxRegistration
33
38
  def inbox_code
34
39
  @attributes[:inbox_code]
@@ -70,6 +70,10 @@ module Files
70
70
  new(name).each(*args, &block)
71
71
  end
72
72
 
73
+ def self.from_path(path)
74
+ File.metadata(path)
75
+ end
76
+
73
77
  def self.get(path, params = {}, options = {})
74
78
  find(path, params, options)
75
79
  end
@@ -482,6 +482,15 @@ module Files
482
482
  @attributes[:group_id] = value
483
483
  end
484
484
 
485
+ # string - Pre-calculated hash of the user's password.
486
+ def imported_password_hash
487
+ @attributes[:imported_password_hash]
488
+ end
489
+
490
+ def imported_password_hash=(value)
491
+ @attributes[:imported_password_hash] = value
492
+ end
493
+
485
494
  # string - User password.
486
495
  def password
487
496
  @attributes[:password]
@@ -551,6 +560,7 @@ module Files
551
560
  # grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
552
561
  # group_id - int64 - Group ID to associate this user with.
553
562
  # group_ids - string - A list of group ids to associate this user with. Comma delimited.
563
+ # imported_password_hash - string - Pre-calculated hash of the user's password.
554
564
  # password - string - User password.
555
565
  # password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `password`.
556
566
  # announcements_read - boolean - Signifies that the user has read all the announcements in the UI.
@@ -597,6 +607,7 @@ module Files
597
607
  raise InvalidParameterError.new("Bad parameter: grant_permission must be an String") if params.dig(:grant_permission) and !params.dig(:grant_permission).is_a?(String)
598
608
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
599
609
  raise InvalidParameterError.new("Bad parameter: group_ids must be an String") if params.dig(:group_ids) and !params.dig(:group_ids).is_a?(String)
610
+ raise InvalidParameterError.new("Bad parameter: imported_password_hash must be an String") if params.dig(:imported_password_hash) and !params.dig(:imported_password_hash).is_a?(String)
600
611
  raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
601
612
  raise InvalidParameterError.new("Bad parameter: password_confirmation must be an String") if params.dig(:password_confirmation) and !params.dig(:password_confirmation).is_a?(String)
602
613
  raise InvalidParameterError.new("Bad parameter: allowed_ips must be an String") if params.dig(:allowed_ips) and !params.dig(:allowed_ips).is_a?(String)
@@ -709,6 +720,7 @@ module Files
709
720
  # grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
710
721
  # group_id - int64 - Group ID to associate this user with.
711
722
  # group_ids - string - A list of group ids to associate this user with. Comma delimited.
723
+ # imported_password_hash - string - Pre-calculated hash of the user's password.
712
724
  # password - string - User password.
713
725
  # password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `password`.
714
726
  # announcements_read - boolean - Signifies that the user has read all the announcements in the UI.
@@ -751,6 +763,7 @@ module Files
751
763
  raise InvalidParameterError.new("Bad parameter: grant_permission must be an String") if params.dig(:grant_permission) and !params.dig(:grant_permission).is_a?(String)
752
764
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
753
765
  raise InvalidParameterError.new("Bad parameter: group_ids must be an String") if params.dig(:group_ids) and !params.dig(:group_ids).is_a?(String)
766
+ raise InvalidParameterError.new("Bad parameter: imported_password_hash must be an String") if params.dig(:imported_password_hash) and !params.dig(:imported_password_hash).is_a?(String)
754
767
  raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
755
768
  raise InvalidParameterError.new("Bad parameter: password_confirmation must be an String") if params.dig(:password_confirmation) and !params.dig(:password_confirmation).is_a?(String)
756
769
  raise InvalidParameterError.new("Bad parameter: allowed_ips must be an String") if params.dig(:allowed_ips) and !params.dig(:allowed_ips).is_a?(String)
@@ -816,6 +829,7 @@ module Files
816
829
  # grant_permission - string - Permission to grant on the user root. Can be blank or `full`, `read`, `write`, `list`, or `history`.
817
830
  # group_id - int64 - Group ID to associate this user with.
818
831
  # group_ids - string - A list of group ids to associate this user with. Comma delimited.
832
+ # imported_password_hash - string - Pre-calculated hash of the user's password.
819
833
  # password - string - User password.
820
834
  # password_confirmation - string - Optional, but if provided, we will ensure that it matches the value sent in `password`.
821
835
  # announcements_read - boolean - Signifies that the user has read all the announcements in the UI.
@@ -861,6 +875,7 @@ module Files
861
875
  raise InvalidParameterError.new("Bad parameter: grant_permission must be an String") if params.dig(:grant_permission) and !params.dig(:grant_permission).is_a?(String)
862
876
  raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params.dig(:group_id) and !params.dig(:group_id).is_a?(Integer)
863
877
  raise InvalidParameterError.new("Bad parameter: group_ids must be an String") if params.dig(:group_ids) and !params.dig(:group_ids).is_a?(String)
878
+ raise InvalidParameterError.new("Bad parameter: imported_password_hash must be an String") if params.dig(:imported_password_hash) and !params.dig(:imported_password_hash).is_a?(String)
864
879
  raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
865
880
  raise InvalidParameterError.new("Bad parameter: password_confirmation must be an String") if params.dig(:password_confirmation) and !params.dig(:password_confirmation).is_a?(String)
866
881
  raise InvalidParameterError.new("Bad parameter: allowed_ips must be an String") if params.dig(:allowed_ips) and !params.dig(:allowed_ips).is_a?(String)
@@ -97,4 +97,18 @@ RSpec.describe Files::File, :with_test_folder, skip: ENV["GITLAB"] do
97
97
  expect(io.tap(&:rewind).read).to eq("I am a string")
98
98
  end
99
99
  end
100
+
101
+ describe ".from_path" do
102
+ it "returns a File object for a file" do
103
+ Files::File.open(test_folder.join("read.txt").to_s, 'w', options) do |f|
104
+ f.write("contents")
105
+ end
106
+ expect(Files::File.from_path("read.txt")).to be_a_kind_of(Files::File)
107
+ end
108
+
109
+ it "returns a Folder object for a Folder" do
110
+ Files::Folder.mkdir("testdir")
111
+ expect(Files::File.from_path("testdir")).to be_a_kind_of(Files::Folder)
112
+ end
113
+ end
100
114
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.195
4
+ version: 1.0.199
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable