repertoire-faceting 0.6.0 → 0.6.1

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: 9e727bb33feffd5e77e77263ecc16f74666ab1d5
4
- data.tar.gz: 087228d40ae3e1faa88de3d285ba4350d81f1411
3
+ metadata.gz: 1d47f7e14757f6e2c1523e8745047d327fef7dba
4
+ data.tar.gz: 5bb0a9262e5da3c7583b5648f6989a0590117f27
5
5
  SHA512:
6
- metadata.gz: e8df6396c41f96dba9822c2f694e79f42e108651c53b9fa49f5bb1032769f7edc8006ee0d5c53f93c1fc5a6612ed3ece7b3380372554ed0f5e61567ac7f47944
7
- data.tar.gz: f3a3b38089d75cc360aa2f99119eeb4955a9c69eeba5e4fc94878523dbed0dc853852df17fa51a2ef6e7f0301aad875a6b2bdf1ac0365e92c31372efe52c978e
6
+ metadata.gz: 813572362a9d495466ae77a379b4691c94d7c18746c5f93d3327da903f6623aca3dd0338a1aacf17b30651f284b0caabd4fe6b3c253d65df55f4c1a9ec2f4338
7
+ data.tar.gz: 174cb320c4cd198c06cc05b02e2258f8a57ba4576e46c44f1bdfe482f6de3be2d252cfb75753e13c7c5dcccf143bd53aebf8110e6882d1cec0fe85b854bbdbe6
data/INSTALL CHANGED
@@ -7,7 +7,7 @@ N.B. Repertoire Faceting requires Postgres 9.3+, Rails 3.2+, Ruby 2.0.0+, and J
7
7
  (You need a working Rails app, with a model, controller, and a partial to show the model)
8
8
 
9
9
  { in Gemfile }
10
- gem 'repertoire-faceting' // 1
10
+ gem 'repertoire-faceting' [ 1 ]
11
11
 
12
12
  { install native bitset extensions }
13
13
  $ bundle install
@@ -15,38 +15,41 @@ N.B. Repertoire Faceting requires Postgres 9.3+, Rails 3.2+, Ruby 2.0.0+, and J
15
15
 
16
16
  { in ./app/models/some_model.rb }
17
17
  class SomeModel
18
- include Repertoire::Faceting::Model // 2
19
- facet :some_column // 3
18
+ include Repertoire::Faceting::Model [ 2 ]
19
+ facet :some_column [ 3 ]
20
20
  end
21
21
 
22
22
  { in ./app/controllers/some_controller]
23
23
  class SomeController
24
- include Repertoire::Faceting::Controller // 4
25
- def base; return SomeModel; end // 5
24
+ include Repertoire::Faceting::Controller [ 4 ]
25
+ def base; return SomeModel; end [ 5 ]
26
26
  end
27
27
 
28
28
  { in ./config/routes.rb }
29
29
  SomeApp::Application.routes.draw do
30
- faceting_for :some_model // 6
30
+ faceting_for :some_model [ 6 ]
31
31
  end
32
32
 
33
- { in ./public/javascripts/application.js }
34
- //= require rep.faceting // 7
33
+ { in ./app/assets/javascripts/application.js }
34
+ //= require rep.faceting [ 7 ]
35
+
36
+ { in ./app/assets/stylesheets/application.css} [ 8 ]
37
+ *= require rep.faceting
35
38
 
36
39
  { in ./app/views/some_controller/index.html.erb }
37
40
  <script language="javascript">
38
41
  $().ready(function() {
39
- $('#paintings').facet_context(); // 8
40
- $('.facet').facet(); // 9
41
- $('#results').results(); // 10
42
+ $('#paintings').facet_context(); [ 9 ]
43
+ $('.facet').facet(); [ 10 ]
44
+ $('#results').results(); [ 11 ]
42
45
  });
43
46
  </script>
44
- <div id='paintings'> // 11
45
- <div id='genre' class='facet'></div> // 12
46
- <div id='results'></div> // 13
47
+ <div id='paintings'> [ 12 ]
48
+ <div id='genre' class='facet'></div> [ 13 ]
49
+ <div id='results'></div> [ 14 ]
47
50
  </div>
48
51
 
49
- ... that's a complete faceted browser in only 13 new lines of code in your app!
52
+ ... that's a complete faceted browser in only 14 new lines of code in your app!
50
53
 
51
54
  Additionally, you may wish to index the facets. At the console or in a migration:
52
55
 
data/ext/Makefile CHANGED
@@ -8,7 +8,7 @@
8
8
  #
9
9
  #-------------------------------------------------------------------------
10
10
 
11
- API_VERSION = 0.6.0
11
+ API_VERSION = 0.6.1
12
12
 
13
13
  MODULES = signature/signature
14
14
  EXTENSION = signature/faceting \
@@ -2,5 +2,5 @@
2
2
 
3
3
  comment = 'API for faceted indexing and queries (based on plv8 + bytea bitmaps)'
4
4
  requires = 'plv8, plpgsql'
5
- default_version = '0.6.0'
5
+ default_version = '0.6.1'
6
6
  schema = 'facet'
@@ -2,5 +2,5 @@
2
2
 
3
3
  comment = 'API for faceted indexing and queries (based on custom C bitmap type)'
4
4
  requires = plpgsql
5
- default_version = '0.6.0'
5
+ default_version = '0.6.1'
6
6
  schema = 'facet'
@@ -3,5 +3,5 @@
3
3
  comment = 'API for faceted indexing and queries (based on builtin VARBIT bit strings)'
4
4
  requires = plpgsql
5
5
  superuser = false
6
- default_version = '0.6.0'
6
+ default_version = '0.6.1'
7
7
  schema = 'facet'
@@ -116,6 +116,11 @@ module Repertoire
116
116
  #
117
117
  module ClassMethods
118
118
 
119
+ #
120
+ # N.B. client code can detect which models are faceted using
121
+ # "respond_to?(:facet?)"
122
+ #
123
+
119
124
  # Declare a facet by name
120
125
  def facet(name, rel=nil)
121
126
  name = name.to_sym
@@ -7,7 +7,7 @@ module Repertoire
7
7
 
8
8
  # Construct and execute a count over the specified facet.
9
9
  def count(name = nil, options = {})
10
- if name.present? && @klass.facet?(name)
10
+ if name.present? && @klass.respond_to?(:facet?) && @klass.facet?(name)
11
11
  name = name.to_sym
12
12
  parent = @klass.facets[name]
13
13
  facet = parent.merge(self)
@@ -1,5 +1,5 @@
1
1
  module Repertoire
2
2
  module Faceting #:nodoc:
3
- VERSION = "0.6.0"
3
+ VERSION = "0.6.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repertoire-faceting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher York
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-04 00:00:00.000000000 Z
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails