Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Changeset 1053

Show
Ignore:
Timestamp:
11/21/03 00:28:46 (5 years ago)
Author:
nahi
Message:

* Use File.open(...) { |f| f.read } instead of File.open(...).read.

[ruby-dev:21964]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/sample/soap/digraph.rb

    r966 r1053  
    2828end 
    2929 
    30 marshalledString = File.open("digraph_marshalled_string.soap").read 
     30marshalledString = File.open("digraph_marshalled_string.soap") { |f| f.read } 
    3131 
    3232puts marshalledString 
  • trunk/sample/wsdl/amazon/wsdlDriver.rb

    r989 r1053  
    3131 
    3232# You must get 'developer's token" from http://associates.amazon.com/exec/panama/associates/ntg/browse/-/1067662 to use Amazon Web Services 2.0. 
    33 #devtag = File.open(File.expand_path("~/.amazon_key")).read.chomp 
     33#devtag = File.open(File.expand_path("~/.amazon_key")) { |f| f.read }.chomp 
    3434devtag = nil 
    3535 
  • trunk/sample/wsdl/googleSearch/sampleClient.rb

    r966 r1053  
    3838# 
    3939key = q = start = maxResults = filter = restrict = safeSearch = lr = ie = oe = nil 
    40 key = File.open(File.expand_path("~/.google_key")).read.chomp 
     40key = File.open(File.expand_path("~/.google_key")) { |f| f.read }.chomp 
    4141q = "Ruby" 
    4242start = 0 
  • trunk/sample/wsdl/googleSearch/wsdlDriver.rb

    r966 r1053  
    44word = ARGV.shift 
    55# You must get key from http://www.google.com/apis/ to use Google Web APIs. 
    6 key = File.open(File.expand_path("~/.google_key")).read.chomp 
     6key = File.open(File.expand_path("~/.google_key")) { |f| f.read }.chomp 
    77 
    88GOOGLE_WSDL = 'http://api.google.com/GoogleSearch.wsdl' 
  • trunk/test/wsdl/axisArray/test_axisarray.rb

    r1051 r1053  
    11require 'test/unit' 
    2 require 'itemList.rb' 
    32require 'soap/processor' 
    43require 'soap/mapping' 
     
    1211class TestAxisArray < Test::Unit::TestCase 
    1312  def setup 
     13    dir = File.dirname(File.expand_path(__FILE__)) 
     14    $:.push(dir) 
     15    require 'itemList.rb' 
     16    $:.delete(dir) 
    1417    @xml =<<__EOX__ 
    1518<?xml version="1.0" encoding="UTF-8"?> 
  • trunk/test/wsdl/marshal/test_wsdlmarshal.rb

    r1039 r1053  
    88 
    99  def initialize(wsdlfile) 
    10     wsdl = WSDL::Parser.new.parse(File.open(wsdlfile).read
     10    wsdl = WSDL::Parser.new.parse(File.open(wsdlfile) { |f| f.read }
    1111    types = wsdl.collect_complextypes 
    1212    @opt = { 
     
    5959    raise if File.exist?("Person.rb") 
    6060    system("ruby #{pathname("../../../bin/wsdl2ruby.rb")} --classdef --wsdl #{pathname("person.wsdl")} --force") 
    61     person_org = File.open(pathname("person_org.rb")).read 
    62     person_new = File.open("Person.rb").read 
     61    person_org = File.open(pathname("person_org.rb")) { |f| f.read } 
     62    person_new = File.open("Person.rb") { |f| f.read } 
    6363    assert_equal(person_org, person_new) 
    6464    File.unlink('Person.rb') if File.exist?('Person.rb') 
  • trunk/test/wsdl/test_emptycomplextype.rb

    r983 r1053  
    1212 
    1313  def test_wsdl 
    14     @wsdl = WSDL::Parser.new.parse(File.open(@@filename).read
     14    @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }
    1515  end 
    1616end 
  • trunk/test/wsdl/test_multiplefault.rb

    r1038 r1053  
    1313 
    1414  def test_multiplefault 
    15     @wsdl = WSDL::Parser.new.parse(File.open(@@filename).read
     15    @wsdl = WSDL::Parser.new.parse(File.open(@@filename) { |f| f.read }
    1616    classdefstr = WSDL::SOAP::ClassDefCreator.new(@wsdl).dump 
    1717    yield_eval_binding(classdefstr) do |b| 
  • trunk/test/xsd/test_xmlschemaparser.rb

    r983 r1053  
    77 
    88class TestXMLSchemaParser < Test::Unit::TestCase 
    9   def self.setup(filename) 
    10     @@filename = filename 
     9  def setup 
     10    @file = File.join(File.dirname(__FILE__), 'xmlschema.xml') 
    1111  end 
    1212 
    1313  def test_wsdl 
    14     @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@@filename).read) 
     14    @wsdl = WSDL::XMLSchema::Parser.new.parse(File.open(@file) { |f| f.read }) 
     15    assert_equal(WSDL::XMLSchema::Schema, @wsdl.class) 
     16    assert_equal(1, @wsdl.collect_elements.size) 
    1517  end 
    1618end 
    1719 
    18 TestXMLSchemaParser.setup(File.join(File.dirname(__FILE__), 'xmlschema.xml')) 
    1920 
    2021 
  • trunk/test/xsd/xmlschema.xml

    r1010 r1053  
    11<?xml version="1.0" encoding="utf-8"?> 
    22<xs:schema 
    3     xmlns:mstns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd" 
    4     xmlns="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd" 
    53    attributeFormDefault="qualified" 
    64    elementFormDefault="qualified" 
    7     targetNamespace="http://www.winfessor.com/SoapBoxWebService/MessageDataSet.xsd" 
    8     id="MessageDataSet" 
     5    targetNamespace="urn:jp.gr.jin.rrr.example.fakeschema" 
    96    xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
    107  <xs:element name="MessageDataSet">