web_safe_filename 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/README.md +12 -1
- data/bin/web_safe_filename +8 -0
- data/lib/web_safe_filename/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7a2e73a34ae2e243647a621f62b91aed46d85fd
|
4
|
+
data.tar.gz: c87021b0da2ad458003e52e6bac621e8a3ed755d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c87965d7c0d44b46cbd02a9120b5955aff719c75a6d55d81c7076ecadb8b02a9a4c72598ffd5be053a09bcc1b6b104c70a7a9a34769e2c6c4c1ca0906971ab0b
|
7
|
+
data.tar.gz: 60c7130494df44b889b3a7c52f2990d4036ade8ad0e1bb502ab50ea0a3be1ddc78917837702bf8fae307a102fb12787fbe811c891a3c106ce4196e6e63393edd
|
data/README.md
CHANGED
@@ -22,7 +22,18 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### CLI
|
26
|
+
Run `web_safe_filename` from the terminal in the desired directory, then type Y at the prompt.
|
27
|
+
|
28
|
+
### Rails
|
29
|
+
It is unlikely you will want use this in a Rails application, but I'm not here to tell you what to do.
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
require 'web_safe_filename'
|
33
|
+
include WebSafeFilename
|
34
|
+
Dir.chdir('your/directory/here')
|
35
|
+
WebSafeFilename::Scrubber.start
|
36
|
+
```
|
26
37
|
|
27
38
|
## Tests
|
28
39
|
|
data/bin/web_safe_filename
CHANGED
@@ -4,4 +4,12 @@ require 'web_safe_filename'
|
|
4
4
|
|
5
5
|
include WebSafeFilename
|
6
6
|
|
7
|
+
puts 'This will recursively rename all files in all directories under this present one. Continue? [Y]'
|
8
|
+
print '> '
|
9
|
+
|
10
|
+
unless gets.chomp == 'Y'
|
11
|
+
puts 'Exiting...'
|
12
|
+
exit 0
|
13
|
+
end
|
14
|
+
|
7
15
|
WebSafeFilename::Scrubber.start
|