SketchUcation Premium Membership

 

 

SketchUp Ruby API Extension Library

Moderator: Jim

Re: SketchUp Ruby API Extension Library

Postby Jim » Wed Jun 17, 2009 4:53 pm

Any ideas on how to create a test suite for these methods? Is it needed?
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: SketchUp Ruby API Extension Library

Postby RickW » Wed Jun 17, 2009 4:54 pm

thomthom wrote:I think my vote is for one file per class/module.
I see it as either you have the skx extension - or you haven't.

Code: Select all
# One file per object
votes += 1

# One big skx file
rick = "not so sure about that"
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: SketchUp Ruby API Extension Library

Postby thomthom » Wed Jun 17, 2009 4:56 pm

I didn't intend one large skx file, but one file per class/module - instead of one file per method and one folder per class/module.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17923
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp Ruby API Extension Library

Postby ScottLininger » Wed Jun 17, 2009 5:07 pm

Jim wrote:Any ideas on how to create a test suite for these methods? Is it needed?


For now, I think we can move forward without a test suite. We have some internal tools that we might be able to share... I'll check.

Unit tests are a wonderful, wonderful thing, and eventually we will thank ourselves if we build them. But we can get away without 'em for a bit.
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger
SketchUp Team
 
Posts: 170
Joined: Tue Oct 21, 2008 11:17 pm
Location: Boulder, CO

Re: SketchUp Ruby API Extension Library

Postby Jim » Wed Jun 17, 2009 5:09 pm

It seems my basing skx directory structure on Facets structure was premature:

From the facets readme file:

the extension methods are no longer stored on a per-method basis. While dividing the extension methods up on a per-method basis had certain advantages, not the least of which was a simple organization, it proved too granular --more "subatomic" than "atomic". With 2.0 we have address this issue. All the extension methods have now been organized into small tightly related groups.


Now if you get in and look at many of the files in facets, they contain a single line requiring the 'tightly related groups' file. This is not what I intentioned.

So, I do not have an issue consolidating what is already there into fewer files containing related methods.

Is anyone suggesting a single file? It may be an option for 'core' methods that provide essential methods and API fixes.
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: SketchUp Ruby API Extension Library

Postby thomthom » Wed Jun 17, 2009 5:14 pm

I don't think I want one large file. But one per class/module sound like a natural way to keep related (grouped) methods organized. It's easier to get an overview of the skx library as well, if they are all stored in the skx root rather than in many sub folders.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17923
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp Ruby API Extension Library

Postby ScottLininger » Wed Jun 17, 2009 5:43 pm

thomthom wrote:I don't think I want one large file. But one per class/module sound like a natural way to keep related (grouped) methods organized. It's easier to get an overview of the skx library as well, if they are all stored in the skx root rather than in many sub folders.


I agree. :)
- Scott Lininger
SketchUp Software Engineer
Have you visited the Ruby API Docs?
User avatar
ScottLininger
SketchUp Team
 
Posts: 170
Joined: Tue Oct 21, 2008 11:17 pm
Location: Boulder, CO

Re: SketchUp Ruby API Extension Library

Postby Jim » Wed Jun 17, 2009 11:00 pm

I've asked Csaba for a separate forum for this project, so hopefully soon we can have more than one topic...
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: SketchUp Ruby API Extension Library

Postby thomthom » Wed Jun 17, 2009 11:02 pm

Jim wrote:I've asked Csaba for a separate forum for this project, so hopefully soon we can have more than one topic...

Good idea.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17923
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: Thomas Thomassen
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Are you a Premium Member? Get your freebies here. Are you not a Premium Member yet? Upgrade your account to grab these freebies instantly.

Ad Machine
Robot
 
Posts: 2012

Previous

Return to Skx Extension Library

Who is online

Users browsing this forum: No registered users and 1 guest