Skip to content

Commit

Permalink
Release 1.15
Browse files Browse the repository at this point in the history
  • Loading branch information
awncorp committed Dec 16, 2022
1 parent 8113659 commit 31cc8ae
Show file tree
Hide file tree
Showing 454 changed files with 3,464 additions and 576 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.15 2022-12-16

- [feature] Include Faker command-line interface
- [update] Resolve test failures
- [update] Make lorem-plugins more performant
- [update] Document Faker#cache method

1.10 2022-08-24

- [feature] Reengineered with locales and better documentation
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Version: 1.15

- [feature] Include Faker command-line interface
- [update] Resolve test failures
- [update] Make lorem-plugins more performant
- [update] Document Faker#cache method

## Version: 1.10

- [feature] Reengineered with locales and better documentation
Expand Down
6 changes: 3 additions & 3 deletions META.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
},
"runtime" : {
"requires" : {
"Venus" : "1.23",
"Venus" : "1.68",
"perl" : "5.018"
}
},
"test" : {
"requires" : {
"Venus" : "1.23",
"Venus" : "1.68",
"perl" : "5.018"
}
}
Expand All @@ -47,7 +47,7 @@
"web" : "http://github.com/awncorp/faker"
}
},
"version" : "1.10",
"version" : "1.15",
"x_authority" : "cpan:AWNCORP",
"x_generated_by_perl" : "v5.34.0",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.32",
Expand Down
6 changes: 3 additions & 3 deletions META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ abstract: 'Extensible Fake Data Generator'
author:
- 'AWNCORP <awncorp@cpan.org>'
build_requires:
Venus: '1.23'
Venus: '1.68'
perl: '5.018'
configure_requires:
ExtUtils::MakeMaker: '0'
Expand All @@ -15,14 +15,14 @@ meta-spec:
version: '1.4'
name: Faker
requires:
Venus: '1.23'
Venus: '1.68'
perl: '5.018'
resources:
bugtracker: http://github.com/awncorp/faker/issues
homepage: https://metacpan.org/dist/Faker
license: https://opensource.org/licenses/apache-2.0
repository: git://github.com/awncorp/faker.git
version: '1.10'
version: '1.15'
x_authority: cpan:AWNCORP
x_generated_by_perl: v5.34.0
x_serialization_backend: 'YAML::Tiny version 1.73'
Expand Down
8 changes: 4 additions & 4 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ my %WriteMakefileArgs = (
"MIN_PERL_VERSION" => "5.018",
"NAME" => "Faker",
"PREREQ_PM" => {
"Venus" => "1.23"
"Venus" => "1.68"
},
"TEST_REQUIRES" => {
"Venus" => "1.23"
"Venus" => "1.68"
},
"VERSION" => "1.10",
"VERSION" => "1.15",
"test" => {
"TESTS" => "t/*.t"
}
);


my %FallbackPrereqs = (
"Venus" => "1.23"
"Venus" => "1.68"
);


Expand Down
50 changes: 45 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ABSTRACT

VERSION

1.10
1.15

SYNOPSIS

Expand Down Expand Up @@ -98,12 +98,10 @@ INTEGRATES

Venus::Role::Buildable

Venus::Role::Coercible

Venus::Role::Doable

Venus::Role::Proxyable

Venus::Role::Optional

METHODS

This package provides the following methods:
Expand Down Expand Up @@ -586,6 +584,48 @@ METHODS

# "Street"

cache

cache(Str $method, Any @args) (Str)

The cache method dispatches to the method specified, caches the method
name and return value, and returns the value. Subsequent calls will
return the cached value.

Since 1.10

cache example 1

package main;

use Faker;

my $faker = Faker->new('en-us');

# my $cache = $faker->cache('person_name');

# "Keeley Balistreri"

# $cache = $faker->cache('person_name');

# "Keeley Balistreri"

cache example 2

package main;

use Faker;

my $faker = Faker->new('en-us');

# my $cache = $faker->cache('company_tagline');

# "iterate back-end content"

# $cache = $faker->cache('company_tagline');

# "iterate back-end content"

color_hex_code

color_hex_code(HashRef $data) (Str)
Expand Down
7 changes: 5 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Release

## Version: 1.10
## Version: 1.15

- [feature] Reengineered with locales and better documentation
- [feature] Include Faker command-line interface
- [update] Resolve test failures
- [update] Make lorem-plugins more performant
- [update] Document Faker#cache method


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10
1.15
4 changes: 2 additions & 2 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This file is generated by Dist::Zilla::Plugin::CPANFile v6.025
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.

requires "Venus" => "1.23";
requires "Venus" => "1.68";
requires "perl" => "5.018";

on 'test' => sub {
requires "Venus" => "1.23";
requires "Venus" => "1.68";
requires "perl" => "5.018";
};

Expand Down
4 changes: 2 additions & 2 deletions dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ run = git commit -m "Built release version %v"

[Prereqs]
perl = 5.018
Venus = 1.23
Venus = 1.68

[Prereqs / TestRequires]
perl = 5.018
Venus = 1.23
Venus = 1.68

[InstallGuide]
[CPANFile]
51 changes: 13 additions & 38 deletions lib/Faker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ use warnings;
use Venus::Class 'attr', 'with';

with 'Venus::Role::Buildable';
with 'Venus::Role::Coercible';
with 'Venus::Role::Doable';
with 'Venus::Role::Proxyable';
with 'Venus::Role::Optional';

# VERSION

our $VERSION = '1.10';
our $VERSION = '1.15';

# AUTHORITY

Expand All @@ -29,28 +28,22 @@ state $sources = {};
attr 'caches';
attr 'locales';

# MODIFIERS
# DEFAULTS

sub caches {
my ($self, $data) = @_;
sub coerce_caches {
return 'Venus::Hash';
}

if ($data) {
return $self->{caches} = $self->coercion({caches => $data})->{caches};
}
else {
return $self->{caches};
}
sub default_caches {
return {};
}

sub locales {
my ($self, $data) = @_;
sub coerce_locales {
return 'Venus::Array';
}

if ($data) {
return $self->{locales} = $self->coercion({locales => $data})->{locales};
}
else {
return $self->{locales};
}
sub default_locales {
return [];
}

# BUILDERS
Expand All @@ -63,15 +56,6 @@ sub build_arg {
};
}

sub build_args {
my ($self, $data) = @_;

$data->{caches} ||= {};
$data->{locales} ||= [];

return $data;
}

sub build_proxy {
my ($self, $package, $method, @args) = @_;

Expand All @@ -82,15 +66,6 @@ sub build_proxy {
return sub { $source->build(faker => $self)->execute(@args) };
}

# COERCIONS

sub coerce {
{
caches => 'Venus::Hash',
locales => 'Venus::Array',
}
}

# METHODS

sub cache {
Expand Down
60 changes: 55 additions & 5 deletions lib/Faker.pod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Extensible Fake Data Generator

=head1 VERSION

1.10
1.15

=cut

Expand Down Expand Up @@ -133,12 +133,10 @@ This package integrates behaviors from:

L<Venus::Role::Buildable>

L<Venus::Role::Coercible>

L<Venus::Role::Doable>

L<Venus::Role::Proxyable>

L<Venus::Role::Optional>

=cut

=head1 METHODS
Expand Down Expand Up @@ -725,6 +723,58 @@ I<Since C<1.10>>

=cut

=head2 cache

cache(Str $method, Any @args) (Str)

The cache method dispatches to the method specified, caches the method name and
return value, and returns the value. Subsequent calls will return the cached
value.

I<Since C<1.10>>

=over 4

=item cache example 1

package main;

use Faker;

my $faker = Faker->new('en-us');

# my $cache = $faker->cache('person_name');

# "Keeley Balistreri"

# $cache = $faker->cache('person_name');

# "Keeley Balistreri"

=back

=over 4

=item cache example 2

package main;

use Faker;

my $faker = Faker->new('en-us');

# my $cache = $faker->cache('company_tagline');

# "iterate back-end content"

# $cache = $faker->cache('company_tagline');

# "iterate back-end content"

=back

=cut

=head2 color_hex_code

color_hex_code(HashRef $data) (Str)
Expand Down
Loading

0 comments on commit 31cc8ae

Please sign in to comment.