/ontohub/spec/factories/ |
H A D | api_key_factory.rb | 4 state { 'valid' } 7 state { 'invalid' }
|
H A D | hets_instance_factory_factory.rb | 18 state { 'free' }
|
/ontohub/db/migrate/ |
H A D | 20150807083608_add_hets_instance_load_balancing_attributes.rb | 3 add_column :hets_instances, :state, :string 7 add_index :hets_instances, :state
|
/ontohub/lib/ |
H A D | proof_evaluation_state_updater.rb | 4 attr_reader :proof_attempt, :state, :message, :theorem 6 def initialize(proof_attempt, state, message = nil) 8 @state = state.to_sym 14 proof_attempt.update_state!(state, message) 22 most_successful(theorem.proof_attempts.select(:state).map(&:state)) 33 theorem.proof_attempts.select(%i(id number)).state(:failed)
|
H A D | state.rb | 16 def self.terminal?(state) 17 TERMINAL_STATES.include?(state) 24 def self.success_order(state) 25 STATES.index(state)
|
H A D | state_updater.rb | 7 scope :state, ->(*states){ 8 where state: states.map(&:to_s) 36 error = "Nested exception on updating state of #{self.class} #{id}\n" 42 state: 'failed', 53 def update_state!(state, error_message = nil) 54 update_attributes!({state: state.to_s,
|
/ontohub/spec/lib/ |
H A D | proof_evaluation_state_updater_spec.rb | 4 context 'single proof attempt from pending state' do 5 let(:proof_attempt) { create :proof_attempt, state: 'pending' } 8 %i(done failed processing).each do |state| 9 context "to #{state}" do 10 let(:pesu) { ProofEvaluationStateUpdater.new(proof_attempt, state) } 13 it "update the state to #{state}" do 14 expect(proof_attempt.state).to eq(state.to_s) 17 it "theorem is #{state}" d [all...] |
H A D | hets_instance_foce_free_worker_spec.rb | 10 let!(:hets_instance) { create :hets_instance, state: 'free' } 18 expect(hets_instance.reload.state).to eq('free') 23 let!(:hets_instance) { create :hets_instance, state: 'force-free' } 31 expect(hets_instance.reload.state).to eq('force-free') 36 let!(:hets_instance) { create :hets_instance, state: 'busy' } 43 it 'change the state' do 44 expect(hets_instance.reload.state).to eq('force-free')
|
H A D | timeout_worker_spec.rb | 26 context 'when the state is processing' do 34 it 'will set the state of the ontology version to failed' do 35 expect(ontology_version.state).to eq('failed') 42 it 'will set the state of the ontology to failed' do 43 expect(ontology.state).to eq('failed') 49 let(:ontology_version) { create :ontology_version, state: 'done' } 51 it 'will not touch the state of the ontology_version' do 53 to_not change(ontology_version, :state) 56 it 'will not touch the state of the ontology' do 58 to_not change(ontology, :state) [all...] |
H A D | repository_pulling_worker_spec.rb | 7 shared_examples 'perform' do |state, minutes, created_jobs_count| 8 context("state #{state}, imported " + 12 {state: state.to_s,
|
/ontohub/app/viewhelpers/ |
H A D | status_overview_viewhelper.rb | 5 states_map(0).merge!(Ontology.group(:state).count) 15 Ontology::States::STATES.each do |state| 16 hash[state] = default
|
H A D | status_ontology_error_viewhelper.rb | 14 Ontology.where(state: STATE) 19 where(state: STATE).
|
/ontohub/features/step_definitions/ |
H A D | ontology_state_steps.rb | 6 Given(/^there is an ontology with a "([^"]+)" version$/) do |state| 7 @ontology_version = FactoryGirl.create :ontology_version, state: state 9 @ontology.state = state 21 When(/^we change the state of the ontology to: (\w+)$/) do |state| 22 @state = state 23 @ontology_version.update_state!(state) [all...] |
H A D | processing_ontologies_status_steps.rb | 27 Given(/^i have (\d+) (#{Ontology::States::STATES.join('|')}) ontologies$/) do |count, state| 28 @ontology_versions = FactoryGirl.create_list(:ontology_version, count, state: state) 31 expect(ontology.state).to eq(state)
|
/ontohub/app/models/ |
H A D | api_key.rb | 6 attr_accessible :key, :state 13 validates :state, inclusion: {in: STATES} 15 scope :valid, -> { where(state: 'valid') } 26 self.state = 'invalid' 33 set_valid! unless state 42 self.state = 'valid'
|
H A D | hets_instance.rb | 27 attr_accessible :name, :uri, :state, :queue_size 33 validate :state, inclusion: {in: STATES} 40 where(state: 'free') 43 where(state: 'force-free') 46 where(state: 'busy') 137 self.state = 'free' 142 if reload.state == 'busy' 143 self.state = 'force-free' 149 self.state = 'busy'
|
/ontohub/app/models/ontology/ |
H A D | states.rb | 7 STATES.each do |state| 8 eval "def #{state}?; state == '#{state}'; end" 15 state(:failed).without_parent.find_each do |ontology| 22 select("state, count(*) AS count").group(:state)
|
H A D | versions.rb | 42 return self.ontology_version if self.state == 'done' 44 where(ontology_id: self, state: 'done'). 59 state = "done" 63 "(SELECT ontology_id FROM ontology_versions WHERE state = ?)", 64 state 70 state = "done" 71 stmt = ['state != ?', state] if user == true 73 stmt = ['state != ? AND ' + 75 'WHERE user_id = ?)', state, use [all...] |
H A D | validations.rb | 12 validates :state, inclusion: {in: Ontology::States::STATES}
|
/ontohub/app/helpers/ |
H A D | state_helper.rb | 4 resource.state == 'failed' && 34 "evaluation-state label #{State::STATE_LABEL[resource.state.to_sym]}", 39 state: resource.state, 43 state(resource) 47 def state(resource) method in class:StateHelper 48 html = content_tag(:span, t("states.#{resource.state}")) 50 unless State::IDLE_STATES.include?(resource.state) 54 if resource.state [all...] |
/ontohub/app/models/ontology_version/ |
H A D | states.rb | 26 msg = [state] 48 ontology.state = state 51 ontology.children.update_all(state: ontology.state)
|
H A D | oops_requests.rb | 9 request.nil? || request.state == 'failed'
|
/ontohub/spec/models/ |
H A D | api_key_spec.rb | 15 expect(described_class.where(state: 'valid').to_a). 21 expect(old_key.state).to eq('invalid') 36 it 'unacceptable state' do 37 invalid_key = build(:api_key, state: 'nice state')
|
H A D | hets_instance_spec.rb | 87 context 'try again re-checks up-state' do 137 let!(:hets_instance) { create :hets_instance, state: 'free' } 153 expect(chosen.state).to eq('free') 159 let!(:free) { create :hets_instance, state: 'free' } 160 let!(:force_free) { create :hets_instance, state: 'force-free' } 161 let!(:busy) { create :hets_instance, state: 'busy' } 179 expect(instance.state).to eq('busy') 202 expect(instance.state).to eq('free') 213 expect(instance.state).to eq('busy') 220 expect(chosen.state) [all...] |
/ontohub/app/controllers/ |
H A D | home_controller.rb | 9 where(state: 'done').limit(10)
|