dwc-archive 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -17,5 +17,6 @@ tmtags
17
17
  coverage
18
18
  rdoc
19
19
  pkg
20
+ *.gemspec
20
21
 
21
22
  ## PROJECT::SPECIFIC
data/README.rdoc CHANGED
@@ -13,14 +13,16 @@ Update to latest rubygems (v >= 1.3.6) which adds gemcutter sources by default.
13
13
  require 'rubygems'
14
14
  require 'dwc-archive'
15
15
 
16
- dwc = DWCA::DarwinCore.new('/path_to_file/archive_file.tar.gz')
17
- dwc.archive.files # the archive file list
18
- dwc.metadata.data # summary of metadata from eml.xml if it exists
19
- dwc.metadata.authors # authors of the archive
20
- dwc.core.data # summary of DarwinCore main file
21
- dwc.core.file_path # path to the DarwinCore main file
22
- dwc.core.extensions # array of DarwinCore Star extensions
23
- dwc.core.extensions[0].data # summary for an extension
16
+ dwc = DarwinCore.new('/path_to_file/archive_file.tar.gz')
17
+ dwc.archive.files # the archive file list
18
+ dwc.metadata.data # summary of metadata from eml.xml if it exists
19
+ dwc.metadata.authors # authors of the archive
20
+ dwc.core.data # summary of DarwinCore main file
21
+ dwc.core.file_path # path to the DarwinCore main file
22
+ dwc.extensions # array of DarwinCore Star extensions
23
+ dwc.extensions[0].data # summary for an extension
24
+
25
+ DarwinCore.clean_all # remove all expanded archives
24
26
 
25
27
  == Note on Patches/Pull Requests
26
28
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -12,6 +12,11 @@ Feature: Creation of a Darwing Core Archive
12
12
  When I delete expanded files
13
13
  Then they should disappear
14
14
 
15
+ Scenario: Instantiating DarwinCore with a file without "eml.xml"
16
+ Given path to a dwc file "minimal.tar.gz"
17
+ When I create a new DarwinCore instance
18
+ Then "DarwinCore_instance.metadata.data" should send instance of "NilClass" back
19
+
15
20
  Scenario: Instantiating DarwinCore with tar.gz file
16
21
  Given path to a dwc file "data.tar.gz"
17
22
  When I create a new DarwinCore instance
@@ -32,3 +37,8 @@ Feature: Creation of a Darwing Core Archive
32
37
  Given path to a dwc file "data.zip"
33
38
  When I create a new DarwinCore instance
34
39
  Then instance should have a valid archive
40
+
41
+ Scenario: Cleaning temporary directory from expanded archives
42
+ Given acces to DarwinCore gem
43
+ When I use DarwinCore.clean_all method
44
+ Then all temporary directories created by DarwinCore are deleted
@@ -26,7 +26,12 @@ Then /^they should disappear$/ do
26
26
  end
27
27
 
28
28
  When /^I create a new DarwinCore instance$/ do
29
- @dwc = DarwinCore.new(@dwca_file)
29
+ begin
30
+ @dwc = DarwinCore.new(@dwca_file)
31
+ rescue
32
+ @dwca_broken_file = @dwca_file
33
+ @dwc_error = $!
34
+ end
30
35
  end
31
36
 
32
37
  Then /^instance should have a valid archive$/ do
@@ -93,3 +98,29 @@ Then /^extension should have properties, data, file_path, coreid, fields$/ do
93
98
  ext.coreid.should == {:index=>0}
94
99
  ext.fields.should == [{:term=>"http://rs.gbif.org/ecat/terms/vernacularName", :index=>1}, {:term=>"http://rs.gbif.org/thesaurus/languageCode", :index=>2}]
95
100
  end
101
+
102
+ Given /^acces to DarwinCore gem$/ do
103
+ end
104
+
105
+ When /^I use DarwinCore\.clean_all method$/ do
106
+ Dir.entries("/tmp").select {|e| e.match(/^dwc_/) }.size.should > 0
107
+ DarwinCore.clean_all
108
+ end
109
+
110
+ Then /^all temporary directories created by DarwinCore are deleted$/ do
111
+ Dir.entries("/tmp").select {|e| e.match(/^dwc_/) }.should == []
112
+ end
113
+
114
+ Then /^I receive "([^\"]*)" exception with "([^\"]*)" message$/ do |arg1, arg2|
115
+ @dwc_error.class.to_s.should == arg1
116
+ @dwc_error.message.should == arg2
117
+ @dwca_broken_file.should == @dwca_file
118
+ @dwc_error = nil
119
+ @dwca_broken_file = nil
120
+ end
121
+
122
+ Then /^"([^\"]*)" should send instance of "([^\"]*)" back$/ do |arg1, arg2|
123
+ res = eval(arg1.gsub(/DarwinCore_instance/, "@dwc"))
124
+ res.class.to_s.should == arg2
125
+ end
126
+
data/lib/dwc-archive.rb CHANGED
@@ -2,6 +2,8 @@
2
2
  $:.unshift(File.dirname(__FILE__)) unless
3
3
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
4
4
  require 'ruby_extensions'
5
+ require 'fileutils'
6
+ require 'dwc-archive/errors'
5
7
  require 'dwc-archive/expander'
6
8
  require 'dwc-archive/archive'
7
9
  require 'dwc-archive/core'
@@ -11,12 +13,25 @@ require 'dwc-archive/metadata'
11
13
  class DarwinCore
12
14
  attr_reader :archive, :core, :metadata, :extensions
13
15
  alias :eml :metadata
14
- def initialize(dwc_path, tmp_dir = "/tmp")
16
+
17
+ DEFAULT_TMP_DIR = "/tmp"
18
+
19
+ def initialize(dwc_path, tmp_dir = DEFAULT_TMP_DIR)
15
20
  @archive = DarwinCore::Archive.new(dwc_path, tmp_dir)
16
21
  @core = DarwinCore::Core.new(@archive)
17
22
  @metadata = DarwinCore::Metadata.new(@archive)
18
23
  @extensions = get_extensions
19
24
  end
25
+
26
+ def self.clean_all(tmp_dir = DEFAULT_TMP_DIR)
27
+ Dir.entries(tmp_dir).each do |entry|
28
+ path = File.join(tmp_dir, entry)
29
+ if FileTest.directory?(path) && entry.match(/^dwc_[\d]+$/)
30
+ FileUtils.rm_rf(path)
31
+ end
32
+ end
33
+ end
34
+
20
35
  private
21
36
  def get_extensions
22
37
  res = []
@@ -24,6 +39,6 @@ class DarwinCore
24
39
  ext = @archive.meta[root_key][:extension]
25
40
  return [] unless ext
26
41
  ext = [ext] unless ext.class == Array
27
- ext.map {|e| DarwinCore::Extension.new(@archive, e)}
42
+ ext.map { |e| DarwinCore::Extension.new(@archive, e) }
28
43
  end
29
44
  end
@@ -12,13 +12,13 @@ class DarwinCore
12
12
  @eml = files.include?("eml.xml") ? Hash.from_xml(open(File.join(@expander.path, 'eml.xml'))) : nil
13
13
  else
14
14
  clean
15
- raise 'not a valid Darwin Core Archive File'
15
+ raise InvalidArchiveError
16
16
  end
17
17
  end
18
18
 
19
19
  def valid?
20
20
  valid = true
21
- valid = valid && FileTest.exists?(@archive_path)
21
+ valid = valid && @expander.path && FileTest.exists?(@expander.path)
22
22
  valid = valid && files && files.include?('meta.xml')
23
23
  end
24
24
 
@@ -0,0 +1,6 @@
1
+ class DarwinCore
2
+ class Error < RuntimeError; end
3
+ class FileNotFoundError < Error; end
4
+ class UnpackingError < Error; end
5
+ class InvalidArchiveError < Error; end
6
+ end
@@ -9,7 +9,9 @@ class DarwinCore
9
9
 
10
10
  def unpack
11
11
  clean
12
- @unpacker.call(@path, @archive_path) if @unpacker
12
+ raise FileNotFoundError unless File.exists?(@archive_path)
13
+ success = @unpacker.call(@path, @archive_path) if @unpacker
14
+ (@unpacker && success && $?.exitstatus == 0) ? success : (clean; raise UnpackingError)
13
15
  end
14
16
 
15
17
  def path
@@ -32,12 +34,12 @@ class DarwinCore
32
34
  if file_type.match(/tar.*gzip/i)
33
35
  return proc do |tmp_path, archive_path|
34
36
  FileUtils.mkdir tmp_path
35
- system "tar -zxvf #{archive_path} -C #{tmp_path}"
37
+ system("tar -zxf #{archive_path} -C #{tmp_path} > /dev/null 2>&1")
36
38
  end
37
39
  end
38
40
 
39
41
  if file_type.match(/Zip/)
40
- return proc { |tmp_path, archive_path| system "unzip -qq -d #{tmp_path} #{archive_path}" }
42
+ return proc { |tmp_path, archive_path| system("unzip -qq -d #{tmp_path} #{archive_path} > /dev/null 2>&1") }
41
43
  end
42
44
 
43
45
  return nil
@@ -10,11 +10,11 @@ class DarwinCore
10
10
  end
11
11
 
12
12
  def id
13
- @metadata[:eml][:dataset][:attributes][:id]
13
+ @metadata[:eml][:dataset][:attributes][:id] rescue nil
14
14
  end
15
15
 
16
16
  def title
17
- @metadata[:eml][:dataset][:title]
17
+ @metadata[:eml][:dataset][:title] rescue nil
18
18
  end
19
19
 
20
20
  def authors
Binary file
data/spec/files/eml.xml CHANGED
@@ -5,42 +5,42 @@ xmlns:eml="eml://ecoinformatics.org/eml-2.1.0"
5
5
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
6
  xsi:schemaLocation="eml://ecoinformatics.org/eml-2.1.0 eml.xsd">
7
7
  <dataset id="leptogastrinae:version:2.5">
8
- <title>Leptogastrinae (Diptera: Asilidae) Classification</title>
9
- <creator id="10" scope="document">
10
- <individualName>
11
- <givenName>Keith</givenName>
12
- <surName>Bayless</surName>
13
- </individualName>
14
- <electronicMailAddress>keith.bayless@gmail.com</electronicMailAddress>
15
- </creator>
16
- <creator id="5" scope="document">
17
- <individualName>
18
- <givenName>Torsten</givenName>
19
- <surName>Dikow</surName>
20
- </individualName>
21
- <electronicMailAddress>dshorthouse@eol.org</electronicMailAddress>
22
- </creator>
23
- <metadataProvider>
24
- <organizationName>Encyclopedia of Life: LifeDesks (http://www.lifedesks.org)</organizationName>
25
- </metadataProvider>
26
- <pubDate>2010-02-03T01:09:41-05:00</pubDate>
27
- <abstract>These are all the names in the Leptogastrinae classification.</abstract>
28
- <intellectualRights>Creative Commons: publicdomain</intellectualRights>
29
- <distribution>
30
- <online>
31
- <url function="download">http://leptogastrinae.lifedesks.org/files/leptogastrinae/classification_export/shared/leptogastrinae.tar.gz</url>
32
- </online>
33
- </distribution>
34
- <contact>
35
- <references>5</references>
36
- </contact>
37
- <publisher>
38
- <organizationName>The Marine Biological Laboratory</organizationName>
39
- </publisher>
8
+ <title>Leptogastrinae (Diptera: Asilidae) Classification</title>
9
+ <creator id="10" scope="document">
10
+ <individualName>
11
+ <givenName>Keith</givenName>
12
+ <surName>Bayless</surName>
13
+ </individualName>
14
+ <electronicMailAddress>keith.bayless@gmail.com</electronicMailAddress>
15
+ </creator>
16
+ <creator id="5" scope="document">
17
+ <individualName>
18
+ <givenName>Torsten</givenName>
19
+ <surName>Dikow</surName>
20
+ </individualName>
21
+ <electronicMailAddress>dshorthouse@eol.org</electronicMailAddress>
22
+ </creator>
23
+ <metadataProvider>
24
+ <organizationName>Encyclopedia of Life: LifeDesks (http://www.lifedesks.org)</organizationName>
25
+ </metadataProvider>
26
+ <pubDate>2010-02-03T01:09:41-05:00</pubDate>
27
+ <abstract>These are all the names in the Leptogastrinae classification.</abstract>
28
+ <intellectualRights>Creative Commons: publicdomain</intellectualRights>
29
+ <distribution>
30
+ <online>
31
+ <url function="download">http://leptogastrinae.lifedesks.org/files/leptogastrinae/classification_export/shared/leptogastrinae.tar.gz</url>
32
+ </online>
33
+ </distribution>
34
+ <contact>
35
+ <references>5</references>
36
+ </contact>
37
+ <publisher>
38
+ <organizationName>The Marine Biological Laboratory</organizationName>
39
+ </publisher>
40
40
  </dataset>
41
41
  <additionalMetadata>
42
- <metadata>
43
- <citation>Dikow, Torsten. 2010. The Leptogastrinae classification.</citation>
44
- </metadata>
42
+ <metadata>
43
+ <citation>Dikow, Torsten. 2010. The Leptogastrinae classification.</citation>
44
+ </metadata>
45
45
  </additionalMetadata>
46
- </eml:eml>
46
+ </eml:eml>
Binary file
Binary file
@@ -0,0 +1 @@
1
+ an example of uncompressed file
@@ -0,0 +1,33 @@
1
+ require File.dirname(__FILE__) + "/../spec_helper"
2
+
3
+ describe DarwinCore do
4
+ before(:all) do
5
+ @file_dir = File.join(File.dirname(__FILE__), '..', 'files')
6
+ end
7
+
8
+ describe ".new" do
9
+
10
+ it "should create DarwinCore instance out of archive file" do
11
+ ['data.zip', 'data.tar.gz', 'minimal.tar.gz'].each do |file|
12
+ file = File.join(@file_dir, file)
13
+ dwc = DarwinCore.new(file)
14
+ dwc.archive.valid?.should be_true
15
+ end
16
+ end
17
+
18
+ it "should raise error if archive file does not exist" do
19
+ file = 'not_a_file'
20
+ lambda { DarwinCore.new(file) }.should raise_error(DarwinCore::FileNotFoundError)
21
+ end
22
+
23
+ it "should raise error if archive is broken" do
24
+ file = File.join(@file_dir, 'broken.tar.gz')
25
+ lambda { DarwinCore.new(file) }.should raise_error(DarwinCore::UnpackingError)
26
+ end
27
+
28
+ it "should raise error if archive is invalid" do
29
+ file = File.join(@file_dir, 'invalid.tar.gz')
30
+ lambda { DarwinCore.new(file) }.should raise_error(DarwinCore::InvalidArchiveError)
31
+ end
32
+ end
33
+ end
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + "/../spec_helper"
2
2
 
3
3
  describe "Hash" do
4
4
  it "should parse xml to hash" do
5
- Hash.public_methods.include?("from_xml").should be_true
5
+ Hash.public_methods.map { |i| i.to_s }.include?("from_xml").should be_true
6
6
  end
7
7
 
8
8
  it "should parse xml" do
data/spec/spec_helper.rb CHANGED
@@ -1,8 +1,10 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'rubygems'
3
4
  require 'dwc-archive'
4
5
  require 'spec'
5
6
  require 'spec/autorun'
7
+ require 'ruby-debug'
6
8
 
7
9
  Spec::Runner.configure do |config|
8
10
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dmitry Mozzherin
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-18 00:00:00 -04:00
17
+ date: 2010-04-28 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -59,7 +59,6 @@ files:
59
59
  - README.rdoc
60
60
  - Rakefile
61
61
  - VERSION
62
- - dwc-archive.gemspec
63
62
  - features/dwc-archive.feature
64
63
  - features/step_definitions/dwc-archive_steps.rb
65
64
  - features/support/env.rb
@@ -67,19 +66,23 @@ files:
67
66
  - lib/dwc-archive/.expander.rb.swo
68
67
  - lib/dwc-archive/archive.rb
69
68
  - lib/dwc-archive/core.rb
69
+ - lib/dwc-archive/errors.rb
70
70
  - lib/dwc-archive/expander.rb
71
71
  - lib/dwc-archive/extension.rb
72
72
  - lib/dwc-archive/metadata.rb
73
73
  - lib/ruby_extensions.rb
74
- - spec/dwc-archive_spec.rb
74
+ - spec/files/broken.tar.gz
75
75
  - spec/files/data.tar.gz
76
76
  - spec/files/data.zip
77
77
  - spec/files/eml.xml
78
+ - spec/files/invalid.tar.gz
78
79
  - spec/files/meta.xml
80
+ - spec/files/minimal.tar.gz
81
+ - spec/files/uncompressed
82
+ - spec/lib/dwc-archive_spec.rb
79
83
  - spec/lib/ruby_extenstions_spec.rb
80
84
  - spec/spec.opts
81
85
  - spec/spec_helper.rb
82
- - t
83
86
  has_rdoc: true
84
87
  homepage: http://github.com/dimus/dwc-archive
85
88
  licenses: []
@@ -111,6 +114,6 @@ signing_key:
111
114
  specification_version: 3
112
115
  summary: Handler of Darwin Core Archive files
113
116
  test_files:
114
- - spec/dwc-archive_spec.rb
117
+ - spec/lib/dwc-archive_spec.rb
115
118
  - spec/lib/ruby_extenstions_spec.rb
116
119
  - spec/spec_helper.rb
data/dwc-archive.gemspec DELETED
@@ -1,75 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{dwc-archive}
8
- s.version = "0.1.4"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Dmitry Mozzherin"]
12
- s.date = %q{2010-03-18}
13
- s.description = %q{Darwin Core Archive is the current standard exchange format for GLobal Names Architecture modules. This gem makes it easy to incorporate files in Darwin Core Archive format into a ruby project.}
14
- s.email = %q{dmozzherin at gmail dot com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "dwc-archive.gemspec",
27
- "features/dwc-archive.feature",
28
- "features/step_definitions/dwc-archive_steps.rb",
29
- "features/support/env.rb",
30
- "lib/dwc-archive.rb",
31
- "lib/dwc-archive/.expander.rb.swo",
32
- "lib/dwc-archive/archive.rb",
33
- "lib/dwc-archive/core.rb",
34
- "lib/dwc-archive/expander.rb",
35
- "lib/dwc-archive/extension.rb",
36
- "lib/dwc-archive/metadata.rb",
37
- "lib/ruby_extensions.rb",
38
- "spec/dwc-archive_spec.rb",
39
- "spec/files/data.tar.gz",
40
- "spec/files/data.zip",
41
- "spec/files/eml.xml",
42
- "spec/files/meta.xml",
43
- "spec/lib/ruby_extenstions_spec.rb",
44
- "spec/spec.opts",
45
- "spec/spec_helper.rb",
46
- "t"
47
- ]
48
- s.homepage = %q{http://github.com/dimus/dwc-archive}
49
- s.rdoc_options = ["--charset=UTF-8"]
50
- s.require_paths = ["lib"]
51
- s.rubygems_version = %q{1.3.6}
52
- s.summary = %q{Handler of Darwin Core Archive files}
53
- s.test_files = [
54
- "spec/dwc-archive_spec.rb",
55
- "spec/lib/ruby_extenstions_spec.rb",
56
- "spec/spec_helper.rb"
57
- ]
58
-
59
- if s.respond_to? :specification_version then
60
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
61
- s.specification_version = 3
62
-
63
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
64
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
65
- s.add_development_dependency(%q<cucumber>, [">= 0"])
66
- else
67
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
68
- s.add_dependency(%q<cucumber>, [">= 0"])
69
- end
70
- else
71
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
72
- s.add_dependency(%q<cucumber>, [">= 0"])
73
- end
74
- end
75
-
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "DwcArchive" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end
data/t DELETED
@@ -1,74 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{dwc-archive}
8
- s.version = "0.1.2"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Dmitry Mozzherin"]
12
- s.date = %q{2010-03-18}
13
- s.description = %q{Darwin Core Archive is the current standard exchange format for GLobal Names Architecture modules. This gem makes it easy to incorporate files in Darwin Core Archive format into a ruby project.}
14
- s.email = %q{dmozzherin at gmail dot com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION",
26
- "dwc-archive.gemspec",
27
- "features/dwc-archive.feature",
28
- "features/step_definitions/dwc-archive_steps.rb",
29
- "features/support/env.rb",
30
- "lib/dwc-archive.rb",
31
- "lib/dwc-archive/.expander.rb.swo",
32
- "lib/dwc-archive/archive.rb",
33
- "lib/dwc-archive/core.rb",
34
- "lib/dwc-archive/expander.rb",
35
- "lib/dwc-archive/extension.rb",
36
- "lib/dwc-archive/metadata.rb",
37
- "lib/ruby_extensions.rb",
38
- "spec/dwc-archive_spec.rb",
39
- "spec/files/data.tar.gz",
40
- "spec/files/data.zip",
41
- "spec/files/eml.xml",
42
- "spec/files/meta.xml",
43
- "spec/lib/ruby_extenstions_spec.rb",
44
- "spec/spec.opts",
45
- "spec/spec_helper.rb"
46
- ]
47
- s.homepage = %q{http://github.com/dimus/dwc-archive}
48
- s.rdoc_options = ["--charset=UTF-8"]
49
- s.require_paths = ["lib"]
50
- s.rubygems_version = %q{1.3.6}
51
- s.summary = %q{Handler of Darwin Core Archive files}
52
- s.test_files = [
53
- "spec/dwc-archive_spec.rb",
54
- "spec/lib/ruby_extenstions_spec.rb",
55
- "spec/spec_helper.rb"
56
- ]
57
-
58
- if s.respond_to? :specification_version then
59
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
60
- s.specification_version = 3
61
-
62
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
63
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
64
- s.add_development_dependency(%q<cucumber>, [">= 0"])
65
- else
66
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
67
- s.add_dependency(%q<cucumber>, [">= 0"])
68
- end
69
- else
70
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
71
- s.add_dependency(%q<cucumber>, [">= 0"])
72
- end
73
- end
74
-