dwc-archive 0.4.14 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ begin
11
11
  gem.homepage = "http://github.com/GlobalNamesArchitecture/dwc-archive"
12
12
  gem.authors = ["Dmitry Mozzherin"]
13
13
  #gem.add_dependency "fastercsv" if RUBY_VERSION.match /^1.8/
14
- gem.add_dependency 'parsley-store'
14
+ gem.add_dependency 'parsley-store', ">= 0.2.0"
15
15
  gem.add_development_dependency "rspec", ">= 1.2.9"
16
16
  gem.add_development_dependency "cucumber", ">= 0"
17
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.14
1
+ 0.5.0
@@ -60,15 +60,10 @@ class DarwinCore
60
60
  if R19
61
61
  a_scientific_name.force_encoding('utf-8')
62
62
  end
63
- begin
64
- parsed_name = @parser.parse(a_scientific_name)[:scientificName]
65
- rescue
66
- @parser = ParsleyStore.new(1,2)
67
- parsed_name = @parser.parse(a_scientific_name)[:scientificName]
68
- end
63
+ canonical_name = @parser.parse(a_scientific_name, :canonical_only => true)
69
64
  add_name_string(a_scientific_name)
70
- add_name_string(parsed_name[:canonical]) if parsed_name[:parsed]
71
- parsed_name[:parsed] ? parsed_name[:canonical] : a_scientific_name
65
+ add_name_string(canonical_name) unless canonical_name.empty?
66
+ canonical_name.empty? ? a_scientific_name : canonical_name
72
67
  end
73
68
 
74
69
  def get_fields(element)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dwc-archive
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 14
10
- version: 0.4.14
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dmitry Mozzherin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-08 00:00:00 -04:00
18
+ date: 2010-11-05 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,10 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 3
29
+ hash: 23
30
30
  segments:
31
31
  - 0
32
- version: "0"
32
+ - 2
33
+ - 0
34
+ version: 0.2.0
33
35
  type: :runtime
34
36
  version_requirements: *id001
35
37
  - !ruby/object:Gem::Dependency