sexy_scopes 0.5.1 → 0.6.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ce33d394e7388e54629f64eb7ffb6db752337088
4
+ data.tar.gz: 08ed0052a528fba6aec3bdfc27ef53e36c881790
5
+ SHA512:
6
+ metadata.gz: fcf5492bd6d3717504dcf30371796781cd46d13ef5b9fc2de143925b93b6488141f9cf705348b20c0f77fe4e60dfc3b05b7bed8ce4a415a57407ecd381104d33
7
+ data.tar.gz: 490a59156615aeef8e8e94bafb92877c20ebf30680bac27120e5883913ac34da5cf724c694e5d19ea758c17b6fe03ed5a4aa8678f0fa5f5d8edea2227e0a95b1
data/.travis.yml ADDED
@@ -0,0 +1,19 @@
1
+ language: ruby
2
+ bundler_args: --without development --standalone
3
+ rvm:
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - jruby-19mode
8
+ - rbx-19mode
9
+ gemfile:
10
+ - ci/Gemfile.ar3.1
11
+ - ci/Gemfile.ar3.2
12
+ - ci/Gemfile.ar-edge
13
+ matrix:
14
+ exclude:
15
+ - rvm: 1.9.2
16
+ gemfile: ci/Gemfile.ar-edge
17
+ branches:
18
+ only:
19
+ - master
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ### 0.6.0
2
+
3
+ - Drop support for Ruby < 1.9.2 and ActiveRecord < 3.1
4
+ - Add support for JRuby and Rubinius
5
+ - Integrate with Travis CI
6
+
7
+ ### 0.5.1
8
+
9
+ - Initial stable release
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec
data/README.md CHANGED
@@ -1,62 +1,116 @@
1
1
  SexyScopes
2
2
  ==========
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/sexy_scopes.png)](https://rubygems.org/gems/sexy_scopes)
5
+ [![Dependencies](https://gemnasium.com/samleb/sexy_scopes.png?travis)](https://gemnasium.com/samleb/sexy_scopes)
6
+ [![Code Climate](https://codeclimate.com/github/samleb/sexy_scopes.png)](https://codeclimate.com/github/samleb/sexy_scopes)
7
+ [![Build Status](https://api.travis-ci.org/samleb/sexy_scopes.png)](https://travis-ci.org/samleb/sexy_scopes)
8
+ [![Coverage Status](https://coveralls.io/repos/samleb/sexy_scopes/badge.png)](https://coveralls.io/r/samleb/sexy_scopes)
9
+
4
10
  **Write beautiful and expressive ActiveRecord scopes without SQL**
5
11
 
12
+ SexyScopes is a gem that adds syntactic sugar for creating ActiveRecord scopes
13
+ in Ruby instead of SQL.
14
+ This allows for more expressive, less error-prone and database independent conditions.
15
+
16
+ **WARNING**: This gem requires Ruby >= 1.9.2 and ActiveRecord >= 3.1.
17
+
6
18
  * [Source Code](https://github.com/samleb/sexy_scopes)
7
19
  * [Rubygem](http://rubygems.org/gems/sexy_scopes)
8
-
9
- SexyScopes is a gem that adds syntactic sugar for creating scopes in Rails 3.
20
+ * [API Documentation](http://rubydoc.info/gems/sexy_scopes)
10
21
 
11
22
  Usage & Examples
12
23
  ----------------
13
24
 
25
+ Let's define a `Product` model with this schema:
26
+
14
27
  ```ruby
28
+ # price :integer
29
+ # category :string
30
+ # visible :boolean
31
+ # draft :boolean
15
32
  class Product < ActiveRecord::Base
16
- # `self.price` represents the `price` column
17
- def self.cheaper_than(price)
18
- where self.price < price
19
- end
20
-
21
- scope :visible, (category != nil) & (draft == false)
22
-
23
- # can't use `name` directly here as `Product.name` method already exists (== "Product")
24
- def self.search(term)
25
- where attribute(:name) =~ "%#{term}%"
26
- end
27
33
  end
28
34
  ```
29
35
 
30
- Classic `Arel::Attribute` methods (`lt`, `in`, `matches`, `not`, etc.) are still
31
- available and predicates can be chained using special operators `&` (`and`),
32
- `|` (`or`), and `~` (`not`):
36
+ Now take a look at the following scope:
33
37
 
34
38
  ```ruby
35
- class User < ActiveRecord::Base
36
- scope :recently_signed_in, lambda {
37
- where last_sign_in_at > 10.days.ago
38
- }
39
-
40
- (score + 20 == 40).to_sql
41
- # => ("users"."score" + 20) = 40
42
-
43
- ((username == "Bob") | (username != "Alice")).to_sql
44
- # => ("users"."username" = 'Bob' OR "users"."username" != 'Alice')
39
+ scope :visible, where("category IS NOT NULL AND draft = ? AND price > 0", false)
40
+ ```
41
+
42
+ Hum, lots of *SQL*, not very *Ruby*-esque...
43
+
44
+ **With SexyScopes**
45
+
46
+ ```ruby
47
+ scope :visible, where((category != nil) & (draft == false) & (price > 0))
48
+ ```
49
+
50
+ Much better! Looks like magic? *It's not*.
51
+
52
+ `category`, `draft` and `price` in this context are methods representing your model's columns.
53
+ They respond to Ruby operators (like `<`, `==`, etc.) and can be combined
54
+ with logical operators (`&` and `|`) to express complex predicates.
55
+
56
+ --------------------------
57
+
58
+ Let's take a look at another example with these relations:
59
+
60
+ ```ruby
61
+ # rating: integer
62
+ class Post < ActiveRecord::Base
63
+ has_many :comments
45
64
  end
46
65
 
47
- class Product < ActiveRecord::Base
48
- predicate = (attribute(:name) == nil) & ~category.in(%w( shoes shirts ))
49
- predicate.to_sql
50
- # => "products"."name" IS NULL AND NOT ("products"."category" IN ('shoes', 'shirts'))
51
-
52
- # These predicates can be used as arguments to `where`
53
- where(predicate).all
54
- # => SELECT "products".* FROM "products" WHERE "products"."name" IS NULL AND
55
- # NOT ("products"."category" IN ('shoes', 'shirts'))
66
+ # post_id: integer
67
+ # rating: integer
68
+ class Comment < ActiveRecord::Base
69
+ belongs_to :post
56
70
  end
57
71
  ```
58
72
 
59
- Here is a complete list of Arel method aliases:
73
+ Now let's find posts having comments with a rating > 3.
74
+
75
+ **Without SexyScopes**
76
+
77
+ ```ruby
78
+ Post.joins(:comments).merge Comment.where("rating > ?", 3)
79
+ # ActiveRecord::StatementInvalid: ambiguous column name: rating
80
+ ```
81
+
82
+ Because both `Post` and `Comment` have a `rating` column, you have to give the table name explicitly:
83
+
84
+ ```ruby
85
+ Post.joins(:comments).merge Comment.where("comments.rating > ?", 3)
86
+ ```
87
+
88
+ Not very DRY, isn't it ?
89
+
90
+ **With SexyScopes**
91
+
92
+ ```ruby
93
+ Post.joins(:comments).where Comment.rating > 3
94
+ ```
95
+
96
+ Here you have it, clear as day.
97
+
98
+ How does it work ?
99
+ ------------------
100
+
101
+ SexyScopes is essentially a wrapper around [Arel](https://github.com/rails/arel#readme) attribute nodes.
102
+
103
+ It introduces a `ActiveRecord::Base.attribute(name)` class method returning an `Arel::Attribute` object, which
104
+ represent a table column with the given name, that is extended to support Ruby operators.
105
+
106
+ For convenience, SexyScopes dynamically resolves methods whose name is an existing table column: i.e.
107
+ `Product.price` is actually a shortcut for `Product.attribute(:price)`.
108
+
109
+ Please note that this mechanism won't override any of the existing `ActiveRecord::Base` class methods,
110
+ so if you have a column named `name` for instance, you'll have to use `Product.attribute(:name)` instead of
111
+ `Product.name` (which is the class actual name, i.e. `"Product"`).
112
+
113
+ Here is a complete list of operators, and their `Arel::Attribute` equivalents:
60
114
 
61
115
  * For predicates:
62
116
  - `==`: `eq`
@@ -68,12 +122,42 @@ Here is a complete list of Arel method aliases:
68
122
  - `<=`: `lteq`
69
123
  - `!=`: `not_eq`
70
124
 
71
-
72
125
  * For combination
73
126
  - `&`: `and`
74
127
  - `|`: `or`
75
128
  - `~`: `not` (unfortunately, unary prefix `!` doesn't work with ActiveRecord)
76
129
 
130
+ Advanced Examples
131
+ -----------------
132
+
133
+ ```ruby
134
+ # radius: integer
135
+ class Circle < ActiveRecord::Base
136
+ # Attributes can be coerced in arithmetic operations
137
+ def self.perimeter
138
+ 2 * Math::PI * radius
139
+ end
140
+
141
+ def self.area
142
+ Math::PI * radius * radius
143
+ end
144
+ end
145
+
146
+ Circle.where Circle.perimeter > 42
147
+ # SQL: SELECT `circles`.* FROM `circles` WHERE (6.283185307179586 * `circles`.`radius` > 42)
148
+ Circle.where Circle.area < 42
149
+ # SQL: SELECT `circles`.* FROM `circles` WHERE (3.141592653589793 * `circles`.`radius` * `circles`.`radius` < 42)
150
+
151
+ class Product < ActiveRecord::Base
152
+ predicate = (attribute(:name) == nil) & ~category.in(%w( shoes shirts ))
153
+ puts predicate.to_sql
154
+ # `products`.`name` IS NULL AND NOT (`products`.`category` IN ('shoes', 'shirts'))
155
+
156
+ where(predicate).all
157
+ # SQL: SELECT `products`.* FROM `products` WHERE `products`.`name` IS NULL AND
158
+ # NOT (`products`.`category` IN ('shoes', 'shirts'))
159
+ end
160
+ ```
77
161
 
78
162
  Installation
79
163
  ------------
@@ -94,7 +178,6 @@ Then require it in your application code:
94
178
 
95
179
  require 'sexy_scopes'
96
180
 
97
-
98
181
  Contributing
99
182
  ------------
100
183
 
@@ -106,8 +189,15 @@ Report bugs or suggest features using [GitHub issues](https://github.com/samleb/
106
189
  4. Push to the branch (`git push origin my-new-feature`)
107
190
  5. Create new Pull Request
108
191
 
192
+ TODO
193
+ ----
194
+
195
+ - Document the `sql_literal` method and how it can be used to create complex subqueries
196
+ - Handle associations (i.e. `Post.comments == Comment.joins(:posts)` ?)
109
197
 
110
198
  Copyright
111
199
  ---------
112
200
 
113
- Copyright (c) 2010-2012 Samuel Lebeau. See LICENSE for details.
201
+ SexyScopes is released under the [MIT License](http://www.opensource.org/licenses/MIT).
202
+
203
+ Copyright (c) 2010-2013 Samuel Lebeau, See LICENSE for details.
data/Rakefile CHANGED
@@ -5,15 +5,9 @@ desc "Run specifications"
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
7
  desc "Measure test coverage"
8
- if RUBY_VERSION >= '1.9'
9
- task :cov do
10
- ENV['COVERAGE'] = '1'
11
- Rake::Task['spec'].invoke
12
- end
13
- else
14
- RSpec::Core::RakeTask.new(:cov) do |spec|
15
- spec.rcov = true
16
- end
8
+ task :cov do
9
+ ENV['COVERAGE'] = '1'
10
+ Rake::Task['spec'].invoke
17
11
  end
18
12
 
19
13
  task :default => :spec
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', :github => 'rails/rails', :branch => 'master'
4
+
5
+ gem 'rake', '~> 0.9'
6
+ gem 'rspec', '~> 2.0'
7
+ gem 'sqlite3', '~> 1.0'
8
+ gem 'coveralls', require: false
data/ci/Gemfile.ar3.1 ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 3.1.0'
4
+
5
+ gem 'rake', '~> 0.9'
6
+ gem 'rspec', '~> 2.0'
7
+ gem 'sqlite3', '~> 1.0'
8
+ gem 'coveralls', require: false
data/ci/Gemfile.ar3.2 ADDED
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activerecord', '~> 3.2.0'
4
+
5
+ gem 'rake', '~> 0.9'
6
+ gem 'rspec', '~> 2.0'
7
+ gem 'sqlite3', '~> 1.0'
8
+ gem 'coveralls', require: false
@@ -1,17 +1,14 @@
1
1
  module SexyScopes
2
2
  module ActiveRecord
3
3
  module DynamicMethods
4
- # @!visibility private
5
- def respond_to?(method_name, include_private = false) # :nodoc:
6
- super || respond_to_missing?(method_name, include_private)
7
- end
8
-
9
- # # @!visibility private
10
- def respond_to_missing?(method_name, include_private = false) # :nodoc:
11
- Object.respond_to?(:respond_to_missing?) && super || sexy_scopes_has_attribute?(method_name)
12
- end
13
-
14
4
  private
5
+ # # @!visibility private
6
+ def respond_to_missing?(method_name, include_private = false) # :nodoc:
7
+ # super currently resolve to Object#respond_to_missing? which return false,
8
+ # but future version of ActiveRecord::Base might implement respond_to_missing?
9
+ sexy_scopes_has_attribute?(method_name) || super
10
+ end
11
+
15
12
  # Equivalent to calling {#attribute} with the missing method's <tt>name</tt> if the table
16
13
  # has a column with that name.
17
14
  #
@@ -1,8 +1,8 @@
1
1
  module SexyScopes
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 5
5
- TINY = 1
4
+ MINOR = 6
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
 
data/sexy_scopes.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.version = SexyScopes::VERSION
7
7
 
8
8
  gem.summary = %{Write beautiful and expressive ActiveRecord scopes without SQL.}
9
- gem.description = %{Small DSL to create ActiveRecord (>= 3) attribute predicates without writing SQL.}
9
+ gem.description = %{Small DSL to create ActiveRecord (>= 3.1) attribute predicates without writing SQL.}
10
10
 
11
11
  gem.authors = ['Samuel Lebeau']
12
12
  gem.email = 'samuel.lebeau@gmail.com'
@@ -17,18 +17,16 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.licenses = ['MIT']
19
19
 
20
- gem.add_dependency 'activerecord', '~> 3.0'
20
+ gem.required_ruby_version = '>= 1.9.2'
21
+
22
+ gem.add_dependency 'activerecord', '>= 3.1'
21
23
 
22
24
  gem.add_development_dependency 'bundler', '~> 1.0'
23
- gem.add_development_dependency 'rake', '~> 0.9'
25
+ gem.add_development_dependency 'rake', '>= 0.9'
24
26
  gem.add_development_dependency 'rails', '~> 3.0'
25
27
  gem.add_development_dependency 'rspec', '~> 2.0'
26
28
  gem.add_development_dependency 'sqlite3', '~> 1.0'
27
29
  gem.add_development_dependency 'redcarpet', '~> 2.2'
28
30
  gem.add_development_dependency 'yard', '~> 0.8'
29
- if RUBY_VERSION >= '1.9'
30
- gem.add_development_dependency 'simplecov'
31
- else
32
- gem.add_development_dependency 'rcov'
33
- end
31
+ gem.add_development_dependency 'simplecov'
34
32
  end
@@ -57,10 +57,8 @@ describe SexyScopes::ActiveRecord::DynamicMethods do
57
57
  TempUser.username
58
58
  end
59
59
 
60
- ruby_19 do
61
- it "should return a Method object for an existing column" do
62
- expect { TempUser.method(:username) }.to_not raise_error
63
- end
60
+ it "should return a Method object for an existing column" do
61
+ expect { TempUser.method(:username) }.to_not raise_error
64
62
  end
65
63
 
66
64
  it "should raise NoMethodError for a non-existing column" do
@@ -28,9 +28,11 @@ describe SexyScopes::Arel::PredicateMethods do
28
28
 
29
29
  it { should convert_to_sql %{"users"."score" #{sql_operator % 42.0}} }
30
30
 
31
- it "is aliased as `#{operator}`" do
32
- @attribute.method(operator).should == @attribute.method(method)
33
- end if operator
31
+ if operator
32
+ it "is aliased as `#{operator}`" do
33
+ described_class.instance_method(operator).should == described_class.instance_method(method)
34
+ end
35
+ end
34
36
  end
35
37
  end
36
38
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,11 @@
1
+ if ENV['TRAVIS']
2
+ require 'coveralls'
3
+ Coveralls.wear! do
4
+ # exclude gems bundled by Travis
5
+ add_filter 'ci/bundle'
6
+ end
7
+ end
8
+
1
9
  if ENV['COVERAGE']
2
10
  require 'simplecov'
3
11
  SimpleCov.start
@@ -7,14 +15,6 @@ require 'rspec'
7
15
  require 'active_record'
8
16
  require 'sexy_scopes'
9
17
 
10
- RSpec.configure do |config|
11
- config.extend Module.new {
12
- def ruby_19
13
- yield if RUBY_VERSION >= "1.9"
14
- end
15
- }
16
- end
17
-
18
18
  Dir.glob(File.join(File.dirname(__FILE__), '{fixtures,matchers}', '*')) do |file|
19
19
  require file
20
20
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sexy_scopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Samuel Lebeau
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-16 00:00:00.000000000 Z
11
+ date: 2013-05-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: activerecord
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: '3.0'
19
+ version: '3.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
- version: '3.0'
26
+ version: '3.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,23 +41,20 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0.9'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0.9'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rails
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
@@ -78,7 +69,6 @@ dependencies:
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
@@ -86,7 +76,6 @@ dependencies:
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
@@ -94,7 +83,6 @@ dependencies:
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: sqlite3
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
87
  - - ~>
100
88
  - !ruby/object:Gem::Version
@@ -102,7 +90,6 @@ dependencies:
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
94
  - - ~>
108
95
  - !ruby/object:Gem::Version
@@ -110,7 +97,6 @@ dependencies:
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: redcarpet
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: yard
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ~>
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ~>
140
123
  - !ruby/object:Gem::Version
@@ -142,20 +125,18 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: simplecov
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
- description: Small DSL to create ActiveRecord (>= 3) attribute predicates without
139
+ description: Small DSL to create ActiveRecord (>= 3.1) attribute predicates without
159
140
  writing SQL.
160
141
  email: samuel.lebeau@gmail.com
161
142
  executables: []
@@ -163,10 +144,15 @@ extensions: []
163
144
  extra_rdoc_files: []
164
145
  files:
165
146
  - .gitignore
147
+ - .travis.yml
148
+ - CHANGELOG.md
166
149
  - Gemfile
167
150
  - LICENSE
168
151
  - README.md
169
152
  - Rakefile
153
+ - ci/Gemfile.ar-edge
154
+ - ci/Gemfile.ar3.1
155
+ - ci/Gemfile.ar3.2
170
156
  - lib/sexy_scopes.rb
171
157
  - lib/sexy_scopes/active_record.rb
172
158
  - lib/sexy_scopes/active_record/class_methods.rb
@@ -193,27 +179,26 @@ files:
193
179
  homepage: https://github.com/samleb/sexy_scopes
194
180
  licenses:
195
181
  - MIT
182
+ metadata: {}
196
183
  post_install_message:
197
184
  rdoc_options: []
198
185
  require_paths:
199
186
  - lib
200
187
  required_ruby_version: !ruby/object:Gem::Requirement
201
- none: false
202
188
  requirements:
203
- - - ! '>='
189
+ - - '>='
204
190
  - !ruby/object:Gem::Version
205
- version: '0'
191
+ version: 1.9.2
206
192
  required_rubygems_version: !ruby/object:Gem::Requirement
207
- none: false
208
193
  requirements:
209
- - - ! '>='
194
+ - - '>='
210
195
  - !ruby/object:Gem::Version
211
196
  version: '0'
212
197
  requirements: []
213
198
  rubyforge_project:
214
- rubygems_version: 1.8.23
199
+ rubygems_version: 2.0.2
215
200
  signing_key:
216
- specification_version: 3
201
+ specification_version: 4
217
202
  summary: Write beautiful and expressive ActiveRecord scopes without SQL.
218
203
  test_files:
219
204
  - spec/active_record_spec.rb