/ontohub/app/helpers/ |
H A D | state_helper.rb | 2 def erroneous_with_message?(resource) 3 resource.respond_to?(:last_error) && 4 resource.state == 'failed' && 5 resource.last_error 8 def error_message(resource) 9 resource.last_error 12 def retry_resource_chain(resource) 13 if resource.is_a?(Ontology) 14 url_for([resource, :retry]) 15 elsif resource [all...] |
H A D | ontology_helper.rb | 8 def download_path(resource) 9 return nil if resource.versions.done.empty? 10 repository_ontology_ontology_version_path(*resource_chain, resource.versions.done.latest.first) 17 def last_file_path(resource) 19 repository_id: resource.repository.to_param, 20 ref: resource.current_version.commit_oid, 21 path: resource.current_version.path,
|
H A D | link_helper.rb | 12 def fancy_link(resource) 13 return nil unless resource 15 data_type, value = determine_image_type(resource) 17 name = block_given? ? yield(resource) : resource 19 title_target = resource.respond_to?(:last) ? resource.last : resource 23 if resource.respond_to?(:locid) 24 url_for(resource) [all...] |
H A D | proofs_helper.rb | 3 destination = resource.proof_obligation 9 t("proofs.new.klass.#{resource.proof_obligation.class.to_s.underscore}") 13 resource.theorem? 17 if resource.theorem? 18 [resource.proof_obligation] 20 resource.proof_obligation.theorems 25 resource.axiom_selection_method || AxiomSelection::METHODS.first 29 resource.specific_axiom_selection.try(field) || default_value
|
/ontohub/app/controllers/api/v1/ |
H A D | actions_controller.rb | 7 if resource.ready? 18 if resource.resource.respond_to?(:locid) 19 resource.resource.locid 21 url_for(resource.resource)
|
/ontohub/app/viewhelpers/ |
H A D | logic_viewhelper.rb | 5 def initialize(resource) 6 @resource = resource 16 :ontologies, @resource.ontologies.size], 18 Ontology.distributed_in(@resource).size], 21 Ontology.also_distributed_in(@resource).size], 27 fetcher = GraphDataFetcher.new(center: @resource)
|
/ontohub/lib/hets/dg/ |
H A D | parser.rb | 4 attr_accessor :resource, :callback 6 def initialize(resource) 7 self.resource = resource 11 input = resource.respond_to?(:close) ? resource : File.open(resource)
|
/ontohub/app/models/ |
H A D | action.rb | 4 belongs_to :resource, polymorphic: true 6 attr_accessible :initial_eta, :resource 20 if resource.nil? 22 elsif resource.respond_to?(:state) 23 resource.state 24 elsif resource.respond_to?(:status) 25 resource.status 27 raise NoMethodError, "resource does know neither state nor status." 32 if resource.respond_to?(:ready?) 33 resource [all...] |
/ontohub/app/helpers/users/ |
H A D | registrations_helper.rb | 3 resource.api_keys.valid.first 7 ApiKey.new(user: resource)
|
/ontohub/spec/factories/ |
H A D | action_factory.rb | 3 association :resource, factory: :ontology
|
/ontohub/app/controllers/ |
H A D | proofs_controller.rb | 11 if resource.valid? 12 resource.save! 23 def resource method in class:ProofsController 24 @resource ||= resource_class.new(params) 28 resource.ontology 32 if resource.theorem? 33 url_for([resource.proof_obligation, :proof_attempts]) 35 url_for([resource.proof_obligation.ontology, :theorems])
|
H A D | users_controller.rb | 13 @versions = resource.ontology_versions.latest.limit(10).all 14 @failed_versions = resource.ontology_versions.failed 15 @comments = resource.comments.latest.limit(10).all 18 render :json => resource.to_json(:only => [:name, :name]) 21 render :xml => resource.to_xml(:only => [:id, :name])
|
H A D | languages_controller.rb | 29 @mappings_from = resource.mappings_from 30 @mappings_to = resource.mappings_to 31 @serializations = resource.serializations 32 @ontologies = resource.ontologies 33 @relation_list ||= RelationList.new [resource, :supports], 35 :collection => resource.supports,
|
H A D | repository_directories_controller.rb | 9 if resource.valid? 10 resource.save 19 def resource method in class:RepositoryDirectoriesController 25 @repository ||= resource.repository 29 success_message = t('repository_directory.create', name: resource) 35 url: fancy_repository_path(repository, path: resource.path), 36 text: resource.name, 42 created_directories = resource.created_directories
|
H A D | repositories_controller.rb | 11 resource.user = current_user 19 resource.convert_to_local! if params[:un_mirror] 31 resource.destroy_asynchronously 35 redirect_to resource 39 resource.undestroy 41 resource.reload 43 redirect_to resource 52 def resource method in class:RepositoriesController
|
H A D | adjoints_controller.rb | 8 @source = resource.translation
|
H A D | general_mappings_controller.rb | 7 @source = resource.source
|
H A D | language_mappings_controller.rb | 16 @adjoints = resource.adjoints
|
H A D | oops_requests_controller.rb | 7 raise ActiveRecord::RecordNotFound, 'Not Found' unless resource 9 respond_with resource 16 respond_with(*resource_chain, ontology_version, resource) 34 def resource method in class:OopsRequestsController
|
/ontohub/app/controllers/polymorphic_resource/ |
H A D | base.rb | 12 resource.user = current_user 16 if resource.errors.empty? 17 render :partial => resource 26 authorize! :destroy, resource 27 resource.destroy
|
/ontohub/lib/ |
H A D | hets.rb | 18 def self.qualified_loc_id_for(resource) 19 locid = URI.escape(resource.versioned_locid) 23 def self.parse_via_api(resource, hets_options, structure_only: false) 27 parse_caller.call(qualified_loc_id_for(resource), with_mode: mode) 31 def self.prove_via_api(resource, prove_options) 34 prove_caller.call(qualified_loc_id_for(resource)) 38 def self.provers_via_api(resource, provers_options) 41 provers_caller.call(qualified_loc_id_for(resource)) 45 def self.filetype(resource) 46 iri = qualified_loc_id_for(resource) [all...] |
H A D | iri_url_builder.rb | 9 attr_accessor :resource 11 def initialize(resource) 12 self.resource = resource 36 resource.try(:current_version) || resource
|
/ontohub/app/controllers/users/ |
H A D | registrations_controller.rb | 11 def after_inactive_sign_up_path_for(resource) 15 def after_sign_up_path_for(resource)
|
/ontohub/spec/models/ |
H A D | action_spec.rb | 34 let(:action) { create :action, resource: resource } 37 context 'on resource with state' do 38 let(:resource) { mock_model('Resource', state: status) } 45 context 'on resource with status' do 46 let(:resource) { mock_model('Resource', status: status) } 53 context 'on resource w/o anything' do 54 let(:resource) { mock_model('Resource') } 61 context 'without a resource' do 62 let(:resource) { ni [all...] |
/ontohub/app/controllers/admin/ |
H A D | users_controller.rb | 14 resource.skip_reconfirmation! 15 resource.update_attributes({email: params['user']['email'],
|