<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/lib/puppet/util/rails, branch master</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>Code smell: Two space indentation</title>
<updated>2010-07-10T01:12:17+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-07-10T01:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3180b9d9b2c844dade1d361326600f7001ec66dd'/>
<id>3180b9d9b2c844dade1d361326600f7001ec66dd</id>
<content type='text'>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replaced 106806 occurances of ^( +)(.*$) with

The ruby community almost universally (i.e. everyone but Luke, Markus, and the other eleven people
who learned ruby in the 1900s) uses two-space indentation.

3 Examples:

    The code:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
            element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
            assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    becomes:
        end

        # Tell getopt which arguments are valid
        def test_get_getopt_args
          element = Setting.new :name =&gt; "foo", :desc =&gt; "anything", :settings =&gt; Puppet::Util::Settings.new
          assert_equal([["--foo", GetoptLong::REQUIRED_ARGUMENT]], element.getopt_args, "Did not produce appropriate getopt args")

    The code:
            assert_equal(str, val)

            assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    becomes:
          assert_equal(str, val)

          assert_instance_of(Float, result)

        end

        # Now test it with a passed object
    The code:
        end

        assert_nothing_raised do
            klass[:Yay] = "boo"
            klass["Cool"] = :yayness
        end

    becomes:
        end

        assert_nothing_raised do
          klass[:Yay] = "boo"
          klass["Cool"] = :yayness
        end
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixing most of the broken tests in test/</title>
<updated>2010-02-17T14:50:53+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@reductivelabs.com</email>
</author>
<published>2010-01-31T05:36:32+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=9c867e6d79dcc56cd34683c9a339dc729ad2d291'/>
<id>9c867e6d79dcc56cd34683c9a339dc729ad2d291</id>
<content type='text'>
This involves a bit of refactoring in the rest
of the code to make it all work, but most of the
changes are fixing or removing old tests.

Signed-off-by: Luke Kanies &lt;luke@reductivelabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This involves a bit of refactoring in the rest
of the code to make it all work, but most of the
changes are fixing or removing old tests.

Signed-off-by: Luke Kanies &lt;luke@reductivelabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial implementation of a "cache accumulator" behavior.</title>
<updated>2009-04-22T04:39:37+00:00</updated>
<author>
<name>Ethan Rowe</name>
<email>ethan@endpoint.com</email>
</author>
<published>2009-04-06T15:34:12+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=75f1923049d5e1edfd3b9e9790a96b487cdef305'/>
<id>75f1923049d5e1edfd3b9e9790a96b487cdef305</id>
<content type='text'>
Mix Puppet::Util::CacheAccumulator into an ActiveRecord-like class, and then for any
attribute in that class on which you are likely to call find_or_create_by_*, specify:

 accumulates :foo

and instead of :find_or_create_by_foo use :accumulate_by_foo.

The class will cache known results keyed by values of :foo.

Do an initial bulk-lookup: class.accumulate_by_foo('foo1', 'foo2', 'foo3', 'foo4')
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mix Puppet::Util::CacheAccumulator into an ActiveRecord-like class, and then for any
attribute in that class on which you are likely to call find_or_create_by_*, specify:

 accumulates :foo

and instead of :find_or_create_by_foo use :accumulate_by_foo.

The class will cache known results keyed by values of :foo.

Do an initial bulk-lookup: class.accumulate_by_foo('foo1', 'foo2', 'foo3', 'foo4')
</pre>
</div>
</content>
</entry>
<entry>
<title>Changing rails value serialization to deal with booleans</title>
<updated>2009-04-22T04:39:37+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@madstop.com</email>
</author>
<published>2009-04-09T22:43:17+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=7a91e1f5c03ed02eed4c45fddd740b899650bf36'/>
<id>7a91e1f5c03ed02eed4c45fddd740b899650bf36</id>
<content type='text'>
The database was automatically converting booleans
to strings, and value comparison was not working correctly
as a result.

Signed-off-by: Luke Kanies &lt;luke@madstop.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The database was automatically converting booleans
to strings, and value comparison was not working correctly
as a result.

Signed-off-by: Luke Kanies &lt;luke@madstop.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring the Rails integration</title>
<updated>2009-04-22T04:39:36+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@madstop.com</email>
</author>
<published>2009-04-08T21:56:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=6314745c054ba9482f145b4ec798431ac2f300a3'/>
<id>6314745c054ba9482f145b4ec798431ac2f300a3</id>
<content type='text'>
This moves all code from the Parser class into
the ActiveRecord classes, and gets rid of
'ar_hash_merge'.

Signed-off-by: Luke Kanies &lt;luke@madstop.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves all code from the Parser class into
the ActiveRecord classes, and gets rid of
'ar_hash_merge'.

Signed-off-by: Luke Kanies &lt;luke@madstop.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rails serialization module to help serialize/unserialize some Puppet Objects</title>
<updated>2009-02-06T10:58:49+00:00</updated>
<author>
<name>Brice Figureau</name>
<email>brice-puppet@daysofwonder.com</email>
</author>
<published>2009-01-29T19:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=3acea41bb879c314d16413339beb8c9cf5705c1e'/>
<id>3acea41bb879c314d16413339beb8c9cf5705c1e</id>
<content type='text'>
Signed-off-by: Brice Figureau &lt;brice-puppet@daysofwonder.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Brice Figureau &lt;brice-puppet@daysofwonder.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Removing the Id tags from all of the files</title>
<updated>2007-10-04T02:55:41+00:00</updated>
<author>
<name>Luke Kanies</name>
<email>luke@madstop.com</email>
</author>
<published>2007-10-04T02:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=fd11603fe47668ba72f0d3f2b984174331a0a154'/>
<id>fd11603fe47668ba72f0d3f2b984174331a0a154</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Major rework of the rails feature.  Changed the relationship between </title>
<updated>2007-06-12T00:31:16+00:00</updated>
<author>
<name>ballman</name>
<email>ballman@980ebf18-57e1-0310-9a29-db15c13687c0</email>
</author>
<published>2007-06-12T00:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=68e37a99d5357f022662f9ba7cc564c48aed21a9'/>
<id>68e37a99d5357f022662f9ba7cc564c48aed21a9</id>
<content type='text'>
host and facts (now many-to-many with fact_name through fact_values).  
Also changed the relationship between resource and params (similarly 
many-to-many with param_names through param_values).

Added the resource_tags and puppet_tags.  The latter has the tag names 
and the former is the man-to-many link with resources. 

There is a little clean up left but the schema is in order.  Also a test 
for the tags stuff is required.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2565 980ebf18-57e1-0310-9a29-db15c13687c0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
host and facts (now many-to-many with fact_name through fact_values).  
Also changed the relationship between resource and params (similarly 
many-to-many with param_names through param_values).

Added the resource_tags and puppet_tags.  The latter has the tag names 
and the former is the man-to-many link with resources. 

There is a little clean up left but the schema is in order.  Also a test 
for the tags stuff is required.



git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2565 980ebf18-57e1-0310-9a29-db15c13687c0
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring some of the rails code.  The speed is now pretty good, but the tagging stuff does not seem to be working and is certainly working very ineffficiently.  Blake says he is going to take a look at that.</title>
<updated>2007-03-24T21:24:29+00:00</updated>
<author>
<name>luke</name>
<email>luke@980ebf18-57e1-0310-9a29-db15c13687c0</email>
</author>
<published>2007-03-24T21:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=2c3abbeef6298683dd199f2a5e663caaaa88dffa'/>
<id>2c3abbeef6298683dd199f2a5e663caaaa88dffa</id>
<content type='text'>
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2350 980ebf18-57e1-0310-9a29-db15c13687c0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2350 980ebf18-57e1-0310-9a29-db15c13687c0
</pre>
</div>
</content>
</entry>
<entry>
<title>All rails *and* language tests now pass, with the exception of a language/resource test that passes by itself but fails when run as part of the whole suite.  Also, I added deletion where appropriate, so that unspecified resources, parameters, and facts are now deleted, as one would expect.</title>
<updated>2006-12-19T04:57:57+00:00</updated>
<author>
<name>luke</name>
<email>luke@980ebf18-57e1-0310-9a29-db15c13687c0</email>
</author>
<published>2006-12-19T04:57:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=9f4870637ce57d548d23c0b3330200014327c268'/>
<id>9f4870637ce57d548d23c0b3330200014327c268</id>
<content type='text'>
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1951 980ebf18-57e1-0310-9a29-db15c13687c0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1951 980ebf18-57e1-0310-9a29-db15c13687c0
</pre>
</div>
</content>
</entry>
</feed>
