new_hash_syntax 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/new_hash_syntax.rake +7 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea9c2f3728f0f05c5915ea39fac85fc5060c8a55
|
4
|
+
data.tar.gz: 57a709fd0525d8676ce497210d8fb87cd5891578
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b300310f8a700aff571feba1823b36ef146ebbf0be9f454246991754680499fb30ff67b2aa34823ae1511911d24db3a6bd95b897a8badf51168a27445c8ce11
|
7
|
+
data.tar.gz: e5b5656b342a5e3d4d2158ac3dde7b1a46f1ea768c9c94c4234bed4b89fa885be80a2bc61181f67e260e22eab2fe9e9c6d3169f8976a94fc3a096b63eb4f2717
|
@@ -1,9 +1,13 @@
|
|
1
1
|
desc "Convert all old hash syntax to new hash syntax"
|
2
2
|
|
3
|
-
|
3
|
+
namespace :new_hash_syntax do
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
task :convert do
|
6
|
+
|
7
|
+
# find all ruby files in the project and change the syntax
|
8
|
+
system("find . -name \*.rb -exec perl -p -i -e 's/([^:]):(\w+)\s*=>/\1\2:/g' {} \;")
|
9
|
+
|
10
|
+
end
|
7
11
|
|
8
12
|
end
|
9
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: new_hash_syntax
|
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
|
- Mukul Goyal
|
@@ -14,28 +14,28 @@ dependencies:
|
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Convert your all ruby files that contains old hash syntax(ruby 1.8) to
|