Building a test suite
scottkellum opened this issue · comments
Sam,
I am playing around with building a test suite for this stuff as I dive in but am having trouble getting the ruby working. Are you building a gem after each change to test? Seems like there should be a better way.
Attached is my work, hoping to tackle random numbers and stuff to get back into this:
scottkellum/sassy-math@f7c3654
Planning on rolling this stuff into modular scale, and this project into Compass.
Actually, what I did was I turned the SassyMath folder into a Compass project, put the functions I'm building inside config.rb, then tested them. Pull down and you should see what I've done.
If you'd like my help with MS, I'm happy to lend a hand!
Also, I'm sure theres a way to do SassScript with just Sass, but couldn't find where to put the ruby so I did it through Compass. There also seems like there should be a way to define variables through Ruby, but couldn't figure out how.
Sent from my iPad
On Jun 9, 2012, at 12:32 AM, Scott Kellumreply@reply.github.com wrote:
Sam,
I am playing around with building a test suite for this stuff as I dive in but am having trouble getting the ruby working. Are you building a gem after each change to test? Seems like there should be a better way.
Attached is my work, hoping to tackle random numbers and stuff to get back into this:
scottkellum/sassy-math@f7c3654Planning on rolling this stuff into modular scale, and this project into Compass.
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19
Ah, I see what you did here. Wish Sass would watch changes to the .rb files. Would love if you helped out with MS, but I still want to know what’s going on. The multi-base and sorting stuff is particularly processor intensive with just Sass.
Yeah Sass script confuses me. I am used to this: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#sassscript
Ruby stuff seems like it is appending the Sass/Compass programs, not leveraging their intended toolsets.
Yup, that's exactly what you're doing. If it doesn't exist, build it!
There are two huge advantages to building out in Ruby: first is full access to native Ruby APIs, functions, extensions, the lot. Second is performance skyrockets. For instance, I noticed with Math that the nth-root function was essentially unusable; cubed root of 100 killed the entire process for instance. Rebuilt in Ruby, it's basically an instant compile.
~ Sam Richard
http://snug.ug
On Saturday, June 9, 2012 at 8:28 AM, Scott Kellum wrote:
Ah, I see what you did here. Wish Sass would watch changes to the .rb files. Would love if you helped out with MS, but I still want to know what’s going on. The multi-base and sorting stuff is particularly processor intensive with just Sass.
Yeah Sass script confuses me. I am used to this: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#sassscript
Ruby stuff seems like it is appending the Sass/Compass programs, not leveraging their intended toolsets.
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6219356
Ruby 1.9.2 has a solid built in random function. Too bad OS X comes with 1.8.7...
Yeah this thing is damn fast.
I like our rand function, and as I was trying to get rand to work, couldn't think of a real reason to use it, do you?
~ Sam Richard
http://snug.ug
On Saturday, June 9, 2012 at 10:33 AM, Scott Kellum wrote:
Ruby 1.9.2 has a solid built in random function. Too bad OS X comes with 1.8.7...
Yeah this thing is damn fast.
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220312
Would be awesome to randomize colors if you can’t decide. Recompile until it looks nice :)
Scott Kellum
scott@scottkellum.com
(347) 422-7572
scottkellum.com
On Saturday, June 9, 2012 at 10:35 AM, Snugug wrote:
I like our rand function, and as I was trying to get rand to work, couldn't think of a real reason to use it, do you?
~ Sam Richard
http://snug.ugOn Saturday, June 9, 2012 at 10:33 AM, Scott Kellum wrote:
Ruby 1.9.2 has a solid built in random function. Too bad OS X comes with 1.8.7...
Yeah this thing is damn fast.
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220312
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220322
True, but then you'd need to copy the values out of your CSS or @debug a variable out because you couldn't reliably capture the result as each call of rand() would produce a different result.
Sam Richard
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Saturday, June 9, 2012 at 10:36 AM, Scott Kellum wrote:
Would be awesome to randomize colors if you can’t decide. Recompile until it looks nice :)
Scott Kellum
scott@scottkellum.com (mailto:scott@scottkellum.com)
(347) 422-7572scottkellum.com (http://scottkellum.com)
On Saturday, June 9, 2012 at 10:35 AM, Snugug wrote:
I like our rand function, and as I was trying to get rand to work, couldn't think of a real reason to use it, do you?
~ Sam Richard
http://snug.ugOn Saturday, June 9, 2012 at 10:33 AM, Scott Kellum wrote:
Ruby 1.9.2 has a solid built in random function. Too bad OS X comes with 1.8.7...
Yeah this thing is damn fast.
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220312
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220322
Reply to this email directly or view it on GitHub:
https://github.com/scottkellum/Sassy-math/issues/19#issuecomment-6220338