rails-idle 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f58b55e40ca14d9ba36db82d076cc50dc3ccba46
4
- data.tar.gz: 8bde64f72b2e5dbd54d034132abe534ba2553d1f
3
+ metadata.gz: b45f973305f9ea1fc194d0f9d136ba0a07e3bf08
4
+ data.tar.gz: 3cafcd4f43d69fb96159bb0a9129ebbf7ac4361e
5
5
  SHA512:
6
- metadata.gz: ddffde060b6413844c73918b96440a479096c8e53212c2e93f8a7b3d1233148b8c341673ad5d80e9a56793b0b462c091095435d38848f4b975697cb275fb3f84
7
- data.tar.gz: c5aae1b3eb90f11b0fbf95f8409a3d8efd6ad11529c2123ccdfba2f0a25d47ff71bcfbb16f043d8cb7da08bac3d77bdb422537bd7a74bb00c1d7a4066f3ee9ba
6
+ metadata.gz: f8e22c570a2f8bae1ea880d221491e55d5f5f7cfb8345509caba4f8bfed5d20fdee1ef5284f17d4cfc4f6c48b7f5cbe9d47a351c40d60823b0cd5cf724648c52
7
+ data.tar.gz: f0013894656f7354eb60cfa5435a10845d13cbf282f8055576a22e9a1978b2f45d540e6c7425d489c033d7c6515139210828e8dd0db5ba7b3c53ca79e277be47
@@ -69,24 +69,14 @@ module RailsIdle
69
69
  end
70
70
 
71
71
  def modify_prefix(identifier, orig_prefix = '')
72
- view_paths.each do |path|
72
+ view_paths.each_with_index do |path, idx|
73
73
  orig_prefix.replace path
74
- return identifier.gsub(path, path.gsub('/', '/')) if identifier.start_with?(path)
74
+ return identifier.gsub(path + '/', '') if identifier.start_with?(path)
75
75
  end
76
76
  orig_prefix.replace ''
77
77
  nil
78
78
  end
79
79
 
80
- # def extract_view(orig_prefix, modified_prefix)
81
- # idx = 1
82
- # view = ''
83
- # while (idx <= orig_prefix.size && idx <= modified_prefix.size && orig_prefix[-idx] == modified_prefix[-idx])
84
- # view = modified_prefix[-idx] + view
85
- # idx += 1
86
- # end
87
- # view
88
- # end
89
-
90
80
  end
91
81
  end
92
82
  end
@@ -1,3 +1,3 @@
1
1
  module RailsIdle
2
- VERSION = '0.0.9'
2
+ VERSION = '0.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-idle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalik Danchenko