codeshift 0.1.8 → 0.1.9

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: 859056551d3a033b662df3b9d00b04fef3c462e0e72c89b25ead9b97b8a56e79
4
- data.tar.gz: 021510423cd55f5c994a2fc4976293eacbcfb2d42aa26983780c36e25a45fe1d
3
+ metadata.gz: 5dc90b2206d515493277afb92c4bfa45e6acad0ac7cd305ee9dae743d31e3250
4
+ data.tar.gz: f8741ad46f12f53c8668c04112257d82f565895c320819258e7e4ab250bf4a1d
5
5
  SHA512:
6
- metadata.gz: 8a1ce90822608f3a2d9ccdf16badf7e24771cc68d9a10cc11d5faaabc4bbf0675ad7b9903d8a340021bc169e3cce788013a4e2dde82b7f7920ac73bd105670db
7
- data.tar.gz: 3c58f135ee9c118856bf55785c3e72947bd83f72eb22e05b0a4b5d9365f84103a18857874a04e012a54e16651799d4d5b543e177ee28dce1bfd3f1d970b3d684
6
+ metadata.gz: e798664f8e3489bfb1301642bf0826a6f2612696e4004cafcdbee8f13869c2833fad9d941f7e61ac0576de3c3e16fcaff326f041b758e9f07e1d919c4004cd78
7
+ data.tar.gz: 9037feda2b9d933f45d2505bac0e5229e7413c1e4fa139babd336fba42b87528afd9dc3ff8cea10da3a59a0a14adc7c1bd4d6624f0e0657694ef7ef5e03d6eeb
data/README.md CHANGED
@@ -23,7 +23,7 @@ $ codeshift -t [TRANSFORM FILE] [PATHS]
23
23
  To apply the transform logic on your `app/models` files
24
24
 
25
25
  ```sh
26
- $ codeshift -t transform.rb app/models/**/*.rb
26
+ $ codeshift -t transform.rb app/models
27
27
  ```
28
28
 
29
29
  For example if you want to reverse the local variable names and method names in your code
@@ -63,7 +63,7 @@ end
63
63
  Then use it against your source code
64
64
 
65
65
  ```sh
66
- $ codeshift -t transform.rb ~/Desktop/test/ruby/**/*.rb
66
+ $ codeshift -t transform.rb ~/Desktop/test/ruby
67
67
  ```
68
68
 
69
69
  Then your source will be transformed something like:
@@ -88,14 +88,14 @@ Usage: codeshift -t <transform-file> [path]
88
88
  The transform file could be a local file or a remote url. For example you can use like
89
89
 
90
90
  ```sh
91
- $ codeshift -t https://gist.githubusercontent.com/[user]/.../transform.rb ~/Desktop/test/ruby/**/*.rb
91
+ $ codeshift -t https://gist.githubusercontent.com/[user]/.../transform.rb ~/Desktop/test/ruby
92
92
  ```
93
93
 
94
94
  ### path
95
95
  The path could be a list of directories or files separated by space.
96
96
 
97
97
  ```sh
98
- $ codeshift -t transform.rb ~/app/legacy/ruby/**/*.rb ~/app/old/**/*.rb
98
+ $ codeshift -t transform.rb ~/app/legacy/ruby ~/app/old
99
99
  ```
100
100
 
101
101
  ```sh
@@ -46,7 +46,8 @@ module CodeShift
46
46
  paths = @files.empty? ? [] : @files
47
47
  paths.each do |path|
48
48
  if File.directory?(path)
49
- Dir.glob(path) do |file_path|
49
+ glob_path = File.join(path,'**','*.rb')
50
+ Dir.glob(glob_path) do |file_path|
50
51
  process_file file_path
51
52
  end
52
53
  else
@@ -1,3 +1,3 @@
1
1
  module Codeshift
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeshift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajasegar Chandran