anki-importer 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.project CHANGED
@@ -5,6 +5,11 @@
5
5
  <projects>
6
6
  </projects>
7
7
  <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
8
13
  </buildSpec>
9
14
  <natures>
10
15
  <nature>org.radrails.rails.core.railsnature</nature>
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
1
  source "http://rubygems.org"
2
2
  gem 'activesupport', '>= 3.0.0', :require => ['active_support/core_ext']
3
3
  gem 'i18n', '>= 0.4.2'
4
- gem 'sqlite3-ruby', '>= 1.3.1', :require => 'sqlite3'
4
+ gem 'sqlite3', '>= 1.3.3', :require => 'sqlite3'
5
5
 
6
6
  group :development do
7
- gem "rspec", "~> 2.0.0"
7
+ gem "rspec", "~> 2.5.0"
8
8
  gem "bundler", "~> 1.0.0"
9
9
  gem "jeweler", "~> 1.5.0"
10
10
  gem "rcov", ">= 0"
@@ -1,27 +1,25 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (3.0.3)
4
+ activesupport (3.0.5)
5
5
  diff-lcs (1.1.2)
6
6
  git (1.2.5)
7
- i18n (0.4.2)
8
- jeweler (1.5.1)
7
+ i18n (0.5.0)
8
+ jeweler (1.5.2)
9
9
  bundler (~> 1.0.0)
10
10
  git (>= 1.2.5)
11
11
  rake
12
12
  rake (0.8.7)
13
13
  rcov (0.9.9)
14
- rspec (2.0.1)
15
- rspec-core (~> 2.0.1)
16
- rspec-expectations (~> 2.0.1)
17
- rspec-mocks (~> 2.0.1)
18
- rspec-core (2.0.1)
19
- rspec-expectations (2.0.1)
20
- diff-lcs (>= 1.1.2)
21
- rspec-mocks (2.0.1)
22
- rspec-core (~> 2.0.1)
23
- rspec-expectations (~> 2.0.1)
24
- sqlite3-ruby (1.3.2)
14
+ rspec (2.5.0)
15
+ rspec-core (~> 2.5.0)
16
+ rspec-expectations (~> 2.5.0)
17
+ rspec-mocks (~> 2.5.0)
18
+ rspec-core (2.5.1)
19
+ rspec-expectations (2.5.0)
20
+ diff-lcs (~> 1.1.2)
21
+ rspec-mocks (2.5.0)
22
+ sqlite3 (1.3.3)
25
23
 
26
24
  PLATFORMS
27
25
  ruby
@@ -32,5 +30,5 @@ DEPENDENCIES
32
30
  i18n (>= 0.4.2)
33
31
  jeweler (~> 1.5.0)
34
32
  rcov
35
- rspec (~> 2.0.0)
36
- sqlite3-ruby (>= 1.3.1)
33
+ rspec (~> 2.5.0)
34
+ sqlite3 (>= 1.3.3)
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
22
22
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
23
23
  # spec.add_runtime_dependency 'jabber4r', '> 0.1'
24
24
  # spec.add_development_dependency 'rspec', '> 1.2.3'
25
- gem.add_runtime_dependency 'sqlite3-ruby', '>= 1.3.1'
25
+ gem.add_runtime_dependency 'sqlite3', '>= 1.3.3'
26
26
  gem.add_runtime_dependency 'activesupport', '>= 3.0.0'
27
27
  gem.add_runtime_dependency 'i18n', '>= 0.4.2'
28
28
  gem.add_development_dependency "rspec", "~> 2.0.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{anki-importer}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Victor Costan"]
12
- s.date = %q{2010-11-28}
12
+ s.date = %q{2011-03-12}
13
13
  s.description = %q{Extracts models, facts and cards from Anki deck databases.}
14
14
  s.email = %q{victor@costan.us}
15
15
  s.extra_rdoc_files = [
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  ]
40
40
  s.homepage = %q{http://github.com/pwnall/anki_importer}
41
41
  s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.7}
42
+ s.rubygems_version = %q{1.6.2}
43
43
  s.summary = %q{Importer for Anki decks}
44
44
  s.test_files = [
45
45
  "spec/anki_importer_spec.rb",
@@ -47,18 +47,17 @@ Gem::Specification.new do |s|
47
47
  ]
48
48
 
49
49
  if s.respond_to? :specification_version then
50
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
51
50
  s.specification_version = 3
52
51
 
53
52
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
53
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
55
54
  s.add_runtime_dependency(%q<i18n>, [">= 0.4.2"])
56
- s.add_runtime_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
57
- s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
55
+ s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.3"])
56
+ s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
58
57
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
59
58
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.0"])
60
59
  s.add_development_dependency(%q<rcov>, [">= 0"])
61
- s.add_runtime_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
60
+ s.add_runtime_dependency(%q<sqlite3>, [">= 1.3.3"])
62
61
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
63
62
  s.add_runtime_dependency(%q<i18n>, [">= 0.4.2"])
64
63
  s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
@@ -68,12 +67,12 @@ Gem::Specification.new do |s|
68
67
  else
69
68
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
70
69
  s.add_dependency(%q<i18n>, [">= 0.4.2"])
71
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
72
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
70
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
71
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
73
72
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
74
73
  s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
75
74
  s.add_dependency(%q<rcov>, [">= 0"])
76
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
75
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
77
76
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
78
77
  s.add_dependency(%q<i18n>, [">= 0.4.2"])
79
78
  s.add_dependency(%q<rspec>, ["~> 2.0.0"])
@@ -84,12 +83,12 @@ Gem::Specification.new do |s|
84
83
  else
85
84
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
86
85
  s.add_dependency(%q<i18n>, [">= 0.4.2"])
87
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
88
- s.add_dependency(%q<rspec>, ["~> 2.0.0"])
86
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
87
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
89
88
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
90
89
  s.add_dependency(%q<jeweler>, ["~> 1.5.0"])
91
90
  s.add_dependency(%q<rcov>, [">= 0"])
92
- s.add_dependency(%q<sqlite3-ruby>, [">= 1.3.1"])
91
+ s.add_dependency(%q<sqlite3>, [">= 1.3.3"])
93
92
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
94
93
  s.add_dependency(%q<i18n>, [">= 0.4.2"])
95
94
  s.add_dependency(%q<rspec>, ["~> 2.0.0"])
@@ -100,11 +100,11 @@ describe "anki-importer" do
100
100
  end
101
101
 
102
102
  it 'should decode the question template' do
103
- front_cm.question_template.should == '%(Color name)s'
103
+ front_cm.question_template.should include('{{{Color name}}}')
104
104
  end
105
105
 
106
106
  it 'should decode the answer template' do
107
- front_cm.answer_template.should == '%(HTML color code)s'
107
+ front_cm.answer_template.should include('{{{HTML color code}}}')
108
108
  end
109
109
 
110
110
  it 'should decode question formatting' do
@@ -132,8 +132,11 @@ describe "anki-importer" do
132
132
  let(:white_fact) do
133
133
  deck.facts.find { |fact| fact.fields[name_field] == 'white' }
134
134
  end
135
- let(:black_fact) do
135
+ let(:black_fact) do
136
136
  black_hanzi = [233, 187, 145].pack('C*') # 黑
137
+ if black_hanzi.respond_to? :force_encoding
138
+ black_hanzi.force_encoding 'UTF-8'
139
+ end
137
140
  deck.facts.find { |fact| fact.fields[name_field] == black_hanzi }
138
141
  end
139
142
  describe 'Fact' do
Binary file
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anki-importer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
4
+ prerelease:
5
+ version: 0.1.4
11
6
  platform: ruby
12
7
  authors:
13
8
  - Victor Costan
@@ -15,230 +10,163 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2010-11-28 00:00:00 -05:00
13
+ date: 2011-03-12 00:00:00 -05:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
17
  name: activesupport
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
18
+ requirement: &id001 !ruby/object:Gem::Requirement
25
19
  none: false
26
20
  requirements:
27
21
  - - ">="
28
22
  - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 3
32
- - 0
33
- - 0
34
23
  version: 3.0.0
35
- requirement: *id001
36
24
  type: :runtime
37
- - !ruby/object:Gem::Dependency
38
25
  prerelease: false
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
39
28
  name: i18n
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
29
+ requirement: &id002 !ruby/object:Gem::Requirement
41
30
  none: false
42
31
  requirements:
43
32
  - - ">="
44
33
  - !ruby/object:Gem::Version
45
- hash: 11
46
- segments:
47
- - 0
48
- - 4
49
- - 2
50
34
  version: 0.4.2
51
- requirement: *id002
52
35
  type: :runtime
53
- - !ruby/object:Gem::Dependency
54
36
  prerelease: false
55
- name: sqlite3-ruby
56
- version_requirements: &id003 !ruby/object:Gem::Requirement
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: sqlite3
40
+ requirement: &id003 !ruby/object:Gem::Requirement
57
41
  none: false
58
42
  requirements:
59
43
  - - ">="
60
44
  - !ruby/object:Gem::Version
61
- hash: 25
62
- segments:
63
- - 1
64
- - 3
65
- - 1
66
- version: 1.3.1
67
- requirement: *id003
45
+ version: 1.3.3
68
46
  type: :runtime
69
- - !ruby/object:Gem::Dependency
70
47
  prerelease: false
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
71
50
  name: rspec
72
- version_requirements: &id004 !ruby/object:Gem::Requirement
51
+ requirement: &id004 !ruby/object:Gem::Requirement
73
52
  none: false
74
53
  requirements:
75
54
  - - ~>
76
55
  - !ruby/object:Gem::Version
77
- hash: 15
78
- segments:
79
- - 2
80
- - 0
81
- - 0
82
- version: 2.0.0
83
- requirement: *id004
56
+ version: 2.5.0
84
57
  type: :development
85
- - !ruby/object:Gem::Dependency
86
58
  prerelease: false
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
87
61
  name: bundler
88
- version_requirements: &id005 !ruby/object:Gem::Requirement
62
+ requirement: &id005 !ruby/object:Gem::Requirement
89
63
  none: false
90
64
  requirements:
91
65
  - - ~>
92
66
  - !ruby/object:Gem::Version
93
- hash: 23
94
- segments:
95
- - 1
96
- - 0
97
- - 0
98
67
  version: 1.0.0
99
- requirement: *id005
100
68
  type: :development
101
- - !ruby/object:Gem::Dependency
102
69
  prerelease: false
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
103
72
  name: jeweler
104
- version_requirements: &id006 !ruby/object:Gem::Requirement
73
+ requirement: &id006 !ruby/object:Gem::Requirement
105
74
  none: false
106
75
  requirements:
107
76
  - - ~>
108
77
  - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 1
112
- - 5
113
- - 0
114
78
  version: 1.5.0
115
- requirement: *id006
116
79
  type: :development
117
- - !ruby/object:Gem::Dependency
118
80
  prerelease: false
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
119
83
  name: rcov
120
- version_requirements: &id007 !ruby/object:Gem::Requirement
84
+ requirement: &id007 !ruby/object:Gem::Requirement
121
85
  none: false
122
86
  requirements:
123
87
  - - ">="
124
88
  - !ruby/object:Gem::Version
125
- hash: 3
126
- segments:
127
- - 0
128
89
  version: "0"
129
- requirement: *id007
130
90
  type: :development
131
- - !ruby/object:Gem::Dependency
132
91
  prerelease: false
133
- name: sqlite3-ruby
134
- version_requirements: &id008 !ruby/object:Gem::Requirement
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: sqlite3
95
+ requirement: &id008 !ruby/object:Gem::Requirement
135
96
  none: false
136
97
  requirements:
137
98
  - - ">="
138
99
  - !ruby/object:Gem::Version
139
- hash: 25
140
- segments:
141
- - 1
142
- - 3
143
- - 1
144
- version: 1.3.1
145
- requirement: *id008
100
+ version: 1.3.3
146
101
  type: :runtime
147
- - !ruby/object:Gem::Dependency
148
102
  prerelease: false
103
+ version_requirements: *id008
104
+ - !ruby/object:Gem::Dependency
149
105
  name: activesupport
150
- version_requirements: &id009 !ruby/object:Gem::Requirement
106
+ requirement: &id009 !ruby/object:Gem::Requirement
151
107
  none: false
152
108
  requirements:
153
109
  - - ">="
154
110
  - !ruby/object:Gem::Version
155
- hash: 7
156
- segments:
157
- - 3
158
- - 0
159
- - 0
160
111
  version: 3.0.0
161
- requirement: *id009
162
112
  type: :runtime
163
- - !ruby/object:Gem::Dependency
164
113
  prerelease: false
114
+ version_requirements: *id009
115
+ - !ruby/object:Gem::Dependency
165
116
  name: i18n
166
- version_requirements: &id010 !ruby/object:Gem::Requirement
117
+ requirement: &id010 !ruby/object:Gem::Requirement
167
118
  none: false
168
119
  requirements:
169
120
  - - ">="
170
121
  - !ruby/object:Gem::Version
171
- hash: 11
172
- segments:
173
- - 0
174
- - 4
175
- - 2
176
122
  version: 0.4.2
177
- requirement: *id010
178
123
  type: :runtime
179
- - !ruby/object:Gem::Dependency
180
124
  prerelease: false
125
+ version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
181
127
  name: rspec
182
- version_requirements: &id011 !ruby/object:Gem::Requirement
128
+ requirement: &id011 !ruby/object:Gem::Requirement
183
129
  none: false
184
130
  requirements:
185
131
  - - ~>
186
132
  - !ruby/object:Gem::Version
187
- hash: 15
188
- segments:
189
- - 2
190
- - 0
191
- - 0
192
133
  version: 2.0.0
193
- requirement: *id011
194
134
  type: :development
195
- - !ruby/object:Gem::Dependency
196
135
  prerelease: false
136
+ version_requirements: *id011
137
+ - !ruby/object:Gem::Dependency
197
138
  name: bundler
198
- version_requirements: &id012 !ruby/object:Gem::Requirement
139
+ requirement: &id012 !ruby/object:Gem::Requirement
199
140
  none: false
200
141
  requirements:
201
142
  - - ~>
202
143
  - !ruby/object:Gem::Version
203
- hash: 23
204
- segments:
205
- - 1
206
- - 0
207
- - 0
208
144
  version: 1.0.0
209
- requirement: *id012
210
145
  type: :development
211
- - !ruby/object:Gem::Dependency
212
146
  prerelease: false
147
+ version_requirements: *id012
148
+ - !ruby/object:Gem::Dependency
213
149
  name: jeweler
214
- version_requirements: &id013 !ruby/object:Gem::Requirement
150
+ requirement: &id013 !ruby/object:Gem::Requirement
215
151
  none: false
216
152
  requirements:
217
153
  - - ~>
218
154
  - !ruby/object:Gem::Version
219
- hash: -1876988220
220
- segments:
221
- - 1
222
- - 5
223
- - 0
224
- - pre5
225
155
  version: 1.5.0.pre5
226
- requirement: *id013
227
156
  type: :development
228
- - !ruby/object:Gem::Dependency
229
157
  prerelease: false
158
+ version_requirements: *id013
159
+ - !ruby/object:Gem::Dependency
230
160
  name: rcov
231
- version_requirements: &id014 !ruby/object:Gem::Requirement
161
+ requirement: &id014 !ruby/object:Gem::Requirement
232
162
  none: false
233
163
  requirements:
234
164
  - - ">="
235
165
  - !ruby/object:Gem::Version
236
- hash: 3
237
- segments:
238
- - 0
239
166
  version: "0"
240
- requirement: *id014
241
167
  type: :development
168
+ prerelease: false
169
+ version_requirements: *id014
242
170
  description: Extracts models, facts and cards from Anki deck databases.
243
171
  email: victor@costan.us
244
172
  executables: []
@@ -282,7 +210,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
282
210
  requirements:
283
211
  - - ">="
284
212
  - !ruby/object:Gem::Version
285
- hash: 3
213
+ hash: -3013077473551003654
286
214
  segments:
287
215
  - 0
288
216
  version: "0"
@@ -291,14 +219,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
219
  requirements:
292
220
  - - ">="
293
221
  - !ruby/object:Gem::Version
294
- hash: 3
295
- segments:
296
- - 0
297
222
  version: "0"
298
223
  requirements: []
299
224
 
300
225
  rubyforge_project:
301
- rubygems_version: 1.3.7
226
+ rubygems_version: 1.6.2
302
227
  signing_key:
303
228
  specification_version: 3
304
229
  summary: Importer for Anki decks