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 92750bb698..0000000000 Binary files a/lib/chili/local_organics_feature/app/assets/images/local_organics_feature/logo.png and /dev/null differ diff --git a/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/admin.js b/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/admin.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/application.js b/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/application.js deleted file mode 100644 index 15ebed9422..0000000000 --- a/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_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/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss deleted file mode 100644 index 0db1d97278..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss +++ /dev/null @@ -1,10 +0,0 @@ -body.admin { - #header { - height: 150px; - } - - #header #logo { - background-color: #fff; - border: 5px solid #fff; - } -} diff --git a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css deleted file mode 100644 index 3192ec897b..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_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/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss deleted file mode 100644 index 94cb262673..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss +++ /dev/null @@ -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; -} diff --git a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss deleted file mode 100644 index 5c0a2d6414..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss +++ /dev/null @@ -1 +0,0 @@ -$link_text_color: #de790c; diff --git a/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/assets.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/assets.html.erb.deface deleted file mode 100644 index dfcc0e6726..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/assets.html.erb.deface +++ /dev/null @@ -1,3 +0,0 @@ - -<%= 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 %> -