ruby-extensions 1.0

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.
File without changes
@@ -0,0 +1,59 @@
1
+ require File.expand_path('../../helper', __FILE__)
2
+
3
+ describe "String.pluralize" do
4
+ it 'Pluralize the word "baby"' do
5
+ 'baby'.pluralize.should.equal 'babies'
6
+ end
7
+
8
+ it 'Pluralize the word "boy"' do
9
+ 'boy'.pluralize.should.equal 'boys'
10
+ end
11
+
12
+ it 'Pluralize the word "user"' do
13
+ 'user'.pluralize.should.equal 'users'
14
+ end
15
+
16
+ it 'Pluralize the word "quiz"' do
17
+ 'quiz'.pluralize.should.equal 'quizes'
18
+ end
19
+
20
+ it 'Pluralize the word "vulcano"' do
21
+ 'vulcano'.pluralize.should.equal 'vulcanoes'
22
+ end
23
+
24
+ it 'Pluralize using pluralize!' do
25
+ word = "vulcano"
26
+
27
+ word.pluralize!
28
+ word.should.equal "vulcanoes"
29
+ end
30
+ end
31
+
32
+ describe "String.singularize" do
33
+ it 'Singularize the word "babies"' do
34
+ 'babies'.singularize.should.equal 'baby'
35
+ end
36
+
37
+ it 'Singularize the word "boys"' do
38
+ 'boys'.singularize.should.equal 'boy'
39
+ end
40
+
41
+ it 'Singularize the word "users"' do
42
+ 'users'.singularize.should.equal 'user'
43
+ end
44
+
45
+ it 'Singularize the word "quizes"' do
46
+ 'quizes'.singularize.should.equal 'quiz'
47
+ end
48
+
49
+ it 'Singularize the word "vulcanoes"' do
50
+ 'vulcanoes'.singularize.should.equal 'vulcano'
51
+ end
52
+
53
+ it 'Singularize using singularize!' do
54
+ word = "vulcanoes"
55
+
56
+ word.singularize!
57
+ word.should.equal "vulcano"
58
+ end
59
+ end
@@ -0,0 +1,4 @@
1
+ require 'bacon'
2
+ require File.expand_path('../../lib/ruby-extensions', __FILE__)
3
+
4
+ Bacon.summary_on_exit
@@ -0,0 +1,48 @@
1
+ require 'fileutils'
2
+ require 'find'
3
+
4
+ namespace :build do
5
+
6
+ desc 'Build and install a new version of the Gem.'
7
+ task :gem do
8
+ # Get the root directory
9
+ lib_path = File.expand_path('../../', __FILE__)
10
+
11
+ # Build and install the gem
12
+ sh "gem build #{lib_path}/ruby-extensions.gemspec"
13
+ sh "mv #{lib_path}/ruby-extensions-#{RubyExtensions::Version}.gem #{lib_path}/pkg"
14
+ sh "gem install #{lib_path}/pkg/ruby-extensions-#{RubyExtensions::Version}.gem"
15
+ end
16
+
17
+ desc 'Build the MANIFEST file.'
18
+ task :manifest do
19
+
20
+ ignore_exts = ['.gem', '.gemspec']
21
+ ignore_files = ['.DS_Store', '.gitignore', 'Ruby Extensions.komodoproject']
22
+ ignore_dirs = ['.git', '.yardoc']
23
+ files = String.new
24
+
25
+ Find.find './' do |f|
26
+ # Ignore directories
27
+ if !File.directory?(f) and !ignore_exts.include?(File.extname(f)) and !ignore_files.include?(File.basename(f))
28
+ # Remove the ./ at the front of each filepath
29
+ f['./'] = ''
30
+ files += "#{f}\n"
31
+ else
32
+ # Get rid of the ./ prefix and prune the current directory tree if it's excluded.
33
+ f['./'] = ''
34
+ Find.prune if ignore_dirs.include?(f)
35
+ end
36
+ end
37
+
38
+ # Time to write the MANIFEST file
39
+ begin
40
+ handle = File.open 'MANIFEST', 'w'
41
+ handle.write files.strip
42
+ abort "The MANIFEST file has been updated."
43
+ rescue
44
+ abort "The MANIFEST file could not be written."
45
+ end
46
+
47
+ end
48
+ end
@@ -0,0 +1,6 @@
1
+
2
+ desc "Generate the documentation using YARD"
3
+ task :doc do
4
+ path = File.expand_path('../../', __FILE__)
5
+ sh("yard doc #{path}/lib -m textile -M redcloth -o #{path}/doc -r #{path}/README.textile")
6
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-extensions
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ version: "1.0"
9
+ platform: ruby
10
+ authors:
11
+ - Yorick Peterse
12
+ autorequire:
13
+ bindir: bin
14
+ cert_chain: []
15
+
16
+ date: 2011-01-26 00:00:00 +01:00
17
+ default_executable:
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: bacon
21
+ prerelease: false
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ version_requirements: *id001
32
+ description: A collection of custom classes that extend Ruby.
33
+ email: info@yorickpeterse.com
34
+ executables: []
35
+
36
+ extensions: []
37
+
38
+ extra_rdoc_files: []
39
+
40
+ files:
41
+ - MANIFEST
42
+ - README.textile
43
+ - Rakefile
44
+ - doc/RubyExtensions.html
45
+ - doc/String.html
46
+ - doc/_index.html
47
+ - doc/class_list.html
48
+ - doc/css/common.css
49
+ - doc/css/full_list.css
50
+ - doc/css/style.css
51
+ - doc/file.README.html
52
+ - doc/file_list.html
53
+ - doc/frames.html
54
+ - doc/index.html
55
+ - doc/js/app.js
56
+ - doc/js/full_list.js
57
+ - doc/js/jquery.js
58
+ - doc/method_list.html
59
+ - doc/top-level-namespace.html
60
+ - lib/ruby-extensions/core/string.rb
61
+ - lib/ruby-extensions.rb
62
+ - pkg/.gitkeep
63
+ - spec/core/string.rb
64
+ - spec/helper.rb
65
+ - tasks/build.rake
66
+ - tasks/doc.rake
67
+ has_rdoc: yard
68
+ homepage: https://github.com/YorickPeterse/Ruby-Extensions
69
+ licenses: []
70
+
71
+ post_install_message:
72
+ rdoc_options: []
73
+
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ segments:
82
+ - 0
83
+ version: "0"
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ requirements: []
93
+
94
+ rubyforge_project:
95
+ rubygems_version: 1.3.7
96
+ signing_key:
97
+ specification_version: 3
98
+ summary: A collection of custom classes that extend Ruby.
99
+ test_files: []
100
+