nanaimo 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +14 -0
- data/.github/workflows/test.yml +43 -0
- data/.rubocop.yml +3 -3
- data/.rubocop_todo.yml +93 -24
- data/CHANGELOG.md +13 -0
- data/Gemfile +6 -1
- data/Gemfile.lock +38 -27
- data/Rakefile +4 -4
- data/lib/nanaimo/reader.rb +2 -2
- data/lib/nanaimo/version.rb +1 -1
- data/lib/nanaimo/writer/xml.rb +4 -4
- data/lib/nanaimo/writer.rb +2 -2
- data/nanaimo.gemspec +3 -1
- metadata +12 -11
- data/.travis.yml +0 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd533c5366e0f76df7328c358c757d55431ea61a8d849b81212908302895fc5e
|
|
4
|
+
data.tar.gz: 28d4ace8d2754d2382dc42c828c88c6ab8e49b3370136899216bd85c8a3a1a4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76588edd6c4d3d45eecaa3f4cccce7330b4e991084d5b14888c0bf4b96fba4e3fa30dabe92c963be5f8d458a8a98d72a9fbec306d203a8b59985d6ba5bf40de9
|
|
7
|
+
data.tar.gz: 90168d0be43173628521a4a124cfb3ae7841650ed4959dbfc804d78a88aacac93b5bfb1613556bef51bdf88ae48afcd8abc3f35bab9261aa6783d0dd432212f0
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: bundler
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: daily
|
|
7
|
+
open-pull-requests-limit: 10
|
|
8
|
+
ignore:
|
|
9
|
+
- dependency-name: rake
|
|
10
|
+
versions:
|
|
11
|
+
- ">= 13.a, < 14"
|
|
12
|
+
- dependency-name: rubocop
|
|
13
|
+
versions:
|
|
14
|
+
- "> 0.52.1"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
- /.+-stable$/
|
|
8
|
+
|
|
9
|
+
pull_request:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-20.04
|
|
14
|
+
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
|
|
18
|
+
matrix:
|
|
19
|
+
ruby:
|
|
20
|
+
- 2.3.8
|
|
21
|
+
- 2.4.10
|
|
22
|
+
- 2.5.8
|
|
23
|
+
- 2.6.6
|
|
24
|
+
- 2.7.1
|
|
25
|
+
- 3.0.0
|
|
26
|
+
- 3.1.2
|
|
27
|
+
- jruby-9.2.11.1
|
|
28
|
+
|
|
29
|
+
env:
|
|
30
|
+
LANG: en_US.UTF-8
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v2
|
|
34
|
+
|
|
35
|
+
- name: Set up Ruby
|
|
36
|
+
uses: ruby/setup-ruby@v1
|
|
37
|
+
with:
|
|
38
|
+
ruby-version: ${{ matrix.ruby }}
|
|
39
|
+
bundler-cache: true
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: bundle exec rake
|
|
43
|
+
continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
|
data/.rubocop.yml
CHANGED
|
@@ -2,10 +2,10 @@ inherit_from:
|
|
|
2
2
|
- .rubocop_todo.yml
|
|
3
3
|
|
|
4
4
|
AllCops:
|
|
5
|
-
TargetRubyVersion: 2.
|
|
5
|
+
TargetRubyVersion: 2.3
|
|
6
6
|
Exclude:
|
|
7
|
-
-
|
|
8
|
-
-
|
|
7
|
+
- "lib/nanaimo/unicode/**/*.rb"
|
|
8
|
+
- "vendor/**/*"
|
|
9
9
|
|
|
10
10
|
Lint/AssignmentInCondition:
|
|
11
11
|
Enabled: false
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,38 +1,74 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on
|
|
3
|
+
# on 2022-05-29 20:27:33 UTC using RuboCop version 1.30.0.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count:
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
# Offense count: 23
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
Layout/ClosingHeredocIndentation:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'spec/nanaimo/reader_spec.rb'
|
|
14
|
+
|
|
15
|
+
# Offense count: 14
|
|
16
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
17
|
+
Layout/EmptyLineAfterGuardClause:
|
|
18
|
+
Exclude:
|
|
19
|
+
- 'lib/nanaimo.rb'
|
|
20
|
+
- 'lib/nanaimo/object.rb'
|
|
21
|
+
- 'lib/nanaimo/plist.rb'
|
|
22
|
+
- 'lib/nanaimo/reader.rb'
|
|
23
|
+
- 'lib/nanaimo/unicode.rb'
|
|
24
|
+
- 'lib/nanaimo/writer.rb'
|
|
25
|
+
- 'lib/nanaimo/writer/pbxproj.rb'
|
|
26
|
+
- 'lib/nanaimo/writer/xml.rb'
|
|
27
|
+
|
|
28
|
+
# Offense count: 24
|
|
29
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
30
|
+
Layout/HeredocIndentation:
|
|
14
31
|
Exclude:
|
|
15
32
|
- 'Rakefile'
|
|
16
33
|
- 'lib/nanaimo/writer/xml.rb'
|
|
17
34
|
- 'spec/nanaimo/reader_spec.rb'
|
|
18
35
|
- 'spec/nanaimo/writer/xml_spec.rb'
|
|
19
36
|
|
|
37
|
+
# Offense count: 1
|
|
38
|
+
# Configuration parameters: AllowComments.
|
|
39
|
+
Lint/EmptyFile:
|
|
40
|
+
Exclude:
|
|
41
|
+
- 'spec/nanaimo/plist_spec.rb'
|
|
42
|
+
|
|
20
43
|
# Offense count: 2
|
|
21
|
-
|
|
22
|
-
|
|
44
|
+
Lint/MissingSuper:
|
|
45
|
+
Exclude:
|
|
46
|
+
- 'lib/nanaimo/reader.rb'
|
|
47
|
+
- 'lib/nanaimo/writer.rb'
|
|
48
|
+
|
|
49
|
+
# Offense count: 2
|
|
50
|
+
# Configuration parameters: ForbiddenDelimiters.
|
|
51
|
+
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
|
|
23
52
|
Naming/HeredocDelimiterNaming:
|
|
24
53
|
Exclude:
|
|
25
54
|
- 'lib/nanaimo/writer/xml.rb'
|
|
26
55
|
|
|
27
56
|
# Offense count: 3
|
|
28
|
-
#
|
|
29
|
-
|
|
57
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
58
|
+
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
|
|
59
|
+
Naming/MethodParameterName:
|
|
30
60
|
Exclude:
|
|
31
|
-
- 'lib/nanaimo/
|
|
32
|
-
- 'lib/nanaimo/writer.rb'
|
|
61
|
+
- 'lib/nanaimo/reader.rb'
|
|
62
|
+
- 'lib/nanaimo/writer/pbxproj.rb'
|
|
63
|
+
|
|
64
|
+
# Offense count: 2
|
|
65
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
66
|
+
Style/CaseLikeIf:
|
|
67
|
+
Exclude:
|
|
68
|
+
- 'lib/nanaimo/object.rb'
|
|
33
69
|
|
|
34
70
|
# Offense count: 1
|
|
35
|
-
#
|
|
71
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
36
72
|
# Configuration parameters: EnforcedStyle.
|
|
37
73
|
# SupportedStyles: compact, expanded
|
|
38
74
|
Style/EmptyMethod:
|
|
@@ -40,32 +76,50 @@ Style/EmptyMethod:
|
|
|
40
76
|
- 'lib/nanaimo/writer/xml.rb'
|
|
41
77
|
|
|
42
78
|
# Offense count: 1
|
|
43
|
-
#
|
|
79
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
44
80
|
Style/Encoding:
|
|
45
81
|
Exclude:
|
|
46
82
|
- 'nanaimo.gemspec'
|
|
47
83
|
|
|
84
|
+
# Offense count: 3
|
|
85
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
86
|
+
Style/ExpandPathArguments:
|
|
87
|
+
Exclude:
|
|
88
|
+
- 'nanaimo.gemspec'
|
|
89
|
+
- 'spec/nanaimo/writer/pbxproj_spec.rb'
|
|
90
|
+
- 'spec/spec_helper.rb'
|
|
91
|
+
|
|
48
92
|
# Offense count: 2
|
|
49
|
-
# Configuration parameters: .
|
|
93
|
+
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
|
50
94
|
# SupportedStyles: annotated, template, unannotated
|
|
51
95
|
Style/FormatStringToken:
|
|
52
96
|
EnforcedStyle: unannotated
|
|
53
97
|
|
|
54
98
|
# Offense count: 2
|
|
99
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
55
100
|
Style/IdenticalConditionalBranches:
|
|
56
101
|
Exclude:
|
|
57
102
|
- 'lib/nanaimo/unicode.rb'
|
|
58
103
|
|
|
59
104
|
# Offense count: 4
|
|
60
|
-
#
|
|
105
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
61
106
|
Style/IfUnlessModifier:
|
|
62
107
|
Exclude:
|
|
63
108
|
- 'lib/nanaimo/reader.rb'
|
|
64
109
|
- 'lib/nanaimo/unicode.rb'
|
|
65
110
|
|
|
111
|
+
# Offense count: 2
|
|
112
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
113
|
+
# Configuration parameters: EnforcedStyle.
|
|
114
|
+
# SupportedStyles: literals, strict
|
|
115
|
+
Style/MutableConstant:
|
|
116
|
+
Exclude:
|
|
117
|
+
- 'lib/nanaimo/reader.rb'
|
|
118
|
+
- 'lib/nanaimo/writer.rb'
|
|
119
|
+
|
|
66
120
|
# Offense count: 3
|
|
67
|
-
#
|
|
68
|
-
# Configuration parameters:
|
|
121
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
122
|
+
# Configuration parameters: EnforcedStyle, IgnoredMethods.
|
|
69
123
|
# SupportedStyles: predicate, comparison
|
|
70
124
|
Style/NumericPredicate:
|
|
71
125
|
Exclude:
|
|
@@ -73,7 +127,7 @@ Style/NumericPredicate:
|
|
|
73
127
|
- 'lib/nanaimo/writer.rb'
|
|
74
128
|
|
|
75
129
|
# Offense count: 8
|
|
76
|
-
#
|
|
130
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
77
131
|
# Configuration parameters: PreferredDelimiters.
|
|
78
132
|
Style/PercentLiteralDelimiters:
|
|
79
133
|
Exclude:
|
|
@@ -85,20 +139,35 @@ Style/PercentLiteralDelimiters:
|
|
|
85
139
|
- 'spec/nanaimo/writer_spec.rb'
|
|
86
140
|
|
|
87
141
|
# Offense count: 1
|
|
88
|
-
#
|
|
142
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
89
143
|
Style/RedundantFreeze:
|
|
90
144
|
Exclude:
|
|
91
145
|
- 'lib/nanaimo/reader.rb'
|
|
92
146
|
|
|
147
|
+
# Offense count: 2
|
|
148
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
149
|
+
Style/RedundantRegexpEscape:
|
|
150
|
+
Exclude:
|
|
151
|
+
- 'lib/nanaimo/writer.rb'
|
|
152
|
+
|
|
93
153
|
# Offense count: 1
|
|
94
|
-
#
|
|
154
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
95
155
|
# Configuration parameters: MinSize.
|
|
96
156
|
# SupportedStyles: percent, brackets
|
|
97
157
|
Style/SymbolArray:
|
|
98
158
|
EnforcedStyle: brackets
|
|
99
159
|
|
|
100
|
-
# Offense count:
|
|
101
|
-
#
|
|
160
|
+
# Offense count: 1
|
|
161
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
162
|
+
# Configuration parameters: EnforcedStyle, MinSize, WordRegex.
|
|
163
|
+
# SupportedStyles: percent, brackets
|
|
164
|
+
Style/WordArray:
|
|
165
|
+
Exclude:
|
|
166
|
+
- 'lib/nanaimo/reader.rb'
|
|
167
|
+
|
|
168
|
+
# Offense count: 22
|
|
169
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
170
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
|
102
171
|
# URISchemes: http, https
|
|
103
|
-
|
|
172
|
+
Layout/LineLength:
|
|
104
173
|
Max: 331
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Nanaimo Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.0 (2024-10-03)
|
|
4
|
+
|
|
5
|
+
##### Enhancements
|
|
6
|
+
|
|
7
|
+
* Allow dollar sign characters ($) in unquoted strings.
|
|
8
|
+
[arthuralee](https://github.com/arthuralee)
|
|
9
|
+
[#58](https://github.com/CocoaPods/Nanaimo/pull/58)
|
|
10
|
+
|
|
11
|
+
##### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* None.
|
|
14
|
+
|
|
15
|
+
|
|
3
16
|
## 0.3.0 (2020-07-17)
|
|
4
17
|
|
|
5
18
|
##### Enhancements
|
data/Gemfile
CHANGED
|
@@ -8,5 +8,10 @@ gemspec
|
|
|
8
8
|
group :development do
|
|
9
9
|
gem 'rake', '~> 12.0'
|
|
10
10
|
gem 'rspec'
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
install_if Gem.ruby_version >= Gem::Version.new('2.6') do
|
|
13
|
+
gem 'rubocop'
|
|
14
|
+
gem 'rubocop-rake', '~> 0.6.0'
|
|
15
|
+
gem 'rubocop-rspec', '~> 2.11'
|
|
16
|
+
end
|
|
12
17
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,51 +1,62 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nanaimo (0.
|
|
4
|
+
nanaimo (0.4.0)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
8
8
|
specs:
|
|
9
|
-
ast (2.4.
|
|
10
|
-
diff-lcs (1.
|
|
11
|
-
parallel (1.
|
|
12
|
-
parser (2.
|
|
13
|
-
ast (~> 2.4.
|
|
14
|
-
|
|
15
|
-
rainbow (3.0.0)
|
|
9
|
+
ast (2.4.2)
|
|
10
|
+
diff-lcs (1.5.1)
|
|
11
|
+
parallel (1.19.2)
|
|
12
|
+
parser (3.1.2.0)
|
|
13
|
+
ast (~> 2.4.1)
|
|
14
|
+
rainbow (3.1.1)
|
|
16
15
|
rake (12.3.3)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
rspec-
|
|
21
|
-
|
|
22
|
-
rspec-
|
|
23
|
-
rspec-
|
|
16
|
+
regexp_parser (2.5.0)
|
|
17
|
+
rexml (3.2.5)
|
|
18
|
+
rspec (3.13.0)
|
|
19
|
+
rspec-core (~> 3.13.0)
|
|
20
|
+
rspec-expectations (~> 3.13.0)
|
|
21
|
+
rspec-mocks (~> 3.13.0)
|
|
22
|
+
rspec-core (3.13.0)
|
|
23
|
+
rspec-support (~> 3.13.0)
|
|
24
|
+
rspec-expectations (3.13.0)
|
|
24
25
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
25
|
-
rspec-support (~> 3.
|
|
26
|
-
rspec-mocks (3.
|
|
26
|
+
rspec-support (~> 3.13.0)
|
|
27
|
+
rspec-mocks (3.13.0)
|
|
27
28
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
28
|
-
rspec-support (~> 3.
|
|
29
|
-
rspec-support (3.
|
|
30
|
-
rubocop (
|
|
29
|
+
rspec-support (~> 3.13.0)
|
|
30
|
+
rspec-support (3.13.0)
|
|
31
|
+
rubocop (1.30.0)
|
|
31
32
|
parallel (~> 1.10)
|
|
32
|
-
parser (>=
|
|
33
|
-
powerpack (~> 0.1)
|
|
33
|
+
parser (>= 3.1.0.0)
|
|
34
34
|
rainbow (>= 2.2.2, < 4.0)
|
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
36
|
+
rexml (>= 3.2.5, < 4.0)
|
|
37
|
+
rubocop-ast (>= 1.18.0, < 2.0)
|
|
35
38
|
ruby-progressbar (~> 1.7)
|
|
36
|
-
unicode-display_width (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
40
|
+
rubocop-ast (1.18.0)
|
|
41
|
+
parser (>= 3.1.1.0)
|
|
42
|
+
rubocop-rake (0.6.0)
|
|
43
|
+
rubocop (~> 1.0)
|
|
44
|
+
rubocop-rspec (2.11.1)
|
|
45
|
+
rubocop (~> 1.19)
|
|
46
|
+
ruby-progressbar (1.11.0)
|
|
47
|
+
unicode-display_width (2.1.0)
|
|
39
48
|
|
|
40
49
|
PLATFORMS
|
|
41
50
|
ruby
|
|
42
51
|
|
|
43
52
|
DEPENDENCIES
|
|
44
|
-
bundler (~>
|
|
53
|
+
bundler (~> 2.3)
|
|
45
54
|
nanaimo!
|
|
46
55
|
rake (~> 12.0)
|
|
47
56
|
rspec
|
|
48
57
|
rubocop
|
|
58
|
+
rubocop-rake (~> 0.6.0)
|
|
59
|
+
rubocop-rspec (~> 2.11)
|
|
49
60
|
|
|
50
61
|
BUNDLED WITH
|
|
51
|
-
|
|
62
|
+
2.3.14
|
data/Rakefile
CHANGED
|
@@ -7,10 +7,10 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
7
7
|
|
|
8
8
|
task default: [:spec]
|
|
9
9
|
|
|
10
|
-
if
|
|
10
|
+
if Gem.ruby_version >= Gem::Version.new('2.6')
|
|
11
11
|
require 'rubocop/rake_task'
|
|
12
12
|
RuboCop::RakeTask.new
|
|
13
|
-
task default: :rubocop
|
|
13
|
+
task default: [:rubocop]
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
task :generate_nextstep_mappings do
|
|
@@ -20,7 +20,7 @@ task :generate_nextstep_mappings do
|
|
|
20
20
|
.lines
|
|
21
21
|
.grep(/^[^#$]/)
|
|
22
22
|
.map { |l| l.split("\t", 3) }
|
|
23
|
-
.reduce('') do |f, (ns, uc, cm)|
|
|
23
|
+
.reduce(+'') do |f, (ns, uc, cm)|
|
|
24
24
|
f << " #{ns} => #{uc}, #{cm}"
|
|
25
25
|
end
|
|
26
26
|
map = <<-RUBY
|
|
@@ -60,7 +60,7 @@ task :generate_quote_maps do
|
|
|
60
60
|
quote_regexp = Regexp.union(quote_map.keys)
|
|
61
61
|
|
|
62
62
|
dump_hash = proc do |hash, indent = 4|
|
|
63
|
-
hash.reduce("{\n") { |dumped, (k, v)| dumped << "#{' ' * (indent + 2)}#{k.dump} => #{v.dump},\n" } << ' ' * indent << '}.freeze'
|
|
63
|
+
hash.reduce(+"{\n") { |dumped, (k, v)| dumped << "#{' ' * (indent + 2)}#{k.dump} => #{v.dump},\n" } << ' ' * indent << '}.freeze'
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
map = <<-RUBY
|
data/lib/nanaimo/reader.rb
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen-string-literal: true
|
|
2
2
|
|
|
3
|
+
autoload :StringScanner, 'strscan'
|
|
4
|
+
|
|
3
5
|
module Nanaimo
|
|
4
6
|
# Transforms plist strings into Plist objects.
|
|
5
7
|
#
|
|
6
8
|
class Reader
|
|
7
|
-
autoload :StringScanner, 'strscan'
|
|
8
|
-
|
|
9
9
|
# Raised when attempting to read a plist with an unsupported file format.
|
|
10
10
|
#
|
|
11
11
|
class UnsupportedPlistFormatError < Error
|
data/lib/nanaimo/version.rb
CHANGED
data/lib/nanaimo/writer/xml.rb
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
autoload :Base64, 'base64'
|
|
4
|
+
autoload :Date, 'date'
|
|
5
|
+
autoload :DateTime, 'date'
|
|
6
|
+
|
|
3
7
|
module Nanaimo
|
|
4
8
|
class Writer
|
|
5
9
|
# Transforms native ruby objects or Plist objects into their XML Plist
|
|
6
10
|
# string representation.
|
|
7
11
|
#
|
|
8
12
|
class XMLWriter < Writer
|
|
9
|
-
autoload :Base64, 'base64'
|
|
10
|
-
autoload :Date, 'date'
|
|
11
|
-
autoload :DateTime, 'date'
|
|
12
|
-
|
|
13
13
|
def write
|
|
14
14
|
write_xml_header
|
|
15
15
|
write_object(@plist.root_object)
|
data/lib/nanaimo/writer.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Nanaimo
|
|
|
25
25
|
|
|
26
26
|
# The magic comment that denotes a UTF8-encoded plist.
|
|
27
27
|
#
|
|
28
|
-
UTF8 = "// !$*UTF8*$!\n"
|
|
28
|
+
UTF8 = "// !$*UTF8*$!\n"
|
|
29
29
|
|
|
30
30
|
# @param plist [Plist,String,Hash,Array] The plist object to write
|
|
31
31
|
# @param pretty [Boolean] Whether to serialize annotations and add
|
|
@@ -90,7 +90,7 @@ module Nanaimo
|
|
|
90
90
|
output
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
-
QUOTED_STRING_REGEXP = %r{\A\z|[^\w
|
|
93
|
+
QUOTED_STRING_REGEXP = %r{\A\z|[^\w\.\$/]|\A___}
|
|
94
94
|
private_constant :QUOTED_STRING_REGEXP
|
|
95
95
|
|
|
96
96
|
def write_string_quoted_if_necessary(object)
|
data/nanaimo.gemspec
CHANGED
|
@@ -20,7 +20,9 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
21
21
|
spec.require_paths = ['lib']
|
|
22
22
|
|
|
23
|
-
spec.
|
|
23
|
+
spec.required_ruby_version = '>= 2.3.0'
|
|
24
|
+
|
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.3'
|
|
24
26
|
spec.add_development_dependency 'rake', '~> 12.3'
|
|
25
27
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
|
26
28
|
end
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nanaimo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Danielle Tomlinson
|
|
8
8
|
- Samuel Giddins
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '
|
|
20
|
+
version: '2.3'
|
|
21
21
|
type: :development
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '
|
|
27
|
+
version: '2.3'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: rake
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
55
|
version: '3.0'
|
|
56
|
-
description:
|
|
56
|
+
description:
|
|
57
57
|
email:
|
|
58
58
|
- dan@tomlinson.io
|
|
59
59
|
- segiddins@segiddins.me
|
|
@@ -61,11 +61,12 @@ executables: []
|
|
|
61
61
|
extensions: []
|
|
62
62
|
extra_rdoc_files: []
|
|
63
63
|
files:
|
|
64
|
+
- ".github/dependabot.yml"
|
|
65
|
+
- ".github/workflows/test.yml"
|
|
64
66
|
- ".gitignore"
|
|
65
67
|
- ".rspec"
|
|
66
68
|
- ".rubocop.yml"
|
|
67
69
|
- ".rubocop_todo.yml"
|
|
68
|
-
- ".travis.yml"
|
|
69
70
|
- CHANGELOG.md
|
|
70
71
|
- CODE_OF_CONDUCT.md
|
|
71
72
|
- Gemfile
|
|
@@ -91,7 +92,7 @@ homepage: https://github.com/CocoaPods/Nanaimo
|
|
|
91
92
|
licenses:
|
|
92
93
|
- MIT
|
|
93
94
|
metadata: {}
|
|
94
|
-
post_install_message:
|
|
95
|
+
post_install_message:
|
|
95
96
|
rdoc_options: []
|
|
96
97
|
require_paths:
|
|
97
98
|
- lib
|
|
@@ -99,15 +100,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
99
100
|
requirements:
|
|
100
101
|
- - ">="
|
|
101
102
|
- !ruby/object:Gem::Version
|
|
102
|
-
version:
|
|
103
|
+
version: 2.3.0
|
|
103
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
105
|
requirements:
|
|
105
106
|
- - ">="
|
|
106
107
|
- !ruby/object:Gem::Version
|
|
107
108
|
version: '0'
|
|
108
109
|
requirements: []
|
|
109
|
-
rubygems_version: 3.
|
|
110
|
-
signing_key:
|
|
110
|
+
rubygems_version: 3.2.3
|
|
111
|
+
signing_key:
|
|
111
112
|
specification_version: 4
|
|
112
113
|
summary: A library for (de)serialization of ASCII Plists.
|
|
113
114
|
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
dist: trusty
|
|
2
|
-
bundler_args: --without debugging documentation
|
|
3
|
-
branches:
|
|
4
|
-
only:
|
|
5
|
-
- master
|
|
6
|
-
|
|
7
|
-
language: ruby
|
|
8
|
-
cache: bundler
|
|
9
|
-
rvm:
|
|
10
|
-
# The latest ruby version
|
|
11
|
-
- 2.7.0
|
|
12
|
-
- 2.6.2
|
|
13
|
-
- 2.5.0
|
|
14
|
-
- 2.4.2
|
|
15
|
-
# OS X 10.9.5-10.10.0 (2.0.0-p481)
|
|
16
|
-
- 2.0.0-p481
|
|
17
|
-
before_install:
|
|
18
|
-
- gem install bundler -v "~> 1.17"
|