Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: isc/convenient_scopes
base: 89c2db1737
...
head fork: isc/convenient_scopes
compare: 5da74ab83e
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 31 additions and 10 deletions.
  1. +1 −1  VERSION
  2. +28 −8 convenient_scopes.gemspec
  3. +2 −1  lib/convenient_scopes.rb
View
2  VERSION
@@ -1 +1 @@
-0.10.0
+0.10.1
View
36 convenient_scopes.gemspec
@@ -4,20 +4,22 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{convenient_scopes}
- s.version = "0.9.1"
+ s.name = "convenient_scopes"
+ s.version = "0.10.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ivan Schneider"]
- s.date = %q{2011-09-28}
- s.description = %q{Dynamic scopes by convention for ActiveRecord 3}
- s.email = %q{isc@massivebraingames.com}
+ s.date = "2012-02-23"
+ s.description = "Dynamic scopes by convention for ActiveRecord 3"
+ s.email = "isc@massivebraingames.com"
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
s.files = [
".document",
+ "Gemfile",
+ "Gemfile.lock",
"LICENSE",
"README.rdoc",
"Rakefile",
@@ -31,24 +33,42 @@ Gem::Specification.new do |s|
"test/test_ordering.rb",
"test/test_search_with_hash.rb"
]
- s.homepage = %q{http://github.com/isc/convenient_scopes}
+ s.homepage = "http://github.com/isc/convenient_scopes"
s.require_paths = ["lib"]
- s.rubygems_version = %q{1.5.2}
- s.summary = %q{Dynamic scopes by convention for ActiveRecord 3}
+ s.rubygems_version = "1.8.17"
+ s.summary = "Dynamic scopes by convention for ActiveRecord 3"
if s.respond_to? :specification_version then
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<test-unit>, [">= 0"])
+ s.add_runtime_dependency(%q<shoulda>, [">= 0"])
+ s.add_runtime_dependency(%q<activerecord>, ["= 3.1.3"])
+ s.add_runtime_dependency(%q<rake>, [">= 0"])
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
+ s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
s.add_runtime_dependency(%q<activerecord>, [">= 3.0.4"])
s.add_development_dependency(%q<shoulda>, [">= 0"])
s.add_development_dependency(%q<sqlite3>, [">= 0"])
else
+ s.add_dependency(%q<test-unit>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<activerecord>, ["= 3.1.3"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<jeweler>, [">= 0"])
+ s.add_dependency(%q<sqlite3>, [">= 0"])
s.add_dependency(%q<activerecord>, [">= 3.0.4"])
s.add_dependency(%q<shoulda>, [">= 0"])
s.add_dependency(%q<sqlite3>, [">= 0"])
end
else
+ s.add_dependency(%q<test-unit>, [">= 0"])
+ s.add_dependency(%q<shoulda>, [">= 0"])
+ s.add_dependency(%q<activerecord>, ["= 3.1.3"])
+ s.add_dependency(%q<rake>, [">= 0"])
+ s.add_dependency(%q<jeweler>, [">= 0"])
+ s.add_dependency(%q<sqlite3>, [">= 0"])
s.add_dependency(%q<activerecord>, [">= 3.0.4"])
s.add_dependency(%q<shoulda>, [">= 0"])
s.add_dependency(%q<sqlite3>, [">= 0"])
View
3  lib/convenient_scopes.rb
@@ -31,7 +31,8 @@ def method_missing name, *args, &block
end
end
- def define_scope name, unscoped
+ def define_scope name, unscoped = nil
+ unscoped ||= self.unscoped
(ScopeDefinitions.instance_methods.inject nil do |memo, scope_type|
memo ||= send scope_type.to_sym, name, unscoped
end) || (association_scope name, unscoped)

No commit comments for this range

Something went wrong with that request. Please try again.