Skip to content

Commit 8594373

Browse files
committed
added demo gems
1 parent b5f9276 commit 8594373

18 files changed

+1524
-54
lines changed

.rvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rvm use 2.0.0@commit --create

Gemfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ end
4444
# Use debugger
4545
# gem 'debugger', group: [:development, :test]
4646

47-
gem 'spree', '2.2.2'
47+
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
4848
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-2-stable'
49-
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable'
49+
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable'
50+
51+
gem 'sunspot_rails'
52+
gem 'sunspot_solr'
53+
gem 'spree_solr', :git => 'git://github.com/devinterface/spree_solr.git', :branch => '2-2-stable'
54+
gem 'spree_monetaweb', :git => 'git://github.com/devinterface/spree_monetaweb.git', :branch => '2-2-stable'

Gemfile.lock

Lines changed: 90 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
GIT
2+
remote: git://github.com/devinterface/spree_monetaweb.git
3+
revision: 85bde1eedda5e1a598498a23c5e02146713113e2
4+
branch: 2-2-stable
5+
specs:
6+
spree_monetaweb (2.1.4)
7+
spree_core (~> 2.2.2)
8+
9+
GIT
10+
remote: git://github.com/devinterface/spree_solr.git
11+
revision: dd5603b8f378c348563f0d1915ae3169d9820b19
12+
branch: 2-2-stable
13+
specs:
14+
spree_solr (2.2.3.beta)
15+
spree_core (~> 2.2.3.beta)
16+
sunspot_rails (>= 2.1.1)
17+
sunspot_solr (>= 2.1.1)
18+
19+
GIT
20+
remote: git://github.com/spree/spree.git
21+
revision: dba23083d8e39830a98b07ffb935e763c348917d
22+
branch: 2-2-stable
23+
specs:
24+
spree (2.2.3.beta)
25+
spree_api (= 2.2.3.beta)
26+
spree_backend (= 2.2.3.beta)
27+
spree_cmd (= 2.2.3.beta)
28+
spree_core (= 2.2.3.beta)
29+
spree_frontend (= 2.2.3.beta)
30+
spree_sample (= 2.2.3.beta)
31+
spree_api (2.2.3.beta)
32+
rabl (= 0.9.3)
33+
spree_core (= 2.2.3.beta)
34+
versioncake (~> 1.2.0)
35+
spree_backend (2.2.3.beta)
36+
jquery-rails (~> 3.1.0)
37+
jquery-ui-rails (~> 4.1.0)
38+
select2-rails (~> 3.4.7)
39+
spree_api (= 2.2.3.beta)
40+
spree_core (= 2.2.3.beta)
41+
spree_cmd (2.2.3.beta)
42+
thor (~> 0.14)
43+
spree_core (2.2.3.beta)
44+
activemerchant (~> 1.42.3)
45+
acts_as_list (= 0.3.0)
46+
awesome_nested_set (~> 3.0.0.rc.3)
47+
aws-sdk (= 1.27.0)
48+
cancan (~> 1.6.10)
49+
deface (~> 1.0.0)
50+
ffaker (~> 1.16)
51+
font-awesome-rails (~> 4.0)
52+
friendly_id (~> 5.0.4)
53+
highline (~> 1.6.18)
54+
httparty (~> 0.11)
55+
json (~> 1.7)
56+
kaminari (~> 0.15.0)
57+
monetize
58+
paperclip (~> 3.4.1)
59+
paranoia (~> 2.0)
60+
rails (~> 4.0.5)
61+
ransack (~> 1.1.0)
62+
state_machine (= 1.2.0)
63+
stringex (~> 1.5.1)
64+
truncate_html (= 0.9.2)
65+
spree_frontend (2.2.3.beta)
66+
canonical-rails (~> 0.0.4)
67+
jquery-rails (~> 3.1.0)
68+
spree_api (= 2.2.3.beta)
69+
spree_core (= 2.2.3.beta)
70+
stringex (~> 1.5.1)
71+
spree_sample (2.2.3.beta)
72+
spree_core (= 2.2.3.beta)
73+
174
GIT
275
remote: https://github.com/spree/spree_auth_devise.git
376
revision: 81a0fbb2db15efbbb50d0d139bbc41aee7fa58a1
@@ -100,7 +173,7 @@ GEM
100173
ffaker (1.24.0)
101174
font-awesome-rails (4.1.0.0)
102175
railties (>= 3.2, < 5.0)
103-
friendly_id (5.0.3)
176+
friendly_id (5.0.4)
104177
activerecord (>= 4.0.0)
105178
highline (1.6.21)
106179
hike (1.2.3)
@@ -146,6 +219,7 @@ GEM
146219
polyamorous (0.6.4)
147220
activerecord (>= 3.0)
148221
polyglot (0.3.5)
222+
pr_geohash (1.0.0)
149223
rabl (0.9.3)
150224
activesupport (>= 2.3.14)
151225
rack (1.5.2)
@@ -171,6 +245,8 @@ GEM
171245
polyamorous (~> 0.6.0)
172246
rdoc (4.1.1)
173247
json (~> 1.4)
248+
rsolr (1.0.10)
249+
builder (>= 2.1.2)
174250
sass (3.2.19)
175251
sass-rails (4.0.3)
176252
railties (>= 4.0.0, < 5.0)
@@ -183,55 +259,6 @@ GEM
183259
select2-rails (3.4.9)
184260
sass-rails
185261
thor (~> 0.14)
186-
spree (2.2.2)
187-
spree_api (= 2.2.2)
188-
spree_backend (= 2.2.2)
189-
spree_cmd (= 2.2.2)
190-
spree_core (= 2.2.2)
191-
spree_frontend (= 2.2.2)
192-
spree_sample (= 2.2.2)
193-
spree_api (2.2.2)
194-
rabl (= 0.9.3)
195-
spree_core (= 2.2.2)
196-
versioncake (~> 1.2.0)
197-
spree_backend (2.2.2)
198-
jquery-rails (~> 3.1.0)
199-
jquery-ui-rails (~> 4.1.0)
200-
select2-rails (~> 3.4.7)
201-
spree_api (= 2.2.2)
202-
spree_core (= 2.2.2)
203-
spree_cmd (2.2.2)
204-
thor (~> 0.14)
205-
spree_core (2.2.2)
206-
activemerchant (~> 1.42.3)
207-
acts_as_list (= 0.3.0)
208-
awesome_nested_set (~> 3.0.0.rc.3)
209-
aws-sdk (= 1.27.0)
210-
cancan (~> 1.6.10)
211-
deface (~> 1.0.0)
212-
ffaker (~> 1.16)
213-
font-awesome-rails (~> 4.0)
214-
friendly_id (= 5.0.3)
215-
highline (~> 1.6.18)
216-
httparty (~> 0.11)
217-
json (~> 1.7)
218-
kaminari (~> 0.15.0)
219-
monetize
220-
paperclip (~> 3.4.1)
221-
paranoia (~> 2.0)
222-
rails (~> 4.0.5)
223-
ransack (~> 1.1.0)
224-
state_machine (= 1.2.0)
225-
stringex (~> 1.5.1)
226-
truncate_html (= 0.9.2)
227-
spree_frontend (2.2.2)
228-
canonical-rails (~> 0.0.4)
229-
jquery-rails (~> 3.1.0)
230-
spree_api (= 2.2.2)
231-
spree_core (= 2.2.2)
232-
stringex (~> 1.5.1)
233-
spree_sample (2.2.2)
234-
spree_core (= 2.2.2)
235262
sprockets (2.11.0)
236263
hike (~> 1.2)
237264
multi_json (~> 1.0)
@@ -244,6 +271,14 @@ GEM
244271
sqlite3 (1.3.9)
245272
state_machine (1.2.0)
246273
stringex (1.5.1)
274+
sunspot (2.1.1)
275+
pr_geohash (~> 1.0)
276+
rsolr (~> 1.0.7)
277+
sunspot_rails (2.1.1)
278+
nokogiri
279+
rails (>= 3)
280+
sunspot (= 2.1.1)
281+
sunspot_solr (2.1.1)
247282
thor (0.19.1)
248283
thread_safe (0.3.4)
249284
tilt (1.4.1)
@@ -276,9 +311,13 @@ DEPENDENCIES
276311
rails (= 4.0.5)
277312
sass-rails (~> 4.0.2)
278313
sdoc
279-
spree (= 2.2.2)
314+
spree!
280315
spree_auth_devise!
281316
spree_gateway!
317+
spree_monetaweb!
318+
spree_solr!
282319
sqlite3
320+
sunspot_rails
321+
sunspot_solr
283322
turbolinks
284323
uglifier (>= 1.3.0)

config/initializers/spree_solr.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Spree::Search::Filters.instance.add do |f|
2+
f.display_name = 'Price'
3+
f.search_condition = :any
4+
f.search_param = 'price'
5+
f.values { [0..10, 10..20, 20..30] }
6+
end
7+
8+
module Sunspot::Search
9+
PaginatedCollection.class_eval do
10+
def maximum(column)
11+
maximum_record = self.max { |a, b| a.send(column) <=> b.send(column) }
12+
return 0 if maximum_record.nil?
13+
maximum_record.send(column)
14+
end
15+
end
16+
end

config/sunspot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
production:
2+
solr:
3+
hostname: localhost
4+
port: 8983
5+
log_level: WARNING
6+
path: /solr/production
7+
# read_timeout: 2
8+
# open_timeout: 0.5
9+
10+
development:
11+
solr:
12+
hostname: localhost
13+
port: 8982
14+
log_level: INFO
15+
path: /solr/development
16+
17+
test:
18+
solr:
19+
hostname: localhost
20+
port: 8981
21+
log_level: WARNING
22+
path: /solr/test
23+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This migration comes from spree_monetaweb (originally 20140609121850)
2+
class AddPaymentIdToPayments < ActiveRecord::Migration
3+
def change
4+
add_column :spree_payments, :monetaweb_payment_id, :string
5+
end
6+
end

db/schema.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
# It's strongly recommended that you check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(version: 20140613141471) do
14+
ActiveRecord::Schema.define(version: 20140613182531) do
1515

1616
create_table "spree_addresses", force: true do |t|
1717
t.string "firstname"
@@ -290,6 +290,7 @@
290290
t.string "cvv_response_code"
291291
t.string "cvv_response_message"
292292
t.decimal "uncaptured_amount", precision: 10, scale: 2, default: 0.0
293+
t.string "monetaweb_payment_id"
293294
end
294295

295296
add_index "spree_payments", ["order_id"], name: "index_spree_payments_on_order_id"

solr/conf/admin-extra.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<!-- The content of this page will be statically included into the top
19+
of the admin page. Uncomment this as an example to see there the content
20+
will show up.
21+
22+
<hr>
23+
<i>This line will appear before the first table</i>
24+
<tr>
25+
<td colspan="2">
26+
This row will be appended to the end of the first table
27+
</td>
28+
</tr>
29+
<hr>
30+
31+
-->

solr/conf/elevate.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
19+
<!-- If this file is found in the config directory, it will only be
20+
loaded once at startup. If it is found in Solr's data
21+
directory, it will be re-loaded every commit.
22+
-->
23+
24+
<elevate>
25+
<query text="foo bar">
26+
<doc id="1" />
27+
<doc id="2" />
28+
<doc id="3" />
29+
</query>
30+
31+
<query text="ipod">
32+
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
33+
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
34+
</query>
35+
36+
</elevate>

0 commit comments

Comments
 (0)