Skip to content

Commit

Permalink
small tweaks before we push a gem
Browse files Browse the repository at this point in the history
  • Loading branch information
julesce committed Mar 19, 2012
1 parent 36f02f6 commit cb9323d
Show file tree
Hide file tree
Showing 9 changed files with 190 additions and 99 deletions.
153 changes: 153 additions & 0 deletions .gitignore
@@ -0,0 +1,153 @@
.bundle
db/*.sqlite3
log/*.log
tmp/
# Rails
.bundle
db/*.sqlite3
db/*.sqlite3-journal
*.log
tmp/**/*
.suo

# Documentation
doc/api
doc/app
doc/*
.yardoc
.yardopts

# Public Uploads
public/system/*
public/themes/*

# Public Cache
public/javascripts/cache
public/stylesheets/cache

# Vendor Cache
vendor/cache

# Acts as Indexed
index/**/*

# Refinery Specific
*.tmproj
*.autobackupbyrefinery.*
/refinerycms-*.gem
.autotest

# Mac
.DS_Store

# Windows
Thumbs.db

# NetBeans
nbproject

# Eclipse
.project

# Redcar
.redcar

# Rubinius
*.rbc

# Vim
*.swp
*.swo

# RubyMine
.idea

# Backup
*~

# Capybara Bug
capybara-*html

# sass
.sass-cache
.sass-cache/*

#rvm
.rvmrc
.rvmrc.*

# Rails
.bundle
db/*.sqlite3
db/*.sqlite3-journal
*.log
tmp
tmp/**/*

# Documentation
doc/api
doc/app
.yardoc
.yardopts

# Public Uploads
public/system/*
public/themes/*

# Public Cache
public/javascripts/cache
public/stylesheets/cache

# Vendor Cache
vendor/cache

# Acts as Indexed
index/**/*

# Refinery Specific
*.tmproj
*.autobackupbyrefinery.*
refinerycms-*.gem
.autotest

# Mac
.DS_Store

# Windows
Thumbs.db

# NetBeans
nbproject

# Eclipse
.project

# Redcar
.redcar

# Rubinius
*.rbc

# Vim
*.swp
*.swo

# RubyMine
.idea

# E-texteditor
.eprj

# Backup
*~

# Capybara Bug
capybara-*html

# sass
.sass-cache
.sass-cache/*

#rvm
.rvmrc
.rvmrc.*
30 changes: 0 additions & 30 deletions app/controllers/variants_controller.rb

This file was deleted.

2 changes: 1 addition & 1 deletion app/models/variant.rb
Expand Up @@ -10,7 +10,7 @@ class Variant < ActiveRecord::Base

delegate :url, :to => :image, :prefix => true

def name_and_price
def name_and_price
name + " - R" + price.to_i.to_s
end
end
11 changes: 0 additions & 11 deletions app/views/variants/index.html.erb

This file was deleted.

45 changes: 0 additions & 45 deletions app/views/variants/show.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion config/routes.rb
@@ -1,5 +1,5 @@
::Refinery::Application.routes.draw do
resources :variants, :only => [:index, :show]
# resources :variants, :only => [:index, :show]

scope(:path => 'refinery', :as => 'admin', :module => 'admin') do
resources :variants, :except => :show do
Expand Down
6 changes: 3 additions & 3 deletions db/migrate/create_variants.rb
Expand Up @@ -21,9 +21,9 @@ def self.down
UserPlugin.destroy_all({:name => "variants"})
end

if defined?(Page)
Page.delete_all({:link_url => "/variants"})
end
#if defined?(Page)
# Page.delete_all({:link_url => "/variants"})
#end

drop_table :variants
end
Expand Down
37 changes: 29 additions & 8 deletions readme.md
@@ -1,10 +1,31 @@
# Variants engine for Refinery CMS.
# Refinery CMS Product Variants

## How to build this engine as a gem
Product variants for your [Refinery CMS](http://refinerycms.com) website, that is making use of the following gem:

cd vendor/engines/variants
gem build refinerycms-variants.gemspec
gem install refinerycms-variants.gem

# Sign up for a http://rubygems.org/ account and publish the gem
gem push refinerycms-variants.gem
+ Products - https://github.com/julesce/refinerycms-products (1.0)

This version of `refinerycms-variants` supports Rails 3.0.x.

## Requirements

Refinery CMS version 1.0.x.

## Install

Make sure that the [products](https://github.com/julesce/refinerycms-products) gem has been installed.

Open up your ``Gemfile`` and add the following:

gem 'refinerycms-variants', '~> 1.0.0'

Now, run:

bundle install

Next, run:

rails generate refinerycms_variants

Migrate your database:

rake db:migrate
3 changes: 3 additions & 0 deletions refinerycms-variants.gemspec
Expand Up @@ -7,4 +7,7 @@ Gem::Specification.new do |s|
s.summary = 'Variants engine for Refinery CMS'
s.require_paths = %w(lib)
s.files = Dir['lib/**/*', 'config/**/*', 'app/**/*']
s.authors = ['James Thompson', 'Byron Peters']
s.email = 'james.b.thompson@gmail.com'
s.homepage = 'https://github.com/byropig/refinerycms-variants'
end

0 comments on commit cb9323d

Please sign in to comment.