fake_arel 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,10 +7,11 @@ gem 'activerecord', '~> 2.3.11'
7
7
  # Add dependencies to develop your gem here.
8
8
  # Include everything needed to run rake, tests, features, etc.
9
9
  group :development do
10
- gem "bundler", "~> 1.0.0"
10
+ gem "bundler"
11
11
  gem "jeweler", "~> 1.6.4"
12
12
  gem "rcov", ">= 0"
13
13
 
14
+ gem 'debugger', :platform => :ruby_19
14
15
  gem 'rspec', '1.3.1'
15
16
  gem "sqlite3-ruby"
16
17
  end
@@ -4,6 +4,14 @@ GEM
4
4
  activerecord (2.3.11)
5
5
  activesupport (= 2.3.11)
6
6
  activesupport (2.3.11)
7
+ columnize (0.3.6)
8
+ debugger (1.3.3)
9
+ columnize (>= 0.3.1)
10
+ debugger-linecache (~> 1.1.1)
11
+ debugger-ruby_core_source (~> 1.2.0)
12
+ debugger-linecache (1.1.2)
13
+ debugger-ruby_core_source (>= 1.1.1)
14
+ debugger-ruby_core_source (1.2.0)
7
15
  git (1.2.5)
8
16
  jeweler (1.6.4)
9
17
  bundler (~> 1.0)
@@ -21,7 +29,8 @@ PLATFORMS
21
29
 
22
30
  DEPENDENCIES
23
31
  activerecord (~> 2.3.11)
24
- bundler (~> 1.0.0)
32
+ bundler
33
+ debugger
25
34
  jeweler (~> 1.6.4)
26
35
  rcov
27
36
  rspec (= 1.3.1)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fake_arel}
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
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 = %q{2012-04-03}
12
+ s.date = %q{2013-03-08}
13
13
  s.description = %q{fake_arel will simulate rails 3 arel syntax for Rails 2.}
14
14
  s.email = %q{grant@pipelinedealsco.com}
15
15
  s.extra_rdoc_files = [
@@ -59,24 +59,27 @@ Gem::Specification.new do |s|
59
59
 
60
60
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
61
  s.add_runtime_dependency(%q<activerecord>, ["~> 2.3.11"])
62
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
62
+ s.add_development_dependency(%q<bundler>, [">= 0"])
63
63
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
64
64
  s.add_development_dependency(%q<rcov>, [">= 0"])
65
+ s.add_development_dependency(%q<debugger>, [">= 0"])
65
66
  s.add_development_dependency(%q<rspec>, ["= 1.3.1"])
66
67
  s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
67
68
  else
68
69
  s.add_dependency(%q<activerecord>, ["~> 2.3.11"])
69
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
70
+ s.add_dependency(%q<bundler>, [">= 0"])
70
71
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
71
72
  s.add_dependency(%q<rcov>, [">= 0"])
73
+ s.add_dependency(%q<debugger>, [">= 0"])
72
74
  s.add_dependency(%q<rspec>, ["= 1.3.1"])
73
75
  s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
74
76
  end
75
77
  else
76
78
  s.add_dependency(%q<activerecord>, ["~> 2.3.11"])
77
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
79
+ s.add_dependency(%q<bundler>, [">= 0"])
78
80
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
79
81
  s.add_dependency(%q<rcov>, [">= 0"])
82
+ s.add_dependency(%q<debugger>, [">= 0"])
80
83
  s.add_dependency(%q<rspec>, ["= 1.3.1"])
81
84
  s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
82
85
  end
@@ -37,7 +37,7 @@ module ActiveRecord
37
37
  ret[:select] = local_scope.proxy_options[:select] unless local_scope.proxy_options[:select].nil?
38
38
  local_conditions = merge_conditions(local_scope.proxy_options[:conditions])
39
39
  if local_conditions && ret[:conditions]
40
- if !ret[:conditions].index(local_conditions)
40
+ if (ret[:conditions].class == Hash and !ret[:conditions].keys.include?(local_conditions)) or (ret[:conditions].class != Hash and !ret[:conditions].index(local_conditions))
41
41
  ret[:conditions] = merge_conditions(ret[:conditions], local_scope.proxy_options[:conditions])
42
42
  end
43
43
  elsif local_conditions
@@ -7,11 +7,11 @@ module Rails3Finders
7
7
  named_scope :offset, lambda {|offset| {:offset => offset}}
8
8
  named_scope :limit, lambda {|limit| {:limit => limit}}
9
9
  named_scope :includes, lambda { |*includes| { :include => includes }}
10
- named_scope :order, lambda {|*order| {:order => order.join(',') }}
10
+ named_scope :order, lambda {|*order| {:order => order.flatten.join(',') }}
11
11
  named_scope :joins, lambda {|*join| {:joins => join } if join[0]}
12
12
  named_scope :from, lambda {|*from| {:from => from }}
13
13
  named_scope :having, lambda {|*having| {:having => having }}
14
- named_scope :group, lambda {|*group| {:group => group.join(',') }}
14
+ named_scope :group, lambda {|*group| {:group => group.flatten.join(',') }}
15
15
  named_scope :readonly, lambda {|readonly| {:readonly => readonly }}
16
16
  named_scope :lock, lambda {|lock| {:lock => lock }}
17
17
 
@@ -2,34 +2,34 @@ witty_retort:
2
2
  id: 1
3
3
  topic_id: 1
4
4
  content: Birdman is better!
5
- created_at: <%= 6.hours.ago.to_s(:db) %>
5
+ created_at: <%= 6.hours.ago.utc.to_s(:db) %>
6
6
 
7
7
  another:
8
8
  id: 2
9
9
  topic_id: 2
10
10
  content: Nuh uh!
11
- created_at: <%= 1.hour.ago.to_s(:db) %>
11
+ created_at: <%= 1.hour.ago.utc.to_s(:db) %>
12
12
 
13
13
  spam:
14
14
  id: 3
15
15
  topic_id: 1
16
16
  content: Nice site!
17
- created_at: <%= 1.hour.ago.to_s(:db) %>
17
+ created_at: <%= 1.hour.ago.utc.to_s(:db) %>
18
18
 
19
19
  decisive:
20
20
  id: 4
21
21
  topic_id: 4
22
22
  content: "I'm getting to the bottom of this"
23
- created_at: <%= 30.minutes.ago.to_s(:db) %>
23
+ created_at: <%= 30.minutes.ago.utc.to_s(:db) %>
24
24
 
25
25
  brave:
26
26
  id: 5
27
27
  topic_id: 4
28
28
  content: "AR doesn't scare me a bit"
29
- created_at: <%= 10.minutes.ago.to_s(:db) %>
29
+ created_at: <%= 10.minutes.ago.utc.to_s(:db) %>
30
30
 
31
31
  thang:
32
32
  id: 6
33
33
  topic_id: 4
34
34
  content: "AR This is some more content"
35
- created_at: <%= 10.hours.ago.to_s(:db) %>
35
+ created_at: <%= 10.hours.ago.utc.to_s(:db) %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_arel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Grant Ammons
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-03 00:00:00 -04:00
18
+ date: 2013-03-08 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -30,25 +30,23 @@ dependencies:
30
30
  - 3
31
31
  - 11
32
32
  version: 2.3.11
33
- prerelease: false
34
- name: activerecord
35
33
  version_requirements: *id001
34
+ name: activerecord
35
+ prerelease: false
36
36
  type: :runtime
37
37
  - !ruby/object:Gem::Dependency
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ~>
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
- hash: 23
43
+ hash: 3
44
44
  segments:
45
- - 1
46
- - 0
47
45
  - 0
48
- version: 1.0.0
49
- prerelease: false
50
- name: bundler
46
+ version: "0"
51
47
  version_requirements: *id002
48
+ name: bundler
49
+ prerelease: false
52
50
  type: :development
53
51
  - !ruby/object:Gem::Dependency
54
52
  requirement: &id003 !ruby/object:Gem::Requirement
@@ -62,9 +60,9 @@ dependencies:
62
60
  - 6
63
61
  - 4
64
62
  version: 1.6.4
65
- prerelease: false
66
- name: jeweler
67
63
  version_requirements: *id003
64
+ name: jeweler
65
+ prerelease: false
68
66
  type: :development
69
67
  - !ruby/object:Gem::Dependency
70
68
  requirement: &id004 !ruby/object:Gem::Requirement
@@ -76,12 +74,26 @@ dependencies:
76
74
  segments:
77
75
  - 0
78
76
  version: "0"
79
- prerelease: false
80
- name: rcov
81
77
  version_requirements: *id004
78
+ name: rcov
79
+ prerelease: false
82
80
  type: :development
83
81
  - !ruby/object:Gem::Dependency
84
82
  requirement: &id005 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ version_requirements: *id005
92
+ name: debugger
93
+ prerelease: false
94
+ type: :development
95
+ - !ruby/object:Gem::Dependency
96
+ requirement: &id006 !ruby/object:Gem::Requirement
85
97
  none: false
86
98
  requirements:
87
99
  - - "="
@@ -92,12 +104,12 @@ dependencies:
92
104
  - 3
93
105
  - 1
94
106
  version: 1.3.1
95
- prerelease: false
107
+ version_requirements: *id006
96
108
  name: rspec
97
- version_requirements: *id005
109
+ prerelease: false
98
110
  type: :development
99
111
  - !ruby/object:Gem::Dependency
100
- requirement: &id006 !ruby/object:Gem::Requirement
112
+ requirement: &id007 !ruby/object:Gem::Requirement
101
113
  none: false
102
114
  requirements:
103
115
  - - ">="
@@ -106,9 +118,9 @@ dependencies:
106
118
  segments:
107
119
  - 0
108
120
  version: "0"
109
- prerelease: false
121
+ version_requirements: *id007
110
122
  name: sqlite3-ruby
111
- version_requirements: *id006
123
+ prerelease: false
112
124
  type: :development
113
125
  description: fake_arel will simulate rails 3 arel syntax for Rails 2.
114
126
  email: grant@pipelinedealsco.com