searchlogic 2.4.26 → 2.4.27
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.yml +1 -1
- data/lib/searchlogic/search/to_yaml.rb +0 -7
- data/searchlogic.gemspec +2 -2
- data/spec/spec_helper.rb +18 -18
- metadata +7 -3
data/VERSION.yml
CHANGED
@@ -4,17 +4,10 @@ module Searchlogic
|
|
4
4
|
def self.included(klass)
|
5
5
|
klass.class_eval do
|
6
6
|
yaml_as "tag:ruby.yaml.org,2002:class"
|
7
|
-
extend ClassMethods
|
8
7
|
include InstanceMethods
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
12
|
-
module ClassMethods
|
13
|
-
def yaml_new(klass, tag, val)
|
14
|
-
raise "ass"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
11
|
module InstanceMethods
|
19
12
|
def to_yaml( opts = {} )
|
20
13
|
YAML::quick_emit( self, opts ) do |out|
|
data/searchlogic.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{searchlogic}
|
8
|
-
s.version = "2.4.
|
8
|
+
s.version = "2.4.27"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ben Johnson of Binary Logic"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-10-05}
|
13
13
|
s.description = %q{Searchlogic makes using ActiveRecord named scopes easier and less repetitive.}
|
14
14
|
s.email = %q{bjohnson@binarylogic.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec'
|
2
2
|
require 'rubygems'
|
3
|
-
require 'ruby-debug'
|
3
|
+
#require 'ruby-debug'
|
4
4
|
require 'active_record'
|
5
5
|
|
6
6
|
ENV['TZ'] = 'UTC'
|
@@ -15,7 +15,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
15
15
|
t.string :auditable_type
|
16
16
|
t.integer :auditable_id
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
create_table :companies do |t|
|
20
20
|
t.datetime :created_at
|
21
21
|
t.datetime :updated_at
|
@@ -23,16 +23,16 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
23
23
|
t.string :description
|
24
24
|
t.integer :users_count, :default => 0
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
create_table :user_groups do |t|
|
28
28
|
t.string :name
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
create_table :user_groups_users, :id => false do |t|
|
32
32
|
t.integer :user_group_id, :null => false
|
33
33
|
t.integer :user_id, :null => false
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
36
|
create_table :users do |t|
|
37
37
|
t.datetime :created_at
|
38
38
|
t.datetime :updated_at
|
@@ -44,13 +44,13 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
44
44
|
t.string :some_type_id
|
45
45
|
t.datetime :whatever_at
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
create_table :carts do |t|
|
49
49
|
t.datetime :created_at
|
50
50
|
t.datetime :updated_at
|
51
51
|
t.integer :user_id
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
create_table :orders do |t|
|
55
55
|
t.datetime :created_at
|
56
56
|
t.datetime :updated_at
|
@@ -59,7 +59,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
59
59
|
t.float :taxes
|
60
60
|
t.float :total
|
61
61
|
end
|
62
|
-
|
62
|
+
|
63
63
|
create_table :fees do |t|
|
64
64
|
t.datetime :created_at
|
65
65
|
t.datetime :updated_at
|
@@ -67,7 +67,7 @@ ActiveRecord::Schema.define(:version => 1) do
|
|
67
67
|
t.integer :owner_id
|
68
68
|
t.float :cost
|
69
69
|
end
|
70
|
-
|
70
|
+
|
71
71
|
create_table :line_items do |t|
|
72
72
|
t.datetime :created_at
|
73
73
|
t.datetime :updated_at
|
@@ -85,44 +85,44 @@ Spec::Runner.configure do |config|
|
|
85
85
|
class ::Audit < ActiveRecord::Base
|
86
86
|
belongs_to :auditable, :polymorphic => true
|
87
87
|
end
|
88
|
-
|
88
|
+
|
89
89
|
class ::Company < ActiveRecord::Base
|
90
90
|
has_many :orders, :through => :users
|
91
91
|
has_many :users, :dependent => :destroy
|
92
92
|
end
|
93
|
-
|
93
|
+
|
94
94
|
class ::UserGroup < ActiveRecord::Base
|
95
95
|
has_and_belongs_to_many :users
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
class ::User < ActiveRecord::Base
|
99
99
|
belongs_to :company, :counter_cache => true
|
100
100
|
has_many :orders, :dependent => :destroy
|
101
101
|
has_many :orders_big, :class_name => 'Order', :conditions => 'total > 100'
|
102
102
|
has_and_belongs_to_many :user_groups
|
103
|
-
|
103
|
+
|
104
104
|
self.skip_time_zone_conversion_for_attributes = [:whatever_at]
|
105
105
|
end
|
106
|
-
|
106
|
+
|
107
107
|
class ::Order < ActiveRecord::Base
|
108
108
|
belongs_to :user
|
109
109
|
has_many :line_items, :dependent => :destroy
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
class ::Fee < ActiveRecord::Base
|
113
113
|
belongs_to :owner, :polymorphic => true
|
114
114
|
end
|
115
|
-
|
115
|
+
|
116
116
|
class ::LineItem < ActiveRecord::Base
|
117
117
|
belongs_to :order
|
118
118
|
end
|
119
|
-
|
119
|
+
|
120
120
|
::Company.destroy_all
|
121
121
|
::User.destroy_all
|
122
122
|
::Order.destroy_all
|
123
123
|
::LineItem.destroy_all
|
124
124
|
end
|
125
|
-
|
125
|
+
|
126
126
|
config.after(:each) do
|
127
127
|
Object.send(:remove_const, :Company)
|
128
128
|
Object.send(:remove_const, :User)
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: searchlogic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 41
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 2
|
7
8
|
- 4
|
8
|
-
-
|
9
|
-
version: 2.4.
|
9
|
+
- 27
|
10
|
+
version: 2.4.27
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Ben Johnson of Binary Logic
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-10-05 00:00:00 -04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
@@ -25,6 +26,7 @@ dependencies:
|
|
25
26
|
requirements:
|
26
27
|
- - ">="
|
27
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
28
30
|
segments:
|
29
31
|
- 2
|
30
32
|
- 0
|
@@ -99,6 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
101
|
requirements:
|
100
102
|
- - ">="
|
101
103
|
- !ruby/object:Gem::Version
|
104
|
+
hash: 3
|
102
105
|
segments:
|
103
106
|
- 0
|
104
107
|
version: "0"
|
@@ -107,6 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
110
|
requirements:
|
108
111
|
- - ">="
|
109
112
|
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
110
114
|
segments:
|
111
115
|
- 0
|
112
116
|
version: "0"
|