simple_po_parser 1.1.2 → 1.1.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 +2 -0
- data/Rakefile +3 -4
- data/lib/simple_po_parser.rb +2 -0
- data/lib/simple_po_parser/error.rb +2 -0
- data/lib/simple_po_parser/parser.rb +2 -0
- data/lib/simple_po_parser/tokenizer.rb +2 -0
- data/lib/simple_po_parser/version.rb +3 -1
- data/simple_po_parser.gemspec +0 -2
- metadata +3 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 145b9c1db6de2e03d5eab7a4b04297cb418af047
|
4
|
+
data.tar.gz: f6cbc4211bc7bb482794c7d620585f8cab1dddba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60479f02418e32487fa9151b8c4a44cc38e3a701174d4201d4335668e4fb08674810ad6a759e2e3aed0979e457a17ed430ea90ed12ef3386e34069539e51407f
|
7
|
+
data.tar.gz: 16984994b33283f09fe363d204f7830351ccd11fe9293ab32c380c534970d7c76d4d36bc69a3fe917c788c3268aaeeef5408b7a348e0a047cfd43a3c5525ece2
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
This is a simple PO file to ruby hash parser, which complies with [GNU PO file specification](https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html). Tested with the msgcat (GNU gettext-tools) 0.18.3 tool.
|
8
8
|
|
9
|
+
The parser is probably as optimized for speed as possible with pure ruby, while parsing all different PO types into seperate keys. It was written as a "core-replacement" for an equivalent parslet PEG parser for [arashm/PoParser](https://github.com/arashm/PoParser) and benchmarked about 500 times faster.
|
10
|
+
|
9
11
|
## Usage
|
10
12
|
|
11
13
|
The parser can be used in two ways:
|
data/Rakefile
CHANGED
@@ -1,13 +1,12 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'rake'
|
3
5
|
require 'rspec/core/rake_task'
|
6
|
+
require 'bundler/gem_tasks'
|
4
7
|
|
5
|
-
RSpec::Core::RakeTask.new(:spec)
|
6
8
|
task :default => :spec
|
7
9
|
|
8
|
-
require 'geminabox-release'
|
9
|
-
GeminaboxRelease.patch(:use_config => true, :remove_release => false)
|
10
|
-
|
11
10
|
desc "Generate a random po file to \"test/benchmark.po\". Takes optional rake args for number of entries"
|
12
11
|
task 'generate_random_pofile', :messages, :obsoletes do |t, args|
|
13
12
|
args.with_defaults(:messages => "200", :obsoletes => "10")
|
data/lib/simple_po_parser.rb
CHANGED
data/simple_po_parser.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_po_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis-Florian Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: geminabox-release
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 0.2.1
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.1
|
55
41
|
description: A simple PO file to ruby hash parser . PO files are translation files
|
56
42
|
generated by GNU/Gettext tool.
|
57
43
|
email:
|
@@ -65,7 +51,6 @@ files:
|
|
65
51
|
- ".travis.yml"
|
66
52
|
- CHANGELOG.md
|
67
53
|
- Gemfile
|
68
|
-
- Gemfile.lock
|
69
54
|
- LICENSE.txt
|
70
55
|
- README.md
|
71
56
|
- Rakefile
|
@@ -105,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
90
|
version: '0'
|
106
91
|
requirements: []
|
107
92
|
rubyforge_project:
|
108
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.6.11
|
109
94
|
signing_key:
|
110
95
|
specification_version: 4
|
111
96
|
summary: A simple PO file to ruby hash parser
|