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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a36d7afbac3fdae6a62fe5c6f990aef192a49f7f
4
- data.tar.gz: 19a0da3e387cadbecf7f8998ea45a62ad870dfb6
3
+ metadata.gz: a0fdaa2d4caf807b396c917cc218140c5c875099
4
+ data.tar.gz: e70ac1a05cca5972956a60a2021f5c7cbca4daaf
5
5
  SHA512:
6
- metadata.gz: 195c258cb20891d49244774b2ee1b94faf75c75f5385eb4cee0c18aac67fbfd3a7816c0318852098e913f9d91567e85d58abc6212eb706db84a99383982befc3
7
- data.tar.gz: 51a3f5b44ed8f6cce744068689587281f4bf1353b05c4124d6dffaa30024f3324e84f0219c5cc84e1d41d97c98122c27b46943e62964de63d6c271601ac0efd5
6
+ metadata.gz: a26d48db5e215512f28a8e9233ed95a3cf9e8cfd5cacd2595a9d092fe5006ed4ef9336e3432a5888b6ff8e5f575f066a2f4b55cec2212f05292e65c6d98f9545
7
+ data.tar.gz: b3a6c6469d3f98af007ca5449ace3a0050d9b42c80dc2973363631bab47d9152e38a523fc4dcf6002c4d9cc5711ce95d10df955cf30e4f2b4a091c8a16aa93bd
data/CHANGELOG.md CHANGED
@@ -1,13 +1,16 @@
1
- ## 0.0.3, 01/18/2017
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, 01/18/2017
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, 01/18/2017
12
+ ## 0.0.1, 01/18/2017
10
13
  * Update confirmation dialog
11
14
 
12
- ## 0.0.0, 01/18/2017
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=/path/to/example_file.js
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=/path/to/example_folder
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/to/example_folder/*.js
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.
@@ -39,8 +39,7 @@ module CodeCaser
39
39
  end
40
40
 
41
41
  def convert_files(files)
42
- # cache the original file in a backup folder.
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
@@ -1,3 +1,3 @@
1
1
  module CodeCaser
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
data/lib/code_caser.rb CHANGED
@@ -1,5 +1,4 @@
1
-
2
- Dir["./lib/code_caser/*.rb"].each {|file| require file }
1
+ Dir[File.dirname(__FILE__) + '/code_caser/*.rb'].each {|file| require file }
3
2
 
4
3
  module CodeCaser
5
4
  def self.to_camel(opts)
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.3
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
- back.
56
+ and vice versa.
57
57
  email:
58
58
  - sjlovell34@gmail.com
59
59
  executables: