JIRA-REST-Class
view release on metacpan or search on metacpan
});
* username
* password
The username and password of a JIRA user to use for authentication.
If anonymous is false then, if either username or password isn't
defined the module looks them up in either the ".netrc" file or via
Config::Identity (which allows "gpg" encrypted credentials).
Config::Identity will look for ~/.jira-identity or ~/.jira. You can
change the filename stub from "jira" to a custom stub with the
"JIRA_REST_IDENTITY" environment variable.
* rest_client_config
A JIRA::REST object uses a REST::Client object to make the REST
invocations. This optional argument must be a hash reference that
can be fed to the REST::Client constructor. Note that the "url"
Returns the base URL for this JIRA server's REST API. For example, if
your JIRA server is at "http://jira.example.com", this would return
"http://jira.example.com/rest/api/latest".
strip_protocol_and_host
A method to take the provided URL and strip the protocol and host from
it. For example, if the URL "http://jira.example.com/rest/api/latest"
was passed to this method, "/rest/api/latest" would be returned.
jira
Returns a JIRA::REST::Class object with credentials for the last JIRA
user.
factory
An accessor for the JIRA::REST::Class::Factory.
JIRA_REST
An accessor that returns the JIRA::REST object being used.
REST_CLIENT
An accessor that returns the REST::Client object inside the JIRA::REST
lib/JIRA/REST/Class.pm view on Meta::CPAN
#pod });
#pod },
#pod $needs_url_regexp,
#pod 'JIRA::REST::Class->new with no url throws an exception',
#pod );
#pod
#pod throws_ok(
#pod sub {
#pod JIRA::REST::Class->new('http://not.a.good.server.com');
#pod },
#pod qr/No credentials found/,
#pod q{JIRA::REST::Class->new with just url tries to find credentials},
#pod );
#pod
#pod lives_ok(
#pod sub {
#pod JIRA::REST::Class->new(TestServer_url(), 'user', 'pass');
#pod },
#pod q{JIRA::REST::Class->new with url, username, and password does't croak!},
#pod );
#pod
#pod =end testing
lib/JIRA/REST/Class.pm view on Meta::CPAN
});
=item * B<username>
=item * B<password>
The username and password of a JIRA user to use for authentication.
If B<anonymous> is false then, if either B<username> or B<password> isn't
defined the module looks them up in either the C<.netrc> file or via
L<Config::Identity|Config::Identity> (which allows C<gpg> encrypted credentials).
L<Config::Identity|Config::Identity> will look for F<~/.jira-identity> or
F<~/.jira>. You can change the filename stub from C<jira> to a custom stub
with the C<JIRA_REST_IDENTITY> environment variable.
=item * B<rest_client_config>
A JIRA::REST object uses a L<REST::Client|REST::Client> object to make the REST
invocations. This optional argument must be a hash reference that can be fed
to the REST::Client constructor. Note that the C<url> argument
lib/JIRA/REST/Class.pm view on Meta::CPAN
=head2 B<rest_api_url_base>
Returns the base URL for this JIRA server's REST API. For example, if your JIRA server is at C<http://jira.example.com>, this would return C<http://jira.example.com/rest/api/latest>.
=head2 B<strip_protocol_and_host>
A method to take the provided URL and strip the protocol and host from it. For example, if the URL C<http://jira.example.com/rest/api/latest> was passed to this method, C</rest/api/latest> would be returned.
=head2 B<jira>
Returns a L<JIRA::REST::Class|JIRA::REST::Class> object with credentials for the last JIRA user.
=head2 B<factory>
An accessor for the L<JIRA::REST::Class::Factory|JIRA::REST::Class::Factory>.
=head2 B<JIRA_REST>
An accessor that returns the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<REST_CLIENT>
lib/JIRA/REST/Class.pm view on Meta::CPAN
});
},
$needs_url_regexp,
'JIRA::REST::Class->new with no url throws an exception',
);
throws_ok(
sub {
JIRA::REST::Class->new('http://not.a.good.server.com');
},
qr/No credentials found/,
q{JIRA::REST::Class->new with just url tries to find credentials},
);
lives_ok(
sub {
JIRA::REST::Class->new(TestServer_url(), 'user', 'pass');
},
q{JIRA::REST::Class->new with url, username, and password does't croak!},
);
=end testing
lib/JIRA/REST/Class/Abstract.pm view on Meta::CPAN
Makes accessors for keys under C<< $self->{data}->{fields} >>
=head2 B<make_subroutine>
Takes a subroutine name and a subroutine reference, and blesses the
subroutine into the class used to call this method. Can be called with
either a class name or a blessed object reference.
=head2 B<jira>
Returns a L<JIRA::REST::Class|JIRA::REST::Class> object with credentials for the last JIRA user.
=head2 B<factory>
An accessor for the L<JIRA::REST::Class::Factory|JIRA::REST::Class::Factory>.
=head2 B<JIRA_REST>
An accessor that returns the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<REST_CLIENT>
lib/JIRA/REST/Class/Mixins.pm view on Meta::CPAN
C<'JRC-1'>, the object would be represented as the string C<<
'JIRA::REST::Class::Issue->key(JRC-1)' >>. The goal is to provide a gist of
what the contents of the object are without exhaustively dumping EVERYTHING.
I use it a lot for figuring out what's in the results I'm getting back from
the JIRA API.
=head1 INTERNAL METHODS
=head2 B<jira>
Returns a L<JIRA::REST::Class|JIRA::REST::Class> object with credentials for the last JIRA user.
=head2 B<factory>
An accessor for the L<JIRA::REST::Class::Factory|JIRA::REST::Class::Factory>.
=head2 B<JIRA_REST>
An accessor that returns the L<JIRA::REST|JIRA::REST> object being used.
=head2 B<REST_CLIENT>
t/inline-tests/jira_rest_class.t view on Meta::CPAN
});
},
$needs_url_regexp,
'JIRA::REST::Class->new with no url throws an exception',
);
throws_ok(
sub {
JIRA::REST::Class->new('http://not.a.good.server.com');
},
qr/No credentials found/,
q{JIRA::REST::Class->new with just url tries to find credentials},
);
lives_ok(
sub {
JIRA::REST::Class->new(TestServer_url(), 'user', 'pass');
},
q{JIRA::REST::Class->new with url, username, and password does't croak!},
);
}
is( Test::Builder->new->current_test - $::__tc, 5,
( run in 0.907 second using v1.01-cache-2.11-cpan-4d50c553e7e )