any2tmx 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/any2tmx.gemspec +1 -3
- data/bin/{yaml2tmx → any2tmx} +1 -1
- data/lib/any2tmx/options.rb +2 -2
- data/lib/any2tmx/transformer.rb +2 -1
- data/lib/any2tmx/version.rb +1 -1
- metadata +4 -8
- data/bin/android2tmx +0 -30
- data/bin/json2tmx +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f65c112bbd60ad3b4dff17f240b2869830ee9ac2
|
4
|
+
data.tar.gz: a8b80040a9af84996b59e9cb7afc88554bfc770b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 708c01b89eaa7af3dcc58069ae5fe74233636197940ae7c7c9e4f36afbcc41fc84fc4f22dab819ba97597a60ca232533e878f3f542719448dc7ee1956b820341
|
7
|
+
data.tar.gz: 94bad25c5c90ede45c717cd776e79400970f398b41e7c3ea12761d582715d32ac4d2f36de012d39f7ecedfa61ab83e5e8e690eb5fa65e938ae7c16f93a507738
|
data/History.txt
CHANGED
data/any2tmx.gemspec
CHANGED
@@ -17,9 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.add_dependency 'nokogiri', '~> 1.6'
|
18
18
|
s.add_dependency 'xml-write-stream', '~> 1.0'
|
19
19
|
|
20
|
-
s.executables << '
|
21
|
-
s.executables << 'json2tmx'
|
22
|
-
s.executables << 'yaml2tmx'
|
20
|
+
s.executables << 'any2tmx'
|
23
21
|
|
24
22
|
s.require_path = 'lib'
|
25
23
|
s.files = Dir["{lib,spec}/**/*", 'Gemfile', 'History.txt', 'README.md', 'Rakefile', 'any2tmx.gemspec']
|
data/bin/{yaml2tmx → any2tmx}
RENAMED
data/lib/any2tmx/options.rb
CHANGED
@@ -83,7 +83,7 @@ module Any2Tmx
|
|
83
83
|
|
84
84
|
def validate_source
|
85
85
|
unless File.exist?(source[:file])
|
86
|
-
errors <<
|
86
|
+
errors << "Source file #{source[:file]} does not exist."
|
87
87
|
end
|
88
88
|
|
89
89
|
unless source[:locale]
|
@@ -94,7 +94,7 @@ module Any2Tmx
|
|
94
94
|
def validate_targets
|
95
95
|
targets.each do |target|
|
96
96
|
unless File.exist?(target[:file])
|
97
|
-
errors <<
|
97
|
+
errors << "Target file #{target[:file]} does not exist."
|
98
98
|
end
|
99
99
|
|
100
100
|
unless target[:locale]
|
data/lib/any2tmx/transformer.rb
CHANGED
data/lib/any2tmx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: any2tmx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: abroad
|
@@ -57,9 +57,7 @@ description: A command-line tool to convert certain file types to the standard T
|
|
57
57
|
email:
|
58
58
|
- camertron@gmail.com
|
59
59
|
executables:
|
60
|
-
-
|
61
|
-
- json2tmx
|
62
|
-
- yaml2tmx
|
60
|
+
- any2tmx
|
63
61
|
extensions: []
|
64
62
|
extra_rdoc_files: []
|
65
63
|
files:
|
@@ -67,9 +65,7 @@ files:
|
|
67
65
|
- History.txt
|
68
66
|
- Rakefile
|
69
67
|
- any2tmx.gemspec
|
70
|
-
- bin/
|
71
|
-
- bin/json2tmx
|
72
|
-
- bin/yaml2tmx
|
68
|
+
- bin/any2tmx
|
73
69
|
- lib/any2tmx.rb
|
74
70
|
- lib/any2tmx/options.rb
|
75
71
|
- lib/any2tmx/tmx_writer.rb
|
data/bin/android2tmx
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'any2tmx'
|
4
|
-
|
5
|
-
options = Any2Tmx::Options.new('android2tmx')
|
6
|
-
|
7
|
-
unless options.valid?
|
8
|
-
puts options.errors.first
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
|
12
|
-
if options.help?
|
13
|
-
options.print_help
|
14
|
-
exit 0
|
15
|
-
end
|
16
|
-
|
17
|
-
transform = Any2Tmx::Transformer.new(options)
|
18
|
-
result = transformer.transform
|
19
|
-
|
20
|
-
stream = if options.output
|
21
|
-
File.open(options.output, 'w+')
|
22
|
-
else
|
23
|
-
STDOUT
|
24
|
-
end
|
25
|
-
|
26
|
-
Any2Tmx::TmxWriter.write(result, options, stream)
|
27
|
-
|
28
|
-
if options.output
|
29
|
-
STDERR.write("Wrote #{options.output}\n")
|
30
|
-
end
|
data/bin/json2tmx
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
#! /usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'any2tmx'
|
4
|
-
|
5
|
-
options = Any2Tmx::Options.new('json2tmx')
|
6
|
-
|
7
|
-
unless options.valid?
|
8
|
-
puts options.errors.first
|
9
|
-
exit 1
|
10
|
-
end
|
11
|
-
|
12
|
-
if options.help?
|
13
|
-
options.print_help
|
14
|
-
exit 0
|
15
|
-
end
|
16
|
-
|
17
|
-
transform = Any2Tmx::Transformer.new(options)
|
18
|
-
result = transformer.transform
|
19
|
-
|
20
|
-
stream = if options.output
|
21
|
-
File.open(options.output, 'w+')
|
22
|
-
else
|
23
|
-
STDOUT
|
24
|
-
end
|
25
|
-
|
26
|
-
Any2Tmx::TmxWriter.write(result, options, stream)
|
27
|
-
|
28
|
-
if options.output
|
29
|
-
STDERR.write("Wrote #{options.output}\n")
|
30
|
-
end
|