possessive 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/lib/possessive.rb +8 -2
- data/possessive.gemspec +45 -0
- data/test/helper.rb +1 -5
- data/test/test_possessive.rb +5 -3
- metadata +26 -43
- data/.gitignore +0 -21
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gem.description = "Rails plugin that lets you get a possessive form of a string for use on sites"
|
10
10
|
gem.email = "bclubb@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/bclubb/possessive"
|
12
|
-
gem.authors = ["Brian Clubb", "Jamie Flournoy", "Nick Howard"]
|
12
|
+
gem.authors = ["Brian Clubb", "Jamie Flournoy", "Nick Howard", "Aaron Patterson"]
|
13
13
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
14
|
end
|
15
15
|
Jeweler::GemcutterTasks.new
|
@@ -41,7 +41,7 @@ task :test => :check_dependencies
|
|
41
41
|
|
42
42
|
task :default => :test
|
43
43
|
|
44
|
-
require '
|
44
|
+
require 'rdoc/task'
|
45
45
|
Rake::RDocTask.new do |rdoc|
|
46
46
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
47
47
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
data/lib/possessive.rb
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
String.class_eval do
|
2
4
|
def possessive
|
3
|
-
self + ('s' == self[-1,1] ?
|
5
|
+
self + ('s' == self[-1,1] ? Possessive::APOSTROPHE_CHAR : Possessive::APOSTROPHE_CHAR+"s")
|
4
6
|
end
|
5
|
-
end
|
7
|
+
end
|
8
|
+
|
9
|
+
module Possessive
|
10
|
+
APOSTROPHE_CHAR = '’'
|
11
|
+
end
|
data/possessive.gemspec
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "possessive"
|
8
|
+
s.version = "1.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Brian Clubb", "Jamie Flournoy", "Nick Howard", "Aaron Patterson"]
|
12
|
+
s.date = "2012-10-18"
|
13
|
+
s.description = "Rails plugin that lets you get a possessive form of a string for use on sites"
|
14
|
+
s.email = "bclubb@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/possessive.rb",
|
26
|
+
"possessive.gemspec",
|
27
|
+
"rails/init.rb",
|
28
|
+
"test/helper.rb",
|
29
|
+
"test/test_possessive.rb"
|
30
|
+
]
|
31
|
+
s.homepage = "http://github.com/bclubb/possessive"
|
32
|
+
s.require_paths = ["lib"]
|
33
|
+
s.rubygems_version = "1.8.24"
|
34
|
+
s.summary = "Rails plugin that lets you get a possessive form of a string for use on sites"
|
35
|
+
|
36
|
+
if s.respond_to? :specification_version then
|
37
|
+
s.specification_version = 3
|
38
|
+
|
39
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
40
|
+
else
|
41
|
+
end
|
42
|
+
else
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
data/test/helper.rb
CHANGED
data/test/test_possessive.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'helper'
|
2
4
|
|
3
5
|
class TestPossessive < Test::Unit::TestCase
|
4
6
|
test "Possessive with a normal string" do
|
5
|
-
assert_equal "Brian
|
7
|
+
assert_equal "Brian’s", "Brian".possessive
|
6
8
|
end
|
7
|
-
|
9
|
+
|
8
10
|
test "Possessive with a string ending with s" do
|
9
|
-
assert_equal "Steelers
|
11
|
+
assert_equal "Steelers’", "Steelers".possessive
|
10
12
|
end
|
11
13
|
end
|
metadata
CHANGED
@@ -1,77 +1,60 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: possessive
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
version: 1.0.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- Brian Clubb
|
13
9
|
- Jamie Flournoy
|
14
10
|
- Nick Howard
|
11
|
+
- Aaron Patterson
|
15
12
|
autorequire:
|
16
13
|
bindir: bin
|
17
14
|
cert_chain: []
|
18
|
-
|
19
|
-
date: 2010-10-14 00:00:00 -05:00
|
20
|
-
default_executable:
|
15
|
+
date: 2012-10-18 00:00:00.000000000 Z
|
21
16
|
dependencies: []
|
22
|
-
|
23
|
-
|
17
|
+
description: Rails plugin that lets you get a possessive form of a string for use
|
18
|
+
on sites
|
24
19
|
email: bclubb@gmail.com
|
25
20
|
executables: []
|
26
|
-
|
27
21
|
extensions: []
|
28
|
-
|
29
|
-
extra_rdoc_files:
|
22
|
+
extra_rdoc_files:
|
30
23
|
- LICENSE
|
31
24
|
- README.rdoc
|
32
|
-
files:
|
25
|
+
files:
|
33
26
|
- .document
|
34
|
-
- .gitignore
|
35
27
|
- LICENSE
|
36
28
|
- README.rdoc
|
37
29
|
- Rakefile
|
38
30
|
- VERSION
|
39
31
|
- lib/possessive.rb
|
32
|
+
- possessive.gemspec
|
40
33
|
- rails/init.rb
|
41
34
|
- test/helper.rb
|
42
35
|
- test/test_possessive.rb
|
43
|
-
has_rdoc: true
|
44
36
|
homepage: http://github.com/bclubb/possessive
|
45
37
|
licenses: []
|
46
|
-
|
47
38
|
post_install_message:
|
48
|
-
rdoc_options:
|
49
|
-
|
50
|
-
require_paths:
|
39
|
+
rdoc_options: []
|
40
|
+
require_paths:
|
51
41
|
- lib
|
52
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
43
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
|
59
|
-
version: "0"
|
60
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
49
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
- 0
|
67
|
-
version: "0"
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
68
54
|
requirements: []
|
69
|
-
|
70
55
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.
|
56
|
+
rubygems_version: 1.8.24
|
72
57
|
signing_key:
|
73
58
|
specification_version: 3
|
74
59
|
summary: Rails plugin that lets you get a possessive form of a string for use on sites
|
75
|
-
test_files:
|
76
|
-
- test/helper.rb
|
77
|
-
- test/test_possessive.rb
|
60
|
+
test_files: []
|