searchable_record 0.0.2 → 0.0.3

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.
@@ -1,6 +1,6 @@
1
- require File.join(File.dirname(__FILE__) + '/searchable_record_spec_helper')
2
- require 'logger'
3
- require 'searchable_record'
1
+ require File.join(File.dirname(__FILE__) + "/searchable_record_spec_helper")
2
+ require "logger"
3
+ require "searchable_record"
4
4
 
5
5
  class Record; include SearchableRecord; end
6
6
 
@@ -12,9 +12,9 @@ describe SearchableRecord, "for finding queried records" do
12
12
 
13
13
  it "should be able to modify default settings" do
14
14
  new_settings = {
15
- :cast_since_as => 'time',
16
- :cast_until_as => 'date',
17
- :pattern_operator => 'regexp',
15
+ :cast_since_as => "time",
16
+ :cast_until_as => "date",
17
+ :pattern_operator => "regexp",
18
18
  :pattern_converter => lambda { |val| val }
19
19
  }
20
20
 
@@ -31,190 +31,190 @@ describe SearchableRecord, "for finding queried records" do
31
31
  Record.expects(:find).times(2).with(:all, { })
32
32
 
33
33
  Record.find_queried(:all, { }, { })
34
- Record.find_queried(:all, { :foo => 'bar' }, { })
34
+ Record.find_queried(:all, { :foo => "bar" }, { })
35
35
  end
36
36
 
37
37
  it "should execute find with a positive offset parameter" do
38
38
  Record.expects(:find).times(1).with(:all, { :offset => 1 })
39
39
 
40
- Record.find_queried(:all, { :offset => '1' }, { :offset => nil })
40
+ Record.find_queried(:all, { :offset => "1" }, { :offset => nil })
41
41
 
42
42
  Record.expects(:find).times(2).with(:all, { :offset => 4 })
43
43
 
44
- Record.find_queried(:all, { :offset => '4' }, { :offset => nil })
45
- Record.find_queried(:all, { :offset => '4', :limit => '3' }, { :offset => nil })
44
+ Record.find_queried(:all, { :offset => "4" }, { :offset => nil })
45
+ Record.find_queried(:all, { :offset => "4", :limit => "3" }, { :offset => nil })
46
46
  end
47
47
 
48
48
  it "should discard other than positive offset parameters" do
49
49
  Record.expects(:find).times(4).with(:all, { })
50
50
 
51
51
  Record.find_queried(:all, { }, { :offset => nil })
52
- Record.find_queried(:all, { :offset => 'aii' }, { :offset => nil })
53
- Record.find_queried(:all, { :offset => '0' }, { :offset => nil })
54
- Record.find_queried(:all, { :offset => '-1' }, { :offset => nil })
52
+ Record.find_queried(:all, { :offset => "aii" }, { :offset => nil })
53
+ Record.find_queried(:all, { :offset => "0" }, { :offset => nil })
54
+ Record.find_queried(:all, { :offset => "-1" }, { :offset => nil })
55
55
  end
56
56
 
57
57
  it "should execute find with a positive limit parameter" do
58
58
  Record.expects(:find).times(1).with(:all, { :limit => 1 })
59
59
 
60
- Record.find_queried(:all, { :limit => '1' }, { :limit => nil })
60
+ Record.find_queried(:all, { :limit => "1" }, { :limit => nil })
61
61
 
62
62
  Record.expects(:find).times(2).with(:all, { :limit => 4 })
63
63
 
64
- Record.find_queried(:all, { :limit => '4' }, { :limit => nil })
65
- Record.find_queried(:all, { :limit => '4', :offset => '3' }, { :limit => nil })
64
+ Record.find_queried(:all, { :limit => "4" }, { :limit => nil })
65
+ Record.find_queried(:all, { :limit => "4", :offset => "3" }, { :limit => nil })
66
66
  end
67
67
 
68
68
  it "should discard other than positive limit parameters" do
69
69
  Record.expects(:find).times(4).with(:all, { })
70
70
 
71
71
  Record.find_queried(:all, { }, { :limit => nil })
72
- Record.find_queried(:all, { :limit => 'aii' }, { :limit => nil })
73
- Record.find_queried(:all, { :limit => '0' }, { :limit => nil })
74
- Record.find_queried(:all, { :limit => '-1' }, { :limit => nil })
72
+ Record.find_queried(:all, { :limit => "aii" }, { :limit => nil })
73
+ Record.find_queried(:all, { :limit => "0" }, { :limit => nil })
74
+ Record.find_queried(:all, { :limit => "-1" }, { :limit => nil })
75
75
  end
76
76
 
77
77
  it "should execute find with sort parameter" do
78
- Record.expects(:find).times(1).with(:all, { :order => 'users.first_name' })
78
+ Record.expects(:find).times(1).with(:all, { :order => "users.first_name" })
79
79
 
80
- Record.find_queried(:all, { :sort => 'first_name' },
81
- { :sort => { 'first_name' => 'users.first_name' } })
80
+ Record.find_queried(:all, { :sort => "first_name" },
81
+ { :sort => { "first_name" => "users.first_name" } })
82
82
  end
83
83
 
84
84
  it "should execute find with reverse sort parameter" do
85
- Record.expects(:find).times(1).with(:all, { :order => 'users.first_name desc' })
85
+ Record.expects(:find).times(1).with(:all, { :order => "users.first_name desc" })
86
86
 
87
- Record.find_queried(:all, { :rsort => 'first_name' },
88
- { :sort => { 'first_name' => 'users.first_name' },
87
+ Record.find_queried(:all, { :rsort => "first_name" },
88
+ { :sort => { "first_name" => "users.first_name" },
89
89
  :rsort => nil })
90
90
  end
91
91
 
92
92
  it "should raise an exception if rsort is specified without sort rule" do
93
- lambda { Record.find_queried(:all, { :rsort => 'first_name' },
94
- { :rsort => { 'first_name' => 'users.first_name' } }) }.should raise_error(ArgumentError)
93
+ lambda { Record.find_queried(:all, { :rsort => "first_name" },
94
+ { :rsort => { "first_name" => "users.first_name" } }) }.should raise_error(ArgumentError)
95
95
  end
96
96
 
97
- it "should execute find with sort parameter, favoring 'sort' over 'rsort'" do
98
- Record.expects(:find).times(1).with(:all, { :order => 'users.first_name' })
97
+ it "should execute find with sort parameter, favoring \"sort\" over \"rsort\"" do
98
+ Record.expects(:find).times(1).with(:all, { :order => "users.first_name" })
99
99
 
100
- Record.find_queried(:all, { :sort => 'first_name', :rsort => 'last_name' },
101
- { :sort => { 'first_name' => 'users.first_name',
102
- 'last_name' => 'users.last_name' },
100
+ Record.find_queried(:all, { :sort => "first_name", :rsort => "last_name" },
101
+ { :sort => { "first_name" => "users.first_name",
102
+ "last_name" => "users.last_name" },
103
103
  :rsort => nil })
104
104
  end
105
105
 
106
106
  it "should discard other than specified sort parameters" do
107
107
  Record.expects(:find).times(1).with(:all, { })
108
108
 
109
- Record.find_queried(:all, { :sort => 'first' },
110
- { :sort => { 'first_name' => 'users.first_name' } })
109
+ Record.find_queried(:all, { :sort => "first" },
110
+ { :sort => { "first_name" => "users.first_name" } })
111
111
 
112
- Record.expects(:find).times(1).with(:all, { :order => 'users.last_name desc' })
112
+ Record.expects(:find).times(1).with(:all, { :order => "users.last_name desc" })
113
113
 
114
- Record.find_queried(:all, { :sort => 'last', :rsort => 'last_name' },
115
- { :sort => { 'first_name' => 'users.first_name',
116
- 'last_name' => 'users.last_name' },
114
+ Record.find_queried(:all, { :sort => "last", :rsort => "last_name" },
115
+ { :sort => { "first_name" => "users.first_name",
116
+ "last_name" => "users.last_name" },
117
117
  :rsort => nil })
118
118
  end
119
119
 
120
120
  it "should execute find with since parameter, with default settings" do
121
- Record.expects(:find).times(2).with(:all, { :conditions => [ '(users.created_at >= cast(:since as datetime))',
122
- { :since => '2008-02-26' } ] })
121
+ Record.expects(:find).times(2).with(:all, { :conditions => [ "(users.created_at >= cast(:since as datetime))",
122
+ { :since => "2008-02-26" } ] })
123
123
 
124
- Record.find_queried(:all, { :since => '2008-02-26' },
125
- { :since => 'users.created_at' })
126
- Record.find_queried(:all, { :since => '2008-02-26' },
127
- { :since => { :column => 'users.created_at' } })
124
+ Record.find_queried(:all, { :since => "2008-02-26" },
125
+ { :since => "users.created_at" })
126
+ Record.find_queried(:all, { :since => "2008-02-26" },
127
+ { :since => { :column => "users.created_at" } })
128
128
  end
129
129
 
130
130
  it "should execute find with since parameter, with custom settings" do
131
- Record.expects(:find).times(3).with(:all, { :conditions => [ '(users.time >= cast(:since as time))',
132
- { :since => '11:04' } ] })
131
+ Record.expects(:find).times(3).with(:all, { :conditions => [ "(users.time >= cast(:since as time))",
132
+ { :since => "11:04" } ] })
133
133
 
134
- Record.find_queried(:all, { :since => '11:04' },
135
- { :since => { :column => 'users.time',
136
- :cast_as => 'time' } })
134
+ Record.find_queried(:all, { :since => "11:04" },
135
+ { :since => { :column => "users.time",
136
+ :cast_as => "time" } })
137
137
 
138
138
  org_settings = Record.searchable_record_settings.dup
139
- Record.searchable_record_settings[:cast_since_as] = 'time'
139
+ Record.searchable_record_settings[:cast_since_as] = "time"
140
140
 
141
- Record.find_queried(:all, { :since => '11:04' },
142
- { :since => 'users.time'})
141
+ Record.find_queried(:all, { :since => "11:04" },
142
+ { :since => "users.time"})
143
143
 
144
- Record.find_queried(:all, { :since => '11:04' },
145
- { :since => { :column => 'users.time' } })
144
+ Record.find_queried(:all, { :since => "11:04" },
145
+ { :since => { :column => "users.time" } })
146
146
 
147
147
  Record.searchable_record_settings = org_settings
148
148
  end
149
149
 
150
150
  it "should execute find with until parameter, with default settings" do
151
- Record.expects(:find).times(2).with(:all, { :conditions => [ '(users.created_at <= cast(:until as datetime))',
152
- { :until => '2008-04-28' } ] })
151
+ Record.expects(:find).times(2).with(:all, { :conditions => [ "(users.created_at <= cast(:until as datetime))",
152
+ { :until => "2008-04-28" } ] })
153
153
 
154
- Record.find_queried(:all, { :until => '2008-04-28' },
155
- { :until => 'users.created_at' })
156
- Record.find_queried(:all, { :until => '2008-04-28' },
157
- { :until => { :column => 'users.created_at' } })
154
+ Record.find_queried(:all, { :until => "2008-04-28" },
155
+ { :until => "users.created_at" })
156
+ Record.find_queried(:all, { :until => "2008-04-28" },
157
+ { :until => { :column => "users.created_at" } })
158
158
  end
159
159
 
160
160
  it "should execute find with until parameter, with custom settings" do
161
- Record.expects(:find).times(3).with(:all, { :conditions => [ '(users.time <= cast(:until as time))',
162
- { :until => '13:06' } ] })
161
+ Record.expects(:find).times(3).with(:all, { :conditions => [ "(users.time <= cast(:until as time))",
162
+ { :until => "13:06" } ] })
163
163
 
164
- Record.find_queried(:all, { :until => '13:06' },
165
- { :until => { :column => 'users.time',
166
- :cast_as => 'time' } })
164
+ Record.find_queried(:all, { :until => "13:06" },
165
+ { :until => { :column => "users.time",
166
+ :cast_as => "time" } })
167
167
 
168
168
  org_settings = Record.searchable_record_settings.dup
169
- Record.searchable_record_settings[:cast_until_as] = 'time'
169
+ Record.searchable_record_settings[:cast_until_as] = "time"
170
170
 
171
- Record.find_queried(:all, { :until => '13:06' },
172
- { :until => 'users.time'})
171
+ Record.find_queried(:all, { :until => "13:06" },
172
+ { :until => "users.time"})
173
173
 
174
- Record.find_queried(:all, { :until => '13:06' },
175
- { :until => { :column => 'users.time' } })
174
+ Record.find_queried(:all, { :until => "13:06" },
175
+ { :until => { :column => "users.time" } })
176
176
 
177
177
  Record.searchable_record_settings = org_settings
178
178
  end
179
179
 
180
180
  it "should execute find with pattern matching parameters" do
181
181
  Record.expects(:find).times(1).with(:all, :conditions => [ "(users.first_name like :name)",
182
- { :name => '%john%' } ])
182
+ { :name => "%john%" } ])
183
183
 
184
- Record.find_queried(:all, { :name => 'john' },
185
- { :patterns => { :name => 'users.first_name'} })
184
+ Record.find_queried(:all, { :name => "john" },
185
+ { :patterns => { :name => "users.first_name"} })
186
186
  end
187
187
 
188
188
  it "should execute find with a pattern matching parameter, with default settings" do
189
189
  Record.expects(:find).times(1).with(:all, :conditions => [ "(sites.status like :status)",
190
- { :status => '%active%' } ])
190
+ { :status => "%active%" } ])
191
191
 
192
- Record.find_queried(:all, { :status => 'active' },
193
- { :patterns => { :status => 'sites.status' } })
192
+ Record.find_queried(:all, { :status => "active" },
193
+ { :patterns => { :status => "sites.status" } })
194
194
  end
195
195
 
196
196
  it "should execute find with a pattern matching parameter, with custom settings" do
197
197
  Record.expects(:find).times(1).with(:all, :conditions => [ "(sites.domain like :domain)",
198
- { :domain => '%www.example.fi%' } ])
198
+ { :domain => "%www.example.fi%" } ])
199
199
 
200
- Record.find_queried(:all, { :domain => 'www_example_fi' },
201
- { :patterns => { :domain => { :column => 'sites.domain',
200
+ Record.find_queried(:all, { :domain => "www_example_fi" },
201
+ { :patterns => { :domain => { :column => "sites.domain",
202
202
  :converter => lambda { |val| "%#{val.gsub('_', '.')}%" } } } })
203
203
 
204
204
  Record.expects(:find).times(2).with(:all, :conditions => [ "(sites.domain regexp :domain)",
205
- { :domain => 'www.example.fi' } ])
205
+ { :domain => "www.example.fi" } ])
206
206
 
207
- Record.find_queried(:all, { :domain => 'www_example_fi' },
208
- { :patterns => { :domain => { :column => 'sites.domain',
209
- :converter => lambda { |val| val.gsub('_', '.') },
210
- :operator => 'regexp' } } })
207
+ Record.find_queried(:all, { :domain => "www_example_fi" },
208
+ { :patterns => { :domain => { :column => "sites.domain",
209
+ :converter => lambda { |val| val.gsub("_", ".") },
210
+ :operator => "regexp" } } })
211
211
 
212
212
  org_settings = Record.searchable_record_settings.dup
213
- Record.searchable_record_settings[:pattern_operator] = 'regexp'
214
- Record.searchable_record_settings[:pattern_converter] = lambda { |val| val.gsub('_', '.') }
213
+ Record.searchable_record_settings[:pattern_operator] = "regexp"
214
+ Record.searchable_record_settings[:pattern_converter] = lambda { |val| val.gsub("_", ".") }
215
215
 
216
- Record.find_queried(:all, { :domain => 'www_example_fi' },
217
- { :patterns => { :domain => 'sites.domain' } })
216
+ Record.find_queried(:all, { :domain => "www_example_fi" },
217
+ { :patterns => { :domain => "sites.domain" } })
218
218
 
219
219
  Record.searchable_record_settings = org_settings
220
220
  end
@@ -222,40 +222,40 @@ describe SearchableRecord, "for finding queried records" do
222
222
  it "should execute find with multiple pattern matching parameters" do
223
223
  results = [
224
224
  { :conditions => [ "(sites.domain like :domain) and (sites.status like :status)",
225
- { :domain => '%www.another.example.fi%',
226
- :status => '%active%' } ]},
225
+ { :domain => "%www.another.example.fi%",
226
+ :status => "%active%" } ]},
227
227
  { :conditions => [ "(sites.status like :status) and (sites.domain like :domain)",
228
- { :domain => '%www.another.example.fi%',
229
- :status => '%active%' } ]}
228
+ { :domain => "%www.another.example.fi%",
229
+ :status => "%active%" } ]}
230
230
  ]
231
231
 
232
232
  Record.expects(:find).times(1).with(:all, any_of(equals(results[0]), equals(results[1])))
233
233
 
234
- Record.find_queried(:all, { :domain => 'www_another_example_fi',
235
- :status => 'active' },
236
- { :patterns => { :domain => { :column => 'sites.domain',
234
+ Record.find_queried(:all, { :domain => "www_another_example_fi",
235
+ :status => "active" },
236
+ { :patterns => { :domain => { :column => "sites.domain",
237
237
  :converter => lambda { |val| "%#{val.gsub('_', '.')}%" } },
238
- :status => 'sites.status' } })
238
+ :status => "sites.status" } })
239
239
  end
240
240
 
241
241
  it "should preserve additional options" do
242
242
  Record.expects(:find).times(1).with(:all, :include => [ :affiliates ],
243
243
  :conditions => [ "(sites.flags = 'fo') and (sites.domain like :domain)",
244
- { :domain => '%www.still-works.com%' } ])
244
+ { :domain => "%www.still-works.com%" } ])
245
245
 
246
- Record.find_queried(:all, { :domain => 'www_still-works_com' },
247
- { :patterns => { :domain => { :column => 'sites.domain',
246
+ Record.find_queried(:all, { :domain => "www_still-works_com" },
247
+ { :patterns => { :domain => { :column => "sites.domain",
248
248
  :converter => lambda { |val| "%#{val.gsub('_', '.')}%" } } } },
249
249
  { :conditions => "sites.flags = 'fo'",
250
250
  :include => [ :affiliates ] })
251
251
 
252
252
  Record.expects(:find).times(1).with(:all, :include => [ :affiliates ],
253
253
  :conditions => [ "(sites.flags = 'fo') and (users.time <= cast(:until as time))",
254
- { :until => '13:06' } ])
254
+ { :until => "13:06" } ])
255
255
 
256
- Record.find_queried(:all, { :until => '13:06' },
257
- { :until => { :column => 'users.time',
258
- :cast_as => 'time' } },
256
+ Record.find_queried(:all, { :until => "13:06" },
257
+ { :until => { :column => "users.time",
258
+ :cast_as => "time" } },
259
259
  { :conditions => "sites.flags = 'fo'",
260
260
  :include => [ :affiliates ] })
261
261
  end
@@ -265,29 +265,29 @@ describe SearchableRecord, "for finding queried records" do
265
265
 
266
266
  Item.expects(:find).times(1).with(:all,
267
267
  :include => [ :owners ],
268
- :order => 'items.name desc',
268
+ :order => "items.name desc",
269
269
  :offset => 4,
270
270
  :limit => 5,
271
271
  :conditions => [ "(items.flag = 'f') and (items.created_at <= cast(:until as datetime)) and (items.name like :name)",
272
- { :until => '2008-02-28', :name => '%foo.bar%' } ])
272
+ { :until => "2008-02-28", :name => "%foo.bar%" } ])
273
273
 
274
274
  query_params = {
275
- :offset => '4',
276
- :limit => '5',
277
- :rsort => 'name',
278
- :until => '2008-02-28',
279
- :name => 'foo_bar'
275
+ :offset => "4",
276
+ :limit => "5",
277
+ :rsort => "name",
278
+ :until => "2008-02-28",
279
+ :name => "foo_bar"
280
280
  }
281
281
 
282
282
  rules = {
283
283
  :limit => nil,
284
284
  :offset => nil,
285
- :sort => { 'name' => 'items.name', 'created' => 'items.created_at' },
285
+ :sort => { "name" => "items.name", "created" => "items.created_at" },
286
286
  :rsort => nil,
287
- :since => 'items.created_at',
288
- :until => 'items.created_at',
289
- :patterns => { :type => 'items.type',
290
- :name => { :column => 'items.name',
287
+ :since => "items.created_at",
288
+ :until => "items.created_at",
289
+ :patterns => { :type => "items.type",
290
+ :name => { :column => "items.name",
291
291
  :converter => lambda { |val| "%#{val.gsub('_', '.')}%" } } }
292
292
  }
293
293
 
@@ -1,7 +1,7 @@
1
- $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + "/../lib")
2
2
 
3
- require 'rubygems'
4
- require 'mocha'
3
+ require "rubygems"
4
+ require "mocha"
5
5
 
6
6
  Spec::Runner.configure do |config|
7
7
  config.mock_with :mocha
data/spec/util_spec.rb CHANGED
@@ -1,29 +1,29 @@
1
- require File.join(File.dirname(__FILE__) + '/searchable_record_spec_helper')
2
- require 'active_support/core_ext/blank'
3
- require 'util'
1
+ require File.join(File.dirname(__FILE__) + "/searchable_record_spec_helper")
2
+ require "active_support/core_ext/blank"
3
+ require "util"
4
4
 
5
5
  include SearchableRecord
6
6
 
7
7
  describe Util do
8
8
  it "should parse positive integers" do
9
- Util.parse_positive_int('1').should == 1
10
- Util.parse_positive_int('1sdfgsdf').should == 1
9
+ Util.parse_positive_int("1").should == 1
10
+ Util.parse_positive_int("1sdfgsdf").should == 1
11
11
  Util.parse_positive_int(nil).should be_nil
12
- Util.parse_positive_int('0').should be_nil
13
- Util.parse_positive_int('-1').should be_nil
14
- Util.parse_positive_int('sdfgdfg').should be_nil
12
+ Util.parse_positive_int("0").should be_nil
13
+ Util.parse_positive_int("-1").should be_nil
14
+ Util.parse_positive_int("sdfgdfg").should be_nil
15
15
  end
16
16
 
17
17
  it "should prune and duplicate hashes" do
18
18
  str = "don't remove me"
19
19
 
20
- Util.pruned_dup({ :excess => 'foobar', :preserve => str }, [ :preserve ]).should == { :preserve => str }
21
- Util.pruned_dup({ :excess => 'foobar', 'preserve' => str }, [ :preserve ]).should == { :preserve => str }
20
+ Util.pruned_dup({ :excess => "foobar", :preserve => str }, [ :preserve ]).should == { :preserve => str }
21
+ Util.pruned_dup({ :excess => "foobar", "preserve" => str }, [ :preserve ]).should == { :preserve => str }
22
22
 
23
23
  # A contrived example of calling #to_a for the second argument.
24
- Util.pruned_dup({:e => 'foobar', [ :p, str ] => str }, { :p => str }).should == { [:p, str ] => str }
24
+ Util.pruned_dup({:e => "foobar", [ :p, str ] => str }, { :p => str }).should == { [:p, str ] => str }
25
25
 
26
- Util.pruned_dup({ :excess => 'foobar' }, [ :preserve ]).should == { }
26
+ Util.pruned_dup({ :excess => "foobar" }, [ :preserve ]).should == { }
27
27
  Util.pruned_dup({ }, [ ]).should == { }
28
28
  Util.pruned_dup({ }, [ :preserve ]).should == { }
29
29
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchable_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tuomas Kareinen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-27 00:00:00 +03:00
12
+ date: 2009-01-14 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -23,43 +23,51 @@ dependencies:
23
23
  version: "0"
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: hoe
26
+ name: echoe
27
27
  type: :development
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.7.0
33
+ version: "0"
34
34
  version:
35
- description: "SearchableRecord is a small Ruby on Rails plugin that makes the parsing of query parameters from URLs easy for resources, allowing the requester to control the items (records) shown in the resource's representation. The implementation is a helper module (a mixin) for ActiveRecord models. It is used by including SearchableRecord module in a model. The mixin provides a class method, <tt>SearchableRecord#find_queried</tt>, to the class that includes it. The method is a front-end to ActiveRecord::Base#find: it parses query parameters against the given rules and calls <tt>find</tt> accordingly, returning the results of <tt>find</tt>."
35
+ description: SearchableRecord is a small Ruby on Rails plugin that makes the parsing of query parameters from URLs easy for resources, allowing the requester to control the items (records) shown in the resource's representation.
36
36
  email: tkareine@gmail.com
37
37
  executables: []
38
38
 
39
39
  extensions: []
40
40
 
41
41
  extra_rdoc_files:
42
- - History.txt
43
- - Manifest.txt
44
- - MIT-LICENSE.txt
45
- - README.txt
42
+ - CHANGELOG.rdoc
43
+ - lib/searchable_record/core.rb
44
+ - lib/searchable_record/util.rb
45
+ - lib/searchable_record/version.rb
46
+ - lib/searchable_record.rb
47
+ - README.rdoc
46
48
  files:
47
- - History.txt
48
- - Manifest.txt
49
- - MIT-LICENSE.txt
50
- - Rakefile
51
- - README.txt
49
+ - CHANGELOG.rdoc
50
+ - lib/searchable_record/core.rb
51
+ - lib/searchable_record/util.rb
52
+ - lib/searchable_record/version.rb
52
53
  - lib/searchable_record.rb
53
- - lib/util.rb
54
- - spec/searchable_record_spec_helper.rb
54
+ - Manifest
55
+ - Rakefile
56
+ - README.rdoc
55
57
  - spec/searchable_record_spec.rb
58
+ - spec/searchable_record_spec_helper.rb
56
59
  - spec/util_spec.rb
60
+ - searchable_record.gemspec
57
61
  has_rdoc: true
58
62
  homepage: http://searchable-rec.rubyforge.org
59
63
  post_install_message:
60
64
  rdoc_options:
65
+ - --line-numbers
66
+ - --inline-source
67
+ - --title
68
+ - Searchable_record
61
69
  - --main
62
- - README.txt
70
+ - README.rdoc
63
71
  require_paths:
64
72
  - lib
65
73
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -72,12 +80,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
80
  requirements:
73
81
  - - ">="
74
82
  - !ruby/object:Gem::Version
75
- version: "0"
83
+ version: "1.2"
76
84
  version:
77
85
  requirements: []
78
86
 
79
87
  rubyforge_project: searchable-rec
80
- rubygems_version: 1.2.0
88
+ rubygems_version: 1.3.1
81
89
  signing_key:
82
90
  specification_version: 2
83
91
  summary: SearchableRecord is a small Ruby on Rails plugin that makes the parsing of query parameters from URLs easy for resources, allowing the requester to control the items (records) shown in the resource's representation.
data/History.txt DELETED
@@ -1,7 +0,0 @@
1
- === 0.0.2 / 2008-08-26
2
-
3
- * Changed specs to use RSpec syntax instead of test/spec.
4
-
5
- === 0.0.1 / 2008-03-03
6
-
7
- * First release.
data/MIT-LICENSE.txt DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2008 Tuomas Kareinen
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- IN THE SOFTWARE.
data/Manifest.txt DELETED
@@ -1,10 +0,0 @@
1
- History.txt
2
- Manifest.txt
3
- MIT-LICENSE.txt
4
- Rakefile
5
- README.txt
6
- lib/searchable_record.rb
7
- lib/util.rb
8
- spec/searchable_record_spec_helper.rb
9
- spec/searchable_record_spec.rb
10
- spec/util_spec.rb