abroad 4.3.0 → 4.4.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c7d8c0c7ebd22afaf330d5780b47f5ff06562d4
|
4
|
+
data.tar.gz: 04edfad7c29a9e50f7b48fdbfee57242d629f13e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 607324c7da61ef85f86e860e5ab453228e9e50c0f5a3df830796aac6f08299f8309bf2ac182657a7d1dd5f7dd07210b6ce86ecf8c8e028cc686e1b1fb3125989
|
7
|
+
data.tar.gz: 7a14bcc1639c089b0c995c22a21026991bc4783334428750b68ce857870cb93403a618ab4324f7e67d478f5ee71421e45e459e8c1cf836627bbc1671c32e11af
|
data/abroad.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
|
16
16
|
s.add_dependency 'htmlentities', '~> 4.0'
|
17
17
|
s.add_dependency 'json-stream', '~> 0.0'
|
18
|
-
s.add_dependency 'json-write-stream', '~> 1.
|
18
|
+
s.add_dependency 'json-write-stream', '~> 1.2'
|
19
19
|
s.add_dependency 'nokogiri', '>= 1.0', '< 1.8' # 1.8 seems to break html entities
|
20
20
|
s.add_dependency 'xml-write-stream', '~> 1.0'
|
21
21
|
s.add_dependency 'yaml-write-stream', '~> 2.0'
|
@@ -11,10 +11,8 @@ module Abroad
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def write_key_value(key, value)
|
14
|
-
before = pretty? ? "\n#{' ' * indent_spaces}" : ''
|
15
|
-
|
16
14
|
writer.write_key_value(
|
17
|
-
key.encode(encoding), value.encode(encoding),
|
15
|
+
key.encode(encoding), value.encode(encoding), write_options
|
18
16
|
)
|
19
17
|
end
|
20
18
|
|
@@ -26,6 +24,18 @@ module Abroad
|
|
26
24
|
|
27
25
|
private
|
28
26
|
|
27
|
+
def write_options
|
28
|
+
@write_options = { before: before_text, between: between_text }
|
29
|
+
end
|
30
|
+
|
31
|
+
def before_text
|
32
|
+
@before_text ||= pretty? ? "\n#{' ' * indent_spaces}" : ''
|
33
|
+
end
|
34
|
+
|
35
|
+
def between_text
|
36
|
+
@between_text ||= pretty? ? ' ' : ''
|
37
|
+
end
|
38
|
+
|
29
39
|
def indent_spaces
|
30
40
|
options.fetch(:indent_spaces, DEFAULT_INDENT_SPACES)
|
31
41
|
end
|
data/lib/abroad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abroad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.4.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: 2017-
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|