redis-diff_match_patch 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2321,28 +2321,28 @@ local diff2 = diff_main(src, dst2)
2321
2321
  local diff = diff1
2322
2322
  local diff1_offset = 1
2323
2323
 
2324
- function diffToString(diffs)
2325
- local s = ""
2326
-
2327
- for x, e in ipairs(diffs) do
2328
- if e[1] == DIFF_EQUAL then
2329
- s = s .. " EQU " .. e[2]
2330
- elseif e[1] == DIFF_DELETE then
2331
- s = s .. " DEL " .. e[2]
2332
- elseif e[1] == DIFF_INSERT then
2333
- s = s .. " INS " .. e[2]
2334
- end
2335
- end
2336
-
2337
- return s
2338
- end
2339
-
2340
- redis.call("set", "diff1-demo", diffToString(diff1))
2341
- redis.call("set", "diff2-demo", diffToString(diff2))
2342
- redis.call("del", "diff-demo-log")
2343
- redis.call("del", "diff2-demo-log")
2344
- redis.call("rpush", "diff-demo-log", diffToString(diff))
2345
- redis.call("rpush", "diff2-demo-log", diffToString(diff2))
2324
+ -- function diffToString(diffs)
2325
+ -- local s = ""
2326
+ --
2327
+ -- for x, e in ipairs(diffs) do
2328
+ -- if e[1] == DIFF_EQUAL then
2329
+ -- s = s .. " EQU " .. e[2]
2330
+ -- elseif e[1] == DIFF_DELETE then
2331
+ -- s = s .. " DEL " .. e[2]
2332
+ -- elseif e[1] == DIFF_INSERT then
2333
+ -- s = s .. " INS " .. e[2]
2334
+ -- end
2335
+ -- end
2336
+ --
2337
+ -- return s
2338
+ -- end
2339
+ --
2340
+ -- redis.call("set", "diff1-demo", diffToString(diff1))
2341
+ -- redis.call("set", "diff2-demo", diffToString(diff2))
2342
+ -- redis.call("del", "diff-demo-log")
2343
+ -- redis.call("del", "diff2-demo-log")
2344
+ -- redis.call("rpush", "diff-demo-log", diffToString(diff))
2345
+ -- redis.call("rpush", "diff2-demo-log", diffToString(diff2))
2346
2346
 
2347
2347
  -- Merge diff2 into diff1.
2348
2348
  while table.getn(diff2) > 0 do
@@ -2420,8 +2420,8 @@ while table.getn(diff2) > 0 do
2420
2420
  diff1_offset = diff1_offset + 1
2421
2421
  end
2422
2422
 
2423
- redis.call("rpush", "diff-demo-log", diffToString(diff))
2424
- redis.call("rpush", "diff2-demo-log", diffToString(diff2))
2423
+ -- redis.call("rpush", "diff-demo-log", diffToString(diff))
2424
+ -- redis.call("rpush", "diff2-demo-log", diffToString(diff2))
2425
2425
  end
2426
2426
 
2427
2427
  local patches = patch_make(src, diff)
@@ -7,7 +7,7 @@ class Redis
7
7
 
8
8
  attr_reader :redis
9
9
 
10
- VERSION = "1.1.0"
10
+ VERSION = "1.1.1"
11
11
 
12
12
  RESOURCE_DIR = File.dirname(__FILE__)
13
13
  DIFF_SCRIPT = File.read File.join(RESOURCE_DIR, "diff_match_patch-diff.lua")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-diff_match_patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70096136592700 !ruby/object:Gem::Requirement
16
+ requirement: &70096334634300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70096136592700
24
+ version_requirements: *70096334634300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: turn
27
- requirement: &70096136592280 !ruby/object:Gem::Requirement
27
+ requirement: &70096334633880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70096136592280
35
+ version_requirements: *70096334633880
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70096136591860 !ruby/object:Gem::Requirement
38
+ requirement: &70096334633460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70096136591860
46
+ version_requirements: *70096334633460
47
47
  description: This library will allow you to perform atomic diffs, patches and merges
48
48
  on Redis strings.
49
49
  email:
@@ -79,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  segments:
81
81
  - 0
82
- hash: 2305032445798493678
82
+ hash: 1886756281668609739
83
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  segments:
90
90
  - 0
91
- hash: 2305032445798493678
91
+ hash: 1886756281668609739
92
92
  requirements: []
93
93
  rubyforge_project: redis-diff_match_patch
94
94
  rubygems_version: 1.8.11