<feed xmlns='http://www.w3.org/2005/Atom'>
<title>puppet.git/spec/unit/parameter, branch ticket/master/7841</title>
<subtitle>Puppet repo</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/'/>
<entry>
<title>maint: clean up the spec test headers in bulk.</title>
<updated>2011-04-13T07:36:38+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-04-13T07:35:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=db11770718c61f9ee3d5fcd703c5c0c7c05227ca'/>
<id>db11770718c61f9ee3d5fcd703c5c0c7c05227ca</id>
<content type='text'>
We now use a shebang of: #!/usr/bin/env rspec

This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We now use a shebang of: #!/usr/bin/env rspec

This enables the direct execution of spec tests again, which was lost earlier
during the transition to more directly using the rspec2 runtime environment.
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: just require 'spec_helper', thanks rspec2</title>
<updated>2011-04-08T23:06:57+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@puppetlabs.com</email>
</author>
<published>2011-04-08T23:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=6ed00515e8614233160d74b1c32b75fab27ac722'/>
<id>6ed00515e8614233160d74b1c32b75fab27ac722</id>
<content type='text'>
rspec2 automatically sets a bunch of load-path stuff we were by hand, so we
can just stop. As a side-effect we can now avoid a whole pile of stupid things
to try and include the spec_helper.rb file...

...and then we can stop protecting spec_helper from evaluating twice, since we
now require it with a consistent name.  Yay.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rspec2 automatically sets a bunch of load-path stuff we were by hand, so we
can just stop. As a side-effect we can now avoid a whole pile of stupid things
to try and include the spec_helper.rb file...

...and then we can stop protecting spec_helper from evaluating twice, since we
now require it with a consistent name.  Yay.

Reviewed-By: Pieter van de Bruggen &lt;pieter@puppetlabs.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '2.6.next' into next</title>
<updated>2011-03-23T21:32:59+00:00</updated>
<author>
<name>Max Martin</name>
<email>max@puppetlabs.com</email>
</author>
<published>2011-03-23T21:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab'/>
<id>66d0b16c8a0a55dd79b1b0f0e639f107e552d9ab</id>
<content type='text'>
* 2.6.next:
  Fixed #6562 - Minor kick documentation fix
  (#6658) Propagate ENC connection errors to the agent
  (#4884) Remove typo from spec test
  (#4884) Modify tests to pass on non-OS X systems
  (#4884) Revise new exec tests, add a few more
  (#4884) Add an shell provider for execs
  (#4884) Fix Test::Unit exec tests
  (#4884) Break the exec type out to have a posix provider
  (#4884) Add consistent path validation and behavior
  (#4884) Add expand_path to requiring the spec_helper
  (#4884) Autorequire shared behaviors and method to silence warnings
  (#4884) Fix whitespace
  (#4884) Get rid of open3 require since it wasn't being used
  (#5814) Improved cron type specs
  (#5814) cron_spec shouldn't depend on cron provider

Manually Resolved Conflicts:
	lib/puppet/util/command_line/puppetrun
	spec/spec_helper.rb
	spec/unit/type/exec_spec.rb
	spec/unit/type_spec.rb
	test/ral/type/exec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 2.6.next:
  Fixed #6562 - Minor kick documentation fix
  (#6658) Propagate ENC connection errors to the agent
  (#4884) Remove typo from spec test
  (#4884) Modify tests to pass on non-OS X systems
  (#4884) Revise new exec tests, add a few more
  (#4884) Add an shell provider for execs
  (#4884) Fix Test::Unit exec tests
  (#4884) Break the exec type out to have a posix provider
  (#4884) Add consistent path validation and behavior
  (#4884) Add expand_path to requiring the spec_helper
  (#4884) Autorequire shared behaviors and method to silence warnings
  (#4884) Fix whitespace
  (#4884) Get rid of open3 require since it wasn't being used
  (#5814) Improved cron type specs
  (#5814) cron_spec shouldn't depend on cron provider

Manually Resolved Conflicts:
	lib/puppet/util/command_line/puppetrun
	spec/spec_helper.rb
	spec/unit/type/exec_spec.rb
	spec/unit/type_spec.rb
	test/ral/type/exec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>(#4884) Add consistent path validation and behavior</title>
<updated>2011-03-15T18:55:59+00:00</updated>
<author>
<name>Daniel Pittman</name>
<email>daniel@rimspace.net</email>
</author>
<published>2011-03-15T18:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=c86a980fe9b2f2e109fe7956a1be2705f3fc2ade'/>
<id>c86a980fe9b2f2e109fe7956a1be2705f3fc2ade</id>
<content type='text'>
Many path parameters were implementing their own inconsistent validation
and behavior.  Now those parameters can have a parent class that makes
things a lot more consistent.

Reviewed-by: Matt Robinson and Max Martin
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Many path parameters were implementing their own inconsistent validation
and behavior.  Now those parameters can have a parent class that makes
things a lot more consistent.

Reviewed-by: Matt Robinson and Max Martin
</pre>
</div>
</content>
</entry>
<entry>
<title>maint: Use expand_path when requiring spec_helper or puppettest</title>
<updated>2010-12-06T20:01:18+00:00</updated>
<author>
<name>Matt Robinson</name>
<email>matt@puppetlabs.com</email>
</author>
<published>2010-12-06T20:01:18+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=626d7564467bdc0e9d2d385e9aa10c539d9ed175'/>
<id>626d7564467bdc0e9d2d385e9aa10c539d9ed175</id>
<content type='text'>
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths.  If you
expand the path fully, this won't happen.  Ruby 1.9 also requires that
you use expand_path when doing these requires.

Paired-with: Jesse Wolfe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Doing a require to a relative path can cause files to be required more
than once when they're required from different relative paths.  If you
expand the path fully, this won't happen.  Ruby 1.9 also requires that
you use expand_path when doing these requires.

Paired-with: Jesse Wolfe
</pre>
</div>
</content>
</entry>
<entry>
<title>Further RST to Markdown fixes for types, values, tests</title>
<updated>2010-08-12T05:35:19+00:00</updated>
<author>
<name>James Turnbull</name>
<email>james@lovedthanlost.net</email>
</author>
<published>2010-08-12T05:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=252c9b84f79307e5caa50b50e093ad493993622d'/>
<id>252c9b84f79307e5caa50b50e093ad493993622d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>[#3994-part 3] rename spec tests from *_spec_spec to *_spec.rb</title>
<updated>2010-06-29T00:10:20+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-06-29T00:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=fdc8c3509b5ac5bc170c54d72b2c2bafb58409f2'/>
<id>fdc8c3509b5ac5bc170c54d72b2c2bafb58409f2</id>
<content type='text'>
Part 2 re-did the change on the spec files, which it shouldn't have.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part 2 re-did the change on the spec files, which it shouldn't have.
</pre>
</div>
</content>
</entry>
<entry>
<title>[#3994-part 2] rename integration tests to *_spec.rb</title>
<updated>2010-06-28T23:32:11+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-06-28T23:32:11+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=9ceb4540a567b0a9de85af5397df4a292303a9c3'/>
<id>9ceb4540a567b0a9de85af5397df4a292303a9c3</id>
<content type='text'>
Some spec files like active_record.rb had names that would confuse the
load path and get loaded instead of the intended implentation when the
spec was run from the same directory as the file.

Author: Matt Robinson &lt;matt@puppetlabs.com&gt;
Date:   Fri Jun 11 15:29:33 2010 -0700
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some spec files like active_record.rb had names that would confuse the
load path and get loaded instead of the intended implentation when the
spec was run from the same directory as the file.

Author: Matt Robinson &lt;matt@puppetlabs.com&gt;
Date:   Fri Jun 11 15:29:33 2010 -0700
</pre>
</div>
</content>
</entry>
<entry>
<title>[#3994] rename the specs to have _spec.rb at the end</title>
<updated>2010-06-24T05:27:29+00:00</updated>
<author>
<name>Markus Roberts</name>
<email>Markus@reality.com</email>
</author>
<published>2010-06-23T22:51:08+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/ricky/public_git/puppet.git/commit/?id=51b70c05167399eb2274fc1add18b6b18d31429d'/>
<id>51b70c05167399eb2274fc1add18b6b18d31429d</id>
<content type='text'>
Some spec files like active_record.rb had names that would confuse the
load path and get loaded instead of the intended implentation when the
spec was run from the same directory as the file.

Author: Matt Robinson &lt;matt@puppetlabs.com&gt;
Date:   Fri Jun 11 15:29:33 2010 -0700
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some spec files like active_record.rb had names that would confuse the
load path and get loaded instead of the intended implentation when the
spec was run from the same directory as the file.

Author: Matt Robinson &lt;matt@puppetlabs.com&gt;
Date:   Fri Jun 11 15:29:33 2010 -0700
</pre>
</div>
</content>
</entry>
</feed>
