Add chili feature for local organics

This commit is contained in:
Rohan Mitchell
2013-04-22 10:29:05 +10:00
parent cbef31f619
commit a4bdea4d5c
17 changed files with 104 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

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

View File

@@ -0,0 +1,3 @@
= Local Organics Feature
This project rocks and uses AGPL licence.

View File

@@ -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 .

View File

@@ -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 .
*/

View File

@@ -0,0 +1,4 @@
module LocalOrganicsFeature
class ApplicationController < Chili::ApplicationController
end
end

View File

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

View File

@@ -0,0 +1,6 @@
<!-- insert_bottom 'body' -->
<div style='background: #FFF;text-align: center; padding: 4px 0;position: fixed;width: 100%;z-index: 9999;top: 0;'>
local_organics_feature active - edit/remove this file:<br/>
<strong>lib/chili/local_organics_feature/app/overrides/layouts/application/example.html.erb.deface</strong><br/>
<%= link_to 'deface docs', 'https://github.com/spree/deface', target: '_blank' %>
</div>

View File

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

View File

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

View File

@@ -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

View File

@@ -0,0 +1,5 @@
module LocalOrganicsFeature
class Engine < ::Rails::Engine
isolate_namespace LocalOrganicsFeature
end
end

View File

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

View File

@@ -0,0 +1,4 @@
# desc "Explaining what the task does"
# task :local_organics_feature do
# # Task goes here
# end

View File

@@ -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