as_foo 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/as_foo.gemspec +1 -1
- data/lib/as_foo/as_html.rb +3 -3
- data/lib/as_foo/as_markdown.rb +3 -3
- data/lib/as_foo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd3dd8ac8a58d77aa61b739976d031d6589f0574
|
4
|
+
data.tar.gz: ca90df53dcfee806b29992cc38713665a89e1960
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfdb32008d7f30c2b00a77f1d75f9c85d568c08ad637411207c66e3673d601bfd65dd0541674f47f5342c0d6eb5fe9e15ff12837bc10d3fe057cd2052433087c
|
7
|
+
data.tar.gz: e4601e4b930a3dd7148ef30a248f02cb09f84195e29d879270ae5691c1437c4604d0fcb20ee1327b5c32ee00bc5ea9379ebd4a678d3daf46dcf8764a8496eeac
|
data/README.md
CHANGED
@@ -69,7 +69,7 @@ Japan
|
|
69
69
|
|
70
70
|
## Contributing
|
71
71
|
|
72
|
-
1. Fork it ( https://github.com/
|
72
|
+
1. Fork it ( https://github.com/tmaeda/as_foo/fork )
|
73
73
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
74
74
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
75
75
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/as_foo.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["tmaeda@ruby-sapporo.org"]
|
11
11
|
spec.summary = "Convert ruby string to foo."
|
12
12
|
spec.description = ""
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/tmaeda/as_foo"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/as_foo/as_html.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module AsFoo
|
2
2
|
module AsHtml
|
3
|
-
def as_html(with:
|
4
|
-
case
|
3
|
+
def as_html(with: :w3m, options: nil)
|
4
|
+
case with
|
5
5
|
when :w3m
|
6
6
|
IO.popen("w3m -dump -T text/html", "w") do |w3m|
|
7
7
|
w3m.puts self.to_s
|
8
8
|
end
|
9
9
|
else
|
10
|
-
raise ArgumentError.new("unexpected method #{
|
10
|
+
raise ArgumentError.new("unexpected method #{with}")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/as_foo/as_markdown.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module AsFoo
|
2
2
|
module AsMarkdown
|
3
|
-
def as_markdown(with:
|
4
|
-
case
|
3
|
+
def as_markdown(with: :redcarpet, options: nil)
|
4
|
+
case with
|
5
5
|
when :redcarpet
|
6
6
|
require 'redcarpet'
|
7
7
|
Redcarpet::Markdown.new(Redcarpet::Render::HTML, options.to_h).render(self.to_s)
|
8
8
|
else
|
9
|
-
raise ArgumentError.new("unexpected method #{
|
9
|
+
raise ArgumentError.new("unexpected method #{with}")
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/lib/as_foo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: as_foo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tmaeda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -55,7 +55,7 @@ files:
|
|
55
55
|
- lib/as_foo/as_html.rb
|
56
56
|
- lib/as_foo/as_markdown.rb
|
57
57
|
- lib/as_foo/version.rb
|
58
|
-
homepage:
|
58
|
+
homepage: https://github.com/tmaeda/as_foo
|
59
59
|
licenses:
|
60
60
|
- MIT
|
61
61
|
metadata: {}
|