You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/05/25 12:07:39 UTC
[whimsy] branch master updated: Typo
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 0ccbe19 Typo
0ccbe19 is described below
commit 0ccbe1910f2b5ce9892a72f9e5a50862fb2f3acb
Author: Sebb <se...@apache.org>
AuthorDate: Mon May 25 13:06:49 2020 +0100
Typo
---
lib/whimsy/asf/icla.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
index 3854622..8ea4fbc 100644
--- a/lib/whimsy/asf/icla.rb
+++ b/lib/whimsy/asf/icla.rb
@@ -64,7 +64,7 @@ module ASF
def self.preload
people = []
each do |icla|
- unless icla.id == 'notinaval'
+ unless icla.id == 'notinavail'
person = ASF::Person.find(icla.id)
people << person
person.icla = icla
Re: [whimsy] branch master updated: Typo
Posted by Sam Ruby <ru...@intertwingly.net>.
On Mon, May 25, 2020 at 8:26 AM sebb AT ASF <se...@apache.org> wrote:
>
> > - unless icla.id == 'notinaval'
> > + unless icla.id == 'notinavail'
>
> To avoid this happening again, maybe we should be using constants for
> 'magic' strings.
> Easy enough to implement as a constant local to this file, but in this
> case, the constant has much wider applicability.
>
> Would lib/asf.rb be a suitable place for such constants, or would it
> be better to have a Constants class?
Being pedantic, those are orthogonal choices. You can have a
Constants class inside of lib/asf.rb, or you can add constants to the
ASF module in a separate file.
That being said, the option I personally prefer is the one you seem to
have settled on: a noid? method.
- Sam Ruby
Re: [whimsy] branch master updated: Typo
Posted by sebb AT ASF <se...@apache.org>.
On Mon, 25 May 2020 at 13:07, <se...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> sebb pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
> new 0ccbe19 Typo
> 0ccbe19 is described below
>
> commit 0ccbe1910f2b5ce9892a72f9e5a50862fb2f3acb
> Author: Sebb <se...@apache.org>
> AuthorDate: Mon May 25 13:06:49 2020 +0100
>
> Typo
> ---
> lib/whimsy/asf/icla.rb | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/whimsy/asf/icla.rb b/lib/whimsy/asf/icla.rb
> index 3854622..8ea4fbc 100644
> --- a/lib/whimsy/asf/icla.rb
> +++ b/lib/whimsy/asf/icla.rb
> @@ -64,7 +64,7 @@ module ASF
> def self.preload
> people = []
> each do |icla|
> - unless icla.id == 'notinaval'
> + unless icla.id == 'notinavail'
To avoid this happening again, maybe we should be using constants for
'magic' strings.
Easy enough to implement as a constant local to this file, but in this
case, the constant has much wider applicability.
Would lib/asf.rb be a suitable place for such constants, or would it
be better to have a Constants class?
> person = ASF::Person.find(icla.id)
> people << person
> person.icla = icla
>