gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump/syndication rss.py atom.py syndicator.py abstract.py
Date Tue, 18 May 2004 22:51:00 GMT
ajack       2004/05/18 15:51:00

  Modified:    python/gump/syndication Tag: MultiRunner rss.py atom.py
                        syndicator.py abstract.py
  Log:
  Safety check-in...
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.23.2.4  +7 -8      gump/python/gump/syndication/rss.py
  
  Index: rss.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/rss.py,v
  retrieving revision 1.23.2.3
  retrieving revision 1.23.2.4
  diff -u -r1.23.2.3 -r1.23.2.4
  --- rss.py	18 May 2004 22:37:27 -0000	1.23.2.3
  +++ rss.py	18 May 2004 22:51:00 -0000	1.23.2.4
  @@ -263,22 +263,21 @@
           channel.addItem(item)
              
   class RSSSyndicator(AbstractSyndicator):
  -    def __init__(self):
  -        AbstractSyndicator.__init__(self)
  +    def __init__(self,run):
  +        AbstractSyndicator.__init__(self,run)
           self.gumpImage=Image('http://gump.apache.org/images/bench.png',	\
                       'Apache Gump', \
                       'http://gump.apache.org/')
           
  -    def syndicate(self,run):
  +    def syndicate(self):
           
           # Main syndication document
  -        self.run = run
           self.workspace=run.getWorkspace()   
           self.rssFile=self.run.getOptions().getResolver().getFile(self.workspace,'rss','.xml',1)
     
           self.rssUrl=self.run.getOptions().getResolver().getUrl(self.workspace,'rss','.xml')
       
           self.rss=RSS(self.rssUrl,self.rssFile,	\
  -            Channel('Jakarta Gump',		\
  +            Channel('Apache Gump',		\
                       self.workspace.logurl,	\
                       """Life is like a box of chocolates""", \
                   self.gumpImage))
  
  
  
  1.16.2.4  +8 -9      gump/python/gump/syndication/atom.py
  
  Index: atom.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/atom.py,v
  retrieving revision 1.16.2.3
  retrieving revision 1.16.2.4
  diff -u -r1.16.2.3 -r1.16.2.4
  --- atom.py	18 May 2004 22:37:27 -0000	1.16.2.3
  +++ atom.py	18 May 2004 22:51:00 -0000	1.16.2.4
  @@ -165,21 +165,20 @@
           stream.close()  
           
   class AtomSyndicator(AbstractSyndicator):
  -    def __init__(self):
  -        AbstractSyndicator.__init__(self)
  +    def __init__(self,run):
  +        AbstractSyndicator.__init__(self,run)
           
  -    def syndicate(self,run):
  +    def syndicate(self):
           
           # Main syndication document
  -        self.run = run
  -        self.workspace=run.getWorkspace()   
  +        self.workspace=self.run.getWorkspace()   
           
           feedFile=self.run.getOptions().getResolver().getFile(self.workspace,'atom','.xml',1)
     
           feedUrl=self.run.getOptions().getResolver().getAbsoluteUrl(self.workspace,'atom','.xml')
       
           self.feed=AtomFeed(feedUrl,feedFile,	\
                           'workspace',	\
  -                       'Jakarta Gump',		\
  +                       'Apache Gump',		\
                           self.workspace.logurl,	\
                           """Life is like a box of chocolates""")
                       
  
  
  
  1.19.2.3  +6 -12     gump/python/gump/syndication/syndicator.py
  
  Index: syndicator.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/syndicator.py,v
  retrieving revision 1.19.2.2
  retrieving revision 1.19.2.3
  diff -u -r1.19.2.2 -r1.19.2.3
  --- syndicator.py	18 May 2004 22:37:27 -0000	1.19.2.2
  +++ syndicator.py	18 May 2004 22:51:00 -0000	1.19.2.3
  @@ -14,9 +14,7 @@
   # limitations under the License.
   
   """
  -
       Syndicate
  -    
   """
   
   import socket
  @@ -33,14 +31,10 @@
   
   class Syndicator(AbstractRunActor):
       
  -    def __init__(self,run):      
  -        
  +    def __init__(self,run):              
           AbstractRunActor.__init__(self,run)              
           
  -    def processOtherEvent(self,event):
  -            
  -        workspace=self.run.getWorkspace()        
  -        
  +    def processOtherEvent(self,event):            
           if isinstance(event,FinalizeRunEvent):
             
               #
  @@ -55,8 +49,8 @@
           #
           try:    
               from gump.syndication.rss import RSSSyndicator
  -            simple=RSSSyndicator()
  -            simple.syndicate(run)    
  +            simple=RSSSyndicator(run)
  +            simple.syndicate()    
           except:
               log.error('Failed to generate RSS Feeds', exc_info=1)    
           
  @@ -65,8 +59,8 @@
           #
           try:
               from gump.syndication.atom import AtomSyndicator
  -            atom=AtomSyndicator()
  -            atom.syndicate(run)
  +            atom=AtomSyndicator(run)
  +            atom.syndicate()
           except:
               log.error('Failed to generate Atom Feeds', exc_info=1)  
               
  
  
  
  1.1.2.3   +10 -9     gump/python/gump/syndication/Attic/abstract.py
  
  Index: abstract.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/syndication/Attic/abstract.py,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- abstract.py	18 May 2004 20:10:45 -0000	1.1.2.2
  +++ abstract.py	18 May 2004 22:51:00 -0000	1.1.2.3
  @@ -72,22 +72,23 @@
   from gump.model.project import ProjectStatistics
   
   
  -class AbstractSyndicator:
  -    def __init__(self):     pass        
  +class AbstractSyndicator(RunSpecific):
  +    def __init__(self,run):
  +        RunSpecific.__init__(self,run)
           
       #
       # Populate a method called 'syndicateRun(run)'
       #
  -    def syndicate(self,run):
  +    def syndicate(self):
           if not hasattr(self,'syndicateRun'):
  -            raise RuntimeError, 'Complete [' + `self.__class__` + '] with syndicateRun(self,run)'
  +            raise RuntimeError, 'Complete [' + `self.__class__` + '] with syndicateRun(self)'
           
           if not callable(self.syndicateRun):
  -            raise RuntimeException, 'Complete [' + `self.__class__` + '] with a callable
syndicateRun(self,run)'
  +            raise RuntimeException, 'Complete [' + `self.__class__` + '] with a callable
syndicateRun(self)'
           
           log.info('Syndicate run using [' + `self` + ']')
           
  -        self.syndicateRun(run)
  +        self.syndicateRun()
   
       def getProjectContent(self,project,run):
           
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message