mimetype-xml 1.1.3 → 1.2.3
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/lib/mimetype_xml.rb +1 -1
- data/lib/mimetype_xml/xml.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb40f890e3dc197044e6987e83d02154b08c08ce
|
4
|
+
data.tar.gz: 2cf4b31534b7dc77a5408277f8f8780d3a3b73aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f1c9da292e760ba06908894f4f5e351dd34ad1d6e6e08f8dfd836e68fca9ef754852297855c798c358e0895573ca79b89759ea7ec2519caef42194848865fd9
|
7
|
+
data.tar.gz: 2667203b4c8ab8ad877490541f281b1c904a8621859688dee475855e9db791f88a8f84a0cbe2db400eb3efb93f596016ebd1801635b133d1d419e06b36b1559f
|
data/README.md
CHANGED
@@ -58,7 +58,7 @@ require 'toml' # `toml` comes with this gem (`mimetype_xml`)
|
|
58
58
|
|
59
59
|
xml = MimetypeXML::Generate.toml_file(
|
60
60
|
:file => './custom-mime.toml', # The location of the TOML config
|
61
|
-
:xml_dir => '
|
61
|
+
:xml_dir => '/usr/share/mime/package', # Make sure the dir is writable for the user, run `sudo chmod 777 /usr/share/mime/package/`
|
62
62
|
:icon_pack => '~/.icons/YOUR_ICON_PACK' # Replace this with the install dir of your iconpack
|
63
63
|
)
|
64
64
|
|
data/lib/mimetype_xml.rb
CHANGED
@@ -6,7 +6,7 @@ require_relative 'mimetype_xml/xml'
|
|
6
6
|
require_relative 'mimetype_xml/generate'
|
7
7
|
|
8
8
|
module MimetypeXML
|
9
|
-
VERSIONS = { :major => 1, :minor =>
|
9
|
+
VERSIONS = { :major => 1, :minor => 2, :tiny => 3 }
|
10
10
|
|
11
11
|
def self.version *args
|
12
12
|
VERSIONS.flatten.select.with_index { |val, i| i.odd? }.join '.'
|
data/lib/mimetype_xml/xml.rb
CHANGED
@@ -45,9 +45,10 @@ module MimetypeXML
|
|
45
45
|
|
46
46
|
def write_files
|
47
47
|
files = files_hash
|
48
|
-
|
48
|
+
|
49
49
|
files.each do |file, contents|
|
50
|
-
|
50
|
+
bare = contents.split("\n").map(&:rstrip).join("\n")
|
51
|
+
File.open("#{@dir}/#{file}", 'w') { |f| f.write bare }
|
51
52
|
end
|
52
53
|
|
53
54
|
|