I would like to integrate the application version into the source code, so I can package it with the version number (using Rake) and create some helper to display the same informastion in the application. I am not sure about the Ruby/Rails way to accomplish this simple task, in Java we used Jakarta Maven to handle the build process integrating teh version in the configuration files and making it accessible through the source code. Regards. -- Aníbal Rojas http://www.lacaraoscura.com/ anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On 10/18/05, Alex Reuter <reuter-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> Tom Davies <atomgiant@...> writes: > > I have found that when an effect won''t work it is due to a javascript > > error of some sort. If you are using Firefox/Mozilla/Netscape, you > > can type "javascript:" (no quotes) into your address bar and it should > > point you in the right direction. > > Thanks for the tip Tom, but there doesn''t appear to be any javascript errors > in the console. Oh well. I''ll drop this for now, probably shouldn''t have > spent so much time getting a yellow flash to work for a version 0.1 anyway. > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 10/19/05, Aníbal Rojas <anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I would like to integrate the application version into the source > code, so I can package it with the version number (using Rake) and > create some helper to display the same informastion in the > application.First things first, _please_ start a new thread when you''re not replying to the _topic_ of a message. It makes life much easier on people who use threaded news/mail readers. As for your question: you could simply add a step to your package task in the Rakefile that would output a file in, say, ''lib/application_version.rb''. The content of this file could just be the creation of a constant that would be assigned the value of whatever you specify as the package version when you run the package task. Then you can just require that file in ''app/controllers/application.rb'' and output the value of that constant wherever you want the version number to appear in your app. -- Regards, John Wilger ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don''t know," Alice answered. "Then," said the cat, "it doesn''t matter." - Lewis Carrol, Alice in Wonderland
Thanks Jhon, sorry for the typo posting to the list :-s -- Aníbal Rojas http://www.lacaraoscura.com/ anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org On 10/19/05, John Wilger <johnwilger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 10/19/05, Aníbal Rojas <anibalrojas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I would like to integrate the application version into the source > > code, so I can package it with the version number (using Rake) and > > create some helper to display the same informastion in the > > application. > > First things first, _please_ start a new thread when you''re not > replying to the _topic_ of a message. It makes life much easier on > people who use threaded news/mail readers. > > As for your question: you could simply add a step to your package task > in the Rakefile that would output a file in, say, > ''lib/application_version.rb''. The content of this file could just be > the creation of a constant that would be assigned the value of > whatever you specify as the package version when you run the package > task. > > Then you can just require that file in > ''app/controllers/application.rb'' and output the value of that constant > wherever you want the version number to appear in your app. > > -- > Regards, > John Wilger > > ----------- > Alice came to a fork in the road. "Which road do I take?" she asked. > "Where do you want to go?" responded the Cheshire cat. > "I don''t know," Alice answered. > "Then," said the cat, "it doesn''t matter." > - Lewis Carrol, Alice in Wonderland > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >