Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added pks named scope and updated for release to gemcutter

  • Loading branch information...
commit 82411f2b3263e50def12ddfff37d373a8769aa34 1 parent 551f0d5
@rwdaigle rwdaigle authored
View
1  .gitignore
@@ -1 +1,2 @@
doc
+pkg
View
8 CHANGELOG
@@ -1,3 +1,11 @@
+0.3.0
+
+Added only_pks named scope (and pks class method)
+
+0.2.3
+
+Renamed metaclass to eigenclass to avoid conflict w/ Rails' method of the same name
+
0.2.2
* More flexible @ordered@ syntax (by jney - http://github.com/jney)
View
3  README.textile
@@ -141,8 +141,7 @@ The current default ordering for a class can always be accessed via @default_ord
h3. PKs
-
-@only_pks_@ gets only the primary key column. This is useful when combined with the @pks@ class method to get the primary key values as an array:
+@only_pks@ selects only the primary key column. This is useful when combined with the @pks@ class method to get the primary key values as an array:
Article.published.limited(10).only_pks # Get the first 10 published articles with only the 'id' value populated [<Article:XX>, <Article:XX>, ...]
Article.published.limited(10).pks # Get the first 10 published article ids: [1, 2, 3 ...]
View
16 Rakefile
@@ -20,4 +20,20 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
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
+
+# Rakefile
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gemspec|
+ gemspec.name = "utility_scopes"
+ gemspec.summary = "A collection of utilitarian named scopes providing common functionality for ActiveRecord models."
+ gemspec.description = "A collection of utilitarian named scopes providing common functionality for ActiveRecord models."
+ gemspec.email = "ryan@digitaltoniq.com"
+ gemspec.homepage = "http://github.com/yfactorial/utility_scopes"
+ gemspec.authors = ["Ryan Daigle", "Daniel Morrison"]
+ end
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
end
View
85 utility_scopes.gemspec
@@ -1,22 +1,67 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE DIRECTLY
+# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
+# -*- encoding: utf-8 -*-
+
Gem::Specification.new do |s|
-
- s.name = "utility_scopes"
- s.version = "0.2.3"
- s.date = "2009-09-16"
-
- 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.authors = ["Ryan Daigle"]
- s.has_rdoc = true
- s.rdoc_options = ['--main', 'README.textile']
- s.rdoc_options << '--inline-source' << '--charset=UTF-8'
- s.extra_rdoc_files = ['README.textile', 'Rakefile', 'LICENSE', 'CHANGELOG']
+ s.name = %q{utility_scopes}
+ s.version = "0.3.0"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Ryan Daigle", "Daniel Morrison"]
+ s.date = %q{2009-12-11}
+ s.description = %q{A collection of utilitarian named scopes providing common functionality for ActiveRecord models.}
+ s.email = %q{ryan@digitaltoniq.com}
+ s.extra_rdoc_files = [
+ "LICENSE",
+ "README.textile"
+ ]
+ s.files = [
+ ".gitignore",
+ "CHANGELOG",
+ "LICENSE",
+ "README.textile",
+ "Rakefile",
+ "VERSION",
+ "init.rb",
+ "lib/utility_scopes.rb",
+ "lib/utility_scopes/eager.rb",
+ "lib/utility_scopes/except.rb",
+ "lib/utility_scopes/limited.rb",
+ "lib/utility_scopes/ordered.rb",
+ "lib/utility_scopes/pks.rb",
+ "spec/abstract_spec.rb",
+ "spec/eager_spec.rb",
+ "spec/except_spec.rb",
+ "spec/fixtures/article.rb",
+ "spec/limit_spec.rb",
+ "spec/ordered_spec.rb",
+ "spec/spec_helper.rb",
+ "utility_scopes.gemspec"
+ ]
+ s.homepage = %q{http://github.com/yfactorial/utility_scopes}
+ s.rdoc_options = ["--charset=UTF-8"]
+ s.require_paths = ["lib"]
+ s.rubygems_version = %q{1.3.5}
+ s.summary = %q{A collection of utilitarian named scopes providing common functionality for ActiveRecord models.}
+ s.test_files = [
+ "spec/abstract_spec.rb",
+ "spec/eager_spec.rb",
+ "spec/except_spec.rb",
+ "spec/fixtures/article.rb",
+ "spec/limit_spec.rb",
+ "spec/ordered_spec.rb",
+ "spec/spec_helper.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ else
+ end
+ else
+ end
+end
- s.add_dependency 'activerecord', ['>= 2.1.0']
-
- s.files = %w(README.textile Rakefile LICENSE CHANGELOG init.rb lib lib/utility_scopes lib/utility_scopes.rb lib/utility_scopes/eager.rb lib/utility_scopes/except.rb lib/utility_scopes/limited.rb lib/utility_scopes/ordered.rb spec spec/abstract_spec.rb spec/eager_spec.rb spec/except_spec.rb spec/limit_spec.rb spec/ordered_spec.rb spec/spec_helper.rb spec/fixtures spec/fixtures/article.rb)
-end
Please sign in to comment.
Something went wrong with that request. Please try again.