fuckyeahmarkdown 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9e57183a5a47f7b6de78c56bfb81596024fd30f3c5ac457b514bf98ab7ba6406
4
+ data.tar.gz: 93f7d1de71a7778fa97ef949594be79b6c860fe4ffad33ba1c2f73176d288cc3
5
+ SHA512:
6
+ metadata.gz: 63edf9c2115492fb31999bc66f48a58bbe0306e9bbbc513922dd3c9c3815286a60e855fa9bafed893022878e1eb2f69d734bf16687d380d5634cb8c4652064d7
7
+ data.tar.gz: 164a25110ad80bcc78817354f640be5706c75ebea554d66879abc0b1a4055f9c41d42741e34c16ebacf7e0a9ebe646af57ac8a49f1a18987a3f601f9e7af9084
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ usage.rb
7
+ Gemfile.lock
8
+ InstalledFiles
9
+ _yardoc
10
+ coverage
11
+ doc/
12
+ lib/bundler/man
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # Gemfile
2
+ source 'https://rubygems.org'
3
+ ruby '2.3.3'
4
+
5
+ gem 'tty-markdown'
@@ -0,0 +1,15 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = 'fuckyeahmarkdown'
5
+ s.version = '1.0.0'
6
+ s.date = '2018-10-29'
7
+ s.summary = 'Simple API wrapper for Fuckyeahmarkdown'
8
+ s.description = '---'
9
+ s.author = 'Boris Mkrtychan'
10
+ s.email = 'bmkrtychan@gmail.com'
11
+ s.homepage = 'https://github.com/bmkrtychan12/fymd'
12
+ s.license = 'MIT'
13
+ s.files = `git ls-files`.split("\n")
14
+ s.add_dependency('tty-markdown', '~> 0.4.0')
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'net/http'
2
+ require 'yaml'
3
+
4
+ # read: (optional, default 1) whether to run Readability or not, 0 turns off
5
+ $READ = '1'
6
+ # md: (optional, default 1) whether to run Markdownify or not, 0 turns off
7
+ $MD = '1'
8
+
9
+ class Fuckyeahmarkdown
10
+ def self.convert(url)
11
+ uri = URI.parse("http://fuckyeahmarkdown.com/go/?u=#{url}&read=#$READ&md=#$MD")
12
+ response = Net::HTTP.get_response(uri).body
13
+ return response.force_encoding('UTF-8')
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fuckyeahmarkdown
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Boris Mkrtychan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-10-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tty-markdown
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.4.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.4.0
27
+ description: "---"
28
+ email: bmkrtychan@gmail.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".gitignore"
34
+ - Gemfile
35
+ - fuckyeahmarkdown.gemspec
36
+ - lib/fuckyeahmarkdown.rb
37
+ homepage: https://github.com/bmkrtychan12/fymd
38
+ licenses:
39
+ - MIT
40
+ metadata: {}
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ requirements: []
56
+ rubyforge_project:
57
+ rubygems_version: 2.7.6
58
+ signing_key:
59
+ specification_version: 4
60
+ summary: Simple API wrapper for Fuckyeahmarkdown
61
+ test_files: []