basic_search 0.0.2.alpha → 0.0.3.beta
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 +6 -14
- data/Guardfile +2 -0
- data/basic_search.gemspec +11 -10
- data/lib/basic_search/version.rb +1 -1
- data/lib/basic_search/view_helpers.rb +3 -3
- data/spec/basic_search/{view_helper_spec.rb → view_helpers_spec.rb} +6 -6
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NjEwNDc1ZGQ1MWM4YmNjZjEwNzc4ODM1ZmYwMjMwNTliZTk1N2RjNzZmMDg1
|
10
|
-
ZTQxNDkzYjZlYmYwM2U0YWU3N2ZhNmE1ODRkNzc2YjA2ZThiNDE2MjVlNmI2
|
11
|
-
NmNlZDU3NWY1MGRiZDg3NjkzNjg0YmFhZDdmOTk5ZjA5MWY1ZDQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmZmYzgxNDliZGFlM2NjNTdiMjUyM2IxZTI1M2ZhOGE2ZjBlNzY5ZWQ1ZjVh
|
14
|
-
ZjgyODBmYTczMWRlMzU1MjIyOWFlNjkwMGZhZWE2NGJlMTNiZGVjZjEzOTYy
|
15
|
-
ZmY4ZDc1ZDgxZjUyNzRjZDQxZjJmYjJkYmM5NDYwZjIwNTc0ODI=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 976e0f975d2f2c49ac65cc1a77dfeb85ba1a54b0
|
4
|
+
data.tar.gz: 7d36c6df0c887ec6e303e7c1df6d89f0ffa6cbcf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 79a402b8781fbdb64bc027e6d44d4028b18f6744d0a3a416b3de1651acf5fa8ee947200c264e05133af39648eac635dc27aba9886ddcdb3c1d9fb15ae4b132dc
|
7
|
+
data.tar.gz: 48eede3443e71c3d17db576ee7076bdcf4c287f9d3e25ce785bd3b4114814ec61db20ecdfe06b717f855379517f24bb93c26ab6fc484884f538cc69e08e3081a
|
data/Guardfile
CHANGED
data/basic_search.gemspec
CHANGED
@@ -4,20 +4,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'basic_search/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
|
-
gem.name
|
8
|
-
gem.version
|
9
|
-
gem.authors
|
10
|
-
gem.email
|
11
|
-
gem.
|
7
|
+
gem.name = "basic_search"
|
8
|
+
gem.version = BasicSearch::VERSION
|
9
|
+
gem.authors = ["Daniel Grawunder, Christian Mierich"]
|
10
|
+
gem.email = ["gramie.sw@gmail.com"]
|
11
|
+
gem.homepage = "https://github.com/gramie-sw/basic_search"
|
12
|
+
gem.description = %q{A Ruby on Rails basic search gem}
|
12
13
|
gem.summary = %q{An easy to use basic search solution for Ruby on Rails.}
|
13
|
-
gem.license
|
14
|
+
gem.license = "EPL 1.0"
|
14
15
|
|
15
|
-
gem.files
|
16
|
-
gem.executables
|
17
|
-
gem.test_files
|
16
|
+
gem.files = `git ls-files`.split($/)
|
17
|
+
gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
19
|
gem.require_paths = ["lib"]
|
19
20
|
|
20
21
|
gem.add_development_dependency "rspec", "~> 2.13"
|
21
22
|
gem.add_development_dependency "activesupport", "~>3.2"
|
22
|
-
gem.add_development_dependency "guard-rspec", "~>
|
23
|
+
gem.add_development_dependency "guard-rspec", "~>3.0.1"
|
23
24
|
end
|
data/lib/basic_search/version.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module BasicSearch
|
2
2
|
module ViewHelpers
|
3
3
|
|
4
|
-
def
|
4
|
+
def search_param_hash
|
5
5
|
params[:search] ? { search: params[:search] } : {}
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
sortable(columns, title,
|
8
|
+
def sortable_with_search columns, title
|
9
|
+
sortable(columns, title, search_param_hash)
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -12,21 +12,21 @@ describe 'ViewHelpers' do
|
|
12
12
|
|
13
13
|
it 'should return existing hash with key search from params' do
|
14
14
|
@view_helper.stub(:params).and_return({search: 'search_value'})
|
15
|
-
@view_helper.
|
15
|
+
@view_helper.search_param_hash.should eq({search: 'search_value'})
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'should return empty hash if params has no hash with key search' do
|
19
19
|
@view_helper.stub(:params).and_return({})
|
20
|
-
@view_helper.
|
20
|
+
@view_helper.search_param_hash.should eq({})
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
describe '#
|
24
|
+
describe '#sortable_with_search' do
|
25
25
|
|
26
|
-
it 'should call
|
27
|
-
@view_helper.should_receive(:
|
26
|
+
it 'should call sortable with search param' do
|
27
|
+
@view_helper.should_receive(:search_param_hash).and_return({search: 'search_value'})
|
28
28
|
@view_helper.should_receive(:sortable).with(['column1'], 'title', {search: 'search_value'})
|
29
|
-
@view_helper.
|
29
|
+
@view_helper.sortable_with_search(['column1'], 'title')
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: basic_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Grawunder, Christian Mierich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 3.0.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 3.0.1
|
55
55
|
description: A Ruby on Rails basic search gem
|
56
56
|
email:
|
57
57
|
- gramie.sw@gmail.com
|
@@ -74,9 +74,9 @@ files:
|
|
74
74
|
- lib/basic_search/version.rb
|
75
75
|
- lib/basic_search/view_helpers.rb
|
76
76
|
- spec/basic_search/active_record_additions_spec.rb
|
77
|
-
- spec/basic_search/
|
77
|
+
- spec/basic_search/view_helpers_spec.rb
|
78
78
|
- spec/spec_helper.rb
|
79
|
-
homepage:
|
79
|
+
homepage: https://github.com/gramie-sw/basic_search
|
80
80
|
licenses:
|
81
81
|
- EPL 1.0
|
82
82
|
metadata: {}
|
@@ -86,12 +86,12 @@ require_paths:
|
|
86
86
|
- lib
|
87
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- -
|
89
|
+
- - '>='
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '>'
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.3.1
|
97
97
|
requirements: []
|
@@ -102,5 +102,5 @@ specification_version: 4
|
|
102
102
|
summary: An easy to use basic search solution for Ruby on Rails.
|
103
103
|
test_files:
|
104
104
|
- spec/basic_search/active_record_additions_spec.rb
|
105
|
-
- spec/basic_search/
|
105
|
+
- spec/basic_search/view_helpers_spec.rb
|
106
106
|
- spec/spec_helper.rb
|