idecoder 0.1.0 → 0.1.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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +22 -0
  3. data/README.md +69 -2
  4. data/app/assets/javascripts/ace/ace.js +11 -0
  5. data/app/assets/javascripts/ace/ext-static_highlight.js +1 -0
  6. data/app/assets/javascripts/ace/ext-textarea.js +1 -0
  7. data/app/assets/javascripts/ace/keybinding-emacs.js +1 -0
  8. data/app/assets/javascripts/ace/keybinding-vim.js +1 -0
  9. data/app/assets/javascripts/ace/mode-abap.js +1 -0
  10. data/app/assets/javascripts/ace/mode-asciidoc.js +1 -0
  11. data/app/assets/javascripts/ace/mode-c9search.js +1 -0
  12. data/app/assets/javascripts/ace/mode-c_cpp.js +1 -0
  13. data/app/assets/javascripts/ace/mode-clojure.js +1 -0
  14. data/app/assets/javascripts/ace/mode-coffee.js +1 -0
  15. data/app/assets/javascripts/ace/mode-coldfusion.js +1 -0
  16. data/app/assets/javascripts/ace/mode-csharp.js +1 -0
  17. data/app/assets/javascripts/ace/mode-css.js +1 -0
  18. data/app/assets/javascripts/ace/mode-dart.js +1 -0
  19. data/app/assets/javascripts/ace/mode-diff.js +1 -0
  20. data/app/assets/javascripts/ace/mode-dot.js +1 -0
  21. data/app/assets/javascripts/ace/mode-glsl.js +1 -0
  22. data/app/assets/javascripts/ace/mode-golang.js +1 -0
  23. data/app/assets/javascripts/ace/mode-groovy.js +1 -0
  24. data/app/assets/javascripts/ace/mode-haml.js +1 -0
  25. data/app/assets/javascripts/ace/mode-haxe.js +1 -0
  26. data/app/assets/javascripts/ace/mode-html.js +1 -0
  27. data/app/assets/javascripts/ace/mode-jade.js +1 -0
  28. data/app/assets/javascripts/ace/mode-java.js +1 -0
  29. data/app/assets/javascripts/ace/mode-javascript.js +1 -0
  30. data/app/assets/javascripts/ace/mode-json.js +1 -0
  31. data/app/assets/javascripts/ace/mode-jsp.js +1 -0
  32. data/app/assets/javascripts/ace/mode-jsx.js +1 -0
  33. data/app/assets/javascripts/ace/mode-latex.js +1 -0
  34. data/app/assets/javascripts/ace/mode-less.js +1 -0
  35. data/app/assets/javascripts/ace/mode-liquid.js +1 -0
  36. data/app/assets/javascripts/ace/mode-lisp.js +1 -0
  37. data/app/assets/javascripts/ace/mode-lua.js +1 -0
  38. data/app/assets/javascripts/ace/mode-luapage.js +1 -0
  39. data/app/assets/javascripts/ace/mode-lucene.js +1 -0
  40. data/app/assets/javascripts/ace/mode-makefile.js +1 -0
  41. data/app/assets/javascripts/ace/mode-markdown.js +1 -0
  42. data/app/assets/javascripts/ace/mode-objectivec.js +1 -0
  43. data/app/assets/javascripts/ace/mode-ocaml.js +1 -0
  44. data/app/assets/javascripts/ace/mode-perl.js +1 -0
  45. data/app/assets/javascripts/ace/mode-pgsql.js +1 -0
  46. data/app/assets/javascripts/ace/mode-php.js +1 -0
  47. data/app/assets/javascripts/ace/mode-powershell.js +1 -0
  48. data/app/assets/javascripts/ace/mode-python.js +1 -0
  49. data/app/assets/javascripts/ace/mode-r.js +1 -0
  50. data/app/assets/javascripts/ace/mode-rdoc.js +1 -0
  51. data/app/assets/javascripts/ace/mode-rhtml.js +1 -0
  52. data/app/assets/javascripts/ace/mode-ruby.js +1 -0
  53. data/app/assets/javascripts/ace/mode-scad.js +1 -0
  54. data/app/assets/javascripts/ace/mode-scala.js +1 -0
  55. data/app/assets/javascripts/ace/mode-scss.js +1 -0
  56. data/app/assets/javascripts/ace/mode-sh.js +1 -0
  57. data/app/assets/javascripts/ace/mode-sql.js +1 -0
  58. data/app/assets/javascripts/ace/mode-stylus.js +1 -0
  59. data/app/assets/javascripts/ace/mode-svg.js +1 -0
  60. data/app/assets/javascripts/ace/mode-tcl.js +1 -0
  61. data/app/assets/javascripts/ace/mode-tex.js +1 -0
  62. data/app/assets/javascripts/ace/mode-text.js +0 -0
  63. data/app/assets/javascripts/ace/mode-textile.js +1 -0
  64. data/app/assets/javascripts/ace/mode-typescript.js +1 -0
  65. data/app/assets/javascripts/ace/mode-xml.js +1 -0
  66. data/app/assets/javascripts/ace/mode-xquery.js +1 -0
  67. data/app/assets/javascripts/ace/mode-yaml.js +1 -0
  68. data/app/assets/javascripts/ace/theme-ambiance.js +1 -0
  69. data/app/assets/javascripts/ace/theme-chaos.js +1 -0
  70. data/app/assets/javascripts/ace/theme-chrome.js +1 -0
  71. data/app/assets/javascripts/ace/theme-clouds.js +1 -0
  72. data/app/assets/javascripts/ace/theme-clouds_midnight.js +1 -0
  73. data/app/assets/javascripts/ace/theme-cobalt.js +1 -0
  74. data/app/assets/javascripts/ace/theme-crimson_editor.js +1 -0
  75. data/app/assets/javascripts/ace/theme-dawn.js +1 -0
  76. data/app/assets/javascripts/ace/theme-dreamweaver.js +1 -0
  77. data/app/assets/javascripts/ace/theme-eclipse.js +1 -0
  78. data/app/assets/javascripts/ace/theme-github.js +1 -0
  79. data/app/assets/javascripts/ace/theme-idle_fingers.js +1 -0
  80. data/app/assets/javascripts/ace/theme-kr.js +1 -0
  81. data/app/assets/javascripts/ace/theme-merbivore.js +1 -0
  82. data/app/assets/javascripts/ace/theme-merbivore_soft.js +1 -0
  83. data/app/assets/javascripts/ace/theme-mono_industrial.js +1 -0
  84. data/app/assets/javascripts/ace/theme-monokai.js +1 -0
  85. data/app/assets/javascripts/ace/theme-pastel_on_dark.js +1 -0
  86. data/app/assets/javascripts/ace/theme-solarized_dark.js +1 -0
  87. data/app/assets/javascripts/ace/theme-solarized_light.js +1 -0
  88. data/app/assets/javascripts/ace/theme-textmate.js +1 -0
  89. data/app/assets/javascripts/ace/theme-tomorrow.js +1 -0
  90. data/app/assets/javascripts/ace/theme-tomorrow_night.js +1 -0
  91. data/app/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -0
  92. data/app/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -0
  93. data/app/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -0
  94. data/app/assets/javascripts/ace/theme-twilight.js +1 -0
  95. data/app/assets/javascripts/ace/theme-vibrant_ink.js +1 -0
  96. data/app/assets/javascripts/ace/theme-xcode.js +1 -0
  97. data/app/assets/javascripts/ace/worker-coffee.js +1 -0
  98. data/app/assets/javascripts/ace/worker-css.js +1 -0
  99. data/app/assets/javascripts/ace/worker-javascript.js +1 -0
  100. data/app/assets/javascripts/ace/worker-json.js +1 -0
  101. data/app/assets/javascripts/ace/worker-xquery.js +1 -0
  102. data/app/assets/javascripts/idecoder.js +4 -1
  103. data/app/assets/javascripts/jquery-ace.coffee +126 -0
  104. data/app/assets/javascripts/jquery-ace.js +195 -0
  105. data/app/assets/javascripts/jquery-ace.min.js +1 -0
  106. data/app/assets/javascripts/jquery/jquery.min.js +4 -0
  107. data/app/assets/stylesheets/idecoder.css +10 -0
  108. data/lib/idecoder/rails.rb +1 -1
  109. data/lib/idecoder/rails/version.rb +3 -1
  110. data/lib/idecoder/templates/idecoder.erb +83 -0
  111. data/lib/idecoder/view_helpers.rb +2 -1
  112. metadata +139 -28
  113. data/.gitignore +0 -9
  114. data/.idea/.gitignore +0 -2
  115. data/.idea/.rakeTasks +0 -7
  116. data/.idea/idecoder.iml +0 -18
  117. data/.idea/inspectionProfiles/Project_Default.xml +0 -6
  118. data/.idea/misc.xml +0 -7
  119. data/.idea/modules.xml +0 -8
  120. data/.idea/vcs.xml +0 -6
  121. data/.travis.yml +0 -6
  122. data/Gemfile +0 -7
  123. data/LICENSE.txt +0 -21
  124. data/Rakefile +0 -10
  125. data/bin/console +0 -14
  126. data/bin/setup +0 -8
  127. data/commands.txt +0 -1
  128. data/idecoder.gemspec +0 -31
  129. data/railtie.rb +0 -8
  130. data/script_inserter.rb +0 -21
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- *.gem
@@ -1,2 +0,0 @@
1
- # Default ignored files
2
- /workspace.xml
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Settings><!--This file was automatically generated by Ruby plugin.
3
- You are allowed to:
4
- 1. Remove rake task
5
- 2. Add existing rake tasks
6
- To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build idecoder-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install idecoder-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install idecoder-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push idecoder-0.1.0.gem to TODO: Set to 'http://mygemserver.com'" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="ModuleRunConfigurationManager">
4
- <shared />
5
- </component>
6
- <component name="NewModuleRootManager">
7
- <content url="file://$MODULE_DIR$">
8
- <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
- </content>
12
- <orderEntry type="inheritedJdk" />
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, RVM: ruby-2.6.3) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.1, RVM: ruby-2.6.3) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.2, RVM: ruby-2.6.3) [gem]" level="application" />
17
- </component>
18
- </module>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Rubocop" enabled="false" level="WARNING" enabled_by_default="false" />
5
- </profile>
6
- </component>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JavaScriptSettings">
4
- <option name="languageLevel" value="ES6" />
5
- </component>
6
- <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.6.3" project-jdk-type="RUBY_SDK" />
7
- </project>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/idecoder.iml" filepath="$PROJECT_DIR$/.idea/idecoder.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.6.3
6
- before_install: gem install bundler -v 2.1.4
data/Gemfile DELETED
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in idecoder.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 12.0"
7
- gem "minitest", "~> 5.0"
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 michel popolin
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
9
-
10
- task :default => :test
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "idecoder"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1 +0,0 @@
1
- gem build idecoder
@@ -1,31 +0,0 @@
1
- require_relative 'lib/idecoder/rails/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "idecoder"
5
- spec.version = Idecoder::VERSION
6
- spec.authors = ["michel popolin"]
7
- spec.email = ["micpopolin@gmail.com"]
8
-
9
- spec.summary = %q{This creates code editor to use in your project.}
10
- spec.description = %q{Now you can easily put an editor inside your project. With environment variables reader and autocompletes.}
11
- spec.homepage = "https://github.com/popolin/idecoder"
12
- spec.license = "MIT"
13
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
14
-
15
- spec.metadata["homepage_uri"] = spec.homepage
16
-
17
- if spec.respond_to?(:metadata)
18
- spec.metadata["allowed_push_host"] = 'https://rubygems.org'
19
- else
20
- raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
21
- end
22
-
23
- # Specify which files should be added to the gem when it is released.
24
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
26
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
- end
28
- spec.bindir = "exe"
29
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
- spec.require_paths = ["lib"]
31
- end
data/railtie.rb DELETED
@@ -1,8 +0,0 @@
1
- module Idecoder
2
- class Railtie < Rails::Railtie
3
- initializer "idecoder" do |app|
4
- ActionController::Base.send include: Idecoder::ScriptInserter
5
- ActionController::Base.after_filter :insert_idecoder
6
- end
7
- end
8
- end
@@ -1,21 +0,0 @@
1
- module Idecoder
2
- module ScriptInserter
3
- BODY_TAG = %r{</body>}
4
-
5
- JS_SCRIPT = %q{
6
- <script src='idecoder.js'></script>
7
- <script>
8
- var idecoder = new Idecoder()
9
- </script>
10
- }
11
-
12
- def insert_idecoder
13
- if (
14
- response.content_type == 'text/html' &&
15
- response.body.match(BODY_TAG)
16
- )
17
- response.body = response.body.gsub(BODY_TAG, JS_SCRIPT + '\\0')
18
- end
19
- end
20
- end
21
- end