Sha256: 77489bcca278ece11d2305c4e9862a446495960c0d2b3e001d83a6c646663ae2

Contents?: true

Size: 1.47 KB

Versions: 44

Compression:

Stored size: 1.47 KB

Contents

FactoryGirl.define do
  factory :krikri_activity, class: Krikri::Activity do
    id 1
    agent 'Krikri::Harvesters::OAIHarvester'
    opts '{"uri": "http://example.org/endpoint"}'
  end

  factory :krikri_harvest_activity, parent: :krikri_activity do
    id 2
    agent 'Krikri::Harvesters::OAIHarvester'
    opts '{"uri": "http://example.org/endpoint", ' \
    '"oai": {"metadata_prefix": "mods", "set": "set1"}}'
  end

  factory :krikri_mapping_activity, parent: :krikri_activity do
    id 3
    agent 'Krikri::Mapper::Agent'
    opts(
      {
        name: 'test_map',
        generator_uri: (RDF::URI(Krikri::Settings['marmotta']['ldp']) /
          Krikri::Settings['prov']['activity'] / '2').to_s
      }.to_json
    )
  end

  factory :krikri_activity_with_long_opts, parent: :krikri_activity do
    id 4
    opts '{"uri": "http://example.org/endpoint",' \
      '"oai": {"metadata_prefix": "mods", "set": ["SSDPLABrynMawr",' \
      '"SSDPLACornell","SSDPLAUCSD","SSDPLAWashington","SSDelwareAtlas",' \
      '"SSDelwareGeorge","SSDelwareHistoric","SSDelwareIncorporated1968",' \
      '"SSDelwareIncorporated1959"]}}'
  end

  factory :krikri_enrichment_activity, parent: :krikri_activity do
    id 5
    agent 'Krikri::Enricher'
    opts(
      {
        generator_uri: 'http://localhost:8983/marmotta/ldp/activity/3',
        chain: {
          'Krikri::Enrichments::StripHtml' => {
            input_fields: [{sourceResource: :title}]
          }
        }
      }.to_json
    )
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
krikri-0.15.2 spec/factories/krikri_activities.rb
krikri-0.15.1 spec/factories/krikri_activities.rb
krikri-0.15.0 spec/factories/krikri_activities.rb
krikri-0.14.0 spec/factories/krikri_activities.rb
krikri-0.13.2 spec/factories/krikri_activities.rb
krikri-0.13.1 spec/factories/krikri_activities.rb
krikri-0.13.0 spec/factories/krikri_activities.rb
krikri-0.12.4 spec/factories/krikri_activities.rb
krikri-0.12.3 spec/factories/krikri_activities.rb
krikri-0.12.1 spec/factories/krikri_activities.rb
krikri-0.12.0 spec/factories/krikri_activities.rb
krikri-0.12.0.pre.rc.1 spec/factories/krikri_activities.rb
krikri-0.11.2 spec/factories/krikri_activities.rb
krikri-0.11.1 spec/factories/krikri_activities.rb
krikri-0.11.0 spec/factories/krikri_activities.rb
krikri-0.10.1 spec/factories/krikri_activities.rb
krikri-0.10.0 spec/factories/krikri_activities.rb
krikri-0.9.0 spec/factories/krikri_activities.rb
krikri-0.8.9 spec/factories/krikri_activities.rb
krikri-0.8.8 spec/factories/krikri_activities.rb