markdown-ui 0.1.3 → 0.1.4

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 (72) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +48 -0
  3. data/.travis.yml +3 -0
  4. data/Changelog +5 -0
  5. data/README.md +9 -3
  6. data/exe/markdown-ui +1 -1
  7. data/lib/markdown-ui.rb +8 -8
  8. data/lib/markdown-ui/button/animated.rb +2 -2
  9. data/lib/markdown-ui/button/basic.rb +1 -1
  10. data/lib/markdown-ui/button/custom.rb +1 -1
  11. data/lib/markdown-ui/button/element.rb +3 -3
  12. data/lib/markdown-ui/button/focusable.rb +2 -2
  13. data/lib/markdown-ui/button/group/buttons/custom.rb +1 -1
  14. data/lib/markdown-ui/button/group/buttons/element.rb +1 -1
  15. data/lib/markdown-ui/button/group/buttons/icon.rb +1 -1
  16. data/lib/markdown-ui/button/group/buttons/standard.rb +1 -1
  17. data/lib/markdown-ui/button/icon.rb +1 -1
  18. data/lib/markdown-ui/button/labeled_icon.rb +1 -1
  19. data/lib/markdown-ui/button/standard.rb +1 -1
  20. data/lib/markdown-ui/container/alignment/center.rb +1 -1
  21. data/lib/markdown-ui/container/alignment/left.rb +1 -1
  22. data/lib/markdown-ui/container/alignment/right.rb +1 -1
  23. data/lib/markdown-ui/container/custom.rb +1 -1
  24. data/lib/markdown-ui/container/element.rb +1 -1
  25. data/lib/markdown-ui/container/standard.rb +1 -1
  26. data/lib/markdown-ui/container/text.rb +1 -1
  27. data/lib/markdown-ui/content/custom.rb +1 -1
  28. data/lib/markdown-ui/content/header.rb +1 -1
  29. data/lib/markdown-ui/content/icon.rb +1 -1
  30. data/lib/markdown-ui/content/item.rb +1 -1
  31. data/lib/markdown-ui/content/list.rb +1 -1
  32. data/lib/markdown-ui/content/parser.rb +4 -4
  33. data/lib/markdown-ui/content/text.rb +1 -1
  34. data/lib/markdown-ui/grid/column/column.rb +1 -1
  35. data/lib/markdown-ui/grid/grid.rb +1 -1
  36. data/lib/markdown-ui/grid/row/row.rb +1 -1
  37. data/lib/markdown-ui/header/header.rb +2 -2
  38. data/lib/markdown-ui/label/custom.rb +1 -1
  39. data/lib/markdown-ui/label/element.rb +3 -3
  40. data/lib/markdown-ui/menu/custom.rb +1 -1
  41. data/lib/markdown-ui/menu/element.rb +3 -3
  42. data/lib/markdown-ui/menu/pagination.rb +1 -1
  43. data/lib/markdown-ui/menu/pointing.rb +1 -1
  44. data/lib/markdown-ui/menu/secondary.rb +1 -1
  45. data/lib/markdown-ui/menu/standard.rb +1 -1
  46. data/lib/markdown-ui/menu/tabular.rb +1 -1
  47. data/lib/markdown-ui/menu/text.rb +1 -1
  48. data/lib/markdown-ui/menu/vertical.rb +1 -1
  49. data/lib/markdown-ui/message/custom_message.rb +1 -1
  50. data/lib/markdown-ui/message/list_message.rb +1 -1
  51. data/lib/markdown-ui/message/message.rb +2 -2
  52. data/lib/markdown-ui/message/standard_message.rb +1 -1
  53. data/lib/markdown-ui/segment/custom_segment.rb +1 -1
  54. data/lib/markdown-ui/segment/horizontal_segment.rb +1 -1
  55. data/lib/markdown-ui/segment/padded_segment.rb +1 -1
  56. data/lib/markdown-ui/segment/piled_segment.rb +1 -1
  57. data/lib/markdown-ui/segment/segment.rb +1 -1
  58. data/lib/markdown-ui/segment/stacked_segment.rb +1 -1
  59. data/lib/markdown-ui/segment/standard_segment.rb +1 -1
  60. data/lib/markdown-ui/segment/vertical_segment.rb +1 -1
  61. data/lib/markdown-ui/tag/custom_tag.rb +2 -2
  62. data/lib/markdown-ui/tag/item_tag.rb +3 -3
  63. data/lib/markdown-ui/tag/list_tag.rb +3 -3
  64. data/lib/markdown-ui/tag/span_tag.rb +3 -3
  65. data/lib/markdown-ui/tag/standard_tag.rb +3 -3
  66. data/lib/markdown-ui/tag/tag.rb +1 -1
  67. data/lib/markdown-ui/utils/klass_util.rb +3 -3
  68. data/lib/markdown-ui/version.rb +1 -1
  69. data/markdown-ui.gemspec +1 -0
  70. data/website/index.html +100 -14
  71. data/website/index.md +93 -36
  72. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dd5c5e2c3e74efad01d045de1cf24da91d739fe
4
- data.tar.gz: 40c6900cd8044e020ead8ea15c8131cbe010cf51
3
+ metadata.gz: 4dcba2629af4d329f6aa5f684597759b4ad854f3
4
+ data.tar.gz: 70e1b8f199c0ff6246d93197fc0be1088598865c
5
5
  SHA512:
6
- metadata.gz: 6d0cf9ed00b08da900483646bdc2986ecb943774082f35fb29e1bea7c482be74a0c96e97ae3aae023b857136bac7fccabefa779c2c27245d48ab97920100af1f
7
- data.tar.gz: 1e4490c8b3d059d839c7de727ade763e455ea386183d51b210e07d0c3a805cf7d48fbd07cb8f93c678b998b8abb0910470df511d6b91750f30c085834f49e2f5
6
+ metadata.gz: 83de2e442063fdb4b03fcebcfc4b072fa4a88263e96bd372ba97baf6b42ac158910feb20aa3d80d91bf65195db734fe9ca4481c681412408810cf7ac1471d78e
7
+ data.tar.gz: 2d6d3fb86ee84f7e5b0e6c94580d5cc1fa481bd18037e5a1e5ece07b0e180a61d7d587b08e26db400df6b75d4ae13c6842a93c7be4ccd97672b6baf25ae44b3d
@@ -0,0 +1,48 @@
1
+ # This is a sample .codeclimate.yml configured for Engine analysis on Code
2
+ # Climate Platform For an overview of the Code Climate Platform, see here:
3
+ # http://docs.codeclimate.com/article/300-the-codeclimate-platform
4
+
5
+ # Under the engines key, you can configure which engines will analyze your repo.
6
+ # Each key is an engine name. For each value, you need to specify enabled: true
7
+ # to enable the engine as well as any other engines-specific configuration.
8
+
9
+ # For more details, see here:
10
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
11
+
12
+ # For a list of all available engines, see here:
13
+ # http://docs.codeclimate.com/article/296-engines-available-engines
14
+
15
+ engines:
16
+ # to turn on an engine, add it here and set enabled to `true`
17
+ # to turn off an engine, set enabled to `false` or remove it
18
+ rubocop:
19
+ enabled: true
20
+ golint:
21
+ enabled: true
22
+ gofmt:
23
+ enabled: true
24
+ eslint:
25
+ enabled: true
26
+ csslint:
27
+ enabled: true
28
+
29
+ # Engines can analyze files and report issues on them, but you can separately
30
+ # decide which files will receive ratings based on those issues. This is
31
+ # specified by path patterns under the ratings key.
32
+
33
+ # For more details see here:
34
+ # http://docs.codeclimate.com/article/289-configuring-your-repository-via-codeclimate-yml#platform
35
+
36
+ ratings:
37
+ paths:
38
+ # - app/**
39
+ - lib/**
40
+ # - "**.rb"
41
+ # - "**.go"
42
+
43
+ # You can globally exclude files from being analyzed by any engine using the
44
+ # exclude_paths key.
45
+
46
+ exclude_paths:
47
+ - spec/**
48
+ - vendor/**
@@ -1,3 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.2
4
+ addons:
5
+ code_climate:
6
+ repo_token: ad7636365b6ef471d01f356fceae1b5b1043dfc6128674d8b38b50e39221390b
data/Changelog CHANGED
@@ -1,3 +1,8 @@
1
+ 0.1.4
2
+ * Documentation updates
3
+ * Added Badges
4
+ * Make viewport to be mobile ready
5
+
1
6
  0.1.3 - 07-21-15
2
7
  * Add Bundler as a dependency
3
8
  * Updated Documentations
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
- [![Build Status](https://travis-ci.org/jjuliano/markdown-ui.svg)](https://travis-ci.org/jjuliano/markdown-ui)
2
- # Markdown UI
1
+ [![Join the chat at https://gitter.im/jjuliano/markdown-ui](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jjuliano/markdown-ui?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
+
3
+ [![Code Climate](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/badges/9a3000a8f7f20e930c56/gpa.svg)](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/feed) [![Build Status](https://travis-ci.org/jjuliano/markdown-ui.svg)](https://travis-ci.org/jjuliano/markdown-ui) [![Test Coverage](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/badges/9a3000a8f7f20e930c56/coverage.svg)](https://codeclimate.com/repos/55af40bfe30ba04297004e5b/coverage) [![Gem Version](https://badge.fury.io/rb/markdown-ui.svg)](http://badge.fury.io/rb/markdown-ui)
3
4
 
5
+ # Markdown UI
4
6
 
5
7
  Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
6
8
 
@@ -10,7 +12,7 @@ Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
10
12
 
11
13
  ## Usage
12
14
 
13
- $ markdown-ui file.md
15
+ $ markdown-ui file.mdui
14
16
 
15
17
  ## Contributing
16
18
 
@@ -19,3 +21,7 @@ Write UI in Markdown Syntax. See http://jjuliano.github.io/markdown-ui/
19
21
  3. Commit your changes (`git commit -am 'Add some feature'`)
20
22
  4. Push to the branch (`git push origin my-new-feature`)
21
23
  5. Create a new Pull Request
24
+
25
+
26
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/jjuliano/markdown-ui/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
27
+
@@ -15,7 +15,7 @@ puts <<-EOS
15
15
  <head>
16
16
  <meta charset="utf-8">
17
17
  <meta http-equiv="x-ua-compatible" content="ie=edge">
18
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
19
19
 
20
20
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.0.1/semantic.min.css">
21
21
  <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
@@ -1,5 +1,5 @@
1
1
  # coding: UTF-8
2
- require "markdown-ui/version"
2
+ require 'markdown-ui/version'
3
3
 
4
4
  require 'redcarpet'
5
5
  require 'nokogiri'
@@ -22,17 +22,17 @@ module MarkdownUI
22
22
  end
23
23
 
24
24
  def double_emphasis(text)
25
- args = text.split("|")
26
- element = args[0].split(" ")
25
+ args = text.split('|')
26
+ element = args[0].split(' ')
27
27
 
28
28
  content = if args[1].strip =~ /\,/
29
- args[1].split(",")
29
+ args[1].split(',')
30
30
  else
31
31
  args[1].strip
32
32
  end if !args[1].nil?
33
33
 
34
34
  klass = if args[0].strip =~ /\./
35
- k = args[0].split(".")
35
+ k = args[0].split('.')
36
36
  k.reverse!
37
37
  k.shift
38
38
  end
@@ -42,7 +42,7 @@ module MarkdownUI
42
42
  data_attributes = !args[3].nil? ? args[3].downcase : nil
43
43
 
44
44
  html do
45
- case element.join(" ")
45
+ case element.join(' ')
46
46
  when /button/i
47
47
  MarkdownUI::Button::Element.new(element, content, klass, _id).render
48
48
  when /menu/i
@@ -85,7 +85,7 @@ module MarkdownUI
85
85
  end
86
86
 
87
87
  def list(content, list_type)
88
- klass = "ui"
88
+ klass = 'ui'
89
89
  html { MarkdownUI::Content::List.new(content, klass, list_type).render }
90
90
  end
91
91
 
@@ -103,7 +103,7 @@ module MarkdownUI
103
103
  end
104
104
 
105
105
  def table_cell(content, alignment)
106
- body, klass = content.split(":")
106
+ body, klass = content.split(':')
107
107
 
108
108
  "<div class=\"ui #{klass}column\">#{body}</div>"
109
109
  end
@@ -6,7 +6,7 @@ module MarkdownUI::Button
6
6
  @content = content
7
7
  @klass = klass
8
8
  @id = _id
9
- @visible_content, @hidden_content = content.is_a?(Array) ? content : content.split(";")
9
+ @visible_content, @hidden_content = content.is_a?(Array) ? content : content.split(';')
10
10
  end
11
11
 
12
12
  def render
@@ -27,4 +27,4 @@ module MarkdownUI::Button
27
27
  MarkdownUI::StandardTag.new(content.join, klass, _id).render
28
28
  end
29
29
  end
30
- end
30
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Button
16
16
  MarkdownUI::StandardTag.new(content, klass, _id).render
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -10,7 +10,7 @@ module MarkdownUI::Button
10
10
  end
11
11
 
12
12
  def render
13
- element = @element.join(" ").strip
13
+ element = @element.join(' ').strip
14
14
  content = MarkdownUI::Content::Parser.new(@content).parse
15
15
  klass = "ui #{element} #{@klass} button"
16
16
  _id = @id
@@ -11,13 +11,13 @@ module MarkdownUI::Button
11
11
  element = if @element.is_a? Array
12
12
  @element
13
13
  else
14
- @element.split(" ")
14
+ @element.split(' ')
15
15
  end
16
16
 
17
17
  content = @content
18
18
 
19
19
  klass = if @klass.nil?
20
- element.join(" ").strip
20
+ element.join(' ').strip
21
21
  else
22
22
  @klass
23
23
  end
@@ -59,4 +59,4 @@ module MarkdownUI::Button
59
59
  end
60
60
 
61
61
  end
62
- end
62
+ end
@@ -12,7 +12,7 @@ module MarkdownUI::Button
12
12
  content = MarkdownUI::Content::Parser.new(@content).parse
13
13
  klass = MarkdownUI::KlassUtil.new("ui #{@klass} button").klass
14
14
  _id = if @id
15
- " id=\"#{@id.split.join("-")}\""
15
+ " id=\"#{@id.split.join('-')}\""
16
16
  end
17
17
 
18
18
  output = []
@@ -25,4 +25,4 @@ module MarkdownUI::Button
25
25
  output.join
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -18,4 +18,4 @@ module MarkdownUI::Button
18
18
  end
19
19
  end
20
20
  end
21
- end
21
+ end
@@ -25,4 +25,4 @@ module MarkdownUI::Button
25
25
  end
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Button
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Button
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Button
16
16
  MarkdownUI::StandardTag.new(content, klass, _id).render
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -22,4 +22,4 @@ module MarkdownUI::Button
22
22
  MarkdownUI::StandardTag.new(content.join, klass, _id).render
23
23
  end
24
24
  end
25
- end
25
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Button
16
16
  MarkdownUI::StandardTag.new(content, klass, _id).render
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Container
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Container
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -16,4 +16,4 @@ module MarkdownUI::Container
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Container
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -35,4 +35,4 @@ module MarkdownUI::Container
35
35
  end
36
36
 
37
37
  end
38
- end
38
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Container
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -14,4 +14,4 @@ module MarkdownUI::Container
14
14
  MarkdownUI::StandardTag.new(content, klass).render
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -13,4 +13,4 @@ module MarkdownUI
13
13
  end
14
14
  end
15
15
  end
16
- end
16
+ end
@@ -16,4 +16,4 @@ module MarkdownUI
16
16
  end
17
17
  end
18
18
  end
19
- end
19
+ end
@@ -21,4 +21,4 @@ module MarkdownUI
21
21
  end
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -18,4 +18,4 @@ module MarkdownUI
18
18
  end
19
19
  end
20
20
  end
21
- end
21
+ end
@@ -20,4 +20,4 @@ module MarkdownUI
20
20
  end
21
21
  end
22
22
  end
23
- end
23
+ end
@@ -13,14 +13,14 @@ module MarkdownUI
13
13
  final_content = []
14
14
 
15
15
  @content.each do |c|
16
- content = c.split(":")
16
+ content = c.split(':')
17
17
  final_content << process(content)
18
18
  end
19
19
 
20
20
  final_content.join
21
21
  else
22
22
  content = if !(@content =~ /\:/).nil?
23
- @content.split(":")
23
+ @content.split(':')
24
24
  else
25
25
  @content.split("\n")
26
26
  end
@@ -57,10 +57,10 @@ module MarkdownUI
57
57
  elsif mode.list?
58
58
  MarkdownUI::Content::List.new(actual_content, klass).render
59
59
  else
60
- MarkdownUI::Content::Custom.new(content.join(" "), klass).render
60
+ MarkdownUI::Content::Custom.new(content.join(' '), klass).render
61
61
  end
62
62
  end
63
63
 
64
64
  end
65
65
  end
66
- end
66
+ end
@@ -21,4 +21,4 @@ module MarkdownUI
21
21
  end
22
22
  end
23
23
  end
24
- end
24
+ end
@@ -15,4 +15,4 @@ module MarkdownUI
15
15
  MarkdownUI::StandardTag.new(content, klass).render
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -15,4 +15,4 @@ module MarkdownUI
15
15
  MarkdownUI::StandardTag.new(content, klass).render
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -15,4 +15,4 @@ module MarkdownUI
15
15
  MarkdownUI::StandardTag.new(content, klass).render
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,7 +1,7 @@
1
1
  module MarkdownUI
2
2
  class Header
3
3
  def initialize(text, level)
4
- @text, @klass = text.split(":")
4
+ @text, @klass = text.split(':')
5
5
  @level = level
6
6
  end
7
7
 
@@ -27,4 +27,4 @@ module MarkdownUI
27
27
  output.join
28
28
  end
29
29
  end
30
- end
30
+ end