onlyoffice_file_helper 0.3.0 → 0.4.0

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: 960f7f59f836fb2dbbdb528ce155c265cb92e380557fa758465686612d4e7176
4
- data.tar.gz: c0b2363e46bbf0ec44824caa4ba9a6085b0eab20597d9e021fe9f4f2447281ed
3
+ metadata.gz: 7a2fce65649f29c5896b478a8b5786d6c850a91e3d4cc13fefd410a14d70f065
4
+ data.tar.gz: 47be12b2f7e6e19b2beee6a4cc0afb398827e4559106fc695d8c03a0c77d7693
5
5
  SHA512:
6
- metadata.gz: 5483180cd580bd34697f23787630bad8eb72e1b879cbde1af1e22473829c07d36dfe73d0bb5834c4897d9e95d808f12cff6daeb5cb0f42c819abc99152185f3e
7
- data.tar.gz: be52527e07d845c960724fa3a2ddbac3a7e31465bd3d8be6792a91a30a3663a673193bd5d7aeeb64d51caab1d62427cca33bd49f3cdc426bf9ce6d14a9b18e76
6
+ metadata.gz: 46ab25b8bf3ce467eca640b777c38cb6ed58aeb6ce9815b68dee6ced19f33fdb3cbf20beb2fccaaec4e19147717d89f275c3f465ad39beccbe4904e8f6bfdeda
7
+ data.tar.gz: 741fd7bcc0ee7baf61d9d866a51ea633ff3e4bca08c0804fe8286ca08971e1eca3c83097bb18be2afbeed8229fa6fd2b5af82a4c250ca43dd675367af68f53ca
@@ -38,7 +38,7 @@ module OnlyofficeFileHelper
38
38
  def wait_file_to_download(path, timeout = 300)
39
39
  timer = 0
40
40
  OnlyofficeLoggerHelper.log("Start waiting to download file: #{path}")
41
- until File.exist?(path) && !File.exist?(path + '.part')
41
+ until File.exist?(path) && !File.exist?("#{path}.part")
42
42
  OnlyofficeLoggerHelper.log("Waiting for #{timer} seconds from #{timeout}")
43
43
  sleep 1
44
44
  timer += 1
@@ -54,7 +54,7 @@ module OnlyofficeFileHelper
54
54
  # @return [Void]
55
55
  def extract_to_folder(path_to_archive,
56
56
  path_to_extract = path_to_archive.chomp(File.basename(path_to_archive)))
57
- raise 'File not found: ' + path_to_archive.to_s unless wait_file_to_download(path_to_archive)
57
+ raise "File not found: #{path_to_archive}" unless wait_file_to_download(path_to_archive)
58
58
 
59
59
  path_to_extract += '/' unless path_to_extract[-1] == '/'
60
60
  path_to_file = path_to_extract + File.basename(path_to_archive)
@@ -3,6 +3,9 @@
3
3
  module OnlyofficeFileHelper
4
4
  # Methods used to work with directories
5
5
  module DirectoryMethods
6
+ # @return [Array<String>] list of linux special dirs
7
+ LINUX_SPECIAL_DIRS = %w[.. .].freeze
8
+
6
9
  # Delete directory only if it exists
7
10
  # @param path [String] directory to delete
8
11
  # @return [Void]
@@ -16,7 +19,7 @@ module OnlyofficeFileHelper
16
19
  def directory_hash(path)
17
20
  files = []
18
21
  Dir.foreach(path).sort.each do |entry|
19
- next if %w[.. .].include?(entry)
22
+ next if LINUX_SPECIAL_DIRS.include?(entry)
20
23
 
21
24
  full_path = File.join(path, entry)
22
25
  files = root_dir_hash(files, full_path)
@@ -8,7 +8,7 @@ module OnlyofficeFileHelper
8
8
  # @return [String] result of read
9
9
  def read_file_to_string(file_name)
10
10
  result_string = ''
11
- raise 'File not found: ' + file_name.to_s unless File.exist?(file_name)
11
+ raise "File not found: #{file_name}" unless File.exist?(file_name)
12
12
 
13
13
  File.open(file_name, 'r') do |infile|
14
14
  while (line = infile.gets)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module OnlyofficeFileHelper
4
4
  # @return [String] version of gem
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_file_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-16 00:00:00.000000000 Z
12
+ date: 2020-11-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: onlyoffice_logger_helper
@@ -29,36 +29,148 @@ dependencies:
29
29
  name: rubyzip
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '1'
35
- - - "<"
34
+ version: '2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2'
42
+ - !ruby/object:Gem::Dependency
43
+ name: codecov
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: overcommit
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rake
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '13'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '13'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rspec
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
36
89
  - !ruby/object:Gem::Version
37
90
  version: '3'
38
- type: :runtime
91
+ type: :development
39
92
  prerelease: false
40
93
  version_requirements: !ruby/object:Gem::Requirement
41
94
  requirements:
42
- - - ">="
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '3'
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
43
103
  - !ruby/object:Gem::Version
44
104
  version: '1'
45
- - - "<"
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
46
110
  - !ruby/object:Gem::Version
47
- version: '3'
111
+ version: '1'
48
112
  - !ruby/object:Gem::Dependency
49
- name: rake
113
+ name: rubocop-performance
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '1'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '1'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-rake
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ - !ruby/object:Gem::Dependency
141
+ name: rubocop-rspec
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '2'
147
+ type: :development
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '2'
154
+ - !ruby/object:Gem::Dependency
155
+ name: yard
50
156
  requirement: !ruby/object:Gem::Requirement
51
157
  requirements:
52
158
  - - "~>"
53
159
  - !ruby/object:Gem::Version
54
- version: '13.0'
160
+ version: '0'
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: 0.9.20
55
164
  type: :development
56
165
  prerelease: false
57
166
  version_requirements: !ruby/object:Gem::Requirement
58
167
  requirements:
59
168
  - - "~>"
60
169
  - !ruby/object:Gem::Version
61
- version: '13.0'
170
+ version: '0'
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 0.9.20
62
174
  description: ONLYOFFICE Helper Gem for File operation. Used in QA
63
175
  email:
64
176
  - shockwavenn@gmail.com
@@ -76,15 +188,15 @@ files:
76
188
  - lib/onlyoffice_file_helper/ruby_helper.rb
77
189
  - lib/onlyoffice_file_helper/string_helper.rb
78
190
  - lib/onlyoffice_file_helper/version.rb
79
- homepage: https://github.com/onlyoffice-testing-robot/onlyoffice_file_helper
191
+ homepage: https://github.com/ONLYOFFICE-QA/onlyoffice_file_helper
80
192
  licenses:
81
193
  - AGPL-3.0
82
194
  metadata:
83
- bug_tracker_uri: https://github.com/onlyoffice-testing-robot/onlyoffice_file_helper/issues
84
- changelog_uri: https://github.com/onlyoffice-testing-robot/onlyoffice_file_helper/blob/master/CHANGELOG.md
195
+ bug_tracker_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_file_helper/issues
196
+ changelog_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_file_helper/blob/master/CHANGELOG.md
85
197
  documentation_uri: https://www.rubydoc.info/gems/onlyoffice_file_helper
86
- homepage_uri: https://github.com/onlyoffice-testing-robot/onlyoffice_file_helper
87
- source_code_uri: https://github.com/onlyoffice-testing-robot/onlyoffice_file_helper
198
+ homepage_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_file_helper
199
+ source_code_uri: https://github.com/ONLYOFFICE-QA/onlyoffice_file_helper
88
200
  post_install_message:
89
201
  rdoc_options: []
90
202
  require_paths:
@@ -93,14 +205,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
205
  requirements:
94
206
  - - ">="
95
207
  - !ruby/object:Gem::Version
96
- version: '0'
208
+ version: '2.5'
97
209
  required_rubygems_version: !ruby/object:Gem::Requirement
98
210
  requirements:
99
211
  - - ">="
100
212
  - !ruby/object:Gem::Version
101
213
  version: '0'
102
214
  requirements: []
103
- rubygems_version: 3.1.2
215
+ rubygems_version: 3.1.4
104
216
  signing_key:
105
217
  specification_version: 4
106
218
  summary: ONLYOFFICE Helper Gem for File operation