cliz 0.0.1 → 0.0.2
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/functions.rb +5 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c0d4daf42c2bd286855ae30a21fc3de701ab42c05883fea64e36a4f292e6e5a8
|
|
4
|
+
data.tar.gz: 1311ed68a0e040bc8819c3f0aaddbaf6bb8b0d6bb7bd8f5287ee88e456687e6a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94001761e04e7829553b0cc88d108af1cb689f4e122f186b30c0d46a0956d0611fad8f2449ca9185e219fd80388da6a9691bf820680fe9746f3def86440d5644
|
|
7
|
+
data.tar.gz: 0d01bc705f75a863854edcc486f37806b7409fb005d056d69d0b09a57e76b5950b076c953d2b81dae2398d066caf69247db35aeaccb3ba2e65ac41321669ec7e
|
data/lib/functions.rb
CHANGED
|
@@ -6,14 +6,11 @@ require 'fileutils'
|
|
|
6
6
|
def get_a_folder_path output_directory, short_suggestion = nil
|
|
7
7
|
folder_path = nil
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
if File.directory?(folder_path)
|
|
15
|
-
raise ("This short URL is already taken.")
|
|
16
|
-
end
|
|
9
|
+
short_suggestion ||= generate_short_suggestion output_directory
|
|
10
|
+
folder_path = File.join(output_directory, short_suggestion, '/')
|
|
11
|
+
|
|
12
|
+
if File.directory?(folder_path)
|
|
13
|
+
raise ("This short URL is already taken.")
|
|
17
14
|
end
|
|
18
15
|
|
|
19
16
|
folder_path
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cliz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Karthikeyan A K
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-04-
|
|
11
|
+
date: 2021-04-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Cliz - The static URL shortner
|
|
14
14
|
email: mindaslab@protonmail.com
|