citeproc-ruby 1.0.2 → 1.0.3
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: a1c1fa2691a4268ad6ffe4179297403903b02a85
|
4
|
+
data.tar.gz: d8427fe01212ad953da919decf1b0067be04fedf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d175b7dc36cfcb3fe3a7ba149fb8701b7d934fc0153ce665480656f8eb1b9cc603d0c8fe9ee56bd9ffe1ee397cfb5065f01abf21444e50496a346b39c7d0f669
|
7
|
+
data.tar.gz: dc5c94bbff06808c9a922e8687d8f8fdf4176eea08d26761c8833d30b589ff2c00b84f4bbb4e39a096065635eef5657705decce6c9a117cccd1a6f9b4b697308
|
@@ -48,10 +48,16 @@ module CiteProc
|
|
48
48
|
|
49
49
|
def clear!(result = nil)
|
50
50
|
memories = conserve(result)
|
51
|
+
reset
|
52
|
+
ensure
|
53
|
+
notify_observers :clear!, memories.delete(:mode), memories
|
54
|
+
end
|
55
|
+
|
56
|
+
def reset
|
51
57
|
@item, @node, @substitute, @authors, @names = nil, nil, nil, [], nil
|
58
|
+
self
|
52
59
|
ensure
|
53
60
|
changed
|
54
|
-
notify_observers :clear!, memories.delete(:mode), memories
|
55
61
|
end
|
56
62
|
|
57
63
|
def mode
|
@@ -25,13 +25,22 @@ module CiteProc
|
|
25
25
|
it 'drops remembered items when they are too old' do
|
26
26
|
lambda {
|
27
27
|
history.update :store!, 'citation', { :x => 1 }
|
28
|
-
history.update :store!, 'citation', { :x =>
|
29
|
-
history.update :store!, 'citation', { :x =>
|
30
|
-
history.update :store!, 'citation', { :x =>
|
31
|
-
history.update :store!, 'citation', { :x =>
|
28
|
+
history.update :store!, 'citation', { :x => 2 }
|
29
|
+
history.update :store!, 'citation', { :x => 3 }
|
30
|
+
history.update :store!, 'citation', { :x => 4 }
|
31
|
+
history.update :store!, 'citation', { :x => 5 }
|
32
32
|
}.should change { history.citation.length }.to(3)
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
describe '#discard' do
|
37
|
+
it 'clears the history' do
|
38
|
+
history.update :store!, 'bibliography', { :x => 1 }
|
39
|
+
history.memory.should_not be_empty
|
40
|
+
history.discard
|
41
|
+
history.memory.should be_empty
|
42
|
+
end
|
43
|
+
end
|
35
44
|
end
|
36
45
|
|
37
46
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citeproc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: citeproc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: csl
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.2'
|
41
41
|
description: |
|
@@ -47,10 +47,10 @@ executables: []
|
|
47
47
|
extensions: []
|
48
48
|
extra_rdoc_files: []
|
49
49
|
files:
|
50
|
-
- .document
|
51
|
-
- .rspec
|
52
|
-
- .simplecov
|
53
|
-
- .yardopts
|
50
|
+
- ".document"
|
51
|
+
- ".rspec"
|
52
|
+
- ".simplecov"
|
53
|
+
- ".yardopts"
|
54
54
|
- AGPL
|
55
55
|
- BSDL
|
56
56
|
- Gemfile
|
@@ -117,12 +117,12 @@ require_paths:
|
|
117
117
|
- lib
|
118
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: 1.9.3
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
requirements:
|
125
|
-
- -
|
125
|
+
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|