erb_dependencies 0.0.0 → 0.0.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a180e1be395e9da75394e504db4181ce45c24436
|
|
4
|
+
data.tar.gz: 089b72005bdb06c23f1eebd90e4261f0fe41de58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a16f7a9643e054f8ca6941dcfce61b5c1415ca53344b1ce91fc08f04ae53e54583ddca4a297658987691102573a64e512b55c67fc8c3da11f302035c50c5128e
|
|
7
|
+
data.tar.gz: f82c39ac12a219abef950a38a0d552367888aeddec6561addd08947a459ee759bdd1073d9341fb002a984b1eb10055c0ee605585e0372414e3217c33fe6f9199
|
|
@@ -17,6 +17,12 @@ class ControllerGrabber
|
|
|
17
17
|
code = ErbTagsRemover.new.remove_erb_tags(file_text)
|
|
18
18
|
parsed_code = Ruby_parser.new.parse_code(code)
|
|
19
19
|
output_array = Find_controller_calls.new([],"","").find_controllers(parsed_code)
|
|
20
|
+
output_array.each do |output|
|
|
21
|
+
output_value = output_value + "[name: '#{output.name}', receiver: '#{output.receiver}']\n"
|
|
22
|
+
end
|
|
23
|
+
puts output_value
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
ControllerGrabber.new.grab_controllers 'C:/Users/jpms2/Desktop/tanGem/TAn/samples/sample20.html.erb'
|
|
@@ -175,11 +175,19 @@ def look_for_form_for_action(code, instance_variable)
|
|
|
175
175
|
if loop_type == $form_for
|
|
176
176
|
has_hash = !code.children[3].nil?
|
|
177
177
|
if has_hash
|
|
178
|
-
|
|
179
|
-
if
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
hash_implementation1 = code.children[3].children[1].nil?
|
|
179
|
+
if hash_implementation1
|
|
180
|
+
possible_hash = code.children[3].children[0].children[1].type
|
|
181
|
+
if possible_hash == $hash
|
|
182
|
+
loop_action = code.children[3].children[0].children[1].children[0].children[1].children[0]
|
|
183
|
+
end
|
|
184
|
+
else
|
|
185
|
+
possible_hash = code.children[3].children[1].children[1].type
|
|
186
|
+
if possible_hash == $hash
|
|
187
|
+
loop_action = code.children[3].children[1].children[1].children[1].children[1].children[0]
|
|
188
|
+
end
|
|
182
189
|
end
|
|
190
|
+
insert_outputs_on_array(loop_action, instance_variable)
|
|
183
191
|
end
|
|
184
192
|
end
|
|
185
193
|
end
|
data/lib/Util/file_manager.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: erb_dependencies
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joao Pedro de Medeiros Santos
|
|
@@ -24,7 +24,6 @@ files:
|
|
|
24
24
|
- lib/Util/ruby_parser.rb
|
|
25
25
|
- lib/Util/transform_into.rb
|
|
26
26
|
- lib/erb_dependencies.rb
|
|
27
|
-
- lib/outputs/sample1.html_output.txt
|
|
28
27
|
homepage: http://rubygems.org/gems/erb_dependencies
|
|
29
28
|
licenses:
|
|
30
29
|
- MIT
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
[name: 'uuid', receiver: '@otml_file']
|
|
2
|
-
[name: 'otml_category_id', receiver: '@otml_file']
|
|
3
|
-
[name: 'name', receiver: '@otml_file']
|
|
4
|
-
[name: 'path', receiver: '@otml_file']
|
|
5
|
-
[name: 'content', receiver: '@otml_file']
|
|
6
|
-
[name: 'update', receiver: '@otml_files_controller']
|
|
7
|
-
[name: 'otml_file_path', receiver: '']
|
|
8
|
-
[name: 'otml_files_path', receiver: '']
|