mo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mo/railtie.rb +11 -0
  2. data/lib/mo/version.rb +1 -1
  3. metadata +2 -2
@@ -15,6 +15,17 @@ module Mo
15
15
  end
16
16
  end
17
17
 
18
+ desc "Convert ruby hashes to 1.9 style."
19
+ task :rocketless do
20
+ Dir['**/*.rb'].each do |file|
21
+ source = File.open(file).read
22
+ regexp = /(?<!return)(?<!:)(?<!\w)(\s+):(\w+)\s*=>/
23
+ next if source.scan(regexp).size.zero?
24
+ source.gsub!(regexp, '\1\2:')
25
+ open(file, 'w') { |b| b << source }
26
+ end
27
+ end
28
+
18
29
  # Courtesy of changa.
19
30
  desc "Add utf-8 encoding on files that don't have it"
20
31
  task :encoding do
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Mo
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-20 00:00:00.000000000 Z
12
+ date: 2012-02-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Mo helps you keep your rails project clean.
15
15
  email: jboyer@af83.com