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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c286bef2536113f4c240825728bc1bfeacf959b
4
- data.tar.gz: f7a708b82967938a7b1dc2b8b6a02ede66eff662
3
+ metadata.gz: fb40f890e3dc197044e6987e83d02154b08c08ce
4
+ data.tar.gz: 2cf4b31534b7dc77a5408277f8f8780d3a3b73aa
5
5
  SHA512:
6
- metadata.gz: b052ce19b6b980bffbc8756fcf40c77f40e1766202d8546a480c84c2756838c95dac2e05f3abac3fc3559943f867a64be9347d3edee597481de5170ce61fec4d
7
- data.tar.gz: e09821582157808c437a063b935679a76b6f9f3fb7658d2747d7ac085898c786f03d07f97782ffd86fd1131e1454e8d2794e77a541c98bc10bd78bffba5b289a
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 => './.xml', # Choose somewhere, make sure the dir exists
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
 
@@ -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 => 1, :tiny => 3 }
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 '.'
@@ -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
- File.open("#{@dir}/#{file}", 'w') { |f| f.write(contents) }
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mimetype-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Demonstrandum