fake_arel 1.5.0 → 1.5.1

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.5.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fake_arel"
8
- s.version = "1.5.0"
8
+ s.version = "1.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Grant Ammons"]
12
- s.date = "2014-02-04"
12
+ s.date = "2015-02-20"
13
13
  s.description = "fake_arel will simulate rails 3 arel syntax for Rails 2."
14
14
  s.email = "grant@pipelinedealsco.com"
15
15
  s.extra_rdoc_files = [
@@ -51,7 +51,7 @@ Gem::Specification.new do |s|
51
51
  s.homepage = "http://github.com/gammons/fake_arel"
52
52
  s.licenses = ["MIT"]
53
53
  s.require_paths = ["lib"]
54
- s.rubygems_version = "1.8.25"
54
+ s.rubygems_version = "1.8.30"
55
55
  s.summary = "fake_arel: a Rails 3 query interface to Rails 2"
56
56
 
57
57
  if s.respond_to? :specification_version then
@@ -1,6 +1,11 @@
1
1
  module ActiveRecord
2
2
  module NamedScope
3
3
  module ClassMethods
4
+
5
+ def scoping(&block)
6
+ scoped(&block)
7
+ end
8
+
4
9
  def named_scope(name, options = {}, &block)
5
10
  name = name.to_sym
6
11
 
@@ -326,3 +326,13 @@ describe "from" do
326
326
  Topic.from("topics").first.should eql(Topic.all.first)
327
327
  end
328
328
  end
329
+
330
+ describe "scoped" do
331
+ it "uses the scoped method" do
332
+ Topic.where(id: [2, 3]).scoping do
333
+ Topic.where(id: 2).scoping do
334
+ Topic.all.map(&:id).should == [2]
335
+ end
336
+ end
337
+ end
338
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_arel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-04 00:00:00.000000000 Z
12
+ date: 2015-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -192,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  segments:
194
194
  - 0
195
- hash: -1479168766933848698
195
+ hash: -2139113768304386099
196
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  none: false
198
198
  requirements:
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 1.8.25
204
+ rubygems_version: 1.8.30
205
205
  signing_key:
206
206
  specification_version: 3
207
207
  summary: ! 'fake_arel: a Rails 3 query interface to Rails 2'