cherring-rangetastic 0.1.1 → 0.1.2

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/Manifest CHANGED
@@ -1,10 +1,11 @@
1
1
  lib/rangetastic.rb
2
+ Manifest
2
3
  MIT-License
3
4
  Rakefile
5
+ rangetastic.gemspec
4
6
  README.markdown
5
7
  spec/fixtures/models.rb
6
8
  spec/fixtures/structure.sql
7
9
  spec/rangetastic_spec.rb
8
10
  spec/spec_helper.rb
9
11
  spec/test_helper.rb
10
- Manifest
data/README.markdown CHANGED
@@ -0,0 +1,26 @@
1
+ Introduction
2
+ ============
3
+ Rangetastic allows you to filter results of a named_scope call on any dates using any of a list of whitelisted fields you specify.
4
+
5
+ Configuration & Usage
6
+ =====================
7
+
8
+ To acheive this you need to install rangetastic
9
+
10
+ sudo gem install cherring-rangetastic
11
+
12
+ Then inside your environment.rb
13
+
14
+ config.gem "cherring-rangetastic", :source => "http://gems.github.com"
15
+
16
+ Then in your model pass in the fields you wish to allow to be searchable using the between filter
17
+
18
+ class Order < ActiveRecord::Base
19
+ acts_as_rangetastic :fields => ["ordered_on", "fulfilled_on"]
20
+ end
21
+
22
+ You can then chain the between scope with any named_scope call you make:
23
+
24
+ Order.fulfilled.between(1.week.ago, 10.minutes.ago, "fulfilled_on")
25
+
26
+ And if you (or someone nasty!) try to use a field that is not whitelisted, it will raise ActiveRecord::StatementInvalid
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('rangetastic', '0.1.1') do |p|
5
+ Echoe.new('rangetastic', '0.1.2') do |p|
6
6
  p.description = "Chain a date range to any named_scope on any date field with specified white listed fields"
7
7
  p.url = "http://github.com/cherring/rangetastic"
8
8
  p.author = "Chris Herring"
data/rangetastic.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rangetastic}
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chris Herring"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Chain a date range to any named_scope on any date field with specified white listed fields}
11
11
  s.email = %q{chris.herring.iphone@gmail.com}
12
12
  s.extra_rdoc_files = ["lib/rangetastic.rb", "README.markdown"]
13
- s.files = ["lib/rangetastic.rb", "MIT-License", "Rakefile", "README.markdown", "spec/fixtures/models.rb", "spec/fixtures/structure.sql", "spec/rangetastic_spec.rb", "spec/spec_helper.rb", "spec/test_helper.rb", "Manifest", "rangetastic.gemspec"]
13
+ s.files = ["lib/rangetastic.rb", "Manifest", "MIT-License", "Rakefile", "rangetastic.gemspec", "README.markdown", "spec/fixtures/models.rb", "spec/fixtures/structure.sql", "spec/rangetastic_spec.rb", "spec/spec_helper.rb", "spec/test_helper.rb"]
14
14
  s.homepage = %q{http://github.com/cherring/rangetastic}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rangetastic", "--main", "README.markdown"]
16
16
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cherring-rangetastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Herring
@@ -24,16 +24,16 @@ extra_rdoc_files:
24
24
  - README.markdown
25
25
  files:
26
26
  - lib/rangetastic.rb
27
+ - Manifest
27
28
  - MIT-License
28
29
  - Rakefile
30
+ - rangetastic.gemspec
29
31
  - README.markdown
30
32
  - spec/fixtures/models.rb
31
33
  - spec/fixtures/structure.sql
32
34
  - spec/rangetastic_spec.rb
33
35
  - spec/spec_helper.rb
34
36
  - spec/test_helper.rb
35
- - Manifest
36
- - rangetastic.gemspec
37
37
  has_rdoc: false
38
38
  homepage: http://github.com/cherring/rangetastic
39
39
  post_install_message: