ot 0.1.0 → 0.1.1
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/lib/ot/text_operation.rb +5 -1
- data/lib/ot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5d6b114b3eed266032ee95c2534045fbeb1dce08
|
|
4
|
+
data.tar.gz: 7a14fe687409e5b8ed09cf8a576d3694bf31d6e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de8a98b0ec39d46c3cdac52925e04d2f42d7c11fa0ea76f2c23021b8602cfc5e56488a4e061689f76402cee33d147ef418893bf6fe405a463199a72969f451cf
|
|
7
|
+
data.tar.gz: 7f8f55c4d8eeb9420c05a2281780144e06c368d6e9aceb7e4a301c68edbc13c9297881cb62681a00b5d4cd28d4c5b65f3739d7c3e2e7b000dd11c2c0a25d9325
|
data/lib/ot/text_operation.rb
CHANGED
|
@@ -155,11 +155,15 @@ module OT
|
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# Converts operation into an array value.
|
|
158
|
-
# Note that this replaces the toJSON method in ot.js
|
|
159
158
|
def to_a
|
|
160
159
|
return @ops
|
|
161
160
|
end
|
|
162
161
|
|
|
162
|
+
# For serialization.
|
|
163
|
+
def to_json(_options = {})
|
|
164
|
+
return to_a.to_json
|
|
165
|
+
end
|
|
166
|
+
|
|
163
167
|
# Converts an array into an operation and validates it.
|
|
164
168
|
# Note that this replaces the fromJSON method in ot.js
|
|
165
169
|
def self.from_a(ops)
|
data/lib/ot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hayden Ball
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|