From transfire at gmail.com Tue Nov 4 22:00:34 2008 From: transfire at gmail.com (Trans) Date: Tue, 4 Nov 2008 19:00:34 -0800 (PST) Subject: [Facets] Anise replaces annotations.rb Message-ID: <13eb0849-4f33-4804-8c1b-8c0afe7ebe6f@i20g2000prf.googlegroups.com> Heads up in upcoming release of Facets, annotations.rb will be deprecated. The new project Anise (http://anise.rubyforge.org) has been spun-off and can be used instead, which is 100% compatible, plus adds some extra features. T. From jason at jvoegele.com Wed Nov 5 19:15:38 2008 From: jason at jvoegele.com (Jason Voegele) Date: Wed, 5 Nov 2008 19:15:38 -0500 Subject: [Facets] Class.by_name Message-ID: <200811051915.38956.jason@jvoegele.com> A while back I built an application that used the Facets Class.by_name extension. This method allowed for retrieving a Class object from a fully-qualified class name, such as: cls = Class.by_name("MyModule::MyClass") Today I dusted off my old application and tried to run it with the latest version of Facets, but it appears that this Class.by_name method no longer exists. Is there a replacement that I can use to load a Class object from a fully-qualified class name? Thanks. [I apologize if this message is sent more than once. I tried sending twice through the Google Groups interface and it never appeared.] -- Jason Voegele A successful [software] tool is one that was used to do something undreamed of by its author. -- S. C. Johnson From transfire at gmail.com Wed Nov 5 21:29:30 2008 From: transfire at gmail.com (Trans) Date: Wed, 5 Nov 2008 21:29:30 -0500 Subject: [Facets] Class.by_name In-Reply-To: <200811051915.38956.jason@jvoegele.com> References: <200811051915.38956.jason@jvoegele.com> Message-ID: <4b6f054f0811051829t3b38390cw94719b10820d6e84@mail.gmail.com> On Wed, Nov 5, 2008 at 7:15 PM, Jason Voegele wrote: > A while back I built an application that used the Facets Class.by_name > extension. This method allowed for retrieving a Class object from a > fully-qualified class name, such as: > > cls = Class.by_name("MyModule::MyClass") > > Today I dusted off my old application and tried to run it with the > latest version of Facets, but it appears that this Class.by_name > method no longer exists. Is there a replacement that I can use to > load a Class object from a fully-qualified class name? > > Thanks. Hi Jason, Yes, I recall that was deprecated and if I remember correctly it was b/c one can just do: constant("MyModule::MyClass") Let me know if that works for you or not. T. From jason at jvoegele.com Fri Nov 7 08:38:01 2008 From: jason at jvoegele.com (Jason Voegele) Date: Fri, 7 Nov 2008 08:38:01 -0500 Subject: [Facets] Class.by_name In-Reply-To: <4b6f054f0811051829t3b38390cw94719b10820d6e84@mail.gmail.com> References: <200811051915.38956.jason@jvoegele.com> <4b6f054f0811051829t3b38390cw94719b10820d6e84@mail.gmail.com> Message-ID: <200811070838.02192.jason@jvoegele.com> On Wednesday 05 November 2008 09:29:30 pm Trans wrote: > Yes, I recall that was deprecated and if I remember correctly it was > b/c one can just do: > > constant("MyModule::MyClass") > > Let me know if that works for you or not. Hi Trans, I tried the above in both Ruby 1.8 and 1.9, but it didn't work in either one. I get this error: NoMethodError: undefined method `constant' for main:Object Do I need to 'require' something to make that work? -- Jason Voegele Such a fine first dream! But they laughed at me; they said I had made it up. From transfire at gmail.com Sat Nov 29 19:29:04 2008 From: transfire at gmail.com (Trans) Date: Sat, 29 Nov 2008 16:29:04 -0800 (PST) Subject: [Facets] Facets 2.5 Message-ID: <9aec1d58-7b6a-4b1e-b587-40b17363b9bc@w34g2000yqm.googlegroups.com> Facets 2.5.0 is an important milestone in the development of Facets. This release has been tested against Rails' ActiveSupport library. As long as Facets is loaded after ActiveSupport, everything should work fine. Of course, there's no counting for real world trials, but all ActiveSupport testcases pass under this scenario. Secondly, this release is the first of a set of down-scaling releases intended to remove any remaining "fat" from the library. By "fat" we mean a couple of things. Some scripts are substantial enough to be on their own, so they have been spun-off into separate largely compatible projects. In this release: If you were using... Use this project instead... annotations.rb Anise bytes.rb RichUnits times.rb command.rb Clio consoleutils.rb A few others scripts have been deprecated althogetgher because they were too weak, such as uploadutils.rb, or highly experimental, such as chain.rb and eventhook.rb. Although this release constitutes an overall slimming down of Facets, two excellent new libraries have been added. 1) *ini.rb* by Jeena Paradies. While YAML is frequently used by Rubyists for configuration files, a full-on serializer like YAML is often overkill. INI files provide a lightweight solution specifically geared for configuration. 2) *filter.rb* by Brian Candler offers lazy evaluation chains of Enumerable methods. This is an elegant way to optimize contiguous maps, selections, etc. --effective even on infinite enumerators. (Note, the name of this library may be changed in the next release.) While work remains to be done, I am happy to say, Facets is finally beginning to approach the level of solidity I set out to achieve just over a year ago. w00t! Special thanks to Brian Candler, Jeena Paradies and Tyler Rick. Enjoy! ### 2.5.0 / 2008-11-23 * 9 Major Changes * added Brian Candler's Enumerator::Filter * added sparse_array.rb (was old harray.rb) * added Jeena Paradies' ini.rb * renamed CacheDelegator to Memoizer * renamed DictionaryMatcher to just Matcher * deprecated bytes.rb and times.rb (use RichUnits instead) * deprecated uploadutils.rb; ziputils.rb will be (use Folio) * deprecated annotations.rb (use Anise instead) * deprecated command.rb and consoleutils.rb (use Clio instead) * 5 Minor Changes * deprecated chain.rb (very expiremental) * deprecated eventhook.rb (moved to ToadCode project) * deprecated tagiter.rb (moved to ToadCode project) * moved Hash#symolize_keys and #stringify_keys to core lib (still recommend #rekey instead though) * switched to git as of 2.4.5 * 4 Bug Fixes * memoize.rb, cache was at class-level, now at instance-level * binding/caller.rb, fixed require for callstack.rb * fixed missing require in string/tabto.rb * Fixed some bugs with Time#ago/Time#hence not changing years correctly when you changed months. (For example, Time.utc(2008, 1, 1).ago(12, :months) incorrectly returned 2009-01-01 instead of 2007-01-01.) Changed Time#ago/Time#hence to still work if passed negative number.