solutus 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4e5dfc711131b2732b3179bb8bc40adac3c9dbf071f5e37e6edb2cb68421d46
4
- data.tar.gz: 4e00e1d6a9f78530fe55e20f3af15384484f0cad83a0c5b682e7d6d751ef16df
3
+ metadata.gz: 776fe3f61c19491bc00a77ff0bffaec3f1db9215e51a11452f7dd34c6788c166
4
+ data.tar.gz: f7dd68448cc214ac0fb6c752424907fd01761596e72d2d35e2ef5c97aad4be00
5
5
  SHA512:
6
- metadata.gz: a2a15e30c6b22f8b6b513b1b04497e93e78fad19f1225b8afdaa09a96be541d69c42a2eaa67e7911e2b346d7daa11e8395ed6bf38dea1d6c35d7b3547cafbc72
7
- data.tar.gz: 11a67bf8b78990bb57c086ef0ca00901305b4edf2976d2abe648babfa4ab3292965c3775545be52ca9c922568ebbc945bfb9e0e4f6d8924b2820a9f1b15fc76a
6
+ metadata.gz: 3812df86287819f2905efadecc9e5497e2fbbf9aaae0b275de2d28a700ea1e3b537cf2c1ea368f3949a62457c1dad745f1e611b2145b9b2c67db956fec0a7096
7
+ data.tar.gz: c4b82b8285b8c7dd8ca43d6c0f7e666d493ca70c5fe93d80ce29672de4773d176e75c924d8b13705b7ec7983cf197863e64abdacfb240ce1a3d41d132c786b38
@@ -31,7 +31,7 @@ class Solutus
31
31
  PASSWORD_FILE = "password.txt"
32
32
  DAY_ENDINGS = ["th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th", "th", "st"]
33
33
 
34
- VERSION = '0.2.0'
34
+ VERSION = '0.2.1'
35
35
 
36
36
  LOG_FILE = 'log'
37
37
 
@@ -162,7 +162,7 @@ class Solutus
162
162
  if !File.directory?(dir)
163
163
  FileUtils.mkdir_p(dir)
164
164
  end
165
- if file.file?(path)
165
+ if File.file?(path)
166
166
  return 'error: file already exists'
167
167
  end
168
168
  f = File.new(path, 'w')
@@ -278,7 +278,8 @@ HERE
278
278
  File.open(path_to_file, 'wb') do |f|
279
279
  f.write(file.read)
280
280
  end
281
-
281
+ write_log("Uploaded #{path_to_file} from #{request.ip}")
282
+
282
283
  Solutus.command("build")
283
284
 
284
285
  link = settings.global_settings['domain'] + "/" + UPLOAD_DIR_SUFF + "/#{dir}/" + filename
@@ -41,7 +41,7 @@
41
41
  <form method="post" action="/upload" enctype="multipart/form-data">
42
42
  <fieldset>
43
43
  <legend>Upload File and Get Link</legend>
44
- <p><input type="file" name="file"></p>
44
+ <p><input type="file" name="file" required></p>
45
45
  File subdirectory:
46
46
  <input list="fofoo" required name='dir' />
47
47
  <datalist id="fofoo">{{{file_upload_paths}}}</datalist>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solutus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jerome Wei