nanaimo 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +2 -2
- data/lib/nanaimo/reader.rb +1 -0
- data/lib/nanaimo/version.rb +1 -1
- data/lib/nanaimo/writer/pbxproj.rb +19 -16
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1081493a2517a57bb1e78617df2d88f088ab01a5d67b349ca6bdb7a1b0abfc5
|
4
|
+
data.tar.gz: 7a654acc8e0e8f792a584d3dab347a29fc6cb6e18d8a79e55d0a83cfbf6574ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51b9aabdc0d52b41745e9d212d5ab11b682ac84a62d4a164099b98a21049e8029c378621c8ee8b82a55b7ab6eb5f548372ea84cd2381270f8a3ba30d508a6523
|
7
|
+
data.tar.gz: 866422ae0447fc661d5fa9dc551f62b31aba0094c0a1acdedaeb90a69523260ff765794f1197112b157fe093b6e8e17e401615c5b258ff20826b522070e1aac7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Nanaimo Changelog
|
2
2
|
|
3
|
+
## 0.2.6 (2018-07-01)
|
4
|
+
|
5
|
+
##### Enhancements
|
6
|
+
|
7
|
+
* None.
|
8
|
+
|
9
|
+
##### Bug Fixes
|
10
|
+
|
11
|
+
* Fix parse errors crashing when attempting to show context when the error
|
12
|
+
occurs on the first character in the plist.
|
13
|
+
[Samuel Giddins](https://github.com/segiddins)
|
14
|
+
|
15
|
+
|
3
16
|
## 0.2.5 (2018-04-04)
|
4
17
|
|
5
18
|
##### Enhancements
|
data/Gemfile.lock
CHANGED
data/lib/nanaimo/reader.rb
CHANGED
data/lib/nanaimo/version.rb
CHANGED
@@ -28,7 +28,7 @@ module Nanaimo
|
|
28
28
|
write_newline
|
29
29
|
output << "/* Begin #{isa} section */"
|
30
30
|
write_newline
|
31
|
-
sort_dictionary(kvs).each do |k, v|
|
31
|
+
sort_dictionary(kvs, key_can_be_isa: false).each do |k, v|
|
32
32
|
write_dictionary_key_value_pair(k, v)
|
33
33
|
end
|
34
34
|
output << "/* End #{isa} section */"
|
@@ -40,31 +40,34 @@ module Nanaimo
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def write_dictionary_key_value_pair(k, v)
|
43
|
-
|
43
|
+
# since the objects section is always at the top-level,
|
44
|
+
# we can avoid checking if we're starting the 'objects'
|
45
|
+
# section if we're further "indented" (aka deeper) in the project
|
46
|
+
@objects_section = true if indent == 1 && value_for(k) == 'objects'
|
47
|
+
|
44
48
|
super
|
45
49
|
end
|
46
50
|
|
47
|
-
def sort_dictionary(dictionary)
|
51
|
+
def sort_dictionary(dictionary, key_can_be_isa: true)
|
48
52
|
hash = value_for(dictionary)
|
49
|
-
hash.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
key2 = value_for(k2)
|
57
|
-
next -1 if key1 == 'isa'
|
58
|
-
next 1 if key2 == 'isa'
|
59
|
-
key1 <=> key2
|
53
|
+
hash.sort_by do |k, _v|
|
54
|
+
k = value_for(k)
|
55
|
+
if key_can_be_isa
|
56
|
+
k == 'isa' ? '' : k
|
57
|
+
else
|
58
|
+
k
|
59
|
+
end
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
def isa_for(dictionary)
|
64
64
|
dictionary = value_for(dictionary)
|
65
65
|
return unless dictionary.is_a?(Hash)
|
66
|
-
isa = dictionary
|
67
|
-
|
66
|
+
if isa = dictionary['isa']
|
67
|
+
value_for(isa)
|
68
|
+
elsif isa = dictionary[ISA]
|
69
|
+
value_for(isa)
|
70
|
+
end
|
68
71
|
end
|
69
72
|
|
70
73
|
def flat_dictionary?(dictionary)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanaimo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danielle Tomlinson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
107
|
version: '0'
|
108
108
|
requirements: []
|
109
109
|
rubyforge_project:
|
110
|
-
rubygems_version: 2.7.
|
110
|
+
rubygems_version: 2.7.7
|
111
111
|
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: A library for (de)serialization of ASCII Plists.
|