Remove chili

This commit is contained in:
Rohan Mitchell
2014-05-01 10:25:34 +10:00
parent d707624525
commit c9aefa507a
42 changed files with 33 additions and 304 deletions

View File

@@ -29,7 +29,6 @@ gem 'truncate_html'
gem 'representative_view'
gem 'rabl'
gem 'oj'
gem 'chili', :github => 'openfoodfoundation/chili'
gem 'deface', :github => 'spree/deface', :ref => '1110a13'
gem 'paperclip'
gem 'geocoder'
@@ -84,11 +83,6 @@ group :test do
gem 'webmock'
end
group :chili do
gem 'eaterprises_feature', path: 'lib/chili/eaterprises_feature'
gem 'local_organics_feature', path: 'lib/chili/local_organics_feature'
end
group :development do
gem 'pry-debugger'
gem 'debugger-linecache'

View File

@@ -6,17 +6,9 @@ GIT
actionpack (~> 3.0)
activemodel (~> 3.0)
GIT
remote: git://github.com/openfoodfoundation/chili.git
revision: b82608623d504eb39f852115b138a53af5f89505
specs:
chili (3.1.0)
deface (~> 1.0.0.rc2)
rails (~> 3.2)
GIT
remote: git://github.com/openfoodfoundation/spree.git
revision: 1c133672652e1ee8b6c8d694efe258e62378062e
revision: da651b40f5c6cdd32e00b060729eb9aefd4f615f
branch: 1-3-stable
specs:
spree (1.3.3)
@@ -103,20 +95,6 @@ GIT
activemodel (>= 3.0)
railties (>= 3.0)
PATH
remote: lib/chili/eaterprises_feature
specs:
eaterprises_feature (0.0.1)
chili (~> 3.1)
rails (~> 3.2.11)
PATH
remote: lib/chili/local_organics_feature
specs:
local_organics_feature (0.0.1)
chili (~> 3.1)
rails (~> 3.2.11)
GEM
remote: https://rubygems.org/
specs:
@@ -134,16 +112,16 @@ GEM
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
active_link_to (1.0.0)
active_utils (2.0.1)
active_utils (2.0.2)
activesupport (>= 2.3.11)
i18n
activemerchant (1.40.0)
activemerchant (1.43.0)
active_utils (~> 2.0, >= 2.0.1)
activesupport (>= 2.3.14, < 5.0.0)
builder (>= 2.1.2, < 4.0.0)
i18n (~> 0.5)
json (~> 1.7)
money (< 6.0.0)
money (< 7.0.0)
nokogiri (~> 1.4)
activemodel (3.2.17)
activesupport (= 3.2.17)
@@ -194,7 +172,7 @@ GEM
climate_control (0.0.3)
activesupport (>= 3.0)
cliver (0.3.2)
cocaine (0.5.1)
cocaine (0.5.4)
climate_control (>= 0.0.3, < 1.0)
coderay (1.0.9)
coffee-rails (3.2.2)
@@ -204,7 +182,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.3.3)
colorize (0.6.0)
colorize (0.7.2)
columnize (0.3.6)
comfortable_mexican_sofa (1.6.24)
active_link_to (~> 1.0.0)
@@ -297,8 +275,8 @@ GEM
highline (1.6.18)
hike (1.2.3)
http_parser.rb (0.5.3)
httparty (0.11.0)
multi_json (~> 1.0)
httparty (0.13.1)
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.6.9)
immigrant (0.1.6)
@@ -332,13 +310,13 @@ GEM
treetop (~> 1.4.8)
method_source (0.8.1)
mime-types (1.25.1)
mini_portile (0.5.2)
mini_portile (0.5.3)
momentjs-rails (2.5.1)
railties (>= 3.1)
money (5.0.0)
i18n (~> 0.4)
json
multi_json (1.9.2)
multi_json (1.9.3)
multi_xml (0.5.5)
net-scp (1.1.2)
net-ssh (>= 2.6.5)
@@ -397,7 +375,7 @@ GEM
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
raindrops (0.9.0)
rake (10.1.1)
rake (10.3.1)
ransack (0.7.2)
actionpack (~> 3.0)
activerecord (~> 3.0)
@@ -459,7 +437,7 @@ GEM
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.19.0)
thor (0.19.1)
tilt (1.4.1)
timecop (0.6.2.2)
timers (1.1.0)
@@ -472,7 +450,7 @@ GEM
sprockets (>= 2.0.0)
turn (0.8.3)
ansi
tzinfo (0.3.38)
tzinfo (0.3.39)
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
@@ -510,7 +488,6 @@ DEPENDENCIES
aws-sdk
bugsnag
capybara
chili!
coffee-rails (~> 3.2.1)
comfortable_mexican_sofa
compass-rails
@@ -518,7 +495,6 @@ DEPENDENCIES
db2fog
debugger-linecache
deface!
eaterprises_feature!
factory_girl_rails
foreigner
foundation-icons-sass-rails
@@ -536,7 +512,6 @@ DEPENDENCIES
jquery-rails
json_spec
letter_opener
local_organics_feature!
momentjs-rails
newrelic_rpm
oj

View File

@@ -61,4 +61,4 @@ $ff_base: 'Ubuntu', sans-serif !default;
$table_head_color: lighten($body_text_color, 60) !default;
@import "./variables_changes.css.scss";
@import "./store/variables_changes.css.scss";

View File

@@ -1,3 +1,4 @@
require 'open_food_network/feature_toggle'
require 'open_food_network/distribution_change_validator'
ActiveSupport::Notifications.subscribe('spree.order.contents_changed') do |name, start, finish, id, payload|

View File

@@ -1,3 +0,0 @@
.bundle/
log/*.log
pkg/

View File

@@ -1,3 +0,0 @@
= Eaterprises Feature
This feature is released under the AGPL licence.

View File

@@ -1,13 +0,0 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require_tree .

View File

@@ -1,13 +0,0 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/

View File

@@ -1,3 +0,0 @@
<!-- insert_bottom 'head' -->
<%= stylesheet_link_tag 'eaterprises_feature/application' %>
<%= javascript_include_tag 'eaterprises_feature/application' %>

View File

@@ -1,3 +0,0 @@
EaterprisesFeature::Engine.automount!
EaterprisesFeature::Engine.routes.draw do
end

View File

@@ -1,22 +0,0 @@
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "eaterprises_feature/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "eaterprises_feature"
s.version = EaterprisesFeature::VERSION
s.authors = ["Rohan Mitchell"]
s.email = ["rohan@rohanmitchell.com"]
s.homepage = ""
s.summary = "Summary of EaterprisesFeature."
s.description = "Description of EaterprisesFeature."
s.files = Dir["{app,config,db,lib}/**/*"] + ["README.rdoc"]
s.add_dependency "rails", "~> 3.2.11"
s.add_dependency 'chili', '~> 3.1'
s.add_development_dependency "sqlite3"
end

View File

@@ -1,7 +0,0 @@
require "chili"
require "eaterprises_feature/engine"
module EaterprisesFeature
extend Chili::Base
active_if { OpenFoodNetwork::FeatureToggle.enabled? :eaterprises }
end

View File

@@ -1,17 +0,0 @@
require_relative '../../../../open_food_network/feature_toggle'
module EaterprisesFeature
class Engine < ::Rails::Engine
isolate_namespace EaterprisesFeature
if OpenFoodNetwork::FeatureToggle.enabled? :eaterprises
initializer 'eaterprises_feature.sass', :after => :load_config_initializers do |app|
app.config.sass.load_paths += [self.root.join('app', 'assets', 'stylesheets', 'eaterprises_feature')] if Rails.application.config.respond_to? :sass
end
initializer :assets do |app|
app.config.assets.precompile += ['eaterprises_feature/*']
end
end
end
end

View File

@@ -1,3 +0,0 @@
module EaterprisesFeature
VERSION = "0.0.1"
end

View File

@@ -1,3 +0,0 @@
class EaterprisesFeatureGenerator < Rails::Generators::Base
include Chili::GeneratorProxy
end

View File

@@ -1,3 +0,0 @@
.bundle/
log/*.log
pkg/

View File

@@ -1,3 +0,0 @@
= Local Organics Feature
This feature is released under the AGPL licence.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

View File

@@ -1,13 +0,0 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require_tree .

View File

@@ -1,10 +0,0 @@
body.admin {
#header {
height: 150px;
}
#header #logo {
background-color: #fff;
border: 5px solid #fff;
}
}

View File

@@ -1,13 +0,0 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree .
*/

View File

@@ -1,48 +0,0 @@
body {
background-color: #FFF5E0;
}
h2 {
font-size: 26px;
color: #331f00;
}
nav #main-nav-bar {
border-bottom: 9px solid #A3DCFF;
}
nav#taxonomies .taxonomy-root,
nav#taxonomies .taxons-list li a,
nav#filters .filter_name,
nav#filters .filter_choices li a {
font-size: 16px;
}
/* Products listing page */
#products-local ul {
background-color: #e6f4ff;
}
ul.product-listing li a.info {
font-size: 16px;
color: #331f00;
}
ul.product-listing li .price {
font-size: 20px;
}
/* Product details page */
#cart-form .distributor {
font-size: 14px;
font-weight: bold;
}
/* Checkout address page */
#checkout .alternative-available-distributors {
display: none;
}
div#checkout .form-buttons {
padding-top: 30px;
margin-left: 0;
}

View File

@@ -1,3 +0,0 @@
<!-- insert_bottom 'head' -->
<%= stylesheet_link_tag 'local_organics_feature/admin' %>
<%= javascript_include_tag 'local_organics_feature/admin' %>

View File

@@ -1,5 +0,0 @@
<!-- replace_contents '#header' sequence 1 -->
<div data-hook="admin_login_navigation_bar"></div>
<%= link_to image_tag('local_organics_feature/logo.png', :id => 'logo'), spree.admin_path %>
<h1><%= link_to t(:administration), spree.admin_path %></h1>
<div id="progress"><%= image_tag 'admin/progress.gif' %> <%= t(:loading) %>...</div>

View File

@@ -1,3 +0,0 @@
<!-- insert_bottom 'head' -->
<%= stylesheet_link_tag 'local_organics_feature/application' %>
<%= javascript_include_tag 'local_organics_feature/application' %>

View File

@@ -1,3 +0,0 @@
<!-- insert_bottom '#footer-left p' -->
| <%= link_to 'Terms and Conditions', "http://www.localorg.com.au/contactterms-and-conditions.html" %>
| <%= link_to "http://openfoodweb.org/foundation" do %><%= image_tag 'ofw.png', alt: 'Open Food Foundation' %><% end %>

View File

@@ -1,2 +0,0 @@
<!-- replace_contents 'figure#logo' -->
<%= logo 'local_organics_feature/logo.png' %>

View File

@@ -1,3 +0,0 @@
/ replace_contents '#products-local'
%h5= "Products at #{current_distributor.name}"
= render 'spree/shared/products', :products => @products_local, :taxon => @taxon

View File

@@ -1,3 +0,0 @@
/ replace_contents '#products-remote'
%h5 Products found elsewhere
= render 'spree/shared/products', :products => @products_remote, :taxon => @taxon

View File

@@ -1,3 +0,0 @@
LocalOrganicsFeature::Engine.automount!
LocalOrganicsFeature::Engine.routes.draw do
end

View File

@@ -1,3 +0,0 @@
class LocalOrganicsFeatureGenerator < Rails::Generators::Base
include Chili::GeneratorProxy
end

View File

@@ -1,7 +0,0 @@
require "chili"
require "local_organics_feature/engine"
module LocalOrganicsFeature
extend Chili::Base
active_if { OpenFoodNetwork::FeatureToggle.enabled? :local_organics }
end

View File

@@ -1,17 +0,0 @@
require_relative '../../../../open_food_network/feature_toggle'
module LocalOrganicsFeature
class Engine < ::Rails::Engine
isolate_namespace LocalOrganicsFeature
if OpenFoodNetwork::FeatureToggle.enabled? :local_organics
initializer 'local_organics_feature.sass', :after => :load_config_initializers do |app|
app.config.sass.load_paths += [self.root.join('app', 'assets', 'stylesheets', 'local_organics_feature')] if Rails.application.config.respond_to? :sass
end
initializer :assets do |app|
app.config.assets.precompile += ['local_organics_feature/*']
end
end
end
end

View File

@@ -1,3 +0,0 @@
module LocalOrganicsFeature
VERSION = "0.0.1"
end

View File

@@ -1,22 +0,0 @@
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "local_organics_feature/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "local_organics_feature"
s.version = LocalOrganicsFeature::VERSION
s.authors = ["Rohan Mitchell"]
s.email = ["rohan@rohanmitchell.com"]
s.homepage = ""
s.summary = "Summary of LocalOrganicsFeature."
s.description = "Description of LocalOrganicsFeature."
s.files = Dir["{app,config,db,lib}/**/*"] + ["README.rdoc"]
s.add_dependency "rails", "~> 3.2.11"
s.add_dependency 'chili', '~> 3.1'
s.add_development_dependency "sqlite3"
end

View File

@@ -64,6 +64,7 @@ feature %q{
fill_in 'enterprise_name', :with => 'Eaterprises'
fill_in 'enterprise_description', :with => 'Connecting farmers and eaters'
fill_in 'enterprise_long_description', :with => 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro.'
fill_in 'enterprise_distributor_info', :with => 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro.'
uncheck 'enterprise_is_primary_producer'
check 'enterprise_is_distributor'

View File

@@ -7,7 +7,7 @@ feature "As a consumer I want to check out my cart", js: true do
include WebHelper
include UIComponentHelper
let(:distributor) { create(:distributor_enterprise) }
let(:distributor) { create(:distributor_enterprise, distributor_info: 'distributor info') }
let(:supplier) { create(:supplier_enterprise) }
let(:order_cycle) { create(:order_cycle, distributors: [distributor], coordinator: create(:distributor_enterprise)) }
let(:product) { create(:simple_product, supplier: supplier) }
@@ -97,6 +97,22 @@ feature "As a consumer I want to check out my cart", js: true do
click_button "Purchase"
sleep 10
page.should have_content "Your order has been processed successfully"
# It sends a confirmation email containing the distributor info, pickup time and pickup instructions
distributor_info = distributor.distributor_info
pickup_time = order_cycle.pickup_time_for(distributor)
pickup_instructions = order_cycle.pickup_instructions_for(distributor)
distributor_info.should_not be_blank
pickup_time.should_not be_blank
pickup_instructions.should_not be_blank
wait_until { ActionMailer::Base.deliveries.length == 1 }
email = ActionMailer::Base.deliveries.last
email.body.should include distributor_info
email.body.should include pickup_time
email.body.should include pickup_instructions
end
it "takes us to the order confirmation page when submitted with 'same as billing address' checked" do