hash_rocket 0.3.0 → 0.3.1

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.
@@ -1,3 +1,3 @@
1
1
  module HashRocket
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/hash_rocket.rb CHANGED
@@ -46,8 +46,9 @@ private
46
46
  def self.match_symbols(text, strings, verbose)
47
47
  strings.uniq.each do |str|
48
48
  unless str.blank?
49
- puts str #if verbose
49
+ puts str if verbose
50
50
  start, garbage, symbol, hash_rocket = str.match(/((^.{1,}:)|:)(.+)((\ {1,}|[\ {1,}]?)=>(\ {1,}|[\ ]?))/).captures
51
+ space = start.gsub(":","")
51
52
  text = text.gsub(str, (space == "" ? "\n": space) + symbol.gsub(/\ /, "") + ": ")
52
53
  end
53
54
  end
data/spec/data/Gemfile CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/file.erb CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/file.haml CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/file.html CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/file.rb CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/file.yml CHANGED
@@ -16,6 +16,8 @@ class Example
16
16
  :_begin_with_under_score => 'value'
17
17
  {:hash_start => 'value'
18
18
  :hash_end => {'value'
19
+ ,:class => 'value'
20
+ (:cache => 'value'
19
21
  end
20
22
 
21
23
  end
data/spec/data/result.txt CHANGED
@@ -16,6 +16,8 @@ no_ident: 'value'
16
16
  _begin_with_under_score: 'value'
17
17
  {hash_start: 'value'
18
18
  hash_end: {'value'
19
+ ,class: 'value'
20
+ (cache: 'value'
19
21
  end
20
22
 
21
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_rocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-09-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70243009121240 !ruby/object:Gem::Requirement
16
+ requirement: &70188247462840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70243009121240
24
+ version_requirements: *70188247462840
25
25
  description: find and replace old hash rocket
26
26
  email:
27
27
  - mathieub@4nkh.com