citeproc 1.0.0.pre2 → 1.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,13 +15,15 @@ module CiteProc
15
15
 
16
16
  alias size length
17
17
 
18
- def [](key)
18
+ def read_attribute(key)
19
19
  attributes[filter_key(key)]
20
20
  end
21
-
22
- def []=(key, value)
21
+ alias [] read_attribute
22
+
23
+ def write_attribute(key, value)
23
24
  attributes[filter_key(key)] = filter_value(value)
24
25
  end
26
+ alias []= write_attribute
25
27
 
26
28
  def filter_key(key)
27
29
  key.to_sym
data/lib/citeproc/item.rb CHANGED
@@ -91,11 +91,11 @@ module CiteProc
91
91
  # @return [Variable, nil] the matching variable
92
92
  def variable(name, options = {})
93
93
  if options.key?(:form) && options[:form].to_sym == :short
94
- var = attributes["#{name}-short"]
94
+ var = read_attribute "#{name}-short"
95
95
  return var unless var.nil?
96
96
  end
97
97
 
98
- attributes[name]
98
+ read_attribute name
99
99
  end
100
100
 
101
101
  # Calls a block once for each field in the item, passing the field's
@@ -195,7 +195,6 @@ module CiteProc
195
195
  def filter_value(value, key)
196
196
  Variable.create!(value, key)
197
197
  end
198
-
199
198
  end
200
199
 
201
200
  end
@@ -1,3 +1,3 @@
1
1
  module CiteProc
2
- VERSION = '1.0.0.pre2'.freeze
2
+ VERSION = '1.0.0.pre3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: citeproc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre2
4
+ version: 1.0.0.pre3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-12 00:00:00.000000000 Z
12
+ date: 2012-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
16
- requirement: &70261116434580 !ruby/object:Gem::Requirement
16
+ requirement: &70301801255840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.3.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70261116434580
24
+ version_requirements: *70301801255840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: namae
27
- requirement: &70261116433900 !ruby/object:Gem::Requirement
27
+ requirement: &70301801255240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70261116433900
35
+ version_requirements: *70301801255240
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: cucumber
38
- requirement: &70261116433180 !ruby/object:Gem::Requirement
38
+ requirement: &70301801254680 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.2'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70261116433180
46
+ version_requirements: *70301801254680
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70261116448700 !ruby/object:Gem::Requirement
49
+ requirement: &70301801253540 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.7'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70261116448700
57
+ version_requirements: *70301801253540
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70261116448200 !ruby/object:Gem::Requirement
60
+ requirement: &70301801252220 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0.9'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70261116448200
68
+ version_requirements: *70301801252220
69
69
  description: ! "\n A cite processor interface for Citation Style Language (CSL)
70
70
  styles.\n "
71
71
  email:
@@ -136,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  segments:
138
138
  - 0
139
- hash: -1866054154081185825
139
+ hash: -2750459137594679064
140
140
  required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements: