locomotivecms-search 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locomotive/search/engine.rb +8 -4
- data/lib/locomotive/search/version.rb +1 -1
- data/lib/locomotive/search/wagon.rb +31 -0
- data/lib/locomotive/search/wagon/liquid/drops/page.rb +16 -0
- data/lib/locomotive/search/wagon/liquid/drops/site.rb +7 -0
- data/lib/locomotive/search/wagon/liquid/tags/search_for.rb +72 -0
- data/lib/locomotive/search/wagon/searchable_content_entry.rb +9 -0
- data/lib/locomotive/search/wagon/searchable_content_field.rb +15 -0
- data/lib/locomotive/search/wagon/searchable_page.rb +15 -0
- data/spec/dummy/log/test.log +6774 -8871
- data/spec/wagon/Gemfile +25 -0
- data/spec/wagon/Gemfile.lock +154 -0
- data/spec/wagon/app/content_types/categories.yml +56 -0
- data/spec/wagon/app/content_types/emails.yml +35 -0
- data/spec/wagon/app/content_types/projects.yml +59 -0
- data/spec/wagon/app/views/pages/404.liquid.haml +11 -0
- data/spec/wagon/app/views/pages/email-registered.liquid.haml +13 -0
- data/spec/wagon/app/views/pages/index.liquid.haml +93 -0
- data/spec/wagon/app/views/pages/projects/content_type_template.liquid.haml +32 -0
- data/spec/wagon/app/views/pages/search.liquid.haml +31 -0
- data/spec/wagon/app/views/snippets/newsletter_form.liquid.haml +14 -0
- data/spec/wagon/app/views/snippets/projects.liquid.haml +17 -0
- data/spec/wagon/app/views/snippets/social_links.liquid.haml +19 -0
- data/spec/wagon/config.ru +3 -0
- data/spec/wagon/config/site.yml +33 -0
- data/spec/wagon/config/translations.yml +8 -0
- data/spec/wagon/data/categories.yml +8 -0
- data/spec/wagon/data/emails.yml +2 -0
- data/spec/wagon/data/projects.yml +39 -0
- data/spec/wagon/log/wagon.log +541 -0
- metadata +49 -16
data/spec/wagon/Gemfile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# ruby '1.9.3'
|
4
|
+
|
5
|
+
gem 'locomotivecms_wagon', '1.4.0'
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
# Mac OS X
|
9
|
+
gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent'
|
10
|
+
|
11
|
+
# Unix
|
12
|
+
gem 'therubyracer', require: 'v8', platforms: :ruby
|
13
|
+
gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify'
|
14
|
+
|
15
|
+
# Windows
|
16
|
+
gem 'wdm', '>= 0.1.0', require: RUBY_PLATFORM =~ /mswin|mingw/i && 'wdm'
|
17
|
+
end
|
18
|
+
|
19
|
+
group :misc do
|
20
|
+
# Add your extra gems here
|
21
|
+
# gem 'susy', require: 'susy'
|
22
|
+
# gem 'redcarpet', require: 'redcarpet'
|
23
|
+
|
24
|
+
gem 'locomotivecms-search', path: '../../.', require: 'locomotive/search/wagon'
|
25
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../.
|
3
|
+
specs:
|
4
|
+
locomotivecms-search (0.3.2)
|
5
|
+
activesearch (~> 0.3.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
RedCloth (4.2.9)
|
11
|
+
actionpack (1.4.0)
|
12
|
+
activesearch (0.3.2)
|
13
|
+
actionpack
|
14
|
+
activesupport
|
15
|
+
sucker_punch
|
16
|
+
activesupport (3.2.17)
|
17
|
+
i18n (~> 0.6, >= 0.6.4)
|
18
|
+
multi_json (~> 1.0)
|
19
|
+
better_errors (1.0.1)
|
20
|
+
coderay (>= 1.0.0)
|
21
|
+
erubis (>= 2.6.6)
|
22
|
+
celluloid (0.15.2)
|
23
|
+
timers (~> 1.1.0)
|
24
|
+
chronic (0.10.2)
|
25
|
+
chunky_png (1.3.0)
|
26
|
+
coderay (1.1.0)
|
27
|
+
coffee-script (2.2.0)
|
28
|
+
coffee-script-source
|
29
|
+
execjs
|
30
|
+
coffee-script-source (1.7.0)
|
31
|
+
colorize (0.5.8)
|
32
|
+
commonjs (0.2.7)
|
33
|
+
compass (0.12.5)
|
34
|
+
chunky_png (~> 1.2)
|
35
|
+
fssm (>= 0.2.7)
|
36
|
+
sass (~> 3.2.19)
|
37
|
+
daemons (1.1.9)
|
38
|
+
dragonfly (0.9.15)
|
39
|
+
multi_json (~> 1.0)
|
40
|
+
rack
|
41
|
+
erubis (2.7.0)
|
42
|
+
eventmachine (1.0.3)
|
43
|
+
execjs (2.0.2)
|
44
|
+
faker (0.9.5)
|
45
|
+
i18n (~> 0.4)
|
46
|
+
ffi (1.9.3)
|
47
|
+
fssm (0.2.10)
|
48
|
+
haml (4.0.5)
|
49
|
+
tilt
|
50
|
+
hike (1.2.3)
|
51
|
+
httmultiparty (0.3.10)
|
52
|
+
httparty (>= 0.7.3)
|
53
|
+
multipart-post
|
54
|
+
httparty (0.13.1)
|
55
|
+
json (~> 1.8)
|
56
|
+
multi_xml (>= 0.5.2)
|
57
|
+
i18n (0.6.9)
|
58
|
+
json (1.8.1)
|
59
|
+
less (2.2.2)
|
60
|
+
commonjs (~> 0.2.6)
|
61
|
+
libv8 (3.16.14.3)
|
62
|
+
listen (0.7.3)
|
63
|
+
locomotivecms-liquid (2.6.0)
|
64
|
+
locomotivecms-solid (0.2.2.1)
|
65
|
+
locomotivecms-liquid (~> 2.6.0)
|
66
|
+
locomotivecms_mounter (1.4.0)
|
67
|
+
RedCloth (~> 4.2.3)
|
68
|
+
activesupport (~> 3.2.15)
|
69
|
+
chronic (~> 0.10.2)
|
70
|
+
coffee-script (~> 2.2.0)
|
71
|
+
colorize (~> 0.5.8)
|
72
|
+
compass (~> 0.12.2)
|
73
|
+
haml (~> 4.0.3)
|
74
|
+
httmultiparty (= 0.3.10)
|
75
|
+
i18n (~> 0.6.0)
|
76
|
+
json (~> 1.8.0)
|
77
|
+
less (~> 2.2.1)
|
78
|
+
logger
|
79
|
+
mime-types (~> 1.19)
|
80
|
+
multi_json (~> 1.7.3)
|
81
|
+
sass (~> 3.2.12)
|
82
|
+
sprockets (~> 2.0)
|
83
|
+
sprockets-sass
|
84
|
+
stringex (~> 2.0.3)
|
85
|
+
tilt (= 1.4.1)
|
86
|
+
tzinfo (~> 0.3.29)
|
87
|
+
zip (~> 2.0.2)
|
88
|
+
locomotivecms_wagon (1.4.0)
|
89
|
+
RedCloth (~> 4.2.8)
|
90
|
+
activesupport (~> 3.2.11)
|
91
|
+
better_errors (~> 1.0.1)
|
92
|
+
dragonfly (~> 0.9.12)
|
93
|
+
faker (~> 0.9.5)
|
94
|
+
httmultiparty (= 0.3.10)
|
95
|
+
listen (~> 0.7.0)
|
96
|
+
locomotivecms-solid (~> 0.2.2.1)
|
97
|
+
locomotivecms_mounter (~> 1.4.0)
|
98
|
+
rack-cache (~> 1.1)
|
99
|
+
redcarpet (~> 3.0.0)
|
100
|
+
sprockets (~> 2.0)
|
101
|
+
sprockets-sass (~> 1.0.1)
|
102
|
+
thin (~> 1.5.1)
|
103
|
+
thor
|
104
|
+
will_paginate (~> 3.0.3)
|
105
|
+
logger (1.2.8)
|
106
|
+
mime-types (1.25.1)
|
107
|
+
multi_json (1.7.9)
|
108
|
+
multi_xml (0.5.5)
|
109
|
+
multipart-post (2.0.0)
|
110
|
+
rack (1.5.2)
|
111
|
+
rack-cache (1.2)
|
112
|
+
rack (>= 0.4)
|
113
|
+
rb-fsevent (0.9.3)
|
114
|
+
rb-inotify (0.9.2)
|
115
|
+
ffi (>= 0.5.0)
|
116
|
+
redcarpet (3.0.0)
|
117
|
+
ref (1.0.5)
|
118
|
+
sass (3.2.19)
|
119
|
+
sprockets (2.12.0)
|
120
|
+
hike (~> 1.2)
|
121
|
+
multi_json (~> 1.0)
|
122
|
+
rack (~> 1.0)
|
123
|
+
tilt (~> 1.1, != 1.3.0)
|
124
|
+
sprockets-sass (1.0.3)
|
125
|
+
sprockets (~> 2.0)
|
126
|
+
tilt (~> 1.1)
|
127
|
+
stringex (2.0.11)
|
128
|
+
sucker_punch (1.0.3)
|
129
|
+
celluloid (~> 0.15.2)
|
130
|
+
therubyracer (0.12.0)
|
131
|
+
libv8 (~> 3.16.14.0)
|
132
|
+
ref
|
133
|
+
thin (1.5.1)
|
134
|
+
daemons (>= 1.0.9)
|
135
|
+
eventmachine (>= 0.12.6)
|
136
|
+
rack (>= 1.0.0)
|
137
|
+
thor (0.19.1)
|
138
|
+
tilt (1.4.1)
|
139
|
+
timers (1.1.0)
|
140
|
+
tzinfo (0.3.39)
|
141
|
+
wdm (0.1.0)
|
142
|
+
will_paginate (3.0.5)
|
143
|
+
zip (2.0.2)
|
144
|
+
|
145
|
+
PLATFORMS
|
146
|
+
ruby
|
147
|
+
|
148
|
+
DEPENDENCIES
|
149
|
+
locomotivecms-search!
|
150
|
+
locomotivecms_wagon (= 1.4.0)
|
151
|
+
rb-fsevent (~> 0.9.1)
|
152
|
+
rb-inotify (~> 0.9)
|
153
|
+
therubyracer
|
154
|
+
wdm (>= 0.1.0)
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Public name of this content type
|
2
|
+
name: Categories
|
3
|
+
|
4
|
+
# TODO: explain
|
5
|
+
slug: categories
|
6
|
+
|
7
|
+
# Explanation for the backoffice
|
8
|
+
description: Category of a project
|
9
|
+
|
10
|
+
# Default field (e.g title)
|
11
|
+
label_field_name: name
|
12
|
+
|
13
|
+
# Order of entries
|
14
|
+
order_by: manually # default: manually, also available: created_at or any field slug
|
15
|
+
|
16
|
+
# Order direction
|
17
|
+
# order_direction: asc # default: asc, also available: desc
|
18
|
+
|
19
|
+
# Display entries grouped by <field> in the backoffice
|
20
|
+
# group_by: <your field>
|
21
|
+
|
22
|
+
# Activate public 'create' API (e.g for a contact form)
|
23
|
+
# public_submission_enabled: false
|
24
|
+
|
25
|
+
# Emails to be notified on new entries using the public API
|
26
|
+
# public_submission_accounts: ['john@acme.net']
|
27
|
+
|
28
|
+
# Describe each field. The name shoud always be an underscored string
|
29
|
+
fields:
|
30
|
+
- name: # Name of the field
|
31
|
+
label: Name
|
32
|
+
type: string
|
33
|
+
required: true
|
34
|
+
hint: A description of the field for the editors
|
35
|
+
localized: false
|
36
|
+
|
37
|
+
- description: # Name of the field
|
38
|
+
label: Description
|
39
|
+
type: text
|
40
|
+
required: false
|
41
|
+
hint: A description of the field for the editors
|
42
|
+
localized: false
|
43
|
+
text_formatting: html
|
44
|
+
|
45
|
+
- projects: # Name of the field
|
46
|
+
label: Projects
|
47
|
+
type: has_many
|
48
|
+
required: false
|
49
|
+
hint: A description of the field for the editors
|
50
|
+
localized: false # Define the slug of the target content type (eg. comments)
|
51
|
+
class_name: projects
|
52
|
+
# Define the name of the field referring to Categories in the target content type (eg. post)
|
53
|
+
inverse_of: category
|
54
|
+
# If you want to manage the entries of the relationship directly from the source entry
|
55
|
+
ui_enabled: true
|
56
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Public name of this content type
|
2
|
+
name: Emails
|
3
|
+
|
4
|
+
# TODO: explain
|
5
|
+
slug: emails
|
6
|
+
|
7
|
+
# Explanation for the backoffice
|
8
|
+
description: Emails collected for the newsletter
|
9
|
+
|
10
|
+
# Default field (e.g title)
|
11
|
+
label_field_name: email
|
12
|
+
|
13
|
+
# Order of entries
|
14
|
+
order_by: created_at # default: manually, also available: created_at or any field slug
|
15
|
+
|
16
|
+
# Order direction
|
17
|
+
# order_direction: asc # default: asc, also available: desc
|
18
|
+
|
19
|
+
# Display entries grouped by <field> in the backoffice
|
20
|
+
# group_by: <your field>
|
21
|
+
|
22
|
+
# Activate public 'create' API (e.g for a contact form)
|
23
|
+
public_submission_enabled: true
|
24
|
+
|
25
|
+
# Emails to be notified on new entries using the public API
|
26
|
+
# public_submission_accounts: ['john@acme.net']
|
27
|
+
|
28
|
+
# Describe each field. The name shoud always be an underscored string
|
29
|
+
fields:
|
30
|
+
- email: # Name of the field
|
31
|
+
label: Email
|
32
|
+
type: email
|
33
|
+
required: true
|
34
|
+
hint: An email address submitted from the index page
|
35
|
+
localized: false
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Public name of this content type
|
2
|
+
name: Projects
|
3
|
+
|
4
|
+
# TODO: explain
|
5
|
+
slug: projects
|
6
|
+
|
7
|
+
# Explanation for the backoffice
|
8
|
+
description: A description of the content type for the editors
|
9
|
+
|
10
|
+
# Default field (e.g title)
|
11
|
+
label_field_name: name
|
12
|
+
|
13
|
+
# Order of entries
|
14
|
+
order_by: manually # default: manually, also available: created_at or any field slug
|
15
|
+
|
16
|
+
# Order direction
|
17
|
+
# order_direction: asc # default: asc, also available: desc
|
18
|
+
|
19
|
+
# Display entries grouped by <field> in the backoffice
|
20
|
+
# group_by: <your field>
|
21
|
+
|
22
|
+
# Activate public 'create' API (e.g for a contact form)
|
23
|
+
# public_submission_enabled: false
|
24
|
+
|
25
|
+
# Emails to be notified on new entries using the public API
|
26
|
+
# public_submission_accounts: ['john@acme.net']
|
27
|
+
|
28
|
+
# Describe each field. The name shoud always be an underscored string
|
29
|
+
fields:
|
30
|
+
- name: # Name of the field
|
31
|
+
label: Name
|
32
|
+
type: string
|
33
|
+
required: true
|
34
|
+
hint: A description of the field for the editors
|
35
|
+
localized: false
|
36
|
+
searchable: true
|
37
|
+
|
38
|
+
- category: # Name of the field
|
39
|
+
label: Category
|
40
|
+
type: belongs_to
|
41
|
+
required: false
|
42
|
+
hint: A description of the field for the editors
|
43
|
+
# Slug of the target content type (eg post if this content type is a comment)
|
44
|
+
class_name: categories
|
45
|
+
|
46
|
+
- description:
|
47
|
+
label: Description
|
48
|
+
type: text
|
49
|
+
required: false
|
50
|
+
hint: A description of the field for the editors
|
51
|
+
localized: false
|
52
|
+
text_formatting: html
|
53
|
+
|
54
|
+
- image: # Name of the field
|
55
|
+
label: Image
|
56
|
+
type: file
|
57
|
+
required: true
|
58
|
+
hint: A description of the field for the editors
|
59
|
+
localized: false
|
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
title: Email registered with success!
|
3
|
+
published: true
|
4
|
+
---
|
5
|
+
{% extends index %}
|
6
|
+
|
7
|
+
{% block 'main' %}
|
8
|
+
.row
|
9
|
+
|
10
|
+
.alert-box.success{ data: { alert: '' } }
|
11
|
+
%h3.text-center Congratulations, your email address has been registered!
|
12
|
+
|
13
|
+
{% endblock %}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
---
|
2
|
+
title: Home page
|
3
|
+
published: true
|
4
|
+
searchable: true
|
5
|
+
---
|
6
|
+
!!!
|
7
|
+
/[if IE 8] <html class="no-js lt-ie9" lang="en" >
|
8
|
+
/ [if gt IE 8]><!
|
9
|
+
%html.no-js{lang: "en"}
|
10
|
+
/ <![endif]
|
11
|
+
%head
|
12
|
+
%title {{ site.seo_title }} - {{ page.searchable }}
|
13
|
+
|
14
|
+
|
15
|
+
%body
|
16
|
+
%header
|
17
|
+
#background-image
|
18
|
+
|
19
|
+
#logo.row
|
20
|
+
.small-12.columns
|
21
|
+
%h1
|
22
|
+
__
|
23
|
+
%a{ href: '/' }> {{ site.name }} [{{ page.searchable }}]
|
24
|
+
|
25
|
+
#banner.row
|
26
|
+
.small-12.columns
|
27
|
+
{% editable_text header, fixed: true %}
|
28
|
+
%h2 DEMO LOCOMOTIVECMS
|
29
|
+
%p
|
30
|
+
An example of how to use content types
|
31
|
+
%br
|
32
|
+
and editable elements for a portfolio website.
|
33
|
+
{% endeditable_text %}
|
34
|
+
|
35
|
+
.row
|
36
|
+
|
37
|
+
#content
|
38
|
+
{% block main %}
|
39
|
+
.row
|
40
|
+
.small-12.columns
|
41
|
+
{% include projects %}
|
42
|
+
|
43
|
+
.row
|
44
|
+
.small-6.columns
|
45
|
+
{% editable_text first_column %}
|
46
|
+
%h2 Design & Illustrative
|
47
|
+
%p
|
48
|
+
Sed suscipit risus vel sapien fringilla elementum. Donec vulputate sapien suscipit nulla tincidunt sodales. Ut ut nisi in nisl convallis ultricies. Curabitur tristique faucibus tincidunt. Donec rutrum mi faucibus nisi luctus sodales facilisis neque semper.
|
49
|
+
%br
|
50
|
+
%br
|
51
|
+
Curabitur euismod dignissim orci, at vestibulum ligula convallis non. Etiam sagittis diam quis felis volutpat convallis. In vehicula, est sit amet iaculis venenatis, mauris felis euismod tellus, sed facilisis eros felis in nunc. Nam nec arcu vel magna posuere malesuada. Fusce pretium magna vitae elit imperdiet dignissim. Duis egestas quam sit amet tortor vestibulum ac rhoncus dolor vulputate. Maecenas sit amet neque in est iaculis vestibulum.
|
52
|
+
{% endeditable_text %}
|
53
|
+
|
54
|
+
.small-6.columns
|
55
|
+
{% editable_text second_column %}
|
56
|
+
%h2 Years of experience
|
57
|
+
%p
|
58
|
+
Sed suscipit risus vel sapien fringilla elementum. Donec vulputate sapien suscipit nulla tincidunt sodales. Ut ut nisi in nisl convallis ultricies. Curabitur tristique faucibus tincidunt. Donec rutrum mi faucibus nisi luctus sodales facilisis neque semper.
|
59
|
+
%br
|
60
|
+
%br
|
61
|
+
Curabitur euismod dignissim orci, at vestibulum ligula convallis non. Etiam sagittis diam quis felis volutpat convallis. In vehicula, est sit amet iaculis venenatis, mauris felis euismod tellus, sed facilisis eros felis in nunc. Nam nec arcu vel magna posuere malesuada. Fusce pretium magna vitae elit imperdiet dignissim. Duis egestas quam sit amet tortor vestibulum ac rhoncus dolor vulputate. Maecenas sit amet neque in est iaculis vestibulum.
|
62
|
+
{% endeditable_text %}
|
63
|
+
|
64
|
+
{% endblock %}
|
65
|
+
|
66
|
+
{% block social %}
|
67
|
+
|
68
|
+
{% capture social_rss_url %}{% editable_text rss, format: raw, line_break: false, rows: 1, fixed: true %}http://www.locomotivecms.com/articles{% endeditable_text %}{% endcapture %}
|
69
|
+
|
70
|
+
{% capture social_twitter_url %}{% editable_text twitter, format: raw, line_break: false, rows: 1, fixed: true %}https://twitter.com/locomotivecms{% endeditable_text %}{% endcapture %}
|
71
|
+
|
72
|
+
{% capture social_dribbble_url %}{% editable_text dribbble, format: raw, line_break: false, rows: 1, fixed: true %}http://dribbble.com/blazrobar{% endeditable_text %}{% endcapture %}
|
73
|
+
|
74
|
+
{% capture social_linkedin_url %}{% editable_text linkedin, format: raw, line_break: false, rows: 1, fixed: true %}http://www.linkedin.com/in/didier31{% endeditable_text %}{% endcapture %}
|
75
|
+
|
76
|
+
{% endblock %}
|
77
|
+
|
78
|
+
%footer
|
79
|
+
.row
|
80
|
+
#contact.small-12.large-6.columns
|
81
|
+
.row
|
82
|
+
.small-12.large-12.columns
|
83
|
+
%h1 ___{{ site.name }}
|
84
|
+
|
85
|
+
{% editable_text newsletter, fixed: true %}
|
86
|
+
%p
|
87
|
+
About the designer: Blaz Robar is a graphic designer from Melbourne, Australia. More information about him <a href="http://www.blazrobar.com">here</a>.
|
88
|
+
{% endeditable_text %}
|
89
|
+
|
90
|
+
{% include newsletter_form %}
|
91
|
+
|
92
|
+
{% include social_links %}
|
93
|
+
|