twine 1.0.2 → 1.0.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: 0e7971931654800b4d398dd6c3d9e86b96e4f5ba
4
- data.tar.gz: 64a1eccc6c604439e10c82bded869527b123f8db
3
+ metadata.gz: 7eafefd496b0b0b32cdf00d9581ad752d089e2bf
4
+ data.tar.gz: 610848a3c93b4e17276b619561029daadfb30d50
5
5
  SHA512:
6
- metadata.gz: 808d4045076dfef7fcba6d26797eb05d7638fd3c2adc964c24059a20f378beb8c5d978f1598d651e1117a13a1fbdbdf102d21c767aee3a68c7eb5699fae7215a
7
- data.tar.gz: a63755c14cbadb14c0bba2960ff178a5785280bbb72e300dba5dc449ea510c823c6e248a1b848306f7c5de532c658ef8d4f034e80347f58ec2a4525673cf1ab6
6
+ metadata.gz: d350f728eee0e6bebdb35d33cc935e4df7fa1f2ef83fd688bc2fdf9bc0eec91bb132db3e6d0f4ffee10db690b51c763ef720fc87ff0b09217ed535bce4d4382f
7
+ data.tar.gz: d34c508686b8dda827b622f2742f947b05e0be859d75c0ca78ca6a8a69e0c57d5f447d4c6347a67e7bba3df5c89718c75f87dbf90427863173e4e53e498e3bd0
@@ -24,7 +24,7 @@ module Twine
24
24
  # %@ -> %s
25
25
  value = convert_twine_string_placeholder(input)
26
26
 
27
- number_of_placeholders = number_of_twine_placeholders(input)
27
+ number_of_placeholders = number_of_twine_placeholders(value)
28
28
 
29
29
  return value if number_of_placeholders == 0
30
30
 
@@ -1,3 +1,4 @@
1
+ require 'date'
1
2
  require 'safe_yaml/load'
2
3
 
3
4
  SafeYAML::OPTIONS[:suppress_warnings] = true
@@ -1,3 +1,3 @@
1
1
  module Twine
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -79,6 +79,10 @@ class PlaceholderTest < TwineTest
79
79
  to_android("some %d second %2$f")
80
80
  end
81
81
  end
82
+
83
+ def test_complicated_float_placeholders
84
+ assert_equal "%1$.0f%2$s (apparent: %3$.0f)", to_android("%.0f%@ (apparent: %.0f)")
85
+ end
82
86
  end
83
87
 
84
88
  class FromAndroid < PlaceholderTest
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-20 00:00:00.000000000 Z
11
+ date: 2018-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: safe_yaml
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '5.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '5.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest-ci
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mocha
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.1'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.1'
97
97
  description: |2
@@ -105,58 +105,58 @@ extensions: []
105
105
  extra_rdoc_files: []
106
106
  files:
107
107
  - Gemfile
108
- - LICENSE
109
108
  - README.md
110
- - bin/twine
109
+ - LICENSE
111
110
  - lib/twine.rb
112
- - lib/twine/cli.rb
113
- - lib/twine/encoding.rb
114
- - lib/twine/formatters.rb
115
- - lib/twine/formatters/abstract.rb
116
- - lib/twine/formatters/android.rb
111
+ - lib/twine/placeholders.rb
112
+ - lib/twine/plugin.rb
117
113
  - lib/twine/formatters/apple.rb
118
- - lib/twine/formatters/django.rb
119
- - lib/twine/formatters/flash.rb
120
- - lib/twine/formatters/gettext.rb
121
114
  - lib/twine/formatters/jquery.rb
115
+ - lib/twine/formatters/flash.rb
116
+ - lib/twine/formatters/android.rb
122
117
  - lib/twine/formatters/tizen.rb
123
- - lib/twine/output_processor.rb
124
- - lib/twine/placeholders.rb
125
- - lib/twine/plugin.rb
126
- - lib/twine/runner.rb
118
+ - lib/twine/formatters/gettext.rb
119
+ - lib/twine/formatters/django.rb
120
+ - lib/twine/formatters/abstract.rb
121
+ - lib/twine/cli.rb
127
122
  - lib/twine/twine_file.rb
123
+ - lib/twine/encoding.rb
124
+ - lib/twine/output_processor.rb
128
125
  - lib/twine/version.rb
126
+ - lib/twine/formatters.rb
127
+ - lib/twine/runner.rb
128
+ - bin/twine
129
+ - test/test_formatters.rb
130
+ - test/test_output_processor.rb
131
+ - test/test_consume_localization_file.rb
132
+ - test/test_consume_localization_archive.rb
133
+ - test/test_abstract_formatter.rb
134
+ - test/test_cli.rb
135
+ - test/test_twine_file.rb
136
+ - test/test_generate_localization_file.rb
137
+ - test/test_generate_all_localization_files.rb
138
+ - test/twine_test.rb
139
+ - test/test_generate_localization_archive.rb
129
140
  - test/command_test.rb
130
- - test/fixtures/consume_localization_archive.zip
131
- - test/fixtures/enc_utf16be.dummy
141
+ - test/twine_file_dsl.rb
142
+ - test/test_twine_definition.rb
143
+ - test/fixtures/formatter_apple.strings
132
144
  - test/fixtures/enc_utf16be_bom.dummy
133
- - test/fixtures/enc_utf16le.dummy
134
- - test/fixtures/enc_utf16le_bom.dummy
145
+ - test/fixtures/gettext_multiline.po
135
146
  - test/fixtures/enc_utf8.dummy
136
147
  - test/fixtures/formatter_android.xml
137
- - test/fixtures/formatter_apple.strings
148
+ - test/fixtures/consume_localization_archive.zip
149
+ - test/fixtures/twine_accent_values.txt
150
+ - test/fixtures/enc_utf16be.dummy
138
151
  - test/fixtures/formatter_django.po
139
- - test/fixtures/formatter_flash.properties
140
- - test/fixtures/formatter_gettext.po
141
- - test/fixtures/formatter_jquery.json
152
+ - test/fixtures/enc_utf16le.dummy
142
153
  - test/fixtures/formatter_tizen.xml
143
- - test/fixtures/gettext_multiline.po
144
- - test/fixtures/twine_accent_values.txt
145
- - test/test_abstract_formatter.rb
146
- - test/test_cli.rb
147
- - test/test_consume_localization_archive.rb
148
- - test/test_consume_localization_file.rb
149
- - test/test_formatters.rb
150
- - test/test_generate_all_localization_files.rb
151
- - test/test_generate_localization_archive.rb
152
- - test/test_generate_localization_file.rb
153
- - test/test_output_processor.rb
154
+ - test/fixtures/formatter_jquery.json
155
+ - test/fixtures/formatter_gettext.po
156
+ - test/fixtures/formatter_flash.properties
157
+ - test/fixtures/enc_utf16le_bom.dummy
154
158
  - test/test_placeholders.rb
155
- - test/test_twine_definition.rb
156
- - test/test_twine_file.rb
157
159
  - test/test_validate_twine_file.rb
158
- - test/twine_file_dsl.rb
159
- - test/twine_test.rb
160
160
  homepage: https://github.com/mobiata/twine
161
161
  licenses:
162
162
  - BSD-3-Clause
@@ -167,31 +167,31 @@ require_paths:
167
167
  - lib
168
168
  required_ruby_version: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - ">="
170
+ - - '>='
171
171
  - !ruby/object:Gem::Version
172
172
  version: '2.0'
173
173
  required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
- - - ">="
175
+ - - '>='
176
176
  - !ruby/object:Gem::Version
177
177
  version: '0'
178
178
  requirements: []
179
179
  rubyforge_project:
180
- rubygems_version: 2.5.2
180
+ rubygems_version: 2.0.14.1
181
181
  signing_key:
182
182
  specification_version: 4
183
183
  summary: Manage strings and their translations for your iOS, Android and other projects.
184
184
  test_files:
185
+ - test/test_formatters.rb
186
+ - test/test_output_processor.rb
187
+ - test/test_consume_localization_file.rb
188
+ - test/test_consume_localization_archive.rb
185
189
  - test/test_abstract_formatter.rb
186
190
  - test/test_cli.rb
187
- - test/test_consume_localization_archive.rb
188
- - test/test_consume_localization_file.rb
189
- - test/test_formatters.rb
191
+ - test/test_twine_file.rb
192
+ - test/test_generate_localization_file.rb
190
193
  - test/test_generate_all_localization_files.rb
191
194
  - test/test_generate_localization_archive.rb
192
- - test/test_generate_localization_file.rb
193
- - test/test_output_processor.rb
194
- - test/test_placeholders.rb
195
195
  - test/test_twine_definition.rb
196
- - test/test_twine_file.rb
196
+ - test/test_placeholders.rb
197
197
  - test/test_validate_twine_file.rb