view_tree 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/rel +0 -0
- data/lib/view_tree/version.rb +1 -1
- data/lib/view_tree.rb +18 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWJkOGZjYzMzODFkZTVkYzQxNDU4MzllM2UzYWQzMjVkYTQ2ZDdlYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTJhOWY0OTNjNTRhMWQzODk5ZmUxMTIwZTY3NmExYTU0ZDc4ZjI2ZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTllNDliZmQ0NjQ2MWQyOWY2NDI4MjExMDYyZjgwMDU0OWFiMmEzMmZiY2Jh
|
10
|
+
NmExMGM0YzY3ZDQyNDYxY2MwN2RlM2ZjMDI1YjY2ZmQxYWY2NmYwYTRkMDVi
|
11
|
+
Yzc5NGZhZWZmYzgxZTc2YzdlMjgwNjE5Njk0NmRkM2U3NGE3OTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODU2NWM2YWYzNzc4NmViOWJmNzA4NjQxODkxMGMzMjQ0ODY3ZDQzMTZjMDE0
|
14
|
+
MzZjZGJiZmE0ZDhmNjMzYTU0YzA3MmUxZmFhMmE2Njc2N2ZhODc5NGFhY2Mz
|
15
|
+
YTBhZDNlODM3ZGViOTZhNGZhYjZlNTE0Nzk5NTA2NDEwNTljMzA=
|
data/bin/rel
CHANGED
File without changes
|
data/lib/view_tree/version.rb
CHANGED
data/lib/view_tree.rb
CHANGED
@@ -32,22 +32,17 @@ class Cb
|
|
32
32
|
|
33
33
|
reg_partial_name = /(?<=(partial=>)|(render)|(spotpartial=>))\s*['"][a-zA-Z_\/-]+(?=['"])/
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
partial_name = File.basename(partial_name)
|
44
|
-
end
|
45
|
-
self.view_helper("_" + partial_name + ".html.erb" )
|
35
|
+
File.readlines(file_name).each do |line|
|
36
|
+
if !reg_partial_name.match(line).nil?
|
37
|
+
partial_name = reg_partial_name.match(line)
|
38
|
+
partial_name = partial_name.to_s.gsub!(/[\s'"]*/, "")
|
39
|
+
if !partial_name[/spot_loader/].nil?
|
40
|
+
partial_name = line[/(?<=spotpartial=>)\s*['"][a-zA-Z_\/-]+(?=['"])/].to_s.gsub!(/[\s'"]*/, "")
|
41
|
+
else
|
42
|
+
partial_name = File.basename(partial_name)
|
46
43
|
end
|
44
|
+
self.view_helper("_" + partial_name + ".html.erb" )
|
47
45
|
end
|
48
|
-
rescue
|
49
|
-
puts "Please input correct controller and action name."
|
50
|
-
exit
|
51
46
|
end
|
52
47
|
|
53
48
|
end
|
@@ -58,7 +53,7 @@ class Cb
|
|
58
53
|
# Check that if user has input "bundle install --path vendor"
|
59
54
|
|
60
55
|
if controller_action_name.size == 0
|
61
|
-
puts "Please input controller and action name"
|
56
|
+
puts "Please input controller and action name."
|
62
57
|
exit
|
63
58
|
end
|
64
59
|
|
@@ -77,6 +72,14 @@ class Cb
|
|
77
72
|
|
78
73
|
view_name = controller_action_name.gsub(/#/, "/")
|
79
74
|
|
75
|
+
begin
|
76
|
+
File.open(file_name)
|
77
|
+
rescue
|
78
|
+
puts "Please input correct controller and action name."
|
79
|
+
exit
|
80
|
+
end
|
81
|
+
|
82
|
+
|
80
83
|
self.view_helper(view_name)
|
81
84
|
|
82
85
|
if $file_queue.size == 0
|