view · edit · sidebar · attach · print · history

20120410-update-migel-swissindex-updater-job-fiparsed-narcotics-error

<< | Index | >>


Summary

Commits

Index

    • rcov/simplercov

rcov/simplercov

ERROR:  Error installing rcov:
        ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb
**** Ruby 1.9 is not supported. Please switch to simplecov ****


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/rcov-1.0.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/rcov-1.0.0/ext/rcovrt/gem_make.out

But, It seems that simplecov and test-unit has some problem..
suspend

Refs

Stub problem

all model stub are reported as error by this method.

module AccessorCheckMethod
    def define_check_class_methods(check_class_list)
      check_class_list.each do |accessor, klasses|
        define_method("#{accessor.to_s}=") do |arg|
          unless klasses.is_a?(Array)
            klasses = [klasses]
          end 
          klasses << "NilClass"
          klasses.uniq!
          if klasses.include?(arg.class.to_s) 
            instance_variable_set("@#{accessor.to_s}", arg)
          else
            arg_class = arg.class
            arg = if arg.respond_to?(:to_s)
                    arg.to_s[0,10]
                  end 
            raise TypeError.new("'#{arg.to_s}'(#{arg_class}) should be #{klasses.join(' or ')}")
          end 
        end 
      end 
    end 
  end 

Zbarcode app

Refs


create search api

index definition file is etc/index_definitions.yaml

compare search by ean13
in src/state/drugs/compare.rb

 if @session.user_input(:pointer)
      @package = nil 
      self
    elsif ean13 = @session.user_input(:ean13)
      @package = @session.app.package_by_ikskey(ean13.to_s[4,8])
    elsif term = @session.user_input(:search_query)
      @package = ODDB::Package.find_by_name_with_size term
    end 
    if @package.is_a?(ODDB::Package)
      begin
...
  • ODBA.cache.index_matches(index_name, query)
  • ODBA.cache.retrieve_from_index("index_name", query)

http://oddb.yasuhiro.org/de/gcc/api_search/ean/7680393540203

view · edit · sidebar · attach · print · history
Page last modified on April 11, 2012, at 07:44 PM