md_simple_editor 0.2.1 → 0.2.3.pre1

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -0
  3. data/Gemfile +3 -1
  4. data/README.md +4 -9
  5. data/Rakefile +16 -0
  6. data/app/assets/javascripts/md_simple_editor/md_preview.js +2 -0
  7. data/app/assets/javascripts/md_simple_editor.js.coffee +41 -61
  8. data/app/assets/stylesheets/md_simple_editor/md_preview.css +4 -0
  9. data/app/assets/stylesheets/md_simple_editor.css.scss +66 -5
  10. data/app/controllers/md_simple_editor/application_controller.rb +4 -0
  11. data/app/controllers/md_simple_editor/md_preview_controller.rb +8 -0
  12. data/app/helpers/md_simple_editor/md_preview_helper.rb +4 -0
  13. data/app/helpers/md_simple_editor/rails/md_helper.rb +22 -32
  14. data/app/views/md_simple_editor/layouts/md_simple_editor/application.html.erb +14 -0
  15. data/app/views/md_simple_editor/md_preview/preview.html.erb +2 -0
  16. data/bin/rails +8 -0
  17. data/config/routes.rb +3 -3
  18. data/lib/md_simple_editor/engine.rb +3 -2
  19. data/lib/md_simple_editor/version.rb +2 -1
  20. data/lib/md_simple_editor.rb +3 -0
  21. data/md_simple_editor.gemspec +2 -2
  22. data/test/blorgh_test.rb +7 -0
  23. data/test/controllers/md_simple_editor/md_preview_controller_test.rb +11 -0
  24. data/test/dummy/README.rdoc +28 -0
  25. data/test/dummy/Rakefile +6 -0
  26. data/test/dummy/app/assets/images/.keep +0 -0
  27. data/test/dummy/app/assets/javascripts/application.js +13 -0
  28. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  29. data/test/dummy/app/controllers/application_controller.rb +5 -0
  30. data/test/dummy/app/controllers/concerns/.keep +0 -0
  31. data/test/dummy/app/helpers/application_helper.rb +2 -0
  32. data/test/dummy/app/mailers/.keep +0 -0
  33. data/test/dummy/app/models/.keep +0 -0
  34. data/test/dummy/app/models/concerns/.keep +0 -0
  35. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  36. data/test/dummy/bin/bundle +3 -0
  37. data/test/dummy/bin/rails +4 -0
  38. data/test/dummy/bin/rake +4 -0
  39. data/test/dummy/config/application.rb +23 -0
  40. data/test/dummy/config/boot.rb +5 -0
  41. data/test/dummy/config/database.yml +25 -0
  42. data/test/dummy/config/environment.rb +5 -0
  43. data/test/dummy/config/environments/development.rb +29 -0
  44. data/test/dummy/config/environments/production.rb +80 -0
  45. data/test/dummy/config/environments/test.rb +36 -0
  46. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  47. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  48. data/test/dummy/config/initializers/inflections.rb +16 -0
  49. data/test/dummy/config/initializers/mime_types.rb +5 -0
  50. data/test/dummy/config/initializers/session_store.rb +3 -0
  51. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  52. data/test/dummy/config/locales/en.yml +23 -0
  53. data/test/dummy/config/routes.rb +4 -0
  54. data/test/dummy/config/secrets.yml +20 -0
  55. data/test/dummy/config.ru +4 -0
  56. data/test/dummy/lib/assets/.keep +0 -0
  57. data/test/dummy/log/.keep +0 -0
  58. data/test/dummy/public/404.html +67 -0
  59. data/test/dummy/public/422.html +67 -0
  60. data/test/dummy/public/500.html +66 -0
  61. data/test/dummy/public/favicon.ico +0 -0
  62. data/test/helpers/md_simple_editor/md_preview_helper_test.rb +6 -0
  63. data/test/integration/navigation_test.rb +10 -0
  64. data/test/test_helper.rb +15 -0
  65. metadata +116 -31
  66. data/.idea/.rakeTasks +0 -7
  67. data/.idea/encodings.xml +0 -5
  68. data/.idea/md_simple_editor.iml +0 -23
  69. data/.idea/misc.xml +0 -36
  70. data/.idea/modules.xml +0 -9
  71. data/.idea/scopes/scope_settings.xml +0 -5
  72. data/.idea/vcs.xml +0 -7
  73. data/.idea/workspace.xml +0 -56
  74. data/CHANGELOG.md +0 -41
  75. data/app/controllers/md_simple_editor_controller.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c305193cc3627d04d1aedab4db677f0e0d27f9f9
4
- data.tar.gz: 7f5e0821d50abedd8e719b0318b53aab5981cfec
3
+ metadata.gz: d8214eeca60e00fe6e8a881c50333b00c47d34af
4
+ data.tar.gz: b1d85124f67fae81a5cc978bf18b4fa2869ee06b
5
5
  SHA512:
6
- metadata.gz: 751988d84d21befc185f741fcb527c0a4de2e413dd15b40ee7ebd53efe5ab38166b9f6b67123ea1821c32138fa5b53ba4c404653d694416efb86873b36c59750
7
- data.tar.gz: dfe5a187c2f505b7199b6a045c6b1c943e4f0a7209ed1afb670fb50a64abf82c37b39a6bb7d4b102c03d247bb594edb91a68228338f49509e3a710f524cc42de
6
+ metadata.gz: f2643b4cb4719ce1cc84de42a51cc981340d852a57953c91daff11564dd3abc4c7a6c27cf26402a12912048b6b934ed08205f43385e88ef527ad8842286fdeed
7
+ data.tar.gz: 0b3055d1a47f06a79b9cb1f3d9c8bf9c8ed3a04e9ba33ef995f03fbb734381cab42ae098a7826cfdc499df82cee9dc1607fe52826df0d1893099b23ca092c78c
data/.gitignore CHANGED
@@ -15,3 +15,10 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+
19
+ test/dummy/db/*.sqlite3
20
+ test/dummy/db/*.sqlite3-journal
21
+ test/dummy/log/*.log
22
+ test/dummy/tmp/
23
+ test/dummy/.sass-cache
24
+
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
+ ruby '2.0.0'
1
2
  source 'https://rubygems.org'
2
3
 
3
4
  # Specify your gem's dependencies in md_simple_editor.gemspec
4
5
  gemspec
5
6
 
6
- gem 'redcarpet'
7
+ gem 'sqlite3'
8
+ gem 'font-awesome-rails'
data/README.md CHANGED
@@ -47,22 +47,17 @@ Also you can use inside a form
47
47
  <% end %>
48
48
  ```
49
49
 
50
-
51
- #### Version 0.1.8
52
-
53
- Simple markdown editor meets Bootstrap, more elegant look and feel, !and now, the preview mode is OUT"
54
-
55
50
  ## How it looks?
56
51
 
57
- ![Imgur](http://i.imgur.com/gg0MwlD.png)
58
-
59
- ![Imgur](http://i.imgur.com/tX29Zvi.png)
52
+ ![Imgur](http://i.imgur.com/68DXCwP.png)
60
53
 
61
54
 
62
55
  ## ToDo
63
56
 
57
+ - Improve css
64
58
  - Add functions to extend the toolbar
65
- - Add some internationalization options
59
+ - Add preview option
60
+
66
61
 
67
62
  ## Contributing
68
63
 
data/Rakefile CHANGED
@@ -1 +1,17 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
1
8
  require "bundler/gem_tasks"
9
+
10
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
11
+ load 'rails/tasks/engine.rake'
12
+
13
+
14
+
15
+
16
+ Bundler::GemHelper.install_tasks
17
+
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -2,70 +2,52 @@
2
2
  # All this logic will automatically be available in application.js.
3
3
  # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4
4
 
5
- md_simple_editor = () ->
6
- $('.btn-toolbar .btn-group button').click ->
5
+ md_simple_editor = ->
6
+ $('#md-toolbar #btn-group button').mousedown ->
7
7
  att_class = this.classList
8
8
  rgex = /md_/
9
9
 
10
10
  option = $.grep att_class, (item) ->
11
11
  return rgex.test(item)
12
12
 
13
- if option.length != 0
14
- option = option[0].toString()
13
+ option = option[0].toString()
15
14
 
16
- text = if option == 'md_h1'
17
- "# Your Title here"
18
- else if option == 'md_h2'
19
- "## Your Title here"
20
- else if option == 'md_h3'
21
- "### Your Title here"
22
- else if option == 'md_h4'
23
- "#### Your Title here"
24
- else if option == 'md_h5'
25
- "##### Your Title here"
26
- else if option == 'md_italic'
27
- "_Your italic text here_"
28
- else if option == 'md_bold'
29
- "__Your bold text here__"
30
- else if option == 'md_list-ul'
31
- "\n\n* Item 1\n* Item 2\n* Item 3 \n\n<br>"
32
- else if option == 'md_list-ol'
33
- "\n\n1. Item 1\n2. Item 2\n3. Item 3 \n\n<br> "
34
- else if option == 'md_indent'
35
- ">Your indented text here"
36
- else if option == 'md_underline'
37
- "<u>Your undelined text here </u>"
38
- else if option == 'md_table'
39
- "\n|Header|Header|Header|\n|:------|:-------:|------:|\n|Left alignment|Centered|Right alignment|\n\n<br>"
40
- else if option == 'md_minus'
41
- "\n<hr>\n"
42
- else if option == 'md_square'
43
- "\n\t Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut aliquet velit. Nam fermentum, mi quis egestas ornare, massa velit pharetra ante, sed
44
- pellentesque tortor nisl non quam. Nunc eget egestas orci.\n\n<br> "
45
- else if option == 'md_link'
46
- "\n[This is a link](http://google.com)\n"
47
- else if option == 'md_camera-retro'
48
- "\n![Alt](https://www.google.com.co/images/srpr/logo11w.png)\n"
15
+ text = if option == 'md_h1'
16
+ "# Your Title here"
17
+ else if option == 'md_h2'
18
+ "## Your Title here"
19
+ else if option == 'md_h3'
20
+ "### Your Title here"
21
+ else if option == 'md_h4'
22
+ "#### Your Title here"
23
+ else if option == 'md_h5'
24
+ "##### Your Title here"
25
+ else if option == 'md_italic'
26
+ "_Your italic text here_"
27
+ else if option == 'md_bold'
28
+ "__Your bold text here__"
29
+ else if option == 'md_list-ul'
30
+ "\n\n* Item 1\n* Item 2\n* Item 3 \n\n<br>"
31
+ else if option == 'md_list-ol'
32
+ "\n\n1. Item 1\n2. Item 2\n3. Item 3 \n\n<br> "
33
+ else if option == 'md_indent'
34
+ ">Your indented text here"
35
+ else if option == 'md_underline'
36
+ "<u>Your undelined text here </u>"
37
+ else if option == 'md_table'
38
+ "\n|Header|Header|Header|\n|:------|:-------:|------:|\n|Left alignment|Centered|Right alignment|\n\n<br>"
39
+ else if option == 'md_minus'
40
+ "\n<hr>\n"
41
+ else if option == 'md_square'
42
+ "\n\tjebdhwiedwef Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut aliquet velit. Nam fermentum, mi quis egestas ornare, massa velit pharetra ante, sed
43
+ pellentesque tortor nisl non quam. Nunc eget egestas orci.\n\n<br> "
44
+ else if option == 'md_link'
45
+ "\n[This is a link](http://google.com)\n"
46
+ else if option == 'md_camera-retro'
47
+ "\n![Alt](https://www.google.com.co/images/srpr/logo11w.png)\n"
49
48
 
50
- textarea = $('#md-editor #md-text textarea')
51
- insertAtCaret(textarea.attr('id'), text)
52
-
53
- preview = ->
54
- if $('#md-text').prop('hidden')
55
- $('.preview_md').text('Preview')
56
- $('#md-text').removeAttr('hidden')
57
- $('.preview-panel').attr('hidden', 'true')
58
- false
59
- else
60
- $.post(
61
- '/md_simple_editor/preview',
62
- {md: $('#md-text textarea').val()},
63
- (data) ->
64
- $('.preview_md').text('Editor')
65
- $('#md-text').attr('hidden', 'true')
66
- $('.preview-panel').removeAttr('hidden')
67
- $('#md-preview').html(data)
68
- )
49
+ textarea = $('#md-editor #md-text textarea')
50
+ insertAtCaret(textarea.attr('id'), text)
69
51
 
70
52
  insertAtCaret = (areaId, text) ->
71
53
  txtarea = document.getElementById(areaId)
@@ -95,8 +77,6 @@ insertAtCaret = (areaId, text) ->
95
77
  txtarea.focus()
96
78
  txtarea.scrollTop = scrollPos
97
79
 
98
- $(document).on 'turbolinks:load page:load ready', ->
99
- md_simple_editor()
100
- $(document).off 'turbolinks:load page:load ready'
101
- $('.preview_md').click ->
102
- preview()
80
+
81
+ $(document).ready(md_simple_editor())
82
+ $(document).on('page:load', md_simple_editor())
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -1,13 +1,74 @@
1
1
  #md-editor{
2
+ border: 1px solid #66afe9;
3
+ overflow: hidden;
4
+ #md-toolbar{
5
+ height: 50px;
6
+ margin-top: -5px;
7
+ background-color: #f5f5f5;
8
+ border-bottom: 1px dashed gray;
9
+ #btn-group{
10
+ margin: 10px 0 0 10px;
11
+ position: relative;
12
+ display: inline-block;
13
+ vertical-align: middle;
14
+ .btn{
15
+ margin-left: -3px;
16
+ position: relative;
17
+ float: left;
18
+ display: inline-block;
19
+ padding: 6px 12px;
20
+ margin-bottom: 0;
21
+ font-size: 14px;
22
+ font-weight: normal;
23
+ line-height: 1.428571429;
24
+ height: 36px;
25
+ text-align: center;
26
+ white-space: nowrap;
27
+ vertical-align: middle;
28
+ cursor: pointer;
29
+ border: 1px solid transparent;
30
+ -webkit-user-select: none;
31
+ -moz-user-select: none;
32
+ -ms-user-select: none;
33
+ -o-user-select: none;
34
+ user-select: none;
35
+ }
36
+ .btn-default{
37
+ color: #333;
38
+ background-color: #fff;
39
+ border-color: #ccc;
40
+ &:hover{
41
+ color: white;
42
+ text-decoration: none;
43
+ text-shadow: #ffff 0px -1px 0px;
44
+ background-color: #3072b3;
45
+ background-image: -webkit-linear-gradient(top, #599bcd, #3072b3);
46
+ background-image: -moz-linear-gradient(top, #599bcd, #3072b3);
47
+ background-image: linear-gradient(top, #599bcd, #3072b3);
48
+ border-color: #2a65a0;
49
+ background-repeat: repeat no-repeat;
50
+ }
51
+
52
+ &:hover, &:focus, &:active{
53
+ outline: 0; outline-style:none; outline-width:0;
54
+ }
55
+
56
+ }
57
+ &>.btn:first-child{
58
+ border-radius: 4px 0 0 4px;
59
+ }
60
+ &>.btn:last-child{
61
+ border-radius: 0 4px 4px 0;
62
+ }
63
+ }
64
+
65
+ }
2
66
  #md-text{
3
67
  textarea{
4
- padding: 15px;
68
+ width: 99%;
69
+ padding: 4px;
5
70
  }
6
71
  }
7
- #md-preview{
8
- border: solid 1px #cccccc;
9
- padding: 15px;
10
- }
11
72
  }
12
73
 
13
74
  .markdown{
@@ -0,0 +1,4 @@
1
+ module MdSimpleEditor
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ require_dependency "md_simple_editor/application_controller"
2
+
3
+ module MdSimpleEditor
4
+ class MdPreviewController < ApplicationController
5
+ def preview
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ module MdSimpleEditor
2
+ module MdPreviewHelper
3
+ end
4
+ end
@@ -3,77 +3,67 @@ module MdSimpleEditor
3
3
  module MdHelper
4
4
  def md_simple_editor
5
5
  content_tag(:div, :id => "md-editor") do
6
- content_tag(:div, :class => "btn-toolbar", role: "toolbar") do
7
- content_tag(:div, :class => "btn-group") do
8
- button_tag(:type => 'button', :class => "btn btn-default md_h1") do
6
+ content_tag(:div, :id => "md-toolbar") do
7
+ content_tag(:div, :id => "btn-group") do
8
+ button_tag(:type => 'button', :class => "btn btn-default md_h1", :style => "font-size: 15px") do
9
9
  content_tag(:strong, 'H1')
10
10
  end +
11
- button_tag(:type => 'button', :class => "btn btn-default md_h2") do
11
+ button_tag(:type => 'button', :class => "btn btn-default md_h2", :style => "font-size: 13px") do
12
12
  content_tag(:strong, 'H2')
13
13
  end +
14
- button_tag(:type => 'button', :class => "btn btn-default md_h3") do
14
+ button_tag(:type => 'button', :class => "btn btn-default md_h3", :style => "font-size: 11px") do
15
15
  content_tag(:strong, 'H3')
16
16
  end +
17
- button_tag(:type => 'button', :class => "btn btn-default md_h4") do
17
+ button_tag(:type => 'button', :class => "btn btn-default md_h4", :style => "font-size: 9px") do
18
18
  content_tag(:strong, 'H4')
19
19
  end +
20
- button_tag(:type => 'button', :class => "btn btn-default md_h5") do
20
+ button_tag(:type => 'button', :class => "btn btn-default md_h5", :style => "font-size: 7px") do
21
21
  content_tag(:strong, 'H5')
22
22
  end
23
23
  end +
24
- content_tag(:div, :class => "btn-group") do
25
- button_tag(:type => 'button', :class => "btn btn-default md_italic") do
24
+ content_tag(:div, :id => "btn-group") do
25
+ button_tag(:type => 'button', :class => "btn btn-default md_italic", :style => "font-size: 11px") do
26
26
  fa_icon "italic"
27
27
  end +
28
- button_tag(:type => 'button', :class => "btn btn-default md_bold") do
28
+ button_tag(:type => 'button', :class => "btn btn-default md_bold", :style => "font-size: 11px") do
29
29
  fa_icon "bold"
30
30
  end +
31
- button_tag(:type => 'button', :class => "btn btn-default md_list-ul") do
31
+ button_tag(:type => 'button', :class => "btn btn-default md_list-ul", :style => "font-size: 11px") do
32
32
  fa_icon "list-ul"
33
33
  end +
34
- button_tag(:type => 'button', :class => "btn btn-default md_list-ol") do
34
+ button_tag(:type => 'button', :class => "btn btn-default md_list-ol", :style => "font-size: 11px") do
35
35
  fa_icon "list-ol"
36
36
  end +
37
- button_tag(:type => 'button', :class => "btn btn-default md_indent") do
37
+ button_tag(:type => 'button', :class => "btn btn-default md_indent", :style => "font-size: 11px") do
38
38
  fa_icon "indent"
39
39
  end +
40
- button_tag(:type => 'button', :class => "btn btn-default md_underline") do
40
+ button_tag(:type => 'button', :class => "btn btn-default md_underline", :style => "font-size: 11px") do
41
41
  fa_icon "underline"
42
42
  end +
43
- button_tag(:type => 'button', :class => "btn btn-default md_table") do
43
+ button_tag(:type => 'button', :class => "btn btn-default md_table", :style => "font-size: 11px") do
44
44
  fa_icon "table"
45
45
  end +
46
- button_tag(:type => 'button', :class => "btn btn-default md_square") do
46
+ button_tag(:type => 'button', :class => "btn btn-default md_square", :style => "font-size: 11px") do
47
47
  fa_icon "square"
48
48
  end +
49
- button_tag(:type => 'button', :class => "btn btn-default md_minus") do
49
+ button_tag(:type => 'button', :class => "btn btn-default md_minus", :style => "font-size: 11px") do
50
50
  fa_icon "minus"
51
51
  end
52
52
  end +
53
- content_tag(:div, :class => "btn-group") do
54
- button_tag(:type => 'button', :class => "btn btn-default md_link") do
53
+ content_tag(:div, :id => "btn-group") do
54
+ button_tag(:type => 'button', :class => "btn btn-default md_link", :style => "font-size: 11px") do
55
55
  fa_icon "link"
56
56
  end +
57
- button_tag(:type => 'button', :class => "btn btn-default md_camera-retro") do
57
+ button_tag(:type => 'button', :class => "btn btn-default md_camera-retro", :style => "font-size: 11px") do
58
58
  fa_icon "camera-retro"
59
59
  end
60
- end +
61
- content_tag(:div, class: 'btn-group pull-righ') do
62
- button_tag(:type => 'button', :class => "btn btn-primary preview_md") do
63
- 'Preview'
64
- end
65
60
  end
66
61
  end +
67
- content_tag(:br) +
68
62
  content_tag(:div, :id => "md-text") do
69
63
  yield
70
64
  end +
71
- content_tag(:div, class: 'panel panel-success preview-panel', hidden: true) do
72
- content_tag(:div, class: 'panel-heading') do
73
- "Preview"
74
- end +
75
- content_tag(:div, :id => "md-preview", class: 'panel-body') do
76
- end
65
+ content_tag(:div, :id => "md-preview") do
66
+
77
67
  end
78
68
  end
79
69
  end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Blorgh</title>
5
+ <%= stylesheet_link_tag "blorgh/application", media: "all" %>
6
+ <%= javascript_include_tag "blorgh/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,2 @@
1
+ <h1>MdPreview#preview</h1>
2
+ <p>Find me in app/views/md_simple_editor/md_preview/preview.html.erb</p>
data/bin/rails ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/md_simple_editor/engine', __FILE__)
6
+ puts ENGINE_PATH
7
+ require 'rails/all'
8
+ require 'rails/engine/commands'
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
- Rails.application.routes.draw do
2
- post 'md_simple_editor/preview'
3
- end
1
+ MdSimpleEditor::Engine.routes.draw do
2
+ get "md_preview/preview"
3
+ end
@@ -1,6 +1,7 @@
1
1
  module MdSimpleEditor
2
- module Rails
2
+ # module Rails
3
3
  class Engine < ::Rails::Engine
4
+ isolate_namespace MdSimpleEditor
4
5
  end
5
- end
6
+ # end
6
7
  end
@@ -1,3 +1,4 @@
1
1
  module MdSimpleEditor
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3.pre1"
3
3
  end
4
+
@@ -1,4 +1,7 @@
1
1
  require "md_simple_editor/version"
2
2
  require "md_simple_editor/engine" if defined?(Rails)
3
3
 
4
+ module MdSimpleEditor
5
+ end
6
+
4
7
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_dependency "rails"
23
24
 
24
- spec.add_runtime_dependency "font-awesome-rails"
25
- spec.add_runtime_dependency "redcarpet", "~> 3.0"
25
+ spec.add_dependency "font-awesome-rails", "~> 4.0.3.1"
26
26
  end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class BlorghTest < ActiveSupport::TestCase
4
+ test "truth" do
5
+ assert_kind_of Module, Blorgh
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ require 'test_helper'
2
+
3
+ module MdSimpleEditor
4
+ class MdPreviewControllerTest < ActionController::TestCase
5
+ test "should get preview" do
6
+ get :preview
7
+ assert_response :success
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run