Skip to content

Commit

Permalink
Tweaks to citable so that it runs.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjy committed Nov 20, 2013
1 parent 9ced74a commit 09baaf1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -5,14 +5,12 @@ ruby '2.0.0'
# gem 'rack-webconsole', git: 'https://github.com/grappendorf/rack-webconsole.git'

win_os = false

if $LOAD_PATH[0] =~ /[A-Za-z]:[\/\\]/
win_os = true
os = 'Windows'
else
os = '*nix/os x'
end

puts "\nBundling on #{os}(#{$LOAD_PATH[0]})."

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
Expand Down Expand Up @@ -50,6 +48,8 @@ gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1'

gem 'chronic', '~> 0.10'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
Expand Down
2 changes: 1 addition & 1 deletion lib/dwca/import.rb
Expand Up @@ -134,7 +134,7 @@ def self.new_manager(darwin_core_archive)

collecting_event: {
'http://rs.tdwg.org/dwc/terms/samplingProtocol' => {in: :verbatim_method=, out: :verbatim_method},
'http://rs.tdwg.org/dwc/terms/eventDate' => {in: nil, out: nil},
'http://rs.tdwg.org/dwc/terms/eventDate' => {in: nil, out: nil}, # out: date_range
'http://rs.tdwg.org/dwc/terms/habitat' => {in: :macro_habitat=, out: :habitat},
'http://rs.tdwg.org/dwc/terms/locality' => {in: :verbatim_locality=, out: :verbatim_locality},
'http://rs.tdwg.org/dwc/terms/verbatimElevation' => {in: nil, out: :elevation},
Expand Down
5 changes: 3 additions & 2 deletions spec/factories/taxon_name_factory.rb
Expand Up @@ -3,9 +3,10 @@
factory :taxon_name do
end

factory :valid_taxon_name do
factory :valid_taxon_name, class: TaxonName do
association :parent, factory: :root_taxon_name
name 'Adidae'
rank rank_class: Ranks.lookup(:iczn, 'family')
rank_class Ranks.lookup(:iczn, 'Family')
end

end
1 change: 0 additions & 1 deletion spec/models/taxon_name_spec.rb
Expand Up @@ -295,5 +295,4 @@
it_behaves_like 'identifiable'
it_behaves_like 'citable'
end

end
8 changes: 2 additions & 6 deletions spec/support/concerns/citable.rb
@@ -1,10 +1,6 @@
# CITABLE SPEC

shared_examples 'citable' do

# let(:class_with_citations) {described_class.new()}
# let(:class_with_citations) {FactoryGirl.build("valid_#{described_class.name.underscore}".to_sym)}
let(:class_with_citations) {FactoryGirl.build(:valid_taxon_name)}

let(:class_with_citations) {FactoryGirl.build("valid_#{described_class.name.underscore}".to_sym)}

context 'associations' do
specify 'has many citations - includes creating a citation' do
Expand Down

0 comments on commit 09baaf1

Please sign in to comment.