activerecord-like 0.0.4 → 0.0.5
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/.travis.yml +2 -1
- data/README.md +9 -3
- data/activerecord-like.gemspec +0 -1
- data/lib/active_record/like/version.rb +1 -1
- metadata +4 -20
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
[](https://gemnasium.com/ReneB/activerecord-like)
|
6
6
|
[](http://badge.fury.io/rb/activerecord-like)
|
7
7
|
|
8
|
+
[activerecord-like on Github](https://github.com/ReneB/activerecord-like)
|
9
|
+
|
8
10
|
An Active Record Plugin that allows chaining a more DSL-style 'like' or 'not-like' query to an ActiveRecord::Base#where. Requires Rails 4 beta or higher.
|
9
11
|
|
10
12
|
This plugin has been salvaged from the stellar work done by @amatsuda and @claudiob. Most of the code was previously in Active Record master, but was subsequently removed due to, amongst other, scope creep.
|
@@ -27,17 +29,21 @@ Or install it yourself as:
|
|
27
29
|
|
28
30
|
Given a class Post and the WhereChain work in Active Record, this plugin allows code like:
|
29
31
|
|
30
|
-
|
32
|
+
```ruby
|
33
|
+
Post.where.like(title: "%rails%")
|
34
|
+
```
|
31
35
|
|
32
36
|
and
|
33
37
|
|
34
|
-
|
38
|
+
```ruby
|
39
|
+
Post.where.not_like(title: "%rails%")
|
40
|
+
```
|
35
41
|
|
36
42
|
## Contributing
|
37
43
|
|
38
44
|
1. Fork it
|
39
45
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
46
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
|
-
4. Make sure the tests run. I will not merge commits that change code without testing the new code. Running the tests is as easy as running `bundle && rake` - if this does not work, consider it a bug and report it.
|
47
|
+
4. Make sure the tests run. I will not merge commits that change code without testing the new code. Running the tests is as easy as running `bundle && rake` - if this does not work, consider it a bug and report it. *Testing with a specific database engine* is done using `export DB={engine}; bundle && rake` or the equivalent for your system. Supported engines are `mysql`, `sqlite3` and `pg`.
|
42
48
|
5. Push to the branch (`git push origin my-new-feature`)
|
43
49
|
6. Create new Pull Request
|
data/activerecord-like.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-like
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -27,22 +27,6 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 4.0.0
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: arel
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 4.0.2
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 4.0.2
|
46
30
|
description: An ActiveRecord plugin providing a higher-level abstraction for SQL 'LIKE'
|
47
31
|
queries
|
48
32
|
email:
|
@@ -80,7 +64,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
64
|
version: '0'
|
81
65
|
segments:
|
82
66
|
- 0
|
83
|
-
hash:
|
67
|
+
hash: -1166120551184225501
|
84
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
69
|
none: false
|
86
70
|
requirements:
|
@@ -89,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
73
|
version: '0'
|
90
74
|
segments:
|
91
75
|
- 0
|
92
|
-
hash:
|
76
|
+
hash: -1166120551184225501
|
93
77
|
requirements: []
|
94
78
|
rubyforge_project:
|
95
79
|
rubygems_version: 1.8.24
|