Compare commits

..

11 Commits
0.2.5 ... 0.2.7

Author SHA1 Message Date
Rohan Mitchell
aa336d9b9f Merge branch 'feedback' 2012-10-25 10:34:27 +11:00
Rob H
ff029b8903 Add feedback bar to all pages on the front end 2012-10-24 18:26:21 +11:00
Rohan Mitchell
51850be83e Update spree_paypal_express to handle blank states from paypal 2012-10-24 16:19:53 +11:00
Rohan Mitchell
32db258db0 Use spree_heroku with support for staging env 2012-10-24 13:11:40 +11:00
Rob H
4c0109bccc Merge branch 'master', remote-tracking branch 'origin' 2012-10-22 11:15:23 +11:00
Rob H
f83a5b0ba8 Merge branch 'master', remote-tracking branch 'origin' 2012-10-22 10:45:35 +11:00
Rohan Mitchell
87a89324d9 Update repo in readme, add Rob to creds 2012-10-19 17:02:09 +11:00
Rohan Mitchell
4fc7295b97 Use S3 configuration from environment vars instead of s3.yml 2012-10-19 16:40:18 +11:00
Rohan Mitchell
5b025a6cba Make group_buy_unit_size accessible 2012-10-18 15:15:54 +11:00
Rohan Mitchell
9166829930 Add group buy unit size field 2012-10-18 11:56:21 +11:00
Rohan Mitchell
8c7a02ec10 Fix image uploads with CMS 2012-10-18 11:13:40 +11:00
14 changed files with 58 additions and 32 deletions

1
.gitignore vendored
View File

@@ -27,4 +27,5 @@ public/stylesheets
public/images
public/spree
config/abr.yml
config/heroku_env.rb
NERD_tree*

View File

@@ -17,9 +17,9 @@ gem 'simple_form', :git => 'git://github.com/RohanM/simple_form.git'
gem 'unicorn'
gem 'bugsnag'
gem 'spree_heroku', :git => 'git://github.com/joneslee85/spree-heroku.git'
gem 'spree_heroku', :git => 'git://github.com/eaterprises/spree-heroku.git'
gem 'haml'
gem 'aws-s3'
gem 'aws-sdk'
gem 'andand'
gem 'truncate_html'

View File

@@ -13,23 +13,23 @@ GIT
spree_last_address (1.1.0)
spree_core (>= 1.1)
GIT
remote: git://github.com/eaterprises/spree-heroku.git
revision: a1e07bf7a22fc0c07a1be9148f477d20b557dbf6
specs:
spree_heroku (1.0)
aws-sdk (~> 1.3.4)
spree_core (>= 0.70.0)
GIT
remote: git://github.com/eaterprises/spree_paypal_express.git
revision: 63963fd3377a41debbf0f12a4cc78122145b0387
revision: ec7fd298f117fe6c598070dc0e7a38887b9bcbc4
branch: 1-1-stable
specs:
spree_paypal_express (1.1.0)
spree_auth (>= 1.0.0)
spree_core (>= 1.0.0)
GIT
remote: git://github.com/joneslee85/spree-heroku.git
revision: 63f0cfa47089cae50365e226ec7dd1eccde0ac05
specs:
spree_heroku (1.0)
aws-sdk (~> 1.3.4)
spree_core (>= 0.70.0)
GIT
remote: git://github.com/spree/spree.git
revision: 46691e075129fd3d7b59e296d73149a9066c1b9d
@@ -134,10 +134,6 @@ GEM
ansi (1.4.2)
arel (3.0.2)
awesome_print (1.0.2)
aws-s3 (0.6.3)
builder
mime-types
xml-simple
aws-sdk (1.3.9)
httparty (~> 0.7)
json (~> 1.4)
@@ -158,7 +154,7 @@ GEM
xpath (~> 0.1.4)
childprocess (0.3.2)
ffi (~> 1.0.6)
cocaine (0.4.0)
cocaine (0.4.2)
coderay (1.0.7)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
@@ -342,7 +338,6 @@ GEM
uuidtools (2.1.3)
warden (1.1.1)
rack (>= 1.0)
xml-simple (1.1.1)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -352,7 +347,7 @@ PLATFORMS
DEPENDENCIES
andand
awesome_print
aws-s3
aws-sdk
bugsnag
capybara
coffee-rails (~> 3.2.1)

View File

@@ -20,11 +20,11 @@ hosted at GitHub.
You can view the code at:
https://github.com/andrewspinks/openfoodweb
https://github.com/eaterprises/openfoodweb
You can download the source with the command:
git clone git@github.com:andrewspinks/openfoodweb
git clone git@github.com:eaterprises/openfoodweb
## Get it running
@@ -80,6 +80,7 @@ speak to Andrew Spinks.
* Andrew Spinks (http://github.com/andrewspinks)
* Rohan Mitchell (http://github.com/rohanm)
* Rob Harrington (http://github.com/oeoeaio)
## Licence

View File

@@ -6,7 +6,7 @@ Spree::Product.class_eval do
accepts_nested_attributes_for :product_distributions, :allow_destroy => true
attr_accessible :supplier_id, :distributor_ids, :product_distributions_attributes, :group_buy
attr_accessible :supplier_id, :distributor_ids, :product_distributions_attributes, :group_buy, :group_buy_unit_size
validates_presence_of :supplier

View File

@@ -0,0 +1,4 @@
Deface::Override.new(:virtual_path => "spree/layouts/spree_application",
:insert_bottom => "[data-hook='inside_head']",
:partial => "layouts/feedback_script",
:name => "feedback_script")

View File

@@ -0,0 +1,8 @@
<script type="text/javascript">
var uvOptions = {};
(function() {
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/mCbT1cbjQZkPELXOix9Ag.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s);
})();
</script>

View File

@@ -5,3 +5,8 @@
= f.label :group_buy_1, 'Yes'
= f.radio_button :group_buy, '0', :checked => !f.object.group_buy
= f.label :group_buy_0, 'No'
= f.field_container :group_buy_unit_size do
= f.label :group_buy_unit_size
%br
= f.text_field :group_buy_unit_size

View File

@@ -28,3 +28,8 @@ Openfoodweb::Application.configure do
# Expands the lines which load the assets
config.assets.debug = true
end
# Load heroku vars from local file
heroku_env = File.join(Rails.root, 'config', 'heroku_env.rb')
load(heroku_env) if File.exists?(heroku_env)

View File

@@ -34,8 +34,15 @@ ComfortableMexicanSofa.configure do |config|
# the upload method and appropriate settings based on Paperclip. For S3 see:
# http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/S3, and for
# filesystem see: http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/Filesystem
# config.upload_file_options = {:url => '/system/:class/:id/:attachment/:style/:filename'}
config.upload_file_options = {
:storage => 's3',
:s3_credentials => {
:bucket => ENV['S3_BUCKET'],
:access_key_id => ENV['S3_KEY'],
:secret_access_key => ENV['S3_SECRET']
}
}
# Sofa allows you to setup entire site from files. Database is updated with each
# request (if necessary). Please note that database entries are destroyed if there's
# no corresponding file. Fixtures are disabled by default.

View File

@@ -1,8 +0,0 @@
developement:
bucket: openfoodweb_test
access_key_id: AKIAJ3EE2EKGP36D4PUA
secret_access_key: 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
production:
bucket: openfoodweb_production
access_key_id: AKIAJ3EE2EKGP36D4PUA
secret_access_key: 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

View File

@@ -0,0 +1,5 @@
class AddGroupBuyUnitSizeToProducts < ActiveRecord::Migration
def change
add_column :spree_products, :group_buy_unit_size, :string
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20121010004400) do
ActiveRecord::Schema.define(:version => 20121018002907) do
create_table "cms_blocks", :force => true do |t|
t.integer "page_id", :null => false
@@ -487,6 +487,7 @@ ActiveRecord::Schema.define(:version => 20121010004400) do
t.integer "count_on_hand", :default => 0, :null => false
t.integer "supplier_id"
t.boolean "group_buy"
t.string "group_buy_unit_size"
end
add_index "spree_products", ["available_on"], :name => "index_products_on_available_on"

View File

@@ -49,12 +49,14 @@ feature %q{
fill_in 'product_price', :with => '19.99'
select 'New supplier', :from => 'product_supplier_id'
choose 'product_group_buy_1'
fill_in 'Group buy unit size', :with => '10 kg'
click_button 'Create'
flash_message.should == 'Product "A new product !!!" has been successfully created!'
product = Spree::Product.find_by_name('A new product !!!')
product.group_buy.should be_true
product.group_buy_unit_size.should == '10 kg'
end
end