trix-genius 0.0.10 → 0.0.12

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
  SHA256:
3
- metadata.gz: d2ddb31fb89d2c3c905bfdf4eb9a338e6586246719261a620f7b2d7699532e89
4
- data.tar.gz: 13cacd38012d4349942c990a66a95ab92b2523c73102e568b7077bd8cc863b55
3
+ metadata.gz: 12c330540b0ad83c3419f7f3504189f7990b6bc69d28d721e35265bb1f252d30
4
+ data.tar.gz: e7014dd5db388632445e0c362cf4430ce89106cfe8b1e309edd8150ff186889b
5
5
  SHA512:
6
- metadata.gz: e2ca48c48b1210fe80ea7f5baf8c0633e0e7d14c1d9f018176996b371dc835271d793e72ca265ef87eae6103f25a842f641eebc350d7985131874cd840be1419
7
- data.tar.gz: ee45b0be8956f65df16edb341f100bfa891515aeb5e4b1fa9c4c089e97503b715c0f1658606d7e79b8c354fcd19c3a6831759a3baf2ce58dc286af3cce620d45
6
+ metadata.gz: b284e6d6b25567262adc270289b393a2d64752592e80ca8bca0a96b2ec7d6b7ca464a6dd5dc98a30cf6381f0e1e7de2853478a13d76b834b6bb5723c51bd4f27
7
+ data.tar.gz: 0705a76cc11e399ec8951c39616de7344d6f1acd415ef2accc81a482611fa3e2e4b160478a4087f07fcfe7eb45d76c6e3e2abe995b552426ea1ad8130537d6ea
@@ -22,7 +22,7 @@ module TrixGenius
22
22
 
23
23
  if File.exist?(js_application_path)
24
24
  application_file = File.read(js_application_path)
25
- update_file application_lines, application_file
25
+ update_file application_lines, application_file, js_application_path
26
26
  else
27
27
  say_status("error", "Could not find #{js_application_path}", :red)
28
28
  end
@@ -35,7 +35,7 @@ module TrixGenius
35
35
 
36
36
  if File.exist?(js_application_controller_path)
37
37
  application_controller_file = File.read(js_application_controller_path)
38
- update_file application_controller_lines, application_controller_file
38
+ update_file application_controller_lines, application_controller_file, js_application_controller_path
39
39
  else
40
40
  say_status("error", "Could not find #{js_application_path}", :red)
41
41
  end
@@ -45,10 +45,10 @@ module TrixGenius
45
45
  copy_file "trix_genius_controller.js", "app/javascript/controllers/trix_genius_controller.js"
46
46
  end
47
47
 
48
- def update_file lines, file_content
48
+ def update_file lines, content, path
49
49
  lines.each do |line|
50
- unless application_file.include?(line)
51
- append_to_file js_application_path, "\n#{line}\n"
50
+ unless content.include?(line)
51
+ append_to_file path, "\n#{line}\n"
52
52
  else
53
53
  say_status("skipped", "Import already present in application.js", :yellow)
54
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trix-genius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giménez Silva Germán Alberto https://rubystacknews.com/