Skip to content
Browse files

Move authors to the required attributes section

The authors setters were in the optional attributes section which is
incorrect.

Fixes rubygems/guides#76
  • Loading branch information...
1 parent 81d806d commit ed7c39d4f35aaf93db01fa8b5103d6e9c585dff8 @drbrain drbrain committed Feb 4, 2014
Showing with 22 additions and 22 deletions.
  1. +22 −22 lib/rubygems/specification.rb
View
44 lib/rubygems/specification.rb
@@ -241,6 +241,28 @@ class Gem::Specification < Gem::BasicSpecification
attr_reader :summary
##
+ # Singular writer for #authors
+ #
+ # Usage:
+ #
+ # spec.author = 'John Jones'
+
+ def author= o
+ self.authors = [o]
+ end
+
+ ##
+ # Sets the list of authors, ensuring it is an array.
+ #
+ # Usage:
+ #
+ # spec.authors = ['John Jones', 'Mary Smith']
+
+ def authors= value
+ @authors = Array(value).flatten.grep(String)
+ end
+
+ ##
# The platform this gem runs on.
#
# This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.
@@ -443,28 +465,6 @@ def add_runtime_dependency(gem, *requirements)
end
##
- # Singular writer for #authors
- #
- # Usage:
- #
- # spec.author = 'John Jones'
-
- def author= o
- self.authors = [o]
- end
-
- ##
- # Sets the list of authors, ensuring it is an array.
- #
- # Usage:
- #
- # spec.authors = ['John Jones', 'Mary Smith']
-
- def authors= value
- @authors = Array(value).flatten.grep(String)
- end
-
- ##
# Executables included in the gem.
#
# For example, the rake gem has rake as an executable. You don’t specify the

0 comments on commit ed7c39d

Please sign in to comment.
Something went wrong with that request. Please try again.