series_joiner 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +3 -5
- data/VERSION +1 -1
- data/series_joiner.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -42,15 +42,13 @@ Here are some examples using custom delimiters and/or conjunctions:
|
|
42
42
|
|
43
43
|
['a', 'b', 'c'].join_as_series(:delimiter => '; ', :conjunction => '; or, ') #=> 'a; b; or, c'
|
44
44
|
|
45
|
-
The use of the serial comma (i.e. the final comma sometimes used before the conjunction) is much debated in grammar circles (http://en.wikipedia.org/wiki/Serial_comma). And who doesn't enjoy a rousing debate about grammar?
|
46
|
-
|
47
|
-
By default, SeriesJoiner sides with The New York Times stylebook and does not use the serial comma. However, so as not to offend adherents to The Chicago Manual of Style, the <tt>:final_delimiter</tt> option can be set to <tt>','</tt> to include it. For example:
|
45
|
+
The use of the serial comma (i.e. the final comma sometimes used before the conjunction) is much debated in grammar circles (http://en.wikipedia.org/wiki/Serial_comma). And who doesn't enjoy a rousing debate about grammar? Don't answer that. Anyway, SeriesJoiner does not use the serial comma by default. If you prefer to use it, just set the <tt>:final_delimiter</tt> option to <tt>','</tt>:
|
48
46
|
|
49
47
|
['a', 'b', 'c'].join_as_series(:final_delimiter => ',') #=> 'a, b, and c'
|
50
48
|
|
51
49
|
== I18n Support
|
52
50
|
|
53
|
-
If you're using SeriesJoiner in a project with I18n support,
|
51
|
+
If you're using SeriesJoiner in a project with I18n support, include the following translations for your locales:
|
54
52
|
|
55
53
|
en:
|
56
54
|
series_joiner:
|
@@ -67,7 +65,7 @@ This gem is generated with jeweler and uses shoulda for testing. To run tests:
|
|
67
65
|
== Notes
|
68
66
|
|
69
67
|
This gem's <tt>join_as_series()</tt> method may be compared with the similar <tt>to_sentence()</tt> method implemented in ActiveSupport (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/array/conversions.rb). There are several differences:
|
70
|
-
* <tt>to_sentence()</tt>
|
68
|
+
* <tt>to_sentence()</tt> is part of ActiveSupport, while <tt>join_as_series</tt> is independent;
|
71
69
|
* <tt>to_sentence()</tt> implements the serial comma (see definition above) by default, while <tt>join_as_series()</tt> does not; and,
|
72
70
|
* <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>.
|
73
71
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.1
|
data/series_joiner.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{series_joiner}
|
8
|
-
s.version = "1.2.
|
8
|
+
s.version = "1.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dan Gebhardt"]
|
12
|
-
s.date = %q{2011-01-
|
12
|
+
s.date = %q{2011-01-06}
|
13
13
|
s.description = %q{Extends Array with a join_as_series() method for joining arrays of items together into grammatically correct series. Useful for joining series like 'a, b and c'. Custom delimiters and conjunctions can be specified.}
|
14
14
|
s.email = %q{contact@cerebris.com}
|
15
15
|
s.extra_rdoc_files = [
|
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: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Gebhardt
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-06 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|