<< Masa.20110906-update-importer-testcases-migel | 2011 | Masa.20110902-refactoring-testcases-search-migel >>
Goal/Estimate/Evaluation:
suspend
Task
Experiment
module ODDB module View class PopupLogo < HtmlGrid::Component ... def to_html(context) link_attrs = { #"href" => @lookandfeel._event_url(:home) "href" => 'http://www.google.com' }
Result
Note
Consideration
Experiment
def to_html(context) link_attrs = if attrs = @lookandfeel.attributes(:logo) and href = attrs['href'] { "href" => href } else { "href" => @lookandfeel._event_url(:home) } end context.a(link_attrs) { context.img(@attributes) } end
HTML_ATTRIBUTES = {
:logo => {
'width' => '168',
'height' => '95',
'href' => 'http://www.desi.ch',
},
}
Access
Result
Next
Refer
class LookandfeelDesitin < SBSM::LookandfeelWrapper RESULT_FILTER = Proc.new do |seq| (comp = seq.company) && comp.oid == 215 end
Note
Refer
Note
Experiment
def _search_drugs_state(query, stype)
...
@session.set_cookie_input(:resultview, 'pages') if @session.flavor == 'desitin'
state = State::Drugs::Result.new(@session, result)
state.search_query = query
state.search_type = stype
state
end
end
Access
Result
Commit
Pull error
/var/www/oddb.org $ git pull Updating 9f9fa46..f9af421 error: Your local changes to the following files would be overwritten by merge: src/custom/lookandfeelwrapper.rb Please, commit your changes or stash them before you can merge. Aborting
git diff
diff --git a/src/custom/lookandfeelwrapper.rb b/src/custom/lookandfeelwrapper.rb index 9ac7fb1..77b9644 100644 --- a/src/custom/lookandfeelwrapper.rb +++ b/src/custom/lookandfeelwrapper.rb @@ -786,6 +786,7 @@ module ODDB :explain_sort, :compare_backbutton, :custom_tab_navigation, + :ddd_chart, :external_css, :ajax, :home_drugs, @@ -793,6 +794,7 @@ module ODDB :faq_link, :patinfos, :sequences, + :price_history, :ywesee_contact, ] DISABLED = [ :atc_ddd, :legal_note, :navigation, :price_request ] @@ -835,6 +837,14 @@ module ODDB [8,0] => :deductible, } end + PH_END = Date.new(2010,4,10) + def enabled?(event, default=false) + if event == :price_history && @@today < PH_END + true + else + super + end + end def explain_result_components { [0,1] => :explain_original,
Note
Commit
Commit
Experiment
def to_s output = <<-EOS 500:#{@number} EOS #501:#{@article_ean} [@customer_id, @pharmacode].compact.each { |id| #output << sprintf("502:%s\n", id) output << sprintf("501:%s\n", id) }
Run
Setup
masa@masa ~/ywesee/globopharm.xmlconv.bbmb.ch $ cp input.xml xml_orders/
Access
Result
... 300:4 301:20110905 500:1 501:7680542300870 501:1954753 520:2 521:PCE 500:2 501:7680542300528 501:1954724 520:1 521:PCE 500:3 501:7680486270215 501:1342257 520:1 521:PCE ...
Problem
... 20 / 187 Estimate total: 54.78 [m] It will be done in: 48.92 [m] 21 / 187 Estimate total: 52.65 [m] It will be done in: 46.74 [m] 22 / 187 Estimate total: 51.55 [m] It will be done in: 45.48 [m] /usr/lib64/ruby/site_ruby/1.8/odba/cache.rb:324: [BUG] Segmentation fault
... 7 / 571 Estimate total: 6.12 [h] It will be done in: 6.04 [h] 8 / 571 Estimate total: 5.42 [h] It will be done in: 5.34 [h] /usr/lib64/ruby/site_ruby/1.8/odba/stub.rb:179: [BUG] Segmentation fault
324 def fetch_or_do(obj_id, odba_caller, &block) # :nodoc: 325 if (cache_entry = fetch_cache_entry(obj_id)) && cache_entry._odba_object 326 cache_entry.odba_add_reference(odba_caller) 327 cache_entry.odba_object 328 else 329 block.call 330 end 331 end
class Array .. 178 def -(stub) 179 self._odba_minus(stub.odba_instance) 180 end
Note
Reference
suspend
Refer to
migel server side
Question