sunspot-null_result 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bef7ffa38d8ad3d4be8fc8b481b289b6b766b8e8
4
- data.tar.gz: 584871aef8529140697f958c1cd999f64c067479
3
+ metadata.gz: 4b8e4609433f1dd0ac6c3eb45dfc7df567ad9fae
4
+ data.tar.gz: e106556c917db3e3ad8af59ffc77a693ea9694f8
5
5
  SHA512:
6
- metadata.gz: 112df68afbf3355d0fb097e209eca6f72bbfbc45a3526cb796f2814c90538146b97a29a0aa1f155666ad450d2b8bb415ed110ae0e864353177b099bbf787714e
7
- data.tar.gz: 0242d54cbf78ed3126844f4ff766e6039d01a42f2f4fc9819473aa864e68a96e706a0aa4d38c7d5a997c23ff3ef93759e6437f33efe7daf129d7d96c9ba4ec88
6
+ metadata.gz: 7b694c5833779caad543619f0cd72255e41a068b4baab3c44d461fb440424ea84796a196b6861ecb1d129025fbeff3cbf5979411a44dd6dc1460671e761fadcd
7
+ data.tar.gz: b78b2497e98968957a78119d60afdf403f3531d838806d39a0e176aee43e42e3e39dbd0f8430a8efa2dcc523574d2e069c1ce5aa0dae6edfaefc63445f3e695d
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.3
1
+ 2.3.1
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.2.2
4
+ - 2.3.1
5
5
  before_install: gem install bundler -v 1.10.5
6
6
  cache:
7
7
  bundler: true
data/README.md CHANGED
@@ -74,8 +74,13 @@ end
74
74
 
75
75
  ### HEAD (not yet released)
76
76
 
77
+ ### v0.5.0
78
+ * Build on newer MRI version
79
+ * Add Sunspot::NullResult#total and #facet
80
+ * Use frozen_string_literal magic comment for MRI 2.3.x
81
+
77
82
  ### v0.4.1
78
- * Minor fix for accessing previous result page
83
+ * Minor fix for accessing previous result page
79
84
 
80
85
  ### v0.4.0
81
86
  * Extend sunspot groups by useful details, e.g. pagination information
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+ module Sunspot
3
+ class NullResult
4
+ class Facet
5
+ def rows
6
+ []
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Sunspot
2
3
  class NullResult
3
4
  class Group < Struct.new(:value, :collection)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Sunspot
2
3
  class NullResult
3
4
  class GroupedCollection
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Sunspot
2
3
  class NullResult
3
4
  class Hit < Struct.new(:primary_key)
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  module Sunspot
2
3
  class NullResult
3
- VERSION = "0.4.1"
4
+ VERSION = "0.5.0"
4
5
  end
5
6
  end
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  require "sunspot/null_result/version"
2
3
  require "sunspot/null_result/grouped_collection"
3
4
  require "sunspot/null_result/group"
4
5
  require "sunspot/null_result/hit"
6
+ require "sunspot/null_result/facet"
5
7
 
6
8
  module Sunspot
7
9
  class NullResult
@@ -78,5 +80,13 @@ module Sunspot
78
80
  results.size
79
81
  end
80
82
 
83
+ def facet(*)
84
+ Sunspot::NullResult::Facet.new
85
+ end
86
+
87
+ def total
88
+ collection.size
89
+ end
90
+
81
91
  end
82
92
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot-null_result
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Zimmermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-12 00:00:00.000000000 Z
11
+ date: 2016-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -71,6 +71,7 @@ files:
71
71
  - bin/console
72
72
  - bin/setup
73
73
  - lib/sunspot/null_result.rb
74
+ - lib/sunspot/null_result/facet.rb
74
75
  - lib/sunspot/null_result/group.rb
75
76
  - lib/sunspot/null_result/grouped_collection.rb
76
77
  - lib/sunspot/null_result/hit.rb
@@ -96,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
97
  version: '0'
97
98
  requirements: []
98
99
  rubyforge_project:
99
- rubygems_version: 2.4.5.1
100
+ rubygems_version: 2.5.1
100
101
  signing_key:
101
102
  specification_version: 4
102
103
  summary: Provides a standalone mock result for Solr searches