gatchaman 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +5 -1
- data/README.md +5 -0
- data/bin/gatchan +13 -3
- data/lib/gatchaman/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -12,6 +12,11 @@ Gatchaman is a gem to replace src values in HTML documents with data URI scheme
|
|
12
12
|
|
13
13
|
$ gatchan input_file [-r document_root] [-c current_directory]
|
14
14
|
|
15
|
+
or
|
16
|
+
|
17
|
+
gatchaman = Gatchaman.new(document_root, current_directory)
|
18
|
+
gatchaman.data_uri_schemize(html_string)
|
19
|
+
|
15
20
|
## Contributing
|
16
21
|
|
17
22
|
1. Fork it
|
data/bin/gatchan
CHANGED
@@ -13,8 +13,18 @@ def parse_options
|
|
13
13
|
options
|
14
14
|
end
|
15
15
|
|
16
|
+
def help
|
17
|
+
warn "usage: #{$0} input_file [-r document_root] [-c current_directory]"
|
18
|
+
exit 1
|
19
|
+
end
|
20
|
+
|
16
21
|
options = parse_options
|
17
|
-
input_file = ARGV.shift or
|
22
|
+
input_file = ARGV.shift or help
|
18
23
|
|
19
|
-
|
20
|
-
|
24
|
+
begin
|
25
|
+
print Gatchaman.new(options[:document_root], options[:current_directory] || File.dirname(input_file)).
|
26
|
+
data_uri_schemize(IO.read(input_file))
|
27
|
+
rescue => e
|
28
|
+
warn e.message
|
29
|
+
exit 2
|
30
|
+
end
|
data/lib/gatchaman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gatchaman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|