From dc54be992ba2915ea2b185611ff2107b8946c304 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Sun, 21 Apr 2013 08:54:32 +1000 Subject: [PATCH 01/62] Require spree support file that provides a default shipping method for ProductDistributions when building from factory - fixes product seeds --- db/seeds.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/seeds.rb b/db/seeds.rb index dd6be815e2..574ebeeb40 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -2,6 +2,7 @@ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). require File.expand_path('../../spec/factories', __FILE__) +require File.expand_path('../../spec/support/spree/init', __FILE__) # -- Spree From cbef31f61988c5c2240478c5a4411b6e0ad9f061 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 10:24:17 +1000 Subject: [PATCH 02/62] Install chili for feature toggles --- Gemfile | 3 ++- Gemfile.lock | 43 ++++++++++++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 2526802ee0..def8723977 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,8 @@ gem 'aws-sdk' gem 'andand' gem 'truncate_html' gem 'representative_view' +gem 'chili', :github => 'eaterprises/chili' +gem 'deface', :github => 'spree/deface' # Gems used only for assets and not required # in production environments by default. @@ -55,4 +57,3 @@ group :test, :development do gem 'awesome_print' gem "letter_opener" end - diff --git a/Gemfile.lock b/Gemfile.lock index aee3428b19..d6befd949e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,6 +6,14 @@ GIT actionpack (~> 3.0) activemodel (~> 3.0) +GIT + remote: git://github.com/eaterprises/chili.git + revision: b82608623d504eb39f852115b138a53af5f89505 + specs: + chili (3.1.0) + deface (~> 1.0.0.rc2) + rails (~> 3.2) + GIT remote: git://github.com/eaterprises/spree-heroku.git revision: a1e07bf7a22fc0c07a1be9148f477d20b557dbf6 @@ -30,6 +38,15 @@ GIT spree_auth (>= 1.0.0) spree_core (>= 1.0.0) +GIT + remote: git://github.com/spree/deface.git + revision: 20167d78fa87352d1c700e9a25a949de8a6a8e18 + specs: + deface (1.0.0.rc2) + colorize (>= 0.5.8) + nokogiri (~> 1.5.9) + rails (~> 3.1) + GIT remote: git://github.com/spree/spree.git revision: 11dcee754d6c07897eabd26db3e7bcb14ffb595d @@ -167,6 +184,7 @@ GEM coffee-script-source execjs coffee-script-source (1.3.3) + colorize (0.5.8) columnize (0.3.6) comfortable_mexican_sofa (1.6.24) active_link_to (~> 1.0.0) @@ -180,9 +198,6 @@ GEM debugger-linecache (1.1.2) debugger-ruby_core_source (>= 1.1.1) debugger-ruby_core_source (1.1.3) - deface (0.9.1) - nokogiri (~> 1.5.0) - rails (~> 3.1) devise (2.0.5) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) @@ -203,11 +218,11 @@ GEM ffi (1.3.1) haml (3.1.6) highline (1.6.11) - hike (1.2.1) + hike (1.2.2) httparty (0.8.3) multi_json (~> 1.0) multi_xml - i18n (0.6.1) + i18n (0.6.4) journey (1.0.4) jquery-rails (2.2.1) railties (>= 3.0, < 5.0) @@ -231,17 +246,17 @@ GEM mime-types (~> 1.16) treetop (~> 1.4.8) method_source (0.8) - mime-types (1.21) + mime-types (1.23) money (5.0.0) i18n (~> 0.4) json - multi_json (1.5.1) + multi_json (1.7.2) multi_xml (0.5.3) nested_set (1.7.0) activerecord (>= 3.0.0) railties (>= 3.0.0) newrelic_rpm (3.6.0.83) - nokogiri (1.5.6) + nokogiri (1.5.9) orm_adapter (0.0.7) paperclip (2.8.0) activerecord (>= 2.3.0) @@ -285,12 +300,12 @@ GEM rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) raindrops (0.9.0) - rake (10.0.3) + rake (10.0.4) ransack (0.6.0) actionpack (~> 3.0) activerecord (~> 3.0) polyamorous (~> 0.5.0) - rdoc (3.12.1) + rdoc (3.12.2) json (~> 1.4) representative (1.0.5) activesupport (>= 2.2.2) @@ -337,15 +352,15 @@ GEM stringex (1.3.3) therubyracer (0.10.1) libv8 (~> 3.3.10) - thor (0.17.0) - tilt (1.3.3) + thor (0.18.1) + tilt (1.3.7) treetop (1.4.12) polyglot polyglot (>= 0.3.1) truncate_html (0.5.5) turn (0.8.3) ansi - tzinfo (0.3.35) + tzinfo (0.3.37) uglifier (1.2.4) execjs (>= 0.3.0) multi_json (>= 1.0.2) @@ -369,9 +384,11 @@ DEPENDENCIES aws-sdk bugsnag capybara + chili! coffee-rails (~> 3.2.1) comfortable_mexican_sofa database_cleaner (= 0.7.1) + deface! factory_girl_rails faker haml From a4bdea4d5c92aa6852de6c4a8d01d05070464d39 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 10:29:05 +1000 Subject: [PATCH 03/62] Add chili feature for local organics --- Gemfile | 4 ++++ Gemfile.lock | 8 +++++++ lib/chili/local_organics_feature/.gitignore | 3 +++ lib/chili/local_organics_feature/README.rdoc | 3 +++ .../images/local_organics_feature/.gitkeep | 0 .../local_organics_feature/application.js | 13 +++++++++++ .../local_organics_feature/application.css | 13 +++++++++++ .../application_controller.rb | 4 ++++ .../application/assets.html.erb.deface | 3 +++ .../application/example.html.erb.deface | 6 +++++ .../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 | 5 +++++ .../lib/local_organics_feature/version.rb | 3 +++ .../tasks/local_organics_feature_tasks.rake | 4 ++++ .../local_organics_feature.gemspec | 22 +++++++++++++++++++ 17 files changed, 104 insertions(+) create mode 100644 lib/chili/local_organics_feature/.gitignore create mode 100644 lib/chili/local_organics_feature/README.rdoc create mode 100644 lib/chili/local_organics_feature/app/assets/images/local_organics_feature/.gitkeep create mode 100644 lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/application.js create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css create mode 100644 lib/chili/local_organics_feature/app/controllers/local_organics_feature/application_controller.rb create mode 100644 lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface create mode 100644 lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface create mode 100644 lib/chili/local_organics_feature/config/routes.rb create mode 100644 lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb create mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature.rb create mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb create mode 100644 lib/chili/local_organics_feature/lib/local_organics_feature/version.rb create mode 100644 lib/chili/local_organics_feature/lib/tasks/local_organics_feature_tasks.rake create mode 100644 lib/chili/local_organics_feature/local_organics_feature.gemspec diff --git a/Gemfile b/Gemfile index def8723977..930398e871 100644 --- a/Gemfile +++ b/Gemfile @@ -57,3 +57,7 @@ group :test, :development do gem 'awesome_print' gem "letter_opener" end + +group :chili do + gem 'local_organics_feature', path: 'lib/chili/local_organics_feature' +end diff --git a/Gemfile.lock b/Gemfile.lock index d6befd949e..20d718b147 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,6 +104,13 @@ GIT i18n (~> 0.5) spree (~> 1.1) +PATH + remote: lib/chili/local_organics_feature + specs: + local_organics_feature (0.0.1) + chili (~> 3.1) + rails (~> 3.2.11) + GEM remote: http://rubygems.org/ specs: @@ -394,6 +401,7 @@ DEPENDENCIES haml jquery-rails letter_opener + local_organics_feature! newrelic_rpm pg pry-debugger diff --git a/lib/chili/local_organics_feature/.gitignore b/lib/chili/local_organics_feature/.gitignore new file mode 100644 index 0000000000..8619e09c5a --- /dev/null +++ b/lib/chili/local_organics_feature/.gitignore @@ -0,0 +1,3 @@ +.bundle/ +log/*.log +pkg/ diff --git a/lib/chili/local_organics_feature/README.rdoc b/lib/chili/local_organics_feature/README.rdoc new file mode 100644 index 0000000000..b4d54e23c2 --- /dev/null +++ b/lib/chili/local_organics_feature/README.rdoc @@ -0,0 +1,3 @@ += Local Organics Feature + +This project rocks and uses AGPL licence. \ No newline at end of file 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 new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..15ebed9422 --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/application.js @@ -0,0 +1,13 @@ +// 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/application.css b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css new file mode 100644 index 0000000000..3192ec897b --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/application.css @@ -0,0 +1,13 @@ +/* + * 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/controllers/local_organics_feature/application_controller.rb b/lib/chili/local_organics_feature/app/controllers/local_organics_feature/application_controller.rb new file mode 100644 index 0000000000..ed0f159c0e --- /dev/null +++ b/lib/chili/local_organics_feature/app/controllers/local_organics_feature/application_controller.rb @@ -0,0 +1,4 @@ +module LocalOrganicsFeature + class ApplicationController < Chili::ApplicationController + end +end diff --git a/lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface new file mode 100644 index 0000000000..c1fe8ec1e0 --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface @@ -0,0 +1,3 @@ + +<%= stylesheet_link_tag 'local_organics_feature/application' %> +<%= javascript_include_tag 'local_organics_feature/application' %> diff --git a/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface new file mode 100644 index 0000000000..46f3961a1e --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface @@ -0,0 +1,6 @@ + +
+ local_organics_feature active - edit/remove this file:
+ lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface
+ <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> +
diff --git a/lib/chili/local_organics_feature/config/routes.rb b/lib/chili/local_organics_feature/config/routes.rb new file mode 100644 index 0000000000..7ee7f3fd58 --- /dev/null +++ b/lib/chili/local_organics_feature/config/routes.rb @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..23cf22c4eb --- /dev/null +++ b/lib/chili/local_organics_feature/lib/generators/local_organics_feature_generator.rb @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..1512362a59 --- /dev/null +++ b/lib/chili/local_organics_feature/lib/local_organics_feature.rb @@ -0,0 +1,7 @@ +require "chili" +require "local_organics_feature/engine" + +module LocalOrganicsFeature + extend Chili::Base + active_if { true } # edit this to activate/deactivate feature at runtime +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 new file mode 100644 index 0000000000..8f18462620 --- /dev/null +++ b/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb @@ -0,0 +1,5 @@ +module LocalOrganicsFeature + class Engine < ::Rails::Engine + isolate_namespace LocalOrganicsFeature + 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 new file mode 100644 index 0000000000..ef7867a4d6 --- /dev/null +++ b/lib/chili/local_organics_feature/lib/local_organics_feature/version.rb @@ -0,0 +1,3 @@ +module LocalOrganicsFeature + VERSION = "0.0.1" +end diff --git a/lib/chili/local_organics_feature/lib/tasks/local_organics_feature_tasks.rake b/lib/chili/local_organics_feature/lib/tasks/local_organics_feature_tasks.rake new file mode 100644 index 0000000000..1b9f918b69 --- /dev/null +++ b/lib/chili/local_organics_feature/lib/tasks/local_organics_feature_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :local_organics_feature do +# # Task goes here +# end diff --git a/lib/chili/local_organics_feature/local_organics_feature.gemspec b/lib/chili/local_organics_feature/local_organics_feature.gemspec new file mode 100644 index 0000000000..3d55697fa8 --- /dev/null +++ b/lib/chili/local_organics_feature/local_organics_feature.gemspec @@ -0,0 +1,22 @@ +$:.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}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + + s.add_dependency "rails", "~> 3.2.11" + s.add_dependency 'chili', '~> 3.1' + + s.add_development_dependency "sqlite3" +end From 3d8d8ecd49c2eb1511652f78f76137e11ca806a2 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 10:32:09 +1000 Subject: [PATCH 04/62] Move assets deface to correct directory --- .../overrides/layouts/application/example.html.erb.deface | 6 ------ .../layouts/spree_application}/assets.html.erb.deface | 0 2 files changed, 6 deletions(-) delete mode 100644 lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface rename lib/chili/local_organics_feature/app/overrides/{layouts/application => spree/layouts/spree_application}/assets.html.erb.deface (100%) diff --git a/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface deleted file mode 100644 index 46f3961a1e..0000000000 --- a/lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface +++ /dev/null @@ -1,6 +0,0 @@ - -
- local_organics_feature active - edit/remove this file:
- lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface
- <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> -
diff --git a/lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface similarity index 100% rename from lib/chili/local_organics_feature/app/overrides/layouts/application/assets.html.erb.deface rename to lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface From 3bd766eab95de14b5cad731df777458fbbb72e3a Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 10:32:23 +1000 Subject: [PATCH 05/62] Update local organics feature readme --- lib/chili/local_organics_feature/README.rdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chili/local_organics_feature/README.rdoc b/lib/chili/local_organics_feature/README.rdoc index b4d54e23c2..5f394c59cb 100644 --- a/lib/chili/local_organics_feature/README.rdoc +++ b/lib/chili/local_organics_feature/README.rdoc @@ -1,3 +1,3 @@ = Local Organics Feature -This project rocks and uses AGPL licence. \ No newline at end of file +This feature is released under the AGPL licence. From a90f060b2866007aa51713b46f70778acb831012 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 10:49:37 +1000 Subject: [PATCH 06/62] Add local organics logo --- .../images/local_organics_feature/logo.png | Bin 0 -> 9928 bytes .../stylesheets/local_organics_feature/admin.css | 4 ++++ .../spree/layouts/admin/assets.html.erb.deface | 3 +++ .../spree/layouts/admin/logo.html.erb.deface | 5 +++++ .../spree_application/logo.html.erb.deface | 2 ++ 5 files changed, 14 insertions(+) create mode 100644 lib/chili/local_organics_feature/app/assets/images/local_organics_feature/logo.png create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/assets.html.erb.deface create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface 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 new file mode 100644 index 0000000000000000000000000000000000000000..ff7865968f4e39bfead9af9b78ee4eda111506bc GIT binary patch literal 9928 zcmV;(CO6rMP)&ivjo`)+n`cR5Xh_dcKbyxsTaP5sWV&2MG`f!wZw zo;`bZjm2WUV~NCp2!}=E@niA`$Ku-|Ef(VO6PT`)=U~Ti`c=f^`>S#qA(}|+U5k@x{&RhqCKVZ){b#pqp;@cYlKBi;?g|IZQsdfew$IL;sN>?MSe0Qgzx;05LJ_#Sw-5dCoyzWXb}Wcf%00%k*jOBi(P(rxyn6!A8}a@i+}UA6Q1M1K2JW}xJ{#dqj#PYiB<}Os z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M<3H>Af+ zFLWK^@eh)9{3(MTT$u-uj{6>Du?Nt`=TT*1{{-@IaQc5@{9|!HmR8vS0000 +<%= 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 new file mode 100644 index 0000000000..0013311183 --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/spree/layouts/admin/logo.html.erb.deface @@ -0,0 +1,5 @@ + +
+<%= 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/logo.html.erb.deface b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface new file mode 100644 index 0000000000..1f4b4fe5dd --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/logo.html.erb.deface @@ -0,0 +1,2 @@ + +<%= logo 'local_organics_feature/logo.png' %> From 3dd4e074fcf36b598ac3ca2e35f4d8a880a93149 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 16:12:50 +1000 Subject: [PATCH 07/62] Split spree variable changes into per-feature files, add an eaterprises feature for default layout --- Gemfile | 1 + Gemfile.lock | 8 +++ .../stylesheets/store/variables.css.scss | 5 +- 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 ++++ .../variables_changes.css.scss | 1 + .../application_controller.rb | 4 ++ .../application/assets.html.erb.deface | 3 + .../application/example.html.erb.deface | 6 ++ .../eaterprises_feature/config/routes.rb | 3 + .../eaterprises_feature.gemspec | 22 +++++++ .../lib/eaterprises_feature.rb | 7 +++ .../lib/eaterprises_feature/engine.rb | 11 ++++ .../lib/eaterprises_feature/version.rb | 3 + .../eaterprises_feature_generator.rb | 3 + .../lib/tasks/eaterprises_feature_tasks.rake | 4 ++ .../variables_changes.css.scss | 1 + .../stylesheets/store/variables.css.scss | 60 +++++++++++++++++++ .../lib/local_organics_feature.rb | 2 +- .../lib/local_organics_feature/engine.rb | 6 ++ 23 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 lib/chili/eaterprises_feature/.gitignore create mode 100644 lib/chili/eaterprises_feature/README.rdoc create mode 100644 lib/chili/eaterprises_feature/app/assets/images/eaterprises_feature/.gitkeep create mode 100644 lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js create mode 100644 lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css create mode 100644 lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/variables_changes.css.scss create mode 100644 lib/chili/eaterprises_feature/app/controllers/eaterprises_feature/application_controller.rb create mode 100644 lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface create mode 100644 lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface create mode 100644 lib/chili/eaterprises_feature/config/routes.rb create mode 100644 lib/chili/eaterprises_feature/eaterprises_feature.gemspec create mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature.rb create mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb create mode 100644 lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb create mode 100644 lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb create mode 100644 lib/chili/eaterprises_feature/lib/tasks/eaterprises_feature_tasks.rake create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss diff --git a/Gemfile b/Gemfile index 930398e871..a62c21f55a 100644 --- a/Gemfile +++ b/Gemfile @@ -59,5 +59,6 @@ group :test, :development do end group :chili do + gem 'eaterprises_feature', path: 'lib/chili/eaterprises_feature' gem 'local_organics_feature', path: 'lib/chili/local_organics_feature' end diff --git a/Gemfile.lock b/Gemfile.lock index 20d718b147..cdf2d6da28 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,6 +104,13 @@ GIT i18n (~> 0.5) spree (~> 1.1) +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: @@ -396,6 +403,7 @@ DEPENDENCIES comfortable_mexican_sofa database_cleaner (= 0.7.1) deface! + eaterprises_feature! factory_girl_rails faker haml diff --git a/app/assets/stylesheets/store/variables.css.scss b/app/assets/stylesheets/store/variables.css.scss index 33e0fac143..944d5c68df 100644 --- a/app/assets/stylesheets/store/variables.css.scss +++ b/app/assets/stylesheets/store/variables.css.scss @@ -7,7 +7,7 @@ $c_red: #e45353; /* Error red */ $layout_background_color: #FFFFFF; $title_text_color: #404042; $body_text_color: #404042; -$link_text_color: #006066; +$link_text_color: #00ADEE; $product_background_color: #FFFFFF; $product_title_text_color: #404042; @@ -56,3 +56,6 @@ $ff_base: 'Ubuntu', sans-serif; $input_box_font_size: 13px; $base_font_size: 12px; $button_border_color: rgba(0, 138, 189, .75); + + +@import "./variables_changes.css.scss"; diff --git a/lib/chili/eaterprises_feature/.gitignore b/lib/chili/eaterprises_feature/.gitignore new file mode 100644 index 0000000000..8619e09c5a --- /dev/null +++ b/lib/chili/eaterprises_feature/.gitignore @@ -0,0 +1,3 @@ +.bundle/ +log/*.log +pkg/ diff --git a/lib/chili/eaterprises_feature/README.rdoc b/lib/chili/eaterprises_feature/README.rdoc new file mode 100644 index 0000000000..906f47d888 --- /dev/null +++ b/lib/chili/eaterprises_feature/README.rdoc @@ -0,0 +1,3 @@ += EaterprisesFeature + +This project rocks and uses MIT-LICENSE. \ 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 new file mode 100644 index 0000000000..e69de29bb2 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 new file mode 100644 index 0000000000..15ebed9422 --- /dev/null +++ b/lib/chili/eaterprises_feature/app/assets/javascripts/eaterprises_feature/application.js @@ -0,0 +1,13 @@ +// 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 new file mode 100644 index 0000000000..3192ec897b --- /dev/null +++ b/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/application.css @@ -0,0 +1,13 @@ +/* + * 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/assets/stylesheets/eaterprises_feature/variables_changes.css.scss b/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/variables_changes.css.scss new file mode 100644 index 0000000000..c4007abd2f --- /dev/null +++ b/lib/chili/eaterprises_feature/app/assets/stylesheets/eaterprises_feature/variables_changes.css.scss @@ -0,0 +1 @@ +$link_text_color: #006066; diff --git a/lib/chili/eaterprises_feature/app/controllers/eaterprises_feature/application_controller.rb b/lib/chili/eaterprises_feature/app/controllers/eaterprises_feature/application_controller.rb new file mode 100644 index 0000000000..adf879c05a --- /dev/null +++ b/lib/chili/eaterprises_feature/app/controllers/eaterprises_feature/application_controller.rb @@ -0,0 +1,4 @@ +module EaterprisesFeature + class ApplicationController < Chili::ApplicationController + end +end 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 new file mode 100644 index 0000000000..72e5ed7748 --- /dev/null +++ b/lib/chili/eaterprises_feature/app/overrides/layouts/application/assets.html.erb.deface @@ -0,0 +1,3 @@ + +<%= stylesheet_link_tag 'eaterprises_feature/application' %> +<%= javascript_include_tag 'eaterprises_feature/application' %> diff --git a/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface new file mode 100644 index 0000000000..36363d2ab3 --- /dev/null +++ b/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface @@ -0,0 +1,6 @@ + +
+ eaterprises_feature active - edit/remove this file:
+ lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface
+ <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> +
diff --git a/lib/chili/eaterprises_feature/config/routes.rb b/lib/chili/eaterprises_feature/config/routes.rb new file mode 100644 index 0000000000..38585adb71 --- /dev/null +++ b/lib/chili/eaterprises_feature/config/routes.rb @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..7ccc541de4 --- /dev/null +++ b/lib/chili/eaterprises_feature/eaterprises_feature.gemspec @@ -0,0 +1,22 @@ +$:.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}/**/*"] + ["MIT-LICENSE", "Rakefile", "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 new file mode 100644 index 0000000000..175f63096b --- /dev/null +++ b/lib/chili/eaterprises_feature/lib/eaterprises_feature.rb @@ -0,0 +1,7 @@ +require "chili" +require "eaterprises_feature/engine" + +module EaterprisesFeature + extend Chili::Base + active_if { ENV['OFW_DEPLOYMENT'] == 'eaterprises' } +end diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb new file mode 100644 index 0000000000..04ac3369c3 --- /dev/null +++ b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb @@ -0,0 +1,11 @@ +module EaterprisesFeature + class Engine < ::Rails::Engine + isolate_namespace EaterprisesFeature + + if ENV['OFW_DEPLOYMENT'] == 'eaterprises' + initializer 'eaterprises_feature.sass', :after => :load_config_initializers do |app| + app.config.sass.load_paths += [self.root.join('app', 'assets', 'stylesheets', '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 new file mode 100644 index 0000000000..5424d0cb17 --- /dev/null +++ b/lib/chili/eaterprises_feature/lib/eaterprises_feature/version.rb @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000000..b0b6f7f010 --- /dev/null +++ b/lib/chili/eaterprises_feature/lib/generators/eaterprises_feature_generator.rb @@ -0,0 +1,3 @@ +class EaterprisesFeatureGenerator < Rails::Generators::Base + include Chili::GeneratorProxy +end diff --git a/lib/chili/eaterprises_feature/lib/tasks/eaterprises_feature_tasks.rake b/lib/chili/eaterprises_feature/lib/tasks/eaterprises_feature_tasks.rake new file mode 100644 index 0000000000..8c305ec7ae --- /dev/null +++ b/lib/chili/eaterprises_feature/lib/tasks/eaterprises_feature_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :eaterprises_feature do +# # Task goes here +# end 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 new file mode 100644 index 0000000000..5c0a2d6414 --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/variables_changes.css.scss @@ -0,0 +1 @@ +$link_text_color: #de790c; diff --git a/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss b/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss new file mode 100644 index 0000000000..0f32bd296c --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss @@ -0,0 +1,60 @@ +/*--------------------------------------*/ +/* Colors +/*--------------------------------------*/ +$c_green: #8dba53; /* Spree green */ +$c_red: #e45353; /* Error red */ + +diediedie + +$layout_background_color: #FFFFFF; +$title_text_color: #404042; +$body_text_color: #404042; +$link_text_color: #006066; + +$product_background_color: #FFFFFF; +$product_title_text_color: #404042; +$product_body_text_color: #404042; +$product_link_text_color: #BBBBBB; + +/*--------------------------------------*/ +/* Fonts import from remote +/*--------------------------------------*/ +@import url(//fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|&subset=latin,cyrillic,greek,greek-ext,latin-ext,cyrillic-ext); + +/*--------------------------------------*/ +/* Font families +/*--------------------------------------*/ +$ff_base: 'Ubuntu', sans-serif; + +/*-------------------------------------- + | Font sizes + |-------------------------------------- + |- Navigation + | */ + $header_navigation_font_size: 14px; + $horizontal_navigation_font_size: 16px; + $main_navigation_header_font_size: 14px; + $main_navigation_font_size: 12px; +/*|------------------------------------ + |- Product Listing + | */ + $product_list_name_font_size: 12px; + $product_list_price_font_size: 16px; + $product_list_header_font_size: 20px; + $product_list_search_font_size: 14px; +/*|------------------------------------ + |- Product Details + | */ + $product_detail_name_font_size: 24px; + $product_detail_description_font_size: 12px; + $product_detail_price_font_size: 20px; + $product_detail_title_font_size: 14px; +/*|------------------------------------ + |- Basic + | */ + $heading_font_size: 24px; + $sub_heading_font_size: 14px; + $button_font_size: 12px; + $input_box_font_size: 13px; + $base_font_size: 12px; + $button_border_color: rgba(0, 138, 189, .75); diff --git a/lib/chili/local_organics_feature/lib/local_organics_feature.rb b/lib/chili/local_organics_feature/lib/local_organics_feature.rb index 1512362a59..cb160ccd40 100644 --- a/lib/chili/local_organics_feature/lib/local_organics_feature.rb +++ b/lib/chili/local_organics_feature/lib/local_organics_feature.rb @@ -3,5 +3,5 @@ require "local_organics_feature/engine" module LocalOrganicsFeature extend Chili::Base - active_if { true } # edit this to activate/deactivate feature at runtime + active_if { ENV['OFW_DEPLOYMENT'] == '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 index 8f18462620..10e11fc00a 100644 --- a/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb +++ b/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb @@ -1,5 +1,11 @@ module LocalOrganicsFeature class Engine < ::Rails::Engine isolate_namespace LocalOrganicsFeature + + if ENV['OFW_DEPLOYMENT'] == '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')] + end + end end end From 27d7a2c6c299ffc447ecb5f46db4f7d27df8c4bb Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 16:14:52 +1000 Subject: [PATCH 08/62] Remove example deface, update README with licence --- lib/chili/eaterprises_feature/README.rdoc | 4 ++-- .../overrides/layouts/application/example.html.erb.deface | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface diff --git a/lib/chili/eaterprises_feature/README.rdoc b/lib/chili/eaterprises_feature/README.rdoc index 906f47d888..047a9eccec 100644 --- a/lib/chili/eaterprises_feature/README.rdoc +++ b/lib/chili/eaterprises_feature/README.rdoc @@ -1,3 +1,3 @@ -= EaterprisesFeature += Eaterprises Feature -This project rocks and uses MIT-LICENSE. \ No newline at end of file +This feature is released under the AGPL licence. \ No newline at end of file diff --git a/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface deleted file mode 100644 index 36363d2ab3..0000000000 --- a/lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface +++ /dev/null @@ -1,6 +0,0 @@ - -
- eaterprises_feature active - edit/remove this file:
- lib/chili/eaterprises_feature/app/overrides/layouts/application/example.html.erb.deface
- <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> -
From 3db23393d279bc61b43ea5ac25371fcd7b4fdcd9 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 16:23:30 +1000 Subject: [PATCH 09/62] Scope admin css to admin section, add simple styling for front-end --- .../assets/stylesheets/local_organics_feature/admin.css | 4 ---- .../stylesheets/local_organics_feature/admin.css.scss | 6 ++++++ .../local_organics_feature/local_organics.css.scss | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss create mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss diff --git a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css deleted file mode 100644 index 1392dcd0ee..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css +++ /dev/null @@ -1,4 +0,0 @@ -#header #logo { - background-color: #fff; - border: 5px solid #fff; -} \ No newline at end of file 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 new file mode 100644 index 0000000000..1260ec36b5 --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/admin.css.scss @@ -0,0 +1,6 @@ +body.admin { + #header #logo { + background-color: #fff; + border: 5px solid #fff; + } +} 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 new file mode 100644 index 0000000000..d52b599e2b --- /dev/null +++ b/lib/chili/local_organics_feature/app/assets/stylesheets/local_organics_feature/local_organics.css.scss @@ -0,0 +1,7 @@ +body { + background-color: #FFF5E0; +} + +nav #main-nav-bar { + border-bottom: 9px solid #A3DCFF; +} From 7bee04e5f6c615e7f5538668ec657db274a50153 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 16:48:49 +1000 Subject: [PATCH 10/62] Update selenium-webdriver, test with eaterprises deployment settings by default --- Gemfile.lock | 17 +++++++---------- spec/spec_helper.rb | 3 +++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cdf2d6da28..3a0107d275 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -161,7 +161,7 @@ GEM i18n (~> 0.6) multi_json (~> 1.0) acts_as_list (0.1.4) - addressable (2.3.2) + addressable (2.3.4) andand (1.3.3) ansi (1.4.2) arel (3.0.2) @@ -184,8 +184,8 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (~> 2.0) xpath (~> 1.0.0) - childprocess (0.3.6) - ffi (~> 1.0, >= 1.0.6) + childprocess (0.3.9) + ffi (~> 1.0, >= 1.0.11) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.1) @@ -229,7 +229,7 @@ GEM faker (1.0.1) i18n (~> 0.4) ffaker (1.12.1) - ffi (1.3.1) + ffi (1.7.0) haml (3.1.6) highline (1.6.11) hike (1.2.2) @@ -252,9 +252,6 @@ GEM letter_opener (1.0.0) launchy (>= 2.0.4) libv8 (3.3.10.4) - libwebsocket (0.1.7.1) - addressable - websocket mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) @@ -348,11 +345,11 @@ GEM railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - selenium-webdriver (2.27.2) + selenium-webdriver (2.32.1) childprocess (>= 0.2.5) - libwebsocket (~> 0.1.3) multi_json (~> 1.0) rubyzip + websocket (~> 1.0.4) shoulda-matchers (1.1.0) activesupport (>= 3.0.0) slop (3.3.3) @@ -385,7 +382,7 @@ GEM uuidtools (2.1.3) warden (1.1.1) rack (>= 1.0) - websocket (1.0.6) + websocket (1.0.7) xpath (1.0.0) nokogiri (~> 1.3) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ac124b8da9..8b33ac80a2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,6 +3,9 @@ require 'spork' #uncomment the following line to use spork with the debugger #require 'spork/ext/ruby-debug' +# By default, test on eaterprises deployment settings +ENV['OFW_DEPLOYMENT'] ||= 'eaterprises' + Spork.prefork do ENV["RAILS_ENV"] ||= 'test' From 3df220766426bf52181379c029d520d202c03c5c Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 17:36:18 +1000 Subject: [PATCH 11/62] Remove non-present files from gemspecs --- lib/chili/eaterprises_feature/eaterprises_feature.gemspec | 2 +- lib/chili/local_organics_feature/local_organics_feature.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chili/eaterprises_feature/eaterprises_feature.gemspec b/lib/chili/eaterprises_feature/eaterprises_feature.gemspec index 7ccc541de4..5194c3d4dc 100644 --- a/lib/chili/eaterprises_feature/eaterprises_feature.gemspec +++ b/lib/chili/eaterprises_feature/eaterprises_feature.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.summary = "Summary of EaterprisesFeature." s.description = "Description of EaterprisesFeature." - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = Dir["{app,config,db,lib}/**/*"] + ["README.rdoc"] s.add_dependency "rails", "~> 3.2.11" s.add_dependency 'chili', '~> 3.1' diff --git a/lib/chili/local_organics_feature/local_organics_feature.gemspec b/lib/chili/local_organics_feature/local_organics_feature.gemspec index 3d55697fa8..8f9619b4a4 100644 --- a/lib/chili/local_organics_feature/local_organics_feature.gemspec +++ b/lib/chili/local_organics_feature/local_organics_feature.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.summary = "Summary of LocalOrganicsFeature." s.description = "Description of LocalOrganicsFeature." - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = Dir["{app,config,db,lib}/**/*"] + ["README.rdoc"] s.add_dependency "rails", "~> 3.2.11" s.add_dependency 'chili', '~> 3.1' From 139188e021506557eb770a55f01c532f10e21cd4 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 17:37:02 +1000 Subject: [PATCH 12/62] Turn on asset init on precompile - now precompile can find assets stored in engines (lib/chili/...), but this breaks Heroku deployment --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index fa5411b9a6..57edadea95 100644 --- a/config/application.rb +++ b/config/application.rb @@ -72,7 +72,7 @@ module Openfoodweb # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' - config.assets.initialize_on_precompile = false + config.assets.initialize_on_precompile = true config.assets.precompile += ['store/all.css', 'store/all.js', 'admin/all.css', 'admin/*.js', 'admin/**/*.js', 'comfortable_mexican_sofa/*'] end end From 9e60e6269e630843e491325566d51c1f25b9e146 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 18:33:53 +1000 Subject: [PATCH 13/62] Remove unneeded variables override file --- .../stylesheets/store/variables.css.scss | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss diff --git a/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss b/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss deleted file mode 100644 index 0f32bd296c..0000000000 --- a/lib/chili/local_organics_feature/app/assets/stylesheets/store/variables.css.scss +++ /dev/null @@ -1,60 +0,0 @@ -/*--------------------------------------*/ -/* Colors -/*--------------------------------------*/ -$c_green: #8dba53; /* Spree green */ -$c_red: #e45353; /* Error red */ - -diediedie - -$layout_background_color: #FFFFFF; -$title_text_color: #404042; -$body_text_color: #404042; -$link_text_color: #006066; - -$product_background_color: #FFFFFF; -$product_title_text_color: #404042; -$product_body_text_color: #404042; -$product_link_text_color: #BBBBBB; - -/*--------------------------------------*/ -/* Fonts import from remote -/*--------------------------------------*/ -@import url(//fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic|&subset=latin,cyrillic,greek,greek-ext,latin-ext,cyrillic-ext); - -/*--------------------------------------*/ -/* Font families -/*--------------------------------------*/ -$ff_base: 'Ubuntu', sans-serif; - -/*-------------------------------------- - | Font sizes - |-------------------------------------- - |- Navigation - | */ - $header_navigation_font_size: 14px; - $horizontal_navigation_font_size: 16px; - $main_navigation_header_font_size: 14px; - $main_navigation_font_size: 12px; -/*|------------------------------------ - |- Product Listing - | */ - $product_list_name_font_size: 12px; - $product_list_price_font_size: 16px; - $product_list_header_font_size: 20px; - $product_list_search_font_size: 14px; -/*|------------------------------------ - |- Product Details - | */ - $product_detail_name_font_size: 24px; - $product_detail_description_font_size: 12px; - $product_detail_price_font_size: 20px; - $product_detail_title_font_size: 14px; -/*|------------------------------------ - |- Basic - | */ - $heading_font_size: 24px; - $sub_heading_font_size: 14px; - $button_font_size: 12px; - $input_box_font_size: 13px; - $base_font_size: 12px; - $button_border_color: rgba(0, 138, 189, .75); From 8f6cc361cc343cd7db9441ce47ddd775ade261ec Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 22 Apr 2013 18:34:11 +1000 Subject: [PATCH 14/62] Precompile all engine-specific assets --- .../eaterprises_feature/lib/eaterprises_feature/engine.rb | 4 ++++ .../lib/local_organics_feature/engine.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb index 04ac3369c3..63bb988596 100644 --- a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb +++ b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb @@ -6,6 +6,10 @@ module EaterprisesFeature initializer 'eaterprises_feature.sass', :after => :load_config_initializers do |app| app.config.sass.load_paths += [self.root.join('app', 'assets', 'stylesheets', 'eaterprises_feature')] end + + initializer :assets do |app| + app.config.assets.precompile += ['eaterprises_feature/*'] + end end end 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 index 10e11fc00a..9483466be6 100644 --- a/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb +++ b/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb @@ -6,6 +6,10 @@ module LocalOrganicsFeature 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')] end + + initializer :assets do |app| + app.config.assets.precompile += ['local_organics_feature/*'] + end end end end From 0da57f1d6cf09e95c4da64afdf976bbb45142f47 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Tue, 23 Apr 2013 07:32:23 +1000 Subject: [PATCH 15/62] Remove spree_heroku - S3 support is now built into Spree --- Gemfile | 1 - Gemfile.lock | 9 --------- 2 files changed, 10 deletions(-) diff --git a/Gemfile b/Gemfile index a62c21f55a..6c3c11bf1e 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,6 @@ gem 'simple_form', :git => 'git://github.com/RohanM/simple_form.git' gem 'unicorn' gem 'bugsnag' gem 'newrelic_rpm' -gem 'spree_heroku', :git => 'git://github.com/eaterprises/spree-heroku.git' gem 'haml' gem 'aws-sdk' gem 'andand' diff --git a/Gemfile.lock b/Gemfile.lock index 3a0107d275..46365e3d6d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,14 +14,6 @@ GIT deface (~> 1.0.0.rc2) rails (~> 3.2) -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-last-address.git revision: f5ed71a5482fbc16da559737903bb46fe032c150 @@ -418,7 +410,6 @@ DEPENDENCIES simple_form! spork (~> 1.0rc) spree! - spree_heroku! spree_i18n! spree_last_address! spree_paypal_express! From bea247e64d06d93449b1cde177702160f0011605 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 25 Apr 2013 15:31:32 +1000 Subject: [PATCH 16/62] Only configure sass load paths if sass defined. Fixes production init. --- lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb | 2 +- .../local_organics_feature/lib/local_organics_feature/engine.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb index 63bb988596..9c263755a2 100644 --- a/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb +++ b/lib/chili/eaterprises_feature/lib/eaterprises_feature/engine.rb @@ -4,7 +4,7 @@ module EaterprisesFeature if ENV['OFW_DEPLOYMENT'] == 'eaterprises' initializer 'eaterprises_feature.sass', :after => :load_config_initializers do |app| - app.config.sass.load_paths += [self.root.join('app', 'assets', 'stylesheets', 'eaterprises_feature')] + 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| 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 index 9483466be6..2456c50be7 100644 --- a/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb +++ b/lib/chili/local_organics_feature/lib/local_organics_feature/engine.rb @@ -4,7 +4,7 @@ module LocalOrganicsFeature if ENV['OFW_DEPLOYMENT'] == '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')] + 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| From cea2089768810abe21ce0e7935401726e5abcb5d Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 25 Apr 2013 15:50:41 +1000 Subject: [PATCH 17/62] Add empty admin.js, fixes asset not precompiled error --- .../app/assets/javascripts/local_organics_feature/admin.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lib/chili/local_organics_feature/app/assets/javascripts/local_organics_feature/admin.js 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 new file mode 100644 index 0000000000..e69de29bb2 From 9f6d1a2f1890f1f96d45c69556b987590c6505b5 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 25 Apr 2013 21:22:26 +1000 Subject: [PATCH 18/62] Order cycle reports are precise to time of day, not just date --- Gemfile | 3 +- Gemfile.lock | 2 ++ .../admin/reports_controller_decorator.rb | 4 +-- .../admin/reports/order_cycles.html.haml | 4 +-- spec/features/admin/reports_spec.rb | 31 +++++++++++++++++++ 5 files changed, 39 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 6c3c11bf1e..11e7724401 100644 --- a/Gemfile +++ b/Gemfile @@ -54,7 +54,8 @@ group :test, :development do gem 'spork', '~> 1.0rc' gem 'pry-debugger' gem 'awesome_print' - gem "letter_opener" + gem 'letter_opener' + gem 'timecop' end group :chili do diff --git a/Gemfile.lock b/Gemfile.lock index 46365e3d6d..5eebf9014d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -357,6 +357,7 @@ GEM libv8 (~> 3.3.10) thor (0.18.1) tilt (1.3.7) + timecop (0.3.5) treetop (1.4.12) polyglot polyglot (>= 0.3.1) @@ -414,6 +415,7 @@ DEPENDENCIES spree_last_address! spree_paypal_express! therubyracer + timecop truncate_html turn (~> 0.8.3) uglifier (>= 1.0.3) diff --git a/app/controllers/spree/admin/reports_controller_decorator.rb b/app/controllers/spree/admin/reports_controller_decorator.rb index 6de3fc1575..f922f39453 100644 --- a/app/controllers/spree/admin/reports_controller_decorator.rb +++ b/app/controllers/spree/admin/reports_controller_decorator.rb @@ -333,11 +333,11 @@ Spree::Admin::ReportsController.class_eval do if params[:q][:completed_at_gt].blank? params[:q][:completed_at_gt] = Time.zone.now.beginning_of_month else - params[:q][:completed_at_gt] = Time.zone.parse(params[:q][:completed_at_gt]).beginning_of_day rescue Time.zone.now.beginning_of_month + params[:q][:completed_at_gt] = Time.zone.parse(params[:q][:completed_at_gt]) rescue Time.zone.now.beginning_of_month end if params[:q] && !params[:q][:completed_at_lt].blank? - params[:q][:completed_at_lt] = Time.zone.parse(params[:q][:completed_at_lt]).end_of_day rescue "" + params[:q][:completed_at_lt] = Time.zone.parse(params[:q][:completed_at_lt]) rescue "" end params[:q][:meta_sort] ||= "completed_at.desc" diff --git a/app/views/spree/admin/reports/order_cycles.html.haml b/app/views/spree/admin/reports/order_cycles.html.haml index 4468f1d183..e8fb54c069 100644 --- a/app/views/spree/admin/reports/order_cycles.html.haml +++ b/app/views/spree/admin/reports/order_cycles.html.haml @@ -3,11 +3,11 @@ %br .date-range-filter %div{"class" => "left sub-field"} - = f.text_field :completed_at_gt, :class => 'datepicker' + = f.text_field :completed_at_gt, :class => 'datetimepicker' %br = label_tag nil, t(:start), :class => 'sub' %div{"class" => "right sub-field"} - = f.text_field :completed_at_lt, :class => 'datepicker' + = f.text_field :completed_at_lt, :class => 'datetimepicker' %br = label_tag nil, t(:stop) %br diff --git a/spec/features/admin/reports_spec.rb b/spec/features/admin/reports_spec.rb index 2b6c62ee11..1202f7da45 100644 --- a/spec/features/admin/reports_spec.rb +++ b/spec/features/admin/reports_spec.rb @@ -48,4 +48,35 @@ feature %q{ page.should have_content 'Supplier' end + scenario "order cycle reports are precise to time of day, not just date" do + # Given two orders on the same day at different times + @bill_address = create(:address) + @distributor_address = create(:address, :address1 => "distributor address", :city => 'The Shire', :zipcode => "1234") + @distributor = create(:distributor_enterprise, :address => @distributor_address) + product = create(:product) + product_distribution = create(:product_distribution, :product => product, :distributor => @distributor, :shipping_method => create(:shipping_method)) + @shipping_instructions = "pick up on thursday please!" + @order1 = create(:order, :distributor => @distributor, :bill_address => @bill_address, :special_instructions => @shipping_instructions) + @order2 = create(:order, :distributor => @distributor, :bill_address => @bill_address, :special_instructions => @shipping_instructions) + + Timecop.travel(Time.zone.local(2013, 4, 25, 14, 0, 0)) { @order1.finalize! } + Timecop.travel(Time.zone.local(2013, 4, 25, 16, 0, 0)) { @order2.finalize! } + + create(:line_item, :product => product, :order => @order1) + create(:line_item, :product => product, :order => @order2) + + # When I generate a customer report with a timeframe that includes one order but not the other + login_to_admin_section + click_link 'Reports' + click_link 'Order Cycle Reports' + + fill_in 'q_completed_at_gt', with: '2013-04-25 13:00:00' + fill_in 'q_completed_at_lt', with: '2013-04-25 15:00:00' + select 'Order Cycle Customer Totals', from: 'report_type' + click_button 'Search' + + # Then I should see the rows for the first order but not the second + all('table#listing_orders tbody tr').count.should == 2 # Two rows per order + end + end From 4730ba0734a3d6049c271a66fdf58de61a5e1c6b Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 25 Apr 2013 21:52:10 +1000 Subject: [PATCH 19/62] Restore display of admin top-right menu --- .../app/overrides/spree/layouts/admin/logo.html.erb.deface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 0013311183..6b8250dead 100644 --- 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 @@ -1,4 +1,4 @@ - +
<%= link_to image_tag('local_organics_feature/logo.png', :id => 'logo'), spree.admin_path %>

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

From 9909261c8c7e9c69b774291aceb4de73aa076057 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 09:18:47 +1000 Subject: [PATCH 20/62] Update local organics logo --- .../images/local_organics_feature/logo.png | Bin 9928 -> 9507 bytes .../local_organics_feature/admin.css.scss | 4 ++++ 2 files changed, 4 insertions(+) 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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s!CC|;= zz?6ybq&`8_IOS9mkJHL^J{JemCsQ5Fp%J)uj2CU>JPt6CIE-5iP@3h!QhE0T&ly(& zEYEC!ro+7x!;Z5f{vRIDE?$*NJ!1ax_@j#d#p5@y9O}%dM50brmPZZ71Vj2LB(y?;B(T&L`D*QeNKFnqslu z$`J%|kqFQqa>^I+8o7i~eUnIB$n(a?9%CFuxc5vX%GlU!JiP0N@BhK`v85af=!dA< zDv=n;c8F>+{2uE?04ZxP)H}K+s$;Zyt`&eOLfk->tw)a@#cEqfO^v^l?_Q*nGkp~} zvbjWG9f1VFpM#3Ppl6#5vT^EEUUWFyU0ES9SV#%bU#H^z{c)0$p`SPXij{stppqQt>4I!l=X_pcIrRsEjPDhovbB$GN1<(MJ*5i2pcTj^k0U>8a zadjEDU#>DJ#A~Xu0tiQ+Lpe?P38I6AQV`y6bZ*m}ev6e?@sl#nXTpD?0+tR4cUO@rw;=vs75X zt4bciJN%zY`Aw#?zmIAU`VG=wv-mup<2N&2BK#bJ0@uo-p7r9byIxijuTw`YX!Uiy ztSnzA&o@YX?{~W3ZMB?JkezTgWD~r&QWmdFE9Kd8dA7nc=?eI~JQm4Tj$cciS4bJ= zC+n}N!+H_U*YLl*TgHKuOqT;|WBcg&B;A4ENV;B!E>LH*>-@j;zLoU39n@m=PPg}3 zwVGe=R7~%QdK#%#sEJM<3H>Af+ zFLWK^@eh)9{3(MTT$u-uj{6>Du?Nt`=TT*1{{-@IaQc5@{9|!HmR8vS0000 Date: Fri, 26 Apr 2013 09:23:42 +1000 Subject: [PATCH 21/62] Enlarge local organics sidebar font --- .../local_organics_feature/local_organics.css.scss | 6 ++++++ 1 file changed, 6 insertions(+) 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 index d52b599e2b..fe56368f88 100644 --- 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 @@ -5,3 +5,9 @@ body { 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; +} From 06364ec7590b0fa88279afd843c2bfba705460ab Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 09:42:50 +1000 Subject: [PATCH 22/62] Increase local organics font size, change local products background colour --- .../local_organics_feature/local_organics.css.scss | 9 +++++++++ 1 file changed, 9 insertions(+) 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 index fe56368f88..239bf877e6 100644 --- 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 @@ -2,6 +2,11 @@ body { background-color: #FFF5E0; } +h2 { + font-size: 26px; + color: #331f00; +} + nav #main-nav-bar { border-bottom: 9px solid #A3DCFF; } @@ -11,3 +16,7 @@ nav#filters .filter_name, nav#filters .filter_choices li a { font-size: 16px; } + +#products-local ul { + background-color: #e6f4ff; +} From 7911adab6a0e8cd801a91243517376048d60fc9d Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 09:47:20 +1000 Subject: [PATCH 23/62] Update local organics product listing style --- .../local_organics_feature/local_organics.css.scss | 8 ++++++++ 1 file changed, 8 insertions(+) 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 index 239bf877e6..7bd99c643d 100644 --- 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 @@ -20,3 +20,11 @@ nav#filters .filter_choices li a { #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; +} From f17907e06f7d25ca8b49f41866ff67e20de069cd Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 09:56:16 +1000 Subject: [PATCH 24/62] Style local organics product details distributor heading --- app/views/spree/products/_add_to_cart.html.haml | 6 +++--- .../local_organics_feature/local_organics.css.scss | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/views/spree/products/_add_to_cart.html.haml b/app/views/spree/products/_add_to_cart.html.haml index 0b0e118e54..fbf952f812 100644 --- a/app/views/spree/products/_add_to_cart.html.haml +++ b/app/views/spree/products/_add_to_cart.html.haml @@ -19,16 +19,16 @@ %div.cleared %br - if order.nil? || order.distributor.nil? - %div Distributor for your order: + %div.distributor Distributor for your order: = select_tag "distributor_id", options_from_collection_for_select([Enterprise.new]+@product.distributors, "id", "name", :include_blank => '') - else - available_distributors = DistributorChangeValidator.new(order).available_distributors(@product.distributors) - if available_distributors.length > 1 - %div Distributor for your order: + %div.distributor Distributor for your order: = select_tag "distributor_id", options_from_collection_for_select(available_distributors, "id", "name", current_distributor.andand.id) - else = hidden_field_tag "distributor_id", order.distributor.id .distributor-fixed= "Your distributor for this order is #{order.distributor.name}" %br = button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do - = t(:add_to_cart) \ No newline at end of file + = t(:add_to_cart) 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 index 7bd99c643d..7cf5cc61dc 100644 --- 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 @@ -17,6 +17,7 @@ nav#filters .filter_choices li a { font-size: 16px; } +/* Products listing page */ #products-local ul { background-color: #e6f4ff; } @@ -28,3 +29,10 @@ ul.product-listing li a.info { ul.product-listing li .price { font-size: 20px; } + + +/* Product details page */ +#cart-form .distributor { + font-size: 14px; + font-weight: bold; +} \ No newline at end of file From 2379861c92a5588a233ee48ced419e1fd2ecbaf6 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 10:16:51 +1000 Subject: [PATCH 25/62] Shrink local organics local/remote product heading --- .../shared/_products_by_distributor/local.html.haml.deface | 3 +++ .../shared/_products_by_distributor/remote.html.haml.deface | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface 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 new file mode 100644 index 0000000000..f63276ec91 --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/local.html.haml.deface @@ -0,0 +1,3 @@ +/ 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 new file mode 100644 index 0000000000..fa27ef4f1a --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/spree/shared/_products_by_distributor/remote.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents '#products-remote' +%h5 Products found elsewhere += render 'spree/shared/products', :products => @products_remote, :taxon => @taxon From 953fe22d4c99b0b606daac27be2d1f95746113a2 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 12:27:15 +1000 Subject: [PATCH 26/62] Add new feature for rich text distributor info for enterprises --- Gemfile | 1 + Gemfile.lock | 8 +++++++ .../.gitignore | 3 +++ .../README.rdoc | 3 +++ .../.gitkeep | 0 .../application.js | 13 +++++++++++ .../application.css | 13 +++++++++++ .../application_controller.rb | 4 ++++ .../application/assets.html.erb.deface | 3 +++ .../application/example.html.erb.deface | 6 +++++ .../config/routes.rb | 3 +++ ...distributor_info_rich_text_feature.gemspec | 22 +++++++++++++++++++ ...ises_distributor_info_rich_text_feature.rb | 7 ++++++ .../engine.rb | 5 +++++ .../version.rb | 3 +++ ...ibutor_info_rich_text_feature_generator.rb | 3 +++ ...tributor_info_rich_text_feature_tasks.rake | 4 ++++ 17 files changed, 101 insertions(+) create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/.gitignore create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/README.rdoc create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/images/enterprises_distributor_info_rich_text_feature/.gitkeep create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/javascripts/enterprises_distributor_info_rich_text_feature/application.js create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/application.css create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/controllers/enterprises_distributor_info_rich_text_feature/application_controller.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/config/routes.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/version.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/lib/generators/enterprises_distributor_info_rich_text_feature_generator.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/lib/tasks/enterprises_distributor_info_rich_text_feature_tasks.rake diff --git a/Gemfile b/Gemfile index 11e7724401..12d53430f1 100644 --- a/Gemfile +++ b/Gemfile @@ -59,6 +59,7 @@ group :test, :development do end group :chili do + gem 'enterprises_distributor_info_rich_text_feature', path: 'lib/chili/enterprises_distributor_info_rich_text_feature' gem 'eaterprises_feature', path: 'lib/chili/eaterprises_feature' gem 'local_organics_feature', path: 'lib/chili/local_organics_feature' end diff --git a/Gemfile.lock b/Gemfile.lock index 5eebf9014d..c60ab9910b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,6 +103,13 @@ PATH chili (~> 3.1) rails (~> 3.2.11) +PATH + remote: lib/chili/enterprises_distributor_info_rich_text_feature + specs: + enterprises_distributor_info_rich_text_feature (0.0.1) + chili (~> 3.1) + rails (~> 3.2.11) + PATH remote: lib/chili/local_organics_feature specs: @@ -394,6 +401,7 @@ DEPENDENCIES database_cleaner (= 0.7.1) deface! eaterprises_feature! + enterprises_distributor_info_rich_text_feature! factory_girl_rails faker haml diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/.gitignore b/lib/chili/enterprises_distributor_info_rich_text_feature/.gitignore new file mode 100644 index 0000000000..8619e09c5a --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/.gitignore @@ -0,0 +1,3 @@ +.bundle/ +log/*.log +pkg/ diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/README.rdoc b/lib/chili/enterprises_distributor_info_rich_text_feature/README.rdoc new file mode 100644 index 0000000000..fd60a25911 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/README.rdoc @@ -0,0 +1,3 @@ += EnterprisesDistributorInfoRichTextFeature + +This project rocks and uses MIT-LICENSE. \ No newline at end of file diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/images/enterprises_distributor_info_rich_text_feature/.gitkeep b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/images/enterprises_distributor_info_rich_text_feature/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/javascripts/enterprises_distributor_info_rich_text_feature/application.js b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/javascripts/enterprises_distributor_info_rich_text_feature/application.js new file mode 100644 index 0000000000..15ebed9422 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/javascripts/enterprises_distributor_info_rich_text_feature/application.js @@ -0,0 +1,13 @@ +// 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/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/application.css b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/application.css new file mode 100644 index 0000000000..3192ec897b --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/application.css @@ -0,0 +1,13 @@ +/* + * 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/enterprises_distributor_info_rich_text_feature/app/controllers/enterprises_distributor_info_rich_text_feature/application_controller.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/app/controllers/enterprises_distributor_info_rich_text_feature/application_controller.rb new file mode 100644 index 0000000000..b315c062ab --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/controllers/enterprises_distributor_info_rich_text_feature/application_controller.rb @@ -0,0 +1,4 @@ +module EnterprisesDistributorInfoRichTextFeature + class ApplicationController < Chili::ApplicationController + end +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface new file mode 100644 index 0000000000..f494a566f3 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface @@ -0,0 +1,3 @@ + +<%= stylesheet_link_tag 'enterprises_distributor_info_rich_text_feature/application' %> +<%= javascript_include_tag 'enterprises_distributor_info_rich_text_feature/application' %> diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface new file mode 100644 index 0000000000..9609bb3667 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface @@ -0,0 +1,6 @@ + +
+ enterprises_distributor_info_rich_text_feature active - edit/remove this file:
+ lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface
+ <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> +
diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/config/routes.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/config/routes.rb new file mode 100644 index 0000000000..910ef99eca --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/config/routes.rb @@ -0,0 +1,3 @@ +EnterprisesDistributorInfoRichTextFeature::Engine.automount! +EnterprisesDistributorInfoRichTextFeature::Engine.routes.draw do +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec b/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec new file mode 100644 index 0000000000..cf34860bf4 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec @@ -0,0 +1,22 @@ +$:.push File.expand_path("../lib", __FILE__) + +# Maintain your gem's version: +require "enterprises_distributor_info_rich_text_feature/version" + +# Describe your gem and declare its dependencies: +Gem::Specification.new do |s| + s.name = "enterprises_distributor_info_rich_text_feature" + s.version = EnterprisesDistributorInfoRichTextFeature::VERSION + s.authors = ["Rohan Mitchell"] + s.email = ["rohan@rohanmitchell.com"] + s.homepage = "" + s.summary = "Summary of EnterprisesDistributorInfoRichTextFeature." + s.description = "Description of EnterprisesDistributorInfoRichTextFeature." + + s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "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/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb new file mode 100644 index 0000000000..bc2c2956d2 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb @@ -0,0 +1,7 @@ +require "chili" +require "enterprises_distributor_info_rich_text_feature/engine" + +module EnterprisesDistributorInfoRichTextFeature + extend Chili::Base + active_if { true } # edit this to activate/deactivate feature at runtime +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb new file mode 100644 index 0000000000..6c7634e050 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb @@ -0,0 +1,5 @@ +module EnterprisesDistributorInfoRichTextFeature + class Engine < ::Rails::Engine + isolate_namespace EnterprisesDistributorInfoRichTextFeature + end +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/version.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/version.rb new file mode 100644 index 0000000000..f413fbd728 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/version.rb @@ -0,0 +1,3 @@ +module EnterprisesDistributorInfoRichTextFeature + VERSION = "0.0.1" +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/generators/enterprises_distributor_info_rich_text_feature_generator.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/generators/enterprises_distributor_info_rich_text_feature_generator.rb new file mode 100644 index 0000000000..9124250abe --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/generators/enterprises_distributor_info_rich_text_feature_generator.rb @@ -0,0 +1,3 @@ +class EnterprisesDistributorInfoRichTextFeatureGenerator < Rails::Generators::Base + include Chili::GeneratorProxy +end diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/tasks/enterprises_distributor_info_rich_text_feature_tasks.rake b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/tasks/enterprises_distributor_info_rich_text_feature_tasks.rake new file mode 100644 index 0000000000..76d762f80b --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/tasks/enterprises_distributor_info_rich_text_feature_tasks.rake @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :enterprises_distributor_info_rich_text_feature do +# # Task goes here +# end From 49001295111f5a843fd14cb4d605edd0d78ad877 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 12:31:11 +1000 Subject: [PATCH 27/62] Enable feature for local organics only --- .../lib/enterprises_distributor_info_rich_text_feature.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb index bc2c2956d2..dd9b4afa88 100644 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature.rb @@ -3,5 +3,5 @@ require "enterprises_distributor_info_rich_text_feature/engine" module EnterprisesDistributorInfoRichTextFeature extend Chili::Base - active_if { true } # edit this to activate/deactivate feature at runtime + active_if { ENV['OFW_DEPLOYMENT'] == 'local_organics' } end From 1b6bf6ca2b10dfd7f8b10da79b50a4355289bccf Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 12:31:19 +1000 Subject: [PATCH 28/62] Add distributor info field to enterprises --- ...prises.enterprises_distributor_info_rich_text_feature.rb | 6 ++++++ db/schema.rb | 3 ++- .../20130426022945_add_distributor_info_to_enterprises.rb | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20130426023034_add_distributor_info_to_enterprises.enterprises_distributor_info_rich_text_feature.rb create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/db/migrate/20130426022945_add_distributor_info_to_enterprises.rb diff --git a/db/migrate/20130426023034_add_distributor_info_to_enterprises.enterprises_distributor_info_rich_text_feature.rb b/db/migrate/20130426023034_add_distributor_info_to_enterprises.enterprises_distributor_info_rich_text_feature.rb new file mode 100644 index 0000000000..69a6b9981e --- /dev/null +++ b/db/migrate/20130426023034_add_distributor_info_to_enterprises.enterprises_distributor_info_rich_text_feature.rb @@ -0,0 +1,6 @@ +# This migration comes from enterprises_distributor_info_rich_text_feature (originally 20130426022945) +class AddDistributorInfoToEnterprises < ActiveRecord::Migration + def change + add_column :enterprises, :distributor_info, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index a03ce1b6eb..ad3ff4995c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130118031610) do +ActiveRecord::Schema.define(:version => 20130426023034) do create_table "cms_blocks", :force => true do |t| t.integer "page_id", :null => false @@ -156,6 +156,7 @@ ActiveRecord::Schema.define(:version => 20130118031610) do t.string "next_collection_at" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false + t.text "distributor_info" end create_table "exchange_fees", :force => true do |t| diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/db/migrate/20130426022945_add_distributor_info_to_enterprises.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/db/migrate/20130426022945_add_distributor_info_to_enterprises.rb new file mode 100644 index 0000000000..7342726a92 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/db/migrate/20130426022945_add_distributor_info_to_enterprises.rb @@ -0,0 +1,5 @@ +class AddDistributorInfoToEnterprises < ActiveRecord::Migration + def change + add_column :enterprises, :distributor_info, :text + end +end From 08161ece6138d22b92a974331fb15dc48b6f56ca Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 13:09:32 +1000 Subject: [PATCH 29/62] Remove sample defaces --- .../overrides/layouts/application/assets.html.erb.deface | 3 --- .../overrides/layouts/application/example.html.erb.deface | 6 ------ 2 files changed, 9 deletions(-) delete mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface delete mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface deleted file mode 100644 index f494a566f3..0000000000 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/assets.html.erb.deface +++ /dev/null @@ -1,3 +0,0 @@ - -<%= stylesheet_link_tag 'enterprises_distributor_info_rich_text_feature/application' %> -<%= javascript_include_tag 'enterprises_distributor_info_rich_text_feature/application' %> diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface deleted file mode 100644 index 9609bb3667..0000000000 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface +++ /dev/null @@ -1,6 +0,0 @@ - -
- enterprises_distributor_info_rich_text_feature active - edit/remove this file:
- lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/layouts/application/example.html.erb.deface
- <%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %> -
From fb999732eed9f3c04414e687f8c9c610c351c75e Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 13:10:32 +1000 Subject: [PATCH 30/62] Rename enterprises admin extended description to profile info, add distributor info field --- app/views/admin/enterprises/show.html.haml | 2 +- .../enterprises/_form/add_distributor_info.html.haml.deface | 4 ++++ .../_form/rename_extended_description.html.haml.deface | 3 +++ .../enterprises/show/add_distributor_info.html.haml.deface | 4 ++++ .../show/rename_extended_description.html.haml.deface | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/add_distributor_info.html.haml.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/rename_extended_description.html.haml.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/rename_extended_description.html.haml.deface diff --git a/app/views/admin/enterprises/show.html.haml b/app/views/admin/enterprises/show.html.haml index a2eb9027fa..d4a4ed0743 100644 --- a/app/views/admin/enterprises/show.html.haml +++ b/app/views/admin/enterprises/show.html.haml @@ -6,7 +6,7 @@ %tr %th Description: %td= @enterprise.description - %tr + %tr{"data-hook" => "long_description"} %th Extended Description: %td= @enterprise.long_description.andand.html_safe %tr diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/add_distributor_info.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/add_distributor_info.html.haml.deface new file mode 100644 index 0000000000..83ba814fdb --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/add_distributor_info.html.haml.deface @@ -0,0 +1,4 @@ +/ insert_after "[data-hook='long_description']" +%tr{"data-hook" => "distributor_info"} + %td Distributor Info: + %td= f.text_area :distributor_info, :class => 'rich_text' diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/rename_extended_description.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/rename_extended_description.html.haml.deface new file mode 100644 index 0000000000..43c4db4b84 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/_form/rename_extended_description.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents "[data-hook='long_description']" +%td Profile Info: +%td= f.text_area :long_description, :class => 'rich_text' diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface new file mode 100644 index 0000000000..f21c8ac3a5 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface @@ -0,0 +1,4 @@ +/ insert_after "[data-hook='long_description']" +%tr + %th Distributor Info: + %td= @enterprise.distributor_info.andand.html_safe \ No newline at end of file diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/rename_extended_description.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/rename_extended_description.html.haml.deface new file mode 100644 index 0000000000..3571a52472 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/rename_extended_description.html.haml.deface @@ -0,0 +1,3 @@ +/ replace_contents "[data-hook='long_description']" +%th Profile Info: +%td= @enterprise.long_description.andand.html_safe \ No newline at end of file From 63768df3d729be2745981e14a4dd1d10cd67eb3a Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 13:30:21 +1000 Subject: [PATCH 31/62] Replace distributor info box on product details and checkout pages with rich text field --- .../_distributor_details.html.haml | 47 ++++++++++--------- .../feature.css | 5 ++ .../rich_text.html.haml.deface | 4 ++ .../spree_application/assets.html.erb.deface | 2 + 4 files changed, 35 insertions(+), 23 deletions(-) create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/feature.css create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/enterprises/_distributor_details/rich_text.html.haml.deface create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface diff --git a/app/views/enterprises/_distributor_details.html.haml b/app/views/enterprises/_distributor_details.html.haml index 950ba1e7f2..a3f070b451 100644 --- a/app/views/enterprises/_distributor_details.html.haml +++ b/app/views/enterprises/_distributor_details.html.haml @@ -1,23 +1,24 @@ -%h2= distributor.name -%p - %strong Address: - %br/ - = render 'spree/shared/address', :address => distributor.address -%p - %strong Next collection time: - %br/ - = distributor.next_collection_at -%p - %strong Regular collection times: - %br/ - = distributor.pickup_times -%p - %strong Contact: - %br/ - = distributor.contact - %br/ - = "Phone: #{distributor.phone}" - %br/ - = "Email: #{distributor.email}" -%p= distributor.description -%p= link_to distributor.website, distributor.website if distributor.website +.distributor-details{'data-hook' => 'distributor-details'} + %h2= distributor.name + %p + %strong Address: + %br/ + = render 'spree/shared/address', :address => distributor.address + %p + %strong Next collection time: + %br/ + = distributor.next_collection_at + %p + %strong Regular collection times: + %br/ + = distributor.pickup_times + %p + %strong Contact: + %br/ + = distributor.contact + %br/ + = "Phone: #{distributor.phone}" + %br/ + = "Email: #{distributor.email}" + %p= distributor.description + %p= link_to distributor.website, distributor.website if distributor.website diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/feature.css b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/feature.css new file mode 100644 index 0000000000..e8eab603e8 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/assets/stylesheets/enterprises_distributor_info_rich_text_feature/feature.css @@ -0,0 +1,5 @@ +.distributor-details .next-collection-at { + font-size: 20px; + font-weight: bold; + color: #de790c; +} diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/enterprises/_distributor_details/rich_text.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/enterprises/_distributor_details/rich_text.html.haml.deface new file mode 100644 index 0000000000..303d43f62c --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/enterprises/_distributor_details/rich_text.html.haml.deface @@ -0,0 +1,4 @@ +/ replace_contents "[data-hook='distributor-details']" +%h2= distributor.name += distributor.distributor_info.andand.html_safe +.next-collection-at= distributor.next_collection_at diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface new file mode 100644 index 0000000000..7a43bc4978 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/spree/layouts/spree_application/assets.html.erb.deface @@ -0,0 +1,2 @@ + +<%= stylesheet_link_tag 'enterprises_distributor_info_rich_text_feature/application' %> From 92a7f19ff1a7dd7a7485b6f5c748c962c4b51509 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 15:43:13 +1000 Subject: [PATCH 32/62] Add specs for enterprises distributor info as rich text feature --- .../add_distributor_info.html.haml.deface | 2 +- ...distributor_info_rich_text_feature_spec.rb | 68 +++++++++++++++++++ spec/spec_helper.rb | 6 ++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface index f21c8ac3a5..866d632e18 100644 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/overrides/admin/enterprises/show/add_distributor_info.html.haml.deface @@ -1,4 +1,4 @@ / insert_after "[data-hook='long_description']" -%tr +%tr{'data-hook' => 'distributor_info'} %th Distributor Info: %td= @enterprise.distributor_info.andand.html_safe \ No newline at end of file diff --git a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb new file mode 100644 index 0000000000..34d56f409f --- /dev/null +++ b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb @@ -0,0 +1,68 @@ +require 'spec_helper' + +feature "enterprises distributor info as rich text" do + include AuthenticationWorkflow + include WebHelper + + before(:each) do + ENV['OFW_DEPLOYMENT'] = 'local_organics' + end + + + scenario "setting distributor info as admin" do + # Given I'm signed in as an admin + login_to_admin_section + + # When I go to create a new enterprise + click_link 'Enterprises' + click_link 'New Enterprise' + + # Then I should see fields 'Profile Info' and 'Distributor Info' + page.should have_selector 'td', text: 'Profile Info:' + page.should have_selector 'td', text: 'Distributor Info:' + + # When I fill out the form and create the enterprise + fill_in 'enterprise_name', :with => 'Eaterprises' + fill_in 'enterprise_long_description', with: 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro.' + fill_in 'enterprise_distributor_info', with: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' + fill_in 'enterprise_address_attributes_address1', with: '35 Ballantyne St' + fill_in 'enterprise_address_attributes_city', with: 'Thornbury' + fill_in 'enterprise_address_attributes_zipcode', with: '3072' + select 'Australia', from: 'enterprise_address_attributes_country_id' + select 'Victoria', from: 'enterprise_address_attributes_state_id' + + click_button 'Create' + + # Then I should see the enterprise details + flash_message.should == 'Enterprise "Eaterprises" has been successfully created!' + click_link 'Eaterprises' + page.should have_selector "tr[data-hook='long_description'] th", text: 'Profile Info:' + page.should have_selector "tr[data-hook='long_description'] td", text: 'Zombie ipsum reversus ab viral inferno, nam rick grimes malum cerebro.' + + page.should have_selector "tr[data-hook='distributor_info'] th", text: 'Distributor Info:' + page.should have_selector "tr[data-hook='distributor_info'] td", text: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' + end + + scenario "viewing distributor info" do + d = create(:distributor_enterprise, distributor_info: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.', next_collection_at: 'Thursday 2nd May') + p = create(:product, :distributors => [d]) + + login_to_consumer_section + visit spree.select_distributor_order_path(d) + + # -- Product details page + visit spree.product_path p + within '#product-distributor-details' do + page.should have_content 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' + page.should have_content 'Thursday 2nd May' + end + + # -- Checkout + click_button 'Add To Cart' + click_link 'Checkout' + within 'fieldset#shipping' do + page.should have_content 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' + page.should have_content 'Thursday 2nd May' + end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8b33ac80a2..c9cc0c868e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,6 +4,7 @@ require 'spork' #require 'spork/ext/ruby-debug' # By default, test on eaterprises deployment settings +# This must be set before rails loads so that it's available in engine initializers ENV['OFW_DEPLOYMENT'] ||= 'eaterprises' @@ -64,6 +65,11 @@ Spork.prefork do DatabaseCleaner.clean end + config.before(:each) do + # By default, test on eaterprises deployment settings + ENV['OFW_DEPLOYMENT'] ||= 'eaterprises' + end + config.include Rails.application.routes.url_helpers config.include Spree::UrlHelpers config.include Spree::Core::TestingSupport::ControllerRequests, :type => :controller From 89b749fe95881dc7ad69400b5f5009a04c5a7609 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 16:31:33 +1000 Subject: [PATCH 33/62] Add terms and conditions to footer --- .../spree/layouts/spree_application/footer.html.erb.deface | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface 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 new file mode 100644 index 0000000000..e6974fd697 --- /dev/null +++ b/lib/chili/local_organics_feature/app/overrides/spree/layouts/spree_application/footer.html.erb.deface @@ -0,0 +1,2 @@ + +| <%= link_to 'Terms and Conditions', "http://www.localorg.com.au/contactterms-and-conditions.html" %> From 50f3455523db819a4321f45c0626fc0a5349f9a2 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 26 Apr 2013 16:55:30 +1000 Subject: [PATCH 34/62] Fix gemspec --- .../enterprises_distributor_info_rich_text_feature.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec b/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec index cf34860bf4..1e230928b9 100644 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/enterprises_distributor_info_rich_text_feature.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |s| s.summary = "Summary of EnterprisesDistributorInfoRichTextFeature." s.description = "Description of EnterprisesDistributorInfoRichTextFeature." - s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] + s.files = Dir["{app,config,db,lib}/**/*"] + ["README.rdoc"] s.add_dependency "rails", "~> 3.2.11" s.add_dependency 'chili', '~> 3.1' From 06c285689e95709e9de178f5b92fb1c638ceee4b Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 29 Apr 2013 11:14:00 +1000 Subject: [PATCH 35/62] Order confirmation email contains distributor info --- ...nfirm_email_with_distributor_info.text.erb | 32 ++++++++++++++ .../engine.rb | 16 +++++++ ...distributor_info_rich_text_feature_spec.rb | 44 ++++++++++++++++++- 3 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 lib/chili/enterprises_distributor_info_rich_text_feature/app/views/spree/order_mailer/confirm_email_with_distributor_info.text.erb diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/app/views/spree/order_mailer/confirm_email_with_distributor_info.text.erb b/lib/chili/enterprises_distributor_info_rich_text_feature/app/views/spree/order_mailer/confirm_email_with_distributor_info.text.erb new file mode 100644 index 0000000000..6df4f707a6 --- /dev/null +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/app/views/spree/order_mailer/confirm_email_with_distributor_info.text.erb @@ -0,0 +1,32 @@ +Dear <%= @order.bill_address.firstname %>, + +Please review and retain the following order information for your records. + +============================================================ +Order Summary +============================================================ +Order for: <%= @order.bill_address.full_name %> +<% @order.line_items.each do |item| %> + <%= item.variant.sku %> <%= raw(item.variant.product.name) %> <%= raw(item.variant.options_text) -%> (<%=item.quantity%>) @ <%= number_to_currency item.price %> = <%= number_to_currency(item.price * item.quantity) %> +<% end %> +============================================================ +Subtotal: <%= number_to_currency @order.item_total %> +<% @order.adjustments.each do |adjustment| %> + <%= raw(adjustment.label) %> <%= number_to_currency(adjustment.amount) %> +<% end %> +Order Total: <%= number_to_currency(@order.total) %> + +<% if @order.payment_method.name.include? "EFT" %> +============================================================ +Payment Details +============================================================ +<%= @order.payment_method.description.html_safe %> + +<% end %> +============================================================ +Collection / Delivery Details +============================================================ +<%= strip_tags @order.distributor.distributor_info %> +<%= @order.distributor.next_collection_at %> + +Thank you for your business. diff --git a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb index 6c7634e050..cc3763ce65 100644 --- a/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb +++ b/lib/chili/enterprises_distributor_info_rich_text_feature/lib/enterprises_distributor_info_rich_text_feature/engine.rb @@ -1,5 +1,21 @@ module EnterprisesDistributorInfoRichTextFeature class Engine < ::Rails::Engine isolate_namespace EnterprisesDistributorInfoRichTextFeature + + initializer 'enterprises_distributor_info_rich_text_feature.mailer', :after => :load_config_initializers do |app| + if ENV['OFW_DEPLOYMENT'] == 'local_organics' + ::Spree::OrderMailer.class_eval do + def confirm_email(order, resend = false) + @order = order + subject = (resend ? "[#{t(:resend).upcase}] " : '') + subject += "#{Spree::Config[:site_name]} #{t('order_mailer.confirm_email.subject')} ##{order.number}" + + mail(:to => order.email, + :subject => subject, + :template_name => 'confirm_email_with_distributor_info') + end + end + end + end end end diff --git a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb index 34d56f409f..1d6e53ffc8 100644 --- a/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb +++ b/spec/features/chili/enterprises_distributor_info_rich_text_feature_spec.rb @@ -6,6 +6,10 @@ feature "enterprises distributor info as rich text" do before(:each) do ENV['OFW_DEPLOYMENT'] = 'local_organics' + + # The deployment is not set to local_organics on Rails init, so these + # initializers won't run. Re-call them now that the deployment is set. + EnterprisesDistributorInfoRichTextFeature::Engine.initializers.each &:run end @@ -43,8 +47,10 @@ feature "enterprises distributor info as rich text" do page.should have_selector "tr[data-hook='distributor_info'] td", text: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' end - scenario "viewing distributor info" do - d = create(:distributor_enterprise, distributor_info: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.', next_collection_at: 'Thursday 2nd May') + scenario "viewing distributor info", js: true do + setup_shipping_details + + d = create(:distributor_enterprise, distributor_info: 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.', next_collection_at: 'Thursday 2nd May') p = create(:product, :distributors => [d]) login_to_consumer_section @@ -64,5 +70,39 @@ feature "enterprises distributor info as rich text" do page.should have_content 'Chu ge sai yubi dan bisento tobi ashi yubi ge omote.' page.should have_content 'Thursday 2nd May' end + + # -- Purchase email + complete_purchase_from_checkout_address_page + ActionMailer::Base.deliveries.length.should == 1 + email = ActionMailer::Base.deliveries.last + email.body.should =~ /Chu ge sai yubi dan bisento tobi ashi yubi ge omote./ + email.body.should =~ /Thursday 2nd May/ + end + + + private + def setup_shipping_details + zone = create(:zone) + c = Spree::Country.find_by_name('Australia') + Spree::ZoneMember.create(:zoneable => c, :zone => zone) + create(:itemwise_shipping_method, zone: zone) + create(:payment_method, :description => 'Cheque payment method') + end + + + def complete_purchase_from_checkout_address_page + fill_in_fields('order_bill_address_attributes_firstname' => 'Joe', + 'order_bill_address_attributes_lastname' => 'Luck', + 'order_bill_address_attributes_address1' => '19 Sycamore Lane', + 'order_bill_address_attributes_city' => 'Horse Hill', + 'order_bill_address_attributes_zipcode' => '3213', + 'order_bill_address_attributes_phone' => '12999911111') + + select('Australia', :from => 'order_bill_address_attributes_country_id') + select('Victoria', :from => 'order_bill_address_attributes_state_id') + + click_button 'Save and Continue' + click_button 'Save and Continue' + click_button 'Process My Order' end end From e20e4950bb209bc4ab7db0dc09bbbe75b26ca307 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 29 Apr 2013 11:31:01 +1000 Subject: [PATCH 36/62] Install db2fog for S3 database backups --- Gemfile | 1 + Gemfile.lock | 21 +++++++++++++++++++++ config/initializers/db2fog.rb | 6 ++++++ 3 files changed, 28 insertions(+) create mode 100644 config/initializers/db2fog.rb diff --git a/Gemfile b/Gemfile index 12d53430f1..192b978ad3 100644 --- a/Gemfile +++ b/Gemfile @@ -20,6 +20,7 @@ gem 'bugsnag' gem 'newrelic_rpm' gem 'haml' gem 'aws-sdk' +gem 'db2fog' gem 'andand' gem 'truncate_html' gem 'representative_view' diff --git a/Gemfile.lock b/Gemfile.lock index c60ab9910b..e51e95d90f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -204,6 +204,10 @@ GEM paperclip (>= 2.3.0) rails (>= 3.0.0) database_cleaner (0.7.1) + db2fog (0.7.0) + activerecord (~> 3.0) + fog (~> 1.0) + rails (~> 3.0) debugger (1.1.4) columnize (>= 0.3.1) debugger-linecache (~> 1.1.1) @@ -218,6 +222,7 @@ GEM warden (~> 1.1.1) diff-lcs (1.1.3) erubis (2.7.0) + excon (0.16.2) execjs (1.4.0) multi_json (~> 1.0) factory_girl (3.3.0) @@ -229,6 +234,17 @@ GEM i18n (~> 0.4) ffaker (1.12.1) ffi (1.7.0) + fog (1.5.0) + builder + excon (~> 0.14) + formatador (~> 0.2.0) + mime-types + multi_json (~> 1.0) + net-scp (~> 1.0.4) + net-ssh (>= 2.1.3) + nokogiri (~> 1.5.0) + ruby-hmac + formatador (0.2.3) haml (3.1.6) highline (1.6.11) hike (1.2.2) @@ -265,6 +281,9 @@ GEM nested_set (1.7.0) activerecord (>= 3.0.0) railties (>= 3.0.0) + net-scp (1.0.4) + net-ssh (>= 1.99.1) + net-ssh (2.5.2) newrelic_rpm (3.6.0.83) nokogiri (1.5.9) orm_adapter (0.0.7) @@ -338,6 +357,7 @@ GEM activesupport (>= 3.0) railties (>= 3.0) rspec (~> 2.10.0) + ruby-hmac (0.4.0) rubyzip (0.9.9) sass (3.1.19) sass-rails (3.2.5) @@ -399,6 +419,7 @@ DEPENDENCIES coffee-rails (~> 3.2.1) comfortable_mexican_sofa database_cleaner (= 0.7.1) + db2fog deface! eaterprises_feature! enterprises_distributor_info_rich_text_feature! diff --git a/config/initializers/db2fog.rb b/config/initializers/db2fog.rb new file mode 100644 index 0000000000..84579d4d42 --- /dev/null +++ b/config/initializers/db2fog.rb @@ -0,0 +1,6 @@ +DB2Fog.config = { + :aws_access_key_id => Spree::Config[:s3_access_key], + :aws_secret_access_key => Spree::Config[:s3_secret], + :directory => Spree::Config[:s3_bucket], + :provider => 'AWS' +} From 234b2d26e96ce6e91236cf7e88cf50dc89dee91e Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 29 Apr 2013 15:37:48 +1000 Subject: [PATCH 37/62] Add MiGS payment gateway --- app/models/spree/gateway/migs.rb | 19 +++++++++++++++++++ config/application.rb | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 app/models/spree/gateway/migs.rb diff --git a/app/models/spree/gateway/migs.rb b/app/models/spree/gateway/migs.rb new file mode 100644 index 0000000000..bfffc6de12 --- /dev/null +++ b/app/models/spree/gateway/migs.rb @@ -0,0 +1,19 @@ +module Spree + class Gateway::Migs < Gateway + preference :login, :string + preference :password, :string + + attr_accessible :preferred_login, :preferred_password + + + def provider_class + ActiveMerchant::Billing::MigsGateway + end + + def options_with_test_preference + options_without_test_preference.merge(:test => self.preferred_test_mode) + end + + alias_method_chain :options, :test_preference + end +end diff --git a/config/application.rb b/config/application.rb index 57edadea95..02a159bc2f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -37,6 +37,10 @@ module Openfoodweb OpenFoodWeb::Calculator::Weight] end + # Register Spree payment methods + initializer "spree.gateway.payment_methods", :after => "spree.register.payment_methods" do |app| + app.config.spree.payment_methods << Spree::Gateway::Migs + end # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers From da3267a3025f9c03bfc1ba9bd0779e99b971afda Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 29 Apr 2013 16:20:26 +1000 Subject: [PATCH 38/62] Add OpenFoodWeb logo to footer --- app/assets/images/ofw.png | Bin 0 -> 5192 bytes .../spree_application/footer.html.erb.deface | 1 + 2 files changed, 1 insertion(+) create mode 100644 app/assets/images/ofw.png diff --git a/app/assets/images/ofw.png b/app/assets/images/ofw.png new file mode 100644 index 0000000000000000000000000000000000000000..ac571bacd0716dbc86944e675e379c307bb26af7 GIT binary patch literal 5192 zcmV-O6u0Y%P)EX>4Tx0C?J+Q+HUC_ZB|i_hk=OLfG)Jmu!ImA|tE_$Pihg5Rw34gb)%y#f69p zRumNxoJdu~g4GI0orvO~D7a@qiilc^Ra`jkAKa(4eR}Wh?fcjJyyu+f{LXpL4}cL8 zCXwc%Y5+M>g*-agACFH+#L2yY0u@N$1RxOR%fe>`#Q*^C19^CUbg)1C0k3ZW0swH; zE+i7i;s1lWP$pLZAdvvzA`<5d0gzGv$SzdK6adH=0I*ZDWC{S3003-xd_p1ssto|_ z^hrJi0NAOM+!p}Yq8zCR0F40vnJ7mj0zkU}U{!%qECRs70HCZuA}$2Lt^t5qwlYTo zfV~9(c8*w(4?ti5fSE!p%m5%b0suoE6U_r4Oaq`W(!b!TUvP!ENC5!A%azTSOVTqG zxRuZvck=My;vwR~Y_URN7by^C3FIQ2mzyIKNaq7g&I|wm8u`(|{y0C7=jP<$=4R(? z@ASo@{%i1WB0eGU-~POe0t5gMPS5Y!U*+Z218~Oyuywy{sapWrRsd+<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uqxw$xwBe+~HSE*D|sgz3= zMx)VUvEVpfTU(0+uBfQ6SS+DXX!q{j$RlW)9v>gaFbwrjTrFo=Haj~z91hRT&28Pf z)!}d$jmFZ_Ql!x7>FJr784Sbpdc9h$o}HZ?9v&_$D>Io)PwNYWu(PxCl`St{`t+m2 zw=enQQOLkAzWBmyHj^Z|xZu10RbSJkQ*D2}V4ZhC2+d|QQUre_lS!`R^E)F{kGYb; zl_!MB;h<}9byqmymd}Tz?V=Nf5FwMaCBbz&`}XaVNu^) | <%= 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 Web Foundation' %><% end %> \ No newline at end of file From a1f189627b9b329b0d09c05a46215ce9ca1e7521 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Mon, 29 Apr 2013 16:34:19 +1000 Subject: [PATCH 39/62] Only show UserVoice feedback button on Eaterprises deployment --- app/overrides/add_feedback_script.rb | 4 ---- .../layouts/spree_application/feedback_script.html.erb.deface | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 app/overrides/add_feedback_script.rb rename app/views/layouts/_feedback_script.html.erb => lib/chili/eaterprises_feature/app/overrides/spree/layouts/spree_application/feedback_script.html.erb.deface (89%) diff --git a/app/overrides/add_feedback_script.rb b/app/overrides/add_feedback_script.rb deleted file mode 100644 index 5edf2d66fe..0000000000 --- a/app/overrides/add_feedback_script.rb +++ /dev/null @@ -1,4 +0,0 @@ -Deface::Override.new(:virtual_path => "spree/layouts/spree_application", - :insert_bottom => "[data-hook='inside_head']", - :partial => "layouts/feedback_script", - :name => "feedback_script") \ No newline at end of file diff --git a/app/views/layouts/_feedback_script.html.erb b/lib/chili/eaterprises_feature/app/overrides/spree/layouts/spree_application/feedback_script.html.erb.deface similarity index 89% rename from app/views/layouts/_feedback_script.html.erb rename to lib/chili/eaterprises_feature/app/overrides/spree/layouts/spree_application/feedback_script.html.erb.deface index 605e48721c..5ced3ebb12 100644 --- a/app/views/layouts/_feedback_script.html.erb +++ b/lib/chili/eaterprises_feature/app/overrides/spree/layouts/spree_application/feedback_script.html.erb.deface @@ -1,3 +1,4 @@ + <% if Rails.env.production? %>