Permalink
Browse files

Condensed gemspec, added license and added rakefile

  • Loading branch information...
1 parent 287653b commit 7f720059f526ae9a971b39861cf37204f173c17b @rwdaigle rwdaigle committed Aug 20, 2008
Showing with 50 additions and 20 deletions.
  1. +1 −0 .gitignore
  2. +18 −0 LICENSE
  3. +18 −0 Rakefile
  4. +1 −10 spec/abstract_spec.rb
  5. +12 −10 utility_scopes.gemspec
View
@@ -0,0 +1 @@
+doc
View
18 LICENSE
@@ -0,0 +1,18 @@
+Copyright (c) 2008 Ryan Daigle
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,18 @@
+require 'rubygems'
+require 'rake'
+require 'rake/rdoctask'
+
+# TODO add task to execute specs
+
+desc 'Generate RDoc documentation.'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'Rakefile').
+ include('lib/**/*.rb')
+
+ rdoc.main = "README.rdoc"
+ rdoc.title = "utility_scopes documentation"
+
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
+ rdoc.options << '--inline-source' << '--charset=UTF-8'
+ rdoc.options << '--webcvs=http://github.com/yfactorial/utility_scopes/tree/master/'
+end
View
@@ -1,17 +1,8 @@
require File.join(File.dirname(__FILE__), *%w[spec_helper])
require 'activerecord'
-# Mimick plugin loading
$:.unshift "#{File.dirname(__FILE__)}/../lib"
-require 'utility_scopes/limited'
-require 'utility_scopes/ordered'
-require 'utility_scopes/eager'
-
-ActiveRecord::Base.class_eval do
- include UtilityScopes::Limited
- include UtilityScopes::Ordered
- include UtilityScopes::Eager
-end
+require 'utility_scopes'
# Load a test class
def uses_fixture(fixture_name)
View
@@ -1,20 +1,22 @@
Gem::Specification.new do |s|
+
s.name = "utility_scopes"
s.version = "0.1.0"
s.date = "2008-08-20"
+
s.summary = "A collection of utilitarian named scopes providing common functionality for ActiveRecord models"
s.email = "ryan@yfactorial.com"
s.homepage = "http://github.com/yfactorial/utility_scopes"
s.description = "A collection of utilitarian named scopes providing common functionality for ActiveRecord models."
- s.has_rdoc = true
+
+
s.authors = ["Ryan Daigle"]
- s.files = ["README.rdoc",
- "utility_scopes.gemspec",
- "lib/utility_scopes.rb",
- "lib/utility_scopes/limited.rb",
- "lib/utility_scopes/ordered.rb",
- "lib/utility_scopes/eager.rb"]
- s.rdoc_options = ["--main", "README.rdoc"]
- s.extra_rdoc_files = ["README.rdoc"]
- s.add_dependency("activerecord", [">= 2.1.0"])
+ s.has_rdoc = true
+ s.rdoc_options = ['--main', 'README.rdoc']
+ s.rdoc_options << '--inline-source' << '--charset=UTF-8'
+ s.extra_rdoc_files = ['README.rdoc', 'Rakefile', 'LICENSE']
+
+ s.add_dependency 'activerecord', ['>= 2.1.0']
+
+ s.files = %w(README.rdoc Rakefile LICENSE init.rb lib lib/utility_scopes lib/utility_scopes.rb lib/utility_scopes/eager.rb lib/utility_scopes/limited.rb lib/utility_scopes/ordered.rb spec spec/abstract_spec.rb spec/eager_spec.rb spec/limit_spec.rb spec/ordered_spec.rb spec/spec_helper.rb spec/fixtures spec/fixtures/article.rb)
end

0 comments on commit 7f72005

Please sign in to comment.