From c9aefa507a0d497e81de7c18ff4aa6e276ff2884 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 1 May 2014 10:25:34 +1000 Subject: [PATCH] Remove chili --- Gemfile | 6 --- Gemfile.lock | 51 +++++------------- .../stylesheets/store/variables.css.scss | 2 +- .../store}/variables_changes.css.scss | 0 app/models/spree/order_decorator.rb | 1 + lib/chili/eaterprises_feature/.gitignore | 3 -- lib/chili/eaterprises_feature/README.rdoc | 3 -- .../images/eaterprises_feature/.gitkeep | 0 .../eaterprises_feature/application.js | 13 ----- .../eaterprises_feature/application.css | 13 ----- .../application/assets.html.erb.deface | 3 -- .../eaterprises_feature/config/routes.rb | 3 -- .../eaterprises_feature.gemspec | 22 -------- .../lib/eaterprises_feature.rb | 7 --- .../lib/eaterprises_feature/engine.rb | 17 ------ .../lib/eaterprises_feature/version.rb | 3 -- .../eaterprises_feature_generator.rb | 3 -- lib/chili/local_organics_feature/.gitignore | 3 -- lib/chili/local_organics_feature/README.rdoc | 3 -- .../images/local_organics_feature/.gitkeep | 0 .../images/local_organics_feature/logo.png | Bin 9507 -> 0 bytes .../local_organics_feature/admin.js | 0 .../local_organics_feature/application.js | 13 ----- .../local_organics_feature/admin.css.scss | 10 ---- .../local_organics_feature/application.css | 13 ----- .../local_organics.css.scss | 48 ----------------- .../variables_changes.css.scss | 1 - .../layouts/admin/assets.html.erb.deface | 3 -- .../spree/layouts/admin/logo.html.erb.deface | 5 -- .../spree_application/assets.html.erb.deface | 3 -- .../spree_application/footer.html.erb.deface | 3 -- .../spree_application/logo.html.erb.deface | 2 - .../local.html.haml.deface | 3 -- .../remote.html.haml.deface | 3 -- .../local_organics_feature/config/routes.rb | 3 -- .../local_organics_feature_generator.rb | 3 -- .../lib/local_organics_feature.rb | 7 --- .../lib/local_organics_feature/engine.rb | 17 ------ .../lib/local_organics_feature/version.rb | 3 -- .../local_organics_feature.gemspec | 22 -------- spec/features/admin/enterprises_spec.rb | 1 + .../consumer/shopping/checkout_spec.rb | 18 ++++++- 42 files changed, 33 insertions(+), 304 deletions(-) rename {lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature => app/assets/stylesheets/store}/variables_changes.css.scss (100%) delete mode 100644 lib/chili/eaterprises_feature/.gitignore delete mode 100644 lib/chili/eaterprises_feature/README.rdoc delete mode 100644 lib/chili/eaterprises_feature/app/assets/images/eaterprises_feature/.gitkeep delete mode 100644 lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js delete mode 100644 lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css delete mode 100644 lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface delete mode 100644 lib/chili/eaterprises_feature/config/routes.rb delete mode 100644 lib/chili/eaterprises_feature/eaterprises_feature.gemspec delete mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature.rb delete mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb delete mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb delete mode 100644 lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb delete mode 100644 lib/chili/local_organics_feature/.gitignore delete mode 100644 lib/chili/local_organics_feature/README.rdoc delete mode 100644 lib/chili/local_organics_feature/app/assets/images/local_organics_feature/.gitkeep delete mode 100644 lib/chili/local_organics_feature/app/assets/images/local_organics_feature/logo.png delete mode 100644 lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/admin.js delete mode 100644 lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/application.js delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/assets.html.erb.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface delete mode 100644 lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface delete mode 100644 lib/chili/local_organics_feature/config/routes.rb delete mode 100644 lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb delete mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature.rb delete mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb delete mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature/version.rb delete mode 100644 lib/chili/local_organics_feature/local_organics_feature.gemspec diff --git a/Gemfile b/Gemfile index 5050213a17..af4108c9eb 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index 74ffb03923..adba98ff8a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/app/assets/stylesheets/store/variables.css.scss b/app/assets/stylesheets/store/variables.css.scss index f33a4318e9..4cb074ae48 100644 --- a/app/assets/stylesheets/store/variables.css.scss +++ b/app/assets/stylesheets/store/variables.css.scss @@ -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"; diff --git a/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/variables_changes.css.scss b/app/assets/stylesheets/store/variables_changes.css.scss similarity index 100% rename from lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/variables_changes.css.scss rename to app/assets/stylesheets/store/variables_changes.css.scss diff --git a/app/models/spree/order_decorator.rb b/app/models/spree/order_decorator.rb index 7e5d660fc6..d37a84ce1d 100644 --- a/app/models/spree/order_decorator.rb +++ b/app/models/spree/order_decorator.rb @@ -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| diff --git a/lib/chili/eaterprises_feature/.gitignore b/lib/chili/eaterprises_feature/.gitignore deleted file mode 100644 index 8619e09c5a..0000000000 --- a/lib/chili/eaterprises_feature/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.bundle/ -log/*.log -pkg/ diff --git a/lib/chili/eaterprises_feature/README.rdoc b/lib/chili/eaterprises_feature/README.rdoc deleted file mode 100644 index 047a9eccec..0000000000 --- a/lib/chili/eaterprises_feature/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Eaterprises Feature - -This feature is released under the AGPL licence. \ No newline at end of file diff --git a/lib/chili/eaterprises_feature/app/assets/images/eaterprises_feature/.gitkeep b/lib/chili/eaterprises_feature/app/assets/images/eaterprises_feature/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js b/lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js deleted file mode 100644 index 15ebed9422..0000000000 --- a/lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js +++ /dev/null @@ -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 . diff --git a/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css b/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css deleted file mode 100644 index 3192ec897b..0000000000 --- a/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css +++ /dev/null @@ -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 . - */ diff --git a/lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface b/lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface deleted file mode 100644 index 72e5ed7748..0000000000 --- a/lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface +++ /dev/null @@ -1,3 +0,0 @@ - -<%= stylesheet_link_tag 'eaterprises_feature/application' %> -<%= javascript_include_tag 'eaterprises_feature/application' %> diff --git a/lib/chili/eaterprises_feature/config/routes.rb b/lib/chili/eaterprises_feature/config/routes.rb deleted file mode 100644 index 38585adb71..0000000000 --- a/lib/chili/eaterprises_feature/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -EaterprisesFeature::Engine.automount! -EaterprisesFeature::Engine.routes.draw do -end diff --git a/lib/chili/eaterprises_feature/eaterprises_feature.gemspec b/lib/chili/eaterprises_feature/eaterprises_feature.gemspec deleted file mode 100644 index 5194c3d4dc..0000000000 --- a/lib/chili/eaterprises_feature/eaterprises_feature.gemspec +++ /dev/null @@ -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 diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature.rb deleted file mode 100644 index 72cd9d7d95..0000000000 --- a/lib/chili/eaterprises_feature/lib/eaterprises_feature.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "chili" -require "eaterprises_feature/engine" - -module EaterprisesFeature - extend Chili::Base - active_if { OpenFoodNetwork::FeatureToggle.enabled? :eaterprises } -end diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb deleted file mode 100644 index 25965c0559..0000000000 --- a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb +++ /dev/null @@ -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 diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb deleted file mode 100644 index 5424d0cb17..0000000000 --- a/lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module EaterprisesFeature - VERSION = "0.0.1" -end diff --git a/lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb b/lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb deleted file mode 100644 index b0b6f7f010..0000000000 --- a/lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb +++ /dev/null @@ -1,3 +0,0 @@ -class EaterprisesFeatureGenerator < Rails::Generators::Base - include Chili::GeneratorProxy -end diff --git a/lib/chili/local_organics_feature/.gitignore b/lib/chili/local_organics_feature/.gitignore deleted file mode 100644 index 8619e09c5a..0000000000 --- a/lib/chili/local_organics_feature/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.bundle/ -log/*.log -pkg/ diff --git a/lib/chili/local_organics_feature/README.rdoc b/lib/chili/local_organics_feature/README.rdoc deleted file mode 100644 index 5f394c59cb..0000000000 --- a/lib/chili/local_organics_feature/README.rdoc +++ /dev/null @@ -1,3 +0,0 @@ -= Local Organics Feature - -This feature is released under the AGPL licence. diff --git a/lib/chili/local_organics_feature/app/assets/images/local_organics_feature/.gitkeep b/lib/chili/local_organics_feature/app/assets/images/local_organics_feature/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/chili/local_organics_feature/app/assets/images/local_organics_feature/logo.png b/lib/chili/local_organics_feature/app/assets/images/local_organics_feature/logo.png deleted file mode 100644 index 92750bb69882dcfcda536b40d9086076a2f62626..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9507 zcmaKS1ymf*_U7P_;O-1A!JPquySo!4g9IC3&;$vCh2S3C-63djhaiFA!Ghah!EMR= zzu((Ed-iRg?!Hy`-0!=$s%~}F>F!UO>Izsd$X@^e04ya%S?y<;{(QmEQJ?Q=oA$oX zf($BW2-R`1fqGfGfdNu)U97-BB_~T;ur}E8t&i(4SPTF_VzAdWgc_=;f~;MfI4%F$ zaC$pIp3wk+n1naP(%JzG1zLe^?VZKxj@vrvfc9_2=?nzaxYZysU^{z7UpKIhuez?a zuY1<{;TGq1OCed>L5<{KS3F)X#!pdcp?zkr}14?B>Tn}?T+`}q{);Nb@e2!eQpfd4+|p1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VlmLopth|($W@>Qp^gIW~ z^H}|4eE=Iw4#y^Y4+mj -<%= stylesheet_link_tag 'local_organics_feature/admin' %> -<%= javascript_include_tag 'local_organics_feature/admin' %> diff --git a/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface deleted file mode 100644 index 6b8250dead..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface +++ /dev/null @@ -1,5 +0,0 @@ - -
-<%= link_to image_tag('local_organics_feature/logo.png', :id => 'logo'), spree.admin_path %> -

<%= link_to t(:administration), spree.admin_path %>

-
<%= image_tag 'admin/progress.gif' %> <%= t(:loading) %>...
diff --git a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface deleted file mode 100644 index c1fe8ec1e0..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface +++ /dev/null @@ -1,3 +0,0 @@ - -<%= stylesheet_link_tag 'local_organics_feature/application' %> -<%= javascript_include_tag 'local_organics_feature/application' %> diff --git a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface deleted file mode 100644 index d9b0ac9441..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface +++ /dev/null @@ -1,3 +0,0 @@ - -| <%= 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 %> \ No newline at end of file diff --git a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface deleted file mode 100644 index 1f4b4fe5dd..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface +++ /dev/null @@ -1,2 +0,0 @@ - -<%= logo 'local_organics_feature/logo.png' %> diff --git a/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface b/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface deleted file mode 100644 index f63276ec91..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface +++ /dev/null @@ -1,3 +0,0 @@ -/ replace_contents '#products-local' -%h5= "Products at #{current_distributor.name}" -= render 'spree/shared/products', :products => @products_local, :taxon => @taxon diff --git a/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface b/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface deleted file mode 100644 index fa27ef4f1a..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface +++ /dev/null @@ -1,3 +0,0 @@ -/ replace_contents '#products-remote' -%h5 Products found elsewhere -= render 'spree/shared/products', :products => @products_remote, :taxon => @taxon diff --git a/lib/chili/local_organics_feature/config/routes.rb b/lib/chili/local_organics_feature/config/routes.rb deleted file mode 100644 index 7ee7f3fd58..0000000000 --- a/lib/chili/local_organics_feature/config/routes.rb +++ /dev/null @@ -1,3 +0,0 @@ -LocalOrganicsFeature::Engine.automount! -LocalOrganicsFeature::Engine.routes.draw do -end diff --git a/lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb b/lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb deleted file mode 100644 index 23cf22c4eb..0000000000 --- a/lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb +++ /dev/null @@ -1,3 +0,0 @@ -class LocalOrganicsFeatureGenerator < Rails::Generators::Base - include Chili::GeneratorProxy -end diff --git a/lib/chili/local_organics_feature/lib/local_organics_feature.rb b/lib/chili/local_organics_feature/lib/local_organics_feature.rb deleted file mode 100644 index 148abe7761..0000000000 --- a/lib/chili/local_organics_feature/lib/local_organics_feature.rb +++ /dev/null @@ -1,7 +0,0 @@ -require "chili" -require "local_organics_feature/engine" - -module LocalOrganicsFeature - extend Chili::Base - active_if { OpenFoodNetwork::FeatureToggle.enabled? :local_organics } -end diff --git a/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb b/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb deleted file mode 100644 index aaba6a8e8c..0000000000 --- a/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb +++ /dev/null @@ -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 diff --git a/lib/chili/local_organics_feature/lib/local_organics_feature/version.rb b/lib/chili/local_organics_feature/lib/local_organics_feature/version.rb deleted file mode 100644 index ef7867a4d6..0000000000 --- a/lib/chili/local_organics_feature/lib/local_organics_feature/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module LocalOrganicsFeature - VERSION = "0.0.1" -end diff --git a/lib/chili/local_organics_feature/local_organics_feature.gemspec b/lib/chili/local_organics_feature/local_organics_feature.gemspec deleted file mode 100644 index 8f9619b4a4..0000000000 --- a/lib/chili/local_organics_feature/local_organics_feature.gemspec +++ /dev/null @@ -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 diff --git a/spec/features/admin/enterprises_spec.rb b/spec/features/admin/enterprises_spec.rb index 88c6dc8cb4..3bcce92be2 100644 --- a/spec/features/admin/enterprises_spec.rb +++ b/spec/features/admin/enterprises_spec.rb @@ -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' diff --git a/spec/features/consumer/shopping/checkout_spec.rb b/spec/features/consumer/shopping/checkout_spec.rb index a780e9fd4e..0f956816a2 100644 --- a/spec/features/consumer/shopping/checkout_spec.rb +++ b/spec/features/consumer/shopping/checkout_spec.rb @@ -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