code_caser 0.0.3 → 0.0.4
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/CHANGELOG.md +7 -4
- data/README.md +3 -3
- data/lib/code_caser/caser.rb +1 -2
- data/lib/code_caser/version.rb +1 -1
- data/lib/code_caser.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0fdaa2d4caf807b396c917cc218140c5c875099
|
4
|
+
data.tar.gz: e70ac1a05cca5972956a60a2021f5c7cbca4daaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a26d48db5e215512f28a8e9233ed95a3cf9e8cfd5cacd2595a9d092fe5006ed4ef9336e3432a5888b6ff8e5f575f066a2f4b55cec2212f05292e65c6d98f9545
|
7
|
+
data.tar.gz: b3a6c6469d3f98af007ca5449ace3a0050d9b42c80dc2973363631bab47d9152e38a523fc4dcf6002c4d9cc5711ce95d10df955cf30e4f2b4a091c8a16aa93bd
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,16 @@
|
|
1
|
-
## 0.0.
|
1
|
+
## 0.0.4, 01/18/2017
|
2
|
+
* Use relative require paths.
|
3
|
+
|
4
|
+
## 0.0.3, 01/18/2017
|
2
5
|
* Hide backup folder dialog when used with --no-save flag.
|
3
6
|
* Add Ruby version requirement to gemspec.
|
4
7
|
|
5
|
-
## 0.0.2,
|
8
|
+
## 0.0.2, 01/18/2017
|
6
9
|
* Fix bug in gemspec executables path
|
7
10
|
* Update help dialog
|
8
11
|
|
9
|
-
## 0.0.1,
|
12
|
+
## 0.0.1, 01/18/2017
|
10
13
|
* Update confirmation dialog
|
11
14
|
|
12
|
-
## 0.0.0,
|
15
|
+
## 0.0.0, 01/18/2017
|
13
16
|
* Initial release
|
data/README.md
CHANGED
@@ -18,17 +18,17 @@ Commands:
|
|
18
18
|
```
|
19
19
|
To use, pass in the path to the file or folder:
|
20
20
|
```
|
21
|
-
$ code_caser to_camel --path=/
|
21
|
+
$ code_caser to_camel --path=/folder/subfolder/example_file.js
|
22
22
|
```
|
23
23
|
Passing a folder will convert all files in that folder (non-recursive):
|
24
24
|
```
|
25
|
-
$ code_caser to_camel --path=/
|
25
|
+
$ code_caser to_camel --path=/folder/subfolder
|
26
26
|
```
|
27
27
|
code_caser will happily convert files in any directory with the required permissions, so **exercise caution when passing in a directory!** You will be presented a confirmation dialog before any files are converted.
|
28
28
|
|
29
29
|
You may also pass in a globbed directory to convert only files that match a given pattern:
|
30
30
|
```
|
31
|
-
$ code_caser to_camel --path/
|
31
|
+
$ code_caser to_camel --path=/folder/subfolder/*.js
|
32
32
|
```
|
33
33
|
## Options
|
34
34
|
Use the ```--verbose``` flag to print any changes made to each file to the terminal.
|
data/lib/code_caser/caser.rb
CHANGED
@@ -39,8 +39,7 @@ module CodeCaser
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def convert_files(files)
|
42
|
-
#
|
43
|
-
FileUtils.mkdir_p(backup_folder)
|
42
|
+
FileUtils.mkdir_p(backup_folder) # Original files will be cached to this backup folder.
|
44
43
|
files.each { |f| convert_file(f) if File.file?(f) }
|
45
44
|
FileUtils.rm_r(backup_folder) unless @save
|
46
45
|
end
|
data/lib/code_caser/version.rb
CHANGED
data/lib/code_caser.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_caser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Lovell
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.4'
|
55
55
|
description: A simple utility gem to convert files from snake_case to camelCase and
|
56
|
-
|
56
|
+
and vice versa.
|
57
57
|
email:
|
58
58
|
- sjlovell34@gmail.com
|
59
59
|
executables:
|