Skip to content

Commit

Permalink
[#1] Update to 3.5.0
Browse files Browse the repository at this point in the history
First checkin

* Update initial module to be an engine
* Replace Jeweler with Bundler
* Add basic dummy app
* Verify app boots with Cms 3.5.0.alpha
  • Loading branch information
peakpg committed May 11, 2012
1 parent 531b5e7 commit 696d0a5
Show file tree
Hide file tree
Showing 60 changed files with 1,770 additions and 102 deletions.
16 changes: 6 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
coverage/**/*
.DS_Store
.bundle/
log/*.log
tmp/**/*
db/*.sqlite3
db/schema.rb
*.gem
.dotest
tmp/restart.txt
public/cache
.idea
pkg/
test/dummy/db/*.sqlite3
test/dummy/log/*.log
test/dummy/tmp/
test/dummy/.sass-cache
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "http://rubygems.org"

gem "sqlite3"
gem "browsercms", :path=>"~/projects/browsercms"
gemspec



130 changes: 130 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
PATH
remote: .
specs:
bcms_s3 (1.0.0)
browsercms (~> 3.5.0.alpha)
right_aws (~> 3.0.4)

PATH
remote: ~/projects/browsercms
specs:
browsercms (3.5.0.alpha)
ancestry (~> 1.2.4)
ckeditor_rails (~> 3.6.2.2)
jquery-rails (~> 2.0)
paperclip (~> 2.3.5)
rails (~> 3.2.0)
sass-rails
term-ansicolor

GEM
remote: http://rubygems.org/
specs:
actionmailer (3.2.3)
actionpack (= 3.2.3)
mail (~> 2.4.4)
actionpack (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
activemodel (3.2.3)
activesupport (= 3.2.3)
builder (~> 3.0.0)
activerecord (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.3)
activemodel (= 3.2.3)
activesupport (= 3.2.3)
activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
ancestry (1.2.5)
activerecord (>= 2.2.2)
arel (3.0.2)
builder (3.0.0)
ckeditor_rails (3.6.2.2)
railties (~> 3.0)
thor (~> 0.14)
cocaine (0.2.1)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
thor (~> 0.14)
json (1.7.1)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
multi_json (1.3.4)
paperclip (2.3.16)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.3)
actionmailer (= 3.2.3)
actionpack (= 3.2.3)
activerecord (= 3.2.3)
activeresource (= 3.2.3)
activesupport (= 3.2.3)
bundler (~> 1.0)
railties (= 3.2.3)
railties (3.2.3)
actionpack (= 3.2.3)
activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
right_aws (3.0.4)
right_http_connection (>= 1.2.5)
right_http_connection (1.3.0)
sass (3.1.17)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)

PLATFORMS
ruby

DEPENDENCIES
bcms_s3!
browsercms!
sqlite3
16 changes: 13 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# A [BrowserCMS](http://www.browsercms.org) module to allow storage of images and files on the Amazon S3 storage facility
# Overview

A [BrowserCMS](http://www.browsercms.org) module to allow storage of images and files on the Amazon S3 storage facility

## Features

* Allows uploaded files to be stored on Amazon S3.
* Option to change caching to suit heroku and/or use 'www' as the prefix for the non-cms site.

## Using S3 for file storage
To enable S3 file storage set Cms::S3.enabled in config/initializers/browsercms.rb (create this if it does not exist) to true. Ensure that you as provide a s3.yml file that contains your credentials and bucket.
This should be in the following format
Expand Down Expand Up @@ -38,6 +46,8 @@ If you've set up CNAMES in your DNS to point to your bucket, then you can enable
1. The s3.yml should be excluded from public repositories (e.g github) since it contains your secret AWS key which should **never** be revealed to the public.
**Please note**. This no longer applies since the access keys and buckets are now specified in environmental variables and therefore the s3.yml file now contains just references to these environmental variables.
2. Changing from local storage to S3 storage will require you to re-upload all your files (or copy the tree to s3)
3. This module requires the RightAWS gem from RightScale (sudo gem install right_aws)

##### Based on original work on S3 storage for BrowserCMS by [Neil Middleton](http://github.com/neilmiddleton/)
## Contributors

* Original work on S3 storage for BrowserCMS by [Neil Middleton](http://github.com/neilmiddleton/)
* v2.1 by [Anthony Underwood](https://github.com/aunderwo)
61 changes: 37 additions & 24 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
begin
require 'rdoc/task'
rescue LoadError
require 'rdoc/rdoc'
require 'rake/rdoctask'
RDoc::Task = Rake::RDocTask
end

RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'BcmsS3'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end

require 'rake'
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
load 'rails/tasks/engine.rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "bcms_s3"
gem.summary = %Q{This is a browsercms (browsercms.org) module to allow the facility to have attachments stored on Amazon S3. Also there is the option to change caching to suit heroku and/or use 'www' as the prefix for the non-cms site.
Based on original work by Neil Middleton}
gem.email = "email2ants@gmail.com"
gem.homepage = "http://github.com/aunderwo/bcms_s3"
gem.authors = ["Anthony Underwood"]

gem.files = "lib/bcms_s3.rb"
gem.files << "lib/bcms_s3/routes.rb"
gem.files << "lib/bcms_s3/s3_module.rb"
gem.files << "templates/blank.rb"

# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end


Bundler::GemHelper.install_tasks

require 'rake/testtask'

Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end


task :default => :test
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Empty file.
15 changes: 15 additions & 0 deletions app/assets/javascripts/bcms_s3/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// 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 jquery
//= require jquery_ujs
//= require_tree .
13 changes: 13 additions & 0 deletions app/assets/stylesheets/bcms_s3/application.css
Original file line number Diff line number Diff line change
@@ -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 .
*/
4 changes: 4 additions & 0 deletions app/controllers/bcms_s3/application_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module BcmsS3
class ApplicationController < ActionController::Base
end
end
4 changes: 4 additions & 0 deletions app/helpers/bcms_s3/application_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module BcmsS3
module ApplicationHelper
end
end
51 changes: 23 additions & 28 deletions bcms_s3.gemspec
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "bcms_s3/version"

Gem::Specification.new do |s|
s.name = %q{bcms_s3}
s.version = "0.2.1"
s.name = "bcms_s3"
s.version = BcmsS3::VERSION

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Anthony Underwood"]
s.date = %q{2010-06-29}
s.email = %q{email2ants@gmail.com}
s.files = Dir["{app,config,db,lib}/**/*"]
s.authors = ["BrowserMedia", "Anthony Underwood", "Neil Middleton"]
s.description = %q{An S3 module for BrowserCMS}
s.summary = %q{S3 integration for BrowserCMS. A module that stores attachments on Amazon S3.}
s.email = %q{github@browsermedia.com}
s.extra_rdoc_files = [
"README.markdown"
]
s.files = [
"lib/bcms_s3.rb",
"lib/bcms_s3/routes.rb",
"lib/bcms_s3/s3_module.rb",
"templates/blank.rb"
]
s.homepage = %q{http://github.com/aunderwo/bcms_s3}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{This is a browsercms (browsercms.org) module to allow the facility to have attachments stored on Amazon S3. Also there is the option to change caching to suit heroku and/or use 'www' as the prefix for the non-cms site. Based on original work by Neil Middleton}
s.files += Dir["app/**/*"]
s.files += Dir["config/**/*"]
s.files += Dir["db/**/*"]
s.files += Dir["lib/**/*"]
s.files += Dir["Gemfile", "LICENSE.txt", "COPYRIGHT.txt", "GPL.txt" ]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
s.test_files += Dir["test/**/*"]
s.test_files -= Dir['test/dummy/**/*']

s.homepage = %q{https://github.com/browsermedia/bcms_s3}
s.require_paths = ["lib"]
s.rubyforge_project = s.name

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
else
end
else
end
s.add_dependency("right_aws", "~> 3.0.4")
s.add_dependency("browsercms", "~> 3.5.0.alpha")
end


2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BcmsS3::Engine.routes.draw do
end
7 changes: 5 additions & 2 deletions lib/bcms_s3.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
require 'bcms_s3/routes'
require 'bcms_s3/s3_module'
require "bcms_s3/engine"
require "bcms_s3/routes"

module BcmsS3
end
7 changes: 7 additions & 0 deletions lib/bcms_s3/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'browsercms'
module BcmsS3
class Engine < ::Rails::Engine
isolate_namespace BcmsS3
include Cms::Module
end
end
4 changes: 1 addition & 3 deletions lib/bcms_s3/routes.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
module Cms::Routes
def routes_for_bcms_s3
namespace(:cms) do |cms|
#cms.content_blocks :s3s
end

end
end
3 changes: 3 additions & 0 deletions lib/bcms_s3/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module BcmsS3
VERSION = "1.0.0"
end
4 changes: 4 additions & 0 deletions lib/tasks/bcms_s3_tasks.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# desc "Explaining what the task does"
# task :bcms_s3 do
# # Task goes here
# end
Loading

0 comments on commit 696d0a5

Please sign in to comment.