series_joiner 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -3
- data/VERSION +1 -1
- data/series_joiner.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -40,7 +40,7 @@ Here are some examples using custom delimiters and/or conjunctions:
|
|
40
40
|
|
41
41
|
['a', 'b', 'c'].join_as_series(:conjunction => ' or ') #=> 'a, b or c'
|
42
42
|
|
43
|
-
['a', 'b', 'c'].join_as_series(:delimiter => '; ', :conjunction => '; or,') #=> 'a; b; or, c'
|
43
|
+
['a', 'b', 'c'].join_as_series(:delimiter => '; ', :conjunction => '; or, ') #=> 'a; b; or, c'
|
44
44
|
|
45
45
|
The use of the serial comma (i.e. the final comma sometimes used before the conjunction) is much debated in grammar (http://en.wikipedia.org/wiki/Serial_comma). By default, SeriesJoiner does not use the serial comma. However, the <tt>:final_delimiter</tt> option can be set to <tt>','</tt> to include it:
|
46
46
|
|
@@ -55,9 +55,10 @@ This gem is generated with jeweler and uses shoulda for testing. To run tests:
|
|
55
55
|
== Notes
|
56
56
|
|
57
57
|
This gem may be compared with the Rails ActiveSupport extension to Array <tt>to_sentence()</tt> (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/array/conversions.rb). Here are a couple differences:
|
58
|
-
* <tt>to_sentence()</tt> requires ActiveSupport, while <tt>join_as_series</tt> has no
|
58
|
+
* <tt>to_sentence()</tt> requires ActiveSupport, while <tt>join_as_series</tt> has no dependencies;
|
59
59
|
* <tt>to_sentence()</tt> has I18n support baken in; and,
|
60
|
-
* <tt>to_sentence()</tt>
|
60
|
+
* <tt>to_sentence()</tt> implements the serial comma (see definition above) by default, while <tt>join_as_series</tt> does not; and,
|
61
|
+
* <tt>to_sentence()</tt> requires two options (<tt>:two_words_connector</tt> and <tt>:last_word_connector</tt>) to override a conjunction, instead of the one (<tt>:conjunction</tt>) required by <tt>join_as_series</tt>.
|
61
62
|
|
62
63
|
== License
|
63
64
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/series_joiner.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: series_joiner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Gebhardt
|