ghpreview 0.0.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ecd6a28a4028bf030b8c9e94cb16ee9d6cb4764de12830f4e09340a001578508
4
+ data.tar.gz: 1f046c3bf96a82d23bbe5823ba9c8cbfa8d492fdab231cbb0a5306bd080a0f76
5
+ SHA512:
6
+ metadata.gz: 4c9f845b3d78a8c13aff8a2d292b4a66fde9c6dcaf806101bff274179b7af4760e802ecd1ea68da80ba5524a4e49cf09adb96633f66835fa280e9681d39a7a20
7
+ data.tar.gz: 5f799472562d73c65b3bb8b758064f4d60c1fcd6c00b62d78f2624705b22108abd8287d5397269cf8f1ca18dfaf33ab7f3e5b4f3a71fc9be156e86b7bfb13b7c
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  *.gem
2
2
  *.rbc
3
3
  .bundle
4
+ .byebug_history
4
5
  .config
5
6
  .yardoc
6
7
  Gemfile.lock
@@ -0,0 +1,65 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0 - September 30th, 2019
4
+
5
+ - First update after 6 years: Udpate gem versions to get the gem working again with modern rubies.
6
+ - Currently tested in: 2.4, 2.5, 2.6 and ruby-head
7
+
8
+ ## 0.1.1 - December 23, 2013
9
+
10
+ - Specify html-pipeline dependencies. Also now using Bundler to sandbox the required gems. This should make it fail if the dependencies are not specified in the gemspec.
11
+ - Require rspec
12
+
13
+ ## 0.1.0 - December 22, 2013
14
+
15
+ - Update Listener and use new API
16
+ - Update versions of html-pipeline and github-linguist
17
+
18
+ ## 0.0.9 - August 9, 2013
19
+
20
+ - Include anchor links in headings
21
+
22
+ ## 0.0.8 - June 22, 2013
23
+
24
+ - Add convenience executables for testing
25
+ - Extract Viewer, Wrapper, Converter, Watcher.
26
+ - Allow an alternative browser to be used with the -a switch on GNU/Linux.
27
+
28
+ ## 0.0.7 - April 4, 2013
29
+
30
+ - Alow an alternate browser to be used with the -a switch on Mac.
31
+
32
+ ## 0.0.6 - January 4, 2013
33
+
34
+ - SIGINT trapping and error handling
35
+ - Updates dependency versions
36
+
37
+ ## 0.0.5 - December 20, 2012
38
+
39
+ - Lock version of github-linguist to known working version
40
+
41
+ ## 0.0.4 - December 18, 2012
42
+
43
+ - Remove CamoFilter, add asset_root for EmojiFilter
44
+ - Add note about icu.
45
+
46
+ ## 0.0.3 - November 30, 2012
47
+
48
+ - Cache the stylesheets for a week
49
+ - Avoids using the GitHub API and uses Github's html-pipeline.
50
+ - Refactor obfuscated code.
51
+ - Improvements on the README
52
+
53
+ ## 0.0.2 - November 26, 2012
54
+
55
+ - Avoid SSL verifications errors when using open-uri
56
+ - Adds Linux compatibility
57
+ - Cache the fingerprinted stylesheets links for a day
58
+ - Use ERB for HTML template
59
+ - Add live updating preview as a command line option
60
+ - Rename to ghpreview for better tab-completion
61
+
62
+ ## 0.0.1 - November 26, 2012
63
+
64
+ - Initial release with executable.
65
+
data/Gemfile CHANGED
@@ -1,5 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in github-preview.gemspec
4
- gem 'rake'
5
6
  gemspec
7
+
8
+ group :test do
9
+ gem 'rspec'
10
+ end
data/README.md CHANGED
@@ -33,10 +33,14 @@ option:
33
33
  $ ghpreview -w README.md
34
34
  ```
35
35
 
36
- To use an alternate browser (Mac only), use the `-a` (or `--application`) option:
36
+ To use an alternate browser, use the `-a` (or `--application`) option:
37
37
 
38
38
  ```bash
39
+ # On Mac:
39
40
  $ ghpreview -a Safari.app README.md
41
+
42
+ # On GNU/Linux:
43
+ $ ghpreview -a konqueror README.md
40
44
  ```
41
45
 
42
46
  ## Why is this better than X?
@@ -56,7 +60,8 @@ and Github's own stylesheets to style it :octocat:
56
60
  ## Contributing
57
61
 
58
62
  1. Fork it
59
- 2. Create your feature branch (`git checkout -b my-new-feature`)
60
- 3. Commit your changes (`git commit -am 'Add some feature'`)
61
- 4. Push to the branch (`git push origin my-new-feature`)
62
- 5. Create new Pull Request
63
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
64
+ 1. Write specs (`bundle exec rspec spec`)
65
+ 1. Commit your changes (`git commit -am 'Add some feature'`)
66
+ 1. Push to the branch (`git push origin my-new-feature`)
67
+ 1. Create new Pull Request
data/Rakefile CHANGED
@@ -1 +1,3 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
@@ -1,32 +1,33 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- trap("INT") { exit }
4
+ trap('INT') { exit }
4
5
  require 'optparse'
5
6
  require 'ghpreview'
6
7
 
7
8
  options = {}
8
9
 
9
10
  optparse = OptionParser.new do |opts|
10
- opts.banner = "Usage: ghpreview [options] FILE"
11
- opts.separator ""
11
+ opts.banner = 'Usage: ghpreview [options] FILE'
12
+ opts.separator ''
12
13
 
13
- opts.on("-w", "--watch", "Watch for changes") do |w|
14
+ opts.on('-w', '--watch', 'Watch for changes') do |w|
14
15
  options[:watch] = w
15
16
  end
16
17
 
17
- opts.on("-a", "--application APP", "Alternate browser") do |a|
18
+ opts.on('-a', '--application APP', 'Alternate browser') do |a|
18
19
  options[:application] = a
19
20
  end
20
21
  end
21
22
 
22
- def valid_file? filename
23
- filename and File.exist?(filename) and File.file?(filename)
23
+ def valid_file?(filename)
24
+ filename && File.exist?(filename) && File.file?(filename)
24
25
  end
25
26
 
26
27
  begin
27
28
  optparse.parse!
28
29
  unless valid_file? ARGV[0]
29
- puts "Missing markdown file."
30
+ puts 'Missing markdown file.'
30
31
  puts optparse
31
32
  exit
32
33
  end
@@ -1,25 +1,43 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'ghpreview/version'
5
6
 
6
7
  Gem::Specification.new do |gem|
7
- gem.name = "ghpreview"
8
+ gem.name = 'ghpreview'
8
9
  gem.version = GHPreview::VERSION
9
- gem.authors = ["Adam McCrea"]
10
- gem.email = ["adam@adamlogic.com"]
11
- gem.description = %q{Command line utility for previewing Markdown files with Github styling}
10
+ gem.authors = ['Adam McCrea', 'Fernando Briano']
11
+ gem.email = ['fernando@picandocodigo.net', 'adam@adamlogic.com']
12
+ gem.description = 'Command line utility for previewing Markdown files with Github styling'
12
13
  gem.summary = gem.description
13
- gem.homepage = "http://github.com/newcontext/ghpreview"
14
+ gem.homepage = 'http://github.com/edgecase/ghpreview'
14
15
 
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
+ gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
+ gem.require_paths = ['lib']
20
+ gem.metadata = {
21
+ "bug_tracker_uri" => "https://github.com/edgecase/ghpreview/issues",
22
+ "changelog_uri" => "https://github.com/edgecase/ghpreview/blob/master/CHANGELOG.md",
23
+ "documentation_uri" => "https://github.com/edgecase/ghpreview/blob/master/README.md#gamesdb",
24
+ "homepage_uri" => "https://github.com/edgecase/ghpreview",
25
+ "source_code_uri" => "https://github.com/edgecase/ghpreview",
26
+ }
19
27
 
20
- gem.add_dependency 'listen'
28
+ gem.add_dependency 'bundler'
29
+ gem.add_dependency 'commonmarker', '~> 0.16'
30
+ gem.add_dependency 'escape_utils', '~> 1.0'
31
+ gem.add_dependency 'gemoji', '~> 2.0'
32
+ gem.add_dependency 'github-linguist', '~> 7.6'
33
+ gem.add_dependency 'github-markdown', '~> 0.6'
34
+ gem.add_dependency 'html-pipeline', '~> 2.12'
35
+ gem.add_dependency 'httpclient', '~> 2.8'
36
+ gem.add_dependency 'listen', '~> 3.1.5'
21
37
  gem.add_dependency 'rb-fsevent'
22
- gem.add_dependency 'html-pipeline', '0.0.6'
23
- gem.add_dependency 'httpclient'
24
- gem.add_dependency 'github-linguist', '2.1'
38
+ gem.add_dependency 'rinku', '~> 1.7'
39
+ gem.add_dependency 'rouge', '~> 3.1'
40
+ gem.add_dependency 'sanitize', '~> 4.4.0'
41
+
42
+ gem.add_development_dependency 'byebug'
25
43
  end
@@ -1,2 +1,8 @@
1
- require 'ghpreview/version'
2
- require 'ghpreview/previewer'
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ require 'bundler/setup'
6
+
7
+ require_relative 'ghpreview/version'
8
+ require_relative 'ghpreview/previewer'
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'html/pipeline'
4
+
5
+ module GHPreview
6
+ class Converter
7
+ def self.to_html(markdown)
8
+ context = {
9
+ asset_root: 'https://github.githubassets.com/images/icons/',
10
+ base_url: 'https://github.githubassets.com/images/icons/',
11
+ gfm: false
12
+ }
13
+
14
+ pipeline = HTML::Pipeline.new([
15
+ HTML::Pipeline::MarkdownFilter,
16
+ HTML::Pipeline::SanitizationFilter,
17
+ HTML::Pipeline::ImageMaxWidthFilter,
18
+ HTML::Pipeline::TableOfContentsFilter,
19
+ HTML::Pipeline::HttpsFilter,
20
+ HTML::Pipeline::AutolinkFilter,
21
+ HTML::Pipeline::MentionFilter,
22
+ HTML::Pipeline::EmojiFilter,
23
+ HTML::Pipeline::SyntaxHighlightFilter
24
+ ], context)
25
+
26
+ pipeline.call(markdown)[:output].to_s
27
+ end
28
+ end
29
+ end
@@ -1,94 +1,32 @@
1
- require 'erb'
2
- require 'html/pipeline'
3
- require 'listen'
4
- require 'httpclient'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'converter'
4
+ require_relative 'wrapper'
5
+ require_relative 'viewer'
6
+ require_relative 'watcher'
5
7
 
6
8
  module GHPreview
7
9
  class Previewer
8
- HTML_FILEPATH = '/tmp/ghpreview.html'
9
- RAW_TEMPLATE_FILEPATH = "#{File.dirname(__FILE__)}/template.erb"
10
- STYLED_TEMPLATE_FILEPATH = "/tmp/ghpreview-template.erb"
11
- HOMEPAGE = 'https://github.com'
12
- TEMPLATE_CACHE_DURATION = 60 * 60 * 24 * 7 # one week
13
-
14
10
  def initialize(md_filepath, options = {})
15
- @md_filepath = md_filepath
16
- @http = HTTPClient.new
17
- generate_template_with_fingerprinted_stylesheet_links
11
+ Wrapper.generate_template_with_fingerprinted_stylesheet_links
18
12
 
13
+ @md_filepath = md_filepath
19
14
  @application = options[:application]
15
+
20
16
  options[:watch] ? listen : open
21
17
  end
22
18
 
23
19
  def listen
24
20
  puts "Previewing #{@md_filepath}. CTRL-C to stop."
25
- open
26
-
27
- filename = File.basename(@md_filepath)
28
- dirname = File.dirname(File.expand_path(@md_filepath))
29
-
30
- Listen.to(dirname, filter: /#{filename}$/) do |modified|
21
+ Watcher.watch @md_filepath do
31
22
  open
32
23
  end
33
24
  end
34
25
 
35
26
  def open
36
- html = markdown_to_html
37
- html = wrap_content_with_full_document(html)
38
- File.open(HTML_FILEPATH, 'w') { |f| f << html }
39
-
40
- if RUBY_PLATFORM =~ /linux/
41
- command = 'xdg-open'
42
- else
43
- command = @application ? "open -a #{@application}" : 'open'
44
- end
45
- `#{command} #{HTML_FILEPATH}`
46
- end
47
-
48
- private
49
-
50
- def markdown_to_html
51
- markdown = File.read(@md_filepath)
52
-
53
- context = {
54
- asset_root: "http://assets.github.com/images/icons/",
55
- gfm: false
56
- }
57
-
58
- pipeline = HTML::Pipeline.new([
59
- HTML::Pipeline::MarkdownFilter,
60
- HTML::Pipeline::SanitizationFilter,
61
- HTML::Pipeline::ImageMaxWidthFilter,
62
- HTML::Pipeline::HttpsFilter,
63
- HTML::Pipeline::MentionFilter,
64
- HTML::Pipeline::EmojiFilter,
65
- HTML::Pipeline::SyntaxHighlightFilter
66
- ], context)
67
- result = pipeline.call(markdown)[:output].to_s
68
- end
69
-
70
- def generate_template_with_fingerprinted_stylesheet_links
71
- if stale_template?(STYLED_TEMPLATE_FILEPATH)
72
- stylesheet_links = @http.get(HOMEPAGE).body.split("\n").select do |line|
73
- line =~ /https:.*github.*\.css/
74
- end.join
75
-
76
- raw_template = File.read(RAW_TEMPLATE_FILEPATH)
77
- styled_template = ERB.new(raw_template).result(binding)
78
- File.open(STYLED_TEMPLATE_FILEPATH, 'w') do |f|
79
- f.write(styled_template)
80
- end
81
- end
82
- end
83
-
84
- def stale_template?(filepath)
85
- return true unless File.exists?(filepath)
86
- File.mtime(filepath) < (Time.now - TEMPLATE_CACHE_DURATION)
87
- end
88
-
89
- def wrap_content_with_full_document(content)
90
- template = File.read(STYLED_TEMPLATE_FILEPATH)
91
- ERB.new(template).result(binding)
27
+ html = Converter.to_html(File.read(@md_filepath))
28
+ html = Wrapper.wrap_html(html)
29
+ Viewer.view_html html, @application
92
30
  end
93
31
  end
94
32
  end
@@ -1,5 +1,7 @@
1
+ <!DOCTYPE html>
1
2
  <html>
2
3
  <head>
4
+ <meta charset='utf-8'>
3
5
  <%= stylesheet_links %>
4
6
  <style>
5
7
  body { padding: 30px 0; }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module GHPreview
2
- VERSION = "0.0.7"
4
+ VERSION = '0.2.0'
3
5
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GHPreview
4
+ class Viewer
5
+ HTML_FILEPATH = '/tmp/ghpreview.html'
6
+
7
+ def self.view_html(html, application = nil)
8
+ File.open(HTML_FILEPATH, 'w') { |f| f << html }
9
+
10
+ if RUBY_PLATFORM =~ /linux/
11
+ command = if application
12
+ `#{application} #{HTML_FILEPATH} </dev/null &>/dev/null &`
13
+ else
14
+ `xdg-open #{HTML_FILEPATH}`
15
+ end
16
+ else
17
+ command = if application
18
+ "open -a #{application}"
19
+ else
20
+ 'open'
21
+ end
22
+ `#{command} #{HTML_FILEPATH}`
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'listen'
4
+
5
+ module GHPreview
6
+ class Watcher
7
+ def self.watch(filepath)
8
+ yield
9
+
10
+ filename = File.basename(filepath)
11
+ dirname = File.dirname(File.expand_path(filepath))
12
+
13
+ listener = Listen.to(dirname, filter: /#{filename}$/) do |_modified|
14
+ yield
15
+ end
16
+ listener.start
17
+
18
+ Signal.trap('INT') do
19
+ listener.stop
20
+ exit
21
+ end
22
+
23
+ sleep
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'erb'
4
+ require 'httpclient'
5
+
6
+ module GHPreview
7
+ class Wrapper
8
+ GITHUB_URL = 'https://github.com'
9
+ STYLED_TEMPLATE_FILEPATH = '/tmp/ghpreview-template.erb'
10
+ TEMPLATE_CACHE_DURATION = 60 * 60 * 24 * 7 # one week
11
+ RAW_TEMPLATE_FILEPATH = "#{File.dirname(__FILE__)}/template.erb"
12
+
13
+ def self.generate_template_with_fingerprinted_stylesheet_links
14
+ http = HTTPClient.new
15
+
16
+ if stale_template?(STYLED_TEMPLATE_FILEPATH)
17
+ stylesheet_links = http.get(GITHUB_URL).body.split("\n").select do |line|
18
+ line =~ /https:.*github.*\.css/
19
+ end.join
20
+
21
+ raw_template = File.read(RAW_TEMPLATE_FILEPATH)
22
+ styled_template = ERB.new(raw_template).result(binding)
23
+ File.open(STYLED_TEMPLATE_FILEPATH, 'w') do |f|
24
+ f.write(styled_template)
25
+ end
26
+ end
27
+ end
28
+
29
+ def self.wrap_html(content)
30
+ template = File.read(STYLED_TEMPLATE_FILEPATH)
31
+ ERB.new(template).result(binding)
32
+ end
33
+
34
+ private
35
+
36
+ def self.stale_template?(filepath)
37
+ return true unless File.exist?(filepath)
38
+
39
+ File.mtime(filepath) < (Time.now - TEMPLATE_CACHE_DURATION)
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../lib/ghpreview/converter'
4
+
5
+ describe GHPreview::Converter do
6
+ let(:converter) { GHPreview::Converter }
7
+
8
+ it 'converts markdown to HTML' do
9
+ expect(converter.to_html('*Foo*')).to eql('<p><em>Foo</em></p>')
10
+ end
11
+
12
+ it 'includes anchor links in headings' do
13
+ expect(converter.to_html('# Foo')).to eql("<h1>\n<a id=\"foo\" class=\"anchor\" href=\"#foo\" aria-hidden=\"true\"><span aria-hidden=\"true\" class=\"octicon octicon-link\"></span></a>Foo</h1>")
14
+ end
15
+
16
+ it 'passes through non-ASCII characters' do
17
+ expect(converter.to_html('Baña')).to eql('<p>Baña</p>')
18
+ end
19
+ end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require './lib/ghpreview'
5
+
6
+ GHPreview::Previewer.new('README.md')
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require './lib/ghpreview'
5
+
6
+ GHPreview::Previewer.new('README.md', watch: true)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../lib/ghpreview/wrapper'
4
+
5
+ describe GHPreview::Wrapper do
6
+ let(:wrapper) { GHPreview::Wrapper }
7
+
8
+ it 'wraps an HTML fragment in a full document' do
9
+ fragment = '<h1>foo</h1>'
10
+ expect(wrapper.wrap_html(fragment)).to include('<html>')
11
+ end
12
+
13
+ it 'passes through non-ASCII chars' do
14
+ expect(wrapper.wrap_html('<h1>Baña</h1>')).to include('Baña')
15
+ end
16
+
17
+ it 'specifies the charset' do
18
+ expect(wrapper.wrap_html('# foo')).to include("charset='utf-8'")
19
+ end
20
+ end
metadata CHANGED
@@ -1,105 +1,223 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghpreview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Adam McCrea
8
+ - Fernando Briano
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-04 00:00:00.000000000 Z
12
+ date: 2019-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: listen
15
+ name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
17
  requirements:
19
- - - ! '>='
18
+ - - ">="
20
19
  - !ruby/object:Gem::Version
21
20
  version: '0'
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
- - - ! '>='
25
+ - - ">="
28
26
  - !ruby/object:Gem::Version
29
27
  version: '0'
30
28
  - !ruby/object:Gem::Dependency
31
- name: rb-fsevent
29
+ name: commonmarker
32
30
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
31
  requirements:
35
- - - ! '>='
32
+ - - "~>"
36
33
  - !ruby/object:Gem::Version
37
- version: '0'
34
+ version: '0.16'
38
35
  type: :runtime
39
36
  prerelease: false
40
37
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
38
  requirements:
43
- - - ! '>='
39
+ - - "~>"
44
40
  - !ruby/object:Gem::Version
45
- version: '0'
41
+ version: '0.16'
42
+ - !ruby/object:Gem::Dependency
43
+ name: escape_utils
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '1.0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '1.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: gemoji
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '2.0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: github-linguist
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '7.6'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '7.6'
84
+ - !ruby/object:Gem::Dependency
85
+ name: github-markdown
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '0.6'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '0.6'
46
98
  - !ruby/object:Gem::Dependency
47
99
  name: html-pipeline
48
100
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
101
  requirements:
51
- - - '='
102
+ - - "~>"
52
103
  - !ruby/object:Gem::Version
53
- version: 0.0.6
104
+ version: '2.12'
54
105
  type: :runtime
55
106
  prerelease: false
56
107
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
108
  requirements:
59
- - - '='
109
+ - - "~>"
60
110
  - !ruby/object:Gem::Version
61
- version: 0.0.6
111
+ version: '2.12'
62
112
  - !ruby/object:Gem::Dependency
63
113
  name: httpclient
64
114
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
115
  requirements:
67
- - - ! '>='
116
+ - - "~>"
117
+ - !ruby/object:Gem::Version
118
+ version: '2.8'
119
+ type: :runtime
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "~>"
124
+ - !ruby/object:Gem::Version
125
+ version: '2.8'
126
+ - !ruby/object:Gem::Dependency
127
+ name: listen
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - "~>"
131
+ - !ruby/object:Gem::Version
132
+ version: 3.1.5
133
+ type: :runtime
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: 3.1.5
140
+ - !ruby/object:Gem::Dependency
141
+ name: rb-fsevent
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
68
145
  - !ruby/object:Gem::Version
69
146
  version: '0'
70
147
  type: :runtime
71
148
  prerelease: false
72
149
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
150
  requirements:
75
- - - ! '>='
151
+ - - ">="
76
152
  - !ruby/object:Gem::Version
77
153
  version: '0'
78
154
  - !ruby/object:Gem::Dependency
79
- name: github-linguist
155
+ name: rinku
80
156
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
157
  requirements:
83
- - - '='
158
+ - - "~>"
84
159
  - !ruby/object:Gem::Version
85
- version: '2.1'
160
+ version: '1.7'
86
161
  type: :runtime
87
162
  prerelease: false
88
163
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
164
  requirements:
91
- - - '='
165
+ - - "~>"
92
166
  - !ruby/object:Gem::Version
93
- version: '2.1'
167
+ version: '1.7'
168
+ - !ruby/object:Gem::Dependency
169
+ name: rouge
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - "~>"
173
+ - !ruby/object:Gem::Version
174
+ version: '3.1'
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - "~>"
180
+ - !ruby/object:Gem::Version
181
+ version: '3.1'
182
+ - !ruby/object:Gem::Dependency
183
+ name: sanitize
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - "~>"
187
+ - !ruby/object:Gem::Version
188
+ version: 4.4.0
189
+ type: :runtime
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - "~>"
194
+ - !ruby/object:Gem::Version
195
+ version: 4.4.0
196
+ - !ruby/object:Gem::Dependency
197
+ name: byebug
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: '0'
94
210
  description: Command line utility for previewing Markdown files with Github styling
95
211
  email:
212
+ - fernando@picandocodigo.net
96
213
  - adam@adamlogic.com
97
214
  executables:
98
215
  - ghpreview
99
216
  extensions: []
100
217
  extra_rdoc_files: []
101
218
  files:
102
- - .gitignore
219
+ - ".gitignore"
220
+ - CHANGELOG.md
103
221
  - Gemfile
104
222
  - LICENSE.txt
105
223
  - README.md
@@ -107,32 +225,46 @@ files:
107
225
  - bin/ghpreview
108
226
  - ghpreview.gemspec
109
227
  - lib/ghpreview.rb
228
+ - lib/ghpreview/converter.rb
110
229
  - lib/ghpreview/previewer.rb
111
230
  - lib/ghpreview/template.erb
112
231
  - lib/ghpreview/version.rb
113
- homepage: http://github.com/newcontext/ghpreview
232
+ - lib/ghpreview/viewer.rb
233
+ - lib/ghpreview/watcher.rb
234
+ - lib/ghpreview/wrapper.rb
235
+ - spec/converter_spec.rb
236
+ - spec/preview_readme
237
+ - spec/watch_readme
238
+ - spec/wrapper_spec.rb
239
+ homepage: http://github.com/edgecase/ghpreview
114
240
  licenses: []
241
+ metadata:
242
+ bug_tracker_uri: https://github.com/edgecase/ghpreview/issues
243
+ changelog_uri: https://github.com/edgecase/ghpreview/blob/master/CHANGELOG.md
244
+ documentation_uri: https://github.com/edgecase/ghpreview/blob/master/README.md#gamesdb
245
+ homepage_uri: https://github.com/edgecase/ghpreview
246
+ source_code_uri: https://github.com/edgecase/ghpreview
115
247
  post_install_message:
116
248
  rdoc_options: []
117
249
  require_paths:
118
250
  - lib
119
251
  required_ruby_version: !ruby/object:Gem::Requirement
120
- none: false
121
252
  requirements:
122
- - - ! '>='
253
+ - - ">="
123
254
  - !ruby/object:Gem::Version
124
255
  version: '0'
125
256
  required_rubygems_version: !ruby/object:Gem::Requirement
126
- none: false
127
257
  requirements:
128
- - - ! '>='
258
+ - - ">="
129
259
  - !ruby/object:Gem::Version
130
260
  version: '0'
131
261
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 1.8.23
262
+ rubygems_version: 3.0.6
134
263
  signing_key:
135
- specification_version: 3
264
+ specification_version: 4
136
265
  summary: Command line utility for previewing Markdown files with Github styling
137
- test_files: []
138
- has_rdoc:
266
+ test_files:
267
+ - spec/converter_spec.rb
268
+ - spec/preview_readme
269
+ - spec/watch_readme
270
+ - spec/wrapper_spec.rb