Permalink
Browse files

First commit with passing test. This project will demonstrate a drast…

…ic change in refinery engine development ... I hope.
  • Loading branch information...
joemsak committed Mar 27, 2012
1 parent 64037fc commit 5d10589786353c6842a5b7356918cd4b6812fb02
Showing with 934 additions and 0 deletions.
  1. +2 −0 .rspec
  2. +1 −0 .rvmrc
  3. +67 −0 Gemfile
  4. +258 −0 Gemfile.lock
  5. +27 −0 Guardfile
  6. +20 −0 Rakefile
  7. +11 −0 app/controllers/refinery/calendar/admin/events_controller.rb
  8. +34 −0 app/controllers/refinery/calendar/events_controller.rb
  9. +5 −0 app/models/refinery/calendar.rb
  10. +6 −0 app/models/refinery/calendar/event.rb
  11. +25 −0 app/views/refinery/calendar/admin/events/_actions.html.erb
  12. +20 −0 app/views/refinery/calendar/admin/events/_event.html.erb
  13. +2 −0 app/views/refinery/calendar/admin/events/_events.html.erb
  14. +17 −0 app/views/refinery/calendar/admin/events/_form.html.erb
  15. +18 −0 app/views/refinery/calendar/admin/events/_records.html.erb
  16. +5 −0 app/views/refinery/calendar/admin/events/_sortable_list.html.erb
  17. +1 −0 app/views/refinery/calendar/admin/events/edit.html.erb
  18. +7 −0 app/views/refinery/calendar/admin/events/index.html.erb
  19. +1 −0 app/views/refinery/calendar/admin/events/new.html.erb
  20. +11 −0 app/views/refinery/calendar/events/index.html.erb
  21. +27 −0 app/views/refinery/calendar/events/show.html.erb
  22. +27 −0 config/locales/en.yml
  23. +28 −0 config/locales/es.yml
  24. +27 −0 config/locales/fr.yml
  25. +27 −0 config/locales/nb.yml
  26. +27 −0 config/locales/nl.yml
  27. +19 −0 config/routes.rb
  28. +26 −0 db/migrate/1_create_calendar_events.rb
  29. +23 −0 db/seeds.rb
  30. +18 −0 lib/generators/refinery/calendar_generator.rb
  31. +21 −0 lib/refinery/events.rb
  32. +26 −0 lib/refinery/events/engine.rb
  33. +1 −0 lib/refinerycms-calendar.rb
  34. +13 −0 lib/tasks/refinery/calendar.rake
  35. +10 −0 readme.md
  36. +18 −0 refinerycms-calendar.gemspec
  37. +35 −0 script/test
  38. +9 −0 spec/models/refinery/refinery/calendar_spec.rb
  39. +6 −0 tasks/rspec.rake
  40. +8 −0 tasks/testing.rake
View
2 .rspec
@@ -0,0 +1,2 @@
+--color
+-I app/models/refinery
View
1 .rvmrc
@@ -0,0 +1 @@
+rvm use --create 1.9.3@refinerycms-calendar
View
67 Gemfile
@@ -0,0 +1,67 @@
+source "http://rubygems.org"
+
+gemspec
+
+gem 'refinerycms', '~> 2.0.2'
+
+# Refinery/rails should pull in the proper versions of these
+group :assets do
+ gem 'sass-rails'
+ gem 'coffee-rails'
+ gem 'uglifier'
+end
+
+gem 'jquery-rails'
+
+group :development, :test do
+ gem 'generator_spec'
+
+ require 'rbconfig'
+
+ platforms :jruby do
+ gem 'activerecord-jdbcsqlite3-adapter'
+ gem 'activerecord-jdbcmysql-adapter'
+ gem 'activerecord-jdbcpostgresql-adapter'
+ gem 'jruby-openssl'
+ end
+
+ unless defined?(JRUBY_VERSION)
+ gem 'sqlite3'
+ gem 'mysql2'
+ gem 'pg'
+ end
+
+ platforms :mswin, :mingw do
+ gem 'win32console'
+ gem 'rb-fchange', '~> 0.0.5'
+ gem 'rb-notifu', '~> 0.0.4'
+ end
+
+ platforms :ruby do
+ gem 'spork', '0.9.0.rc9'
+ gem 'guard-spork'
+
+ unless ENV['TRAVIS']
+ if RbConfig::CONFIG['target_os'] =~ /darwin/i
+ gem 'rb-fsevent', '>= 0.3.9'
+ gem 'growl', '~> 1.0.3'
+ end
+ if RbConfig::CONFIG['target_os'] =~ /linux/i
+ gem 'rb-inotify', '>= 0.5.1'
+ gem 'libnotify', '~> 0.1.3'
+ end
+ end
+ end
+
+ platforms :jruby do
+ unless ENV['TRAVIS']
+ if RbConfig::CONFIG['target_os'] =~ /darwin/i
+ gem 'growl', '~> 1.0.3'
+ end
+ if RbConfig::CONFIG['target_os'] =~ /linux/i
+ gem 'rb-inotify', '>= 0.5.1'
+ gem 'libnotify', '~> 0.1.3'
+ end
+ end
+ end
+end
View
@@ -0,0 +1,258 @@
+PATH
+ remote: .
+ specs:
+ refinerycms-calendar (1.0)
+ refinerycms-core (~> 2.0.2)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (3.2.2)
+ actionpack (= 3.2.2)
+ mail (~> 2.4.0)
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.1)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activeresource (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+ acts_as_indexed (0.7.8)
+ arel (3.0.2)
+ awesome_nested_set (2.1.2)
+ activerecord (>= 3.0.0)
+ babosa (0.3.7)
+ bcrypt-ruby (3.0.1)
+ builder (3.0.0)
+ capybara (1.1.2)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.3.1)
+ ffi (~> 1.0.6)
+ coffee-rails (3.2.2)
+ coffee-script (>= 2.2.0)
+ railties (~> 3.2.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.2.0)
+ database_cleaner (0.7.2)
+ devise (2.0.4)
+ bcrypt-ruby (~> 3.0)
+ orm_adapter (~> 0.0.3)
+ railties (~> 3.1)
+ warden (~> 1.1.1)
+ diff-lcs (1.1.3)
+ dragonfly (0.9.11)
+ rack
+ erubis (2.7.0)
+ execjs (1.3.0)
+ multi_json (~> 1.0)
+ factory_girl (2.6.4)
+ activesupport (>= 2.3.9)
+ factory_girl_rails (1.7.0)
+ factory_girl (~> 2.6.0)
+ railties (>= 3.0.0)
+ ffi (1.0.11)
+ friendly_id (4.0.4)
+ generator_spec (0.8.5)
+ rails (>= 3.0, < 4.0)
+ rspec-rails
+ globalize3 (0.2.0)
+ activemodel (>= 3.0.0)
+ activerecord (>= 3.0.0)
+ paper_trail (~> 2)
+ growl (1.0.3)
+ guard (1.0.1)
+ ffi (>= 0.5.0)
+ thor (~> 0.14.6)
+ guard-spork (0.5.2)
+ guard (>= 0.10.0)
+ spork (>= 0.8.4)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ jquery-rails (2.0.1)
+ railties (>= 3.2.0, < 5.0)
+ thor (~> 0.14)
+ json (1.6.6)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.18)
+ multi_json (1.2.0)
+ mysql2 (0.3.11)
+ nokogiri (1.5.2)
+ orm_adapter (0.0.7)
+ paper_trail (2.6.3)
+ activerecord (~> 3.0)
+ railties (~> 3.0)
+ pg (0.13.2)
+ 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.2)
+ actionmailer (= 3.2.2)
+ actionpack (= 3.2.2)
+ activerecord (= 3.2.2)
+ activeresource (= 3.2.2)
+ activesupport (= 3.2.2)
+ bundler (~> 1.0)
+ railties (= 3.2.2)
+ railties (3.2.2)
+ actionpack (= 3.2.2)
+ activesupport (= 3.2.2)
+ rack-ssl (~> 1.3.2)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.6)
+ rake (0.9.2.2)
+ rb-fsevent (0.9.0)
+ rdoc (3.12)
+ json (~> 1.4)
+ refinerycms (2.0.2)
+ bundler (~> 1.0)
+ refinerycms-authentication (= 2.0.2)
+ refinerycms-core (= 2.0.2)
+ refinerycms-dashboard (= 2.0.2)
+ refinerycms-images (= 2.0.2)
+ refinerycms-pages (= 2.0.2)
+ refinerycms-resources (= 2.0.2)
+ refinerycms-authentication (2.0.2)
+ devise (~> 2.0.0)
+ refinerycms-core (= 2.0.2)
+ refinerycms-core (2.0.2)
+ acts_as_indexed (~> 0.7.7)
+ awesome_nested_set (~> 2.1.0)
+ coffee-rails (~> 3.2.1)
+ friendly_id (~> 4.0.1)
+ globalize3 (~> 0.2.0)
+ jquery-rails (~> 2.0.0)
+ rails (>= 3.1.3, < 3.3)
+ sass-rails (~> 3.2.3)
+ truncate_html (~> 0.5)
+ uglifier (>= 1.0.3)
+ will_paginate (~> 3.0.2)
+ refinerycms-dashboard (2.0.2)
+ refinerycms-core (= 2.0.2)
+ refinerycms-images (2.0.2)
+ dragonfly (~> 0.9.8)
+ rack-cache (>= 0.5.3)
+ refinerycms-core (= 2.0.2)
+ refinerycms-pages (2.0.2)
+ awesome_nested_set (~> 2.1.0)
+ babosa (!= 0.3.6)
+ refinerycms-core (= 2.0.2)
+ seo_meta (~> 1.2.0)
+ refinerycms-resources (2.0.2)
+ dragonfly (~> 0.9.8)
+ rack-cache (>= 0.5.3)
+ refinerycms-core (= 2.0.2)
+ refinerycms-testing (2.0.2)
+ capybara (~> 1.1.0)
+ database_cleaner (~> 0.7.1)
+ factory_girl_rails (~> 1.7.0)
+ rack-test (~> 0.6.0)
+ refinerycms-core (= 2.0.2)
+ rspec-rails (~> 2.8.1)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
+ rubyzip (0.9.6.1)
+ sass (3.1.15)
+ sass-rails (3.2.5)
+ railties (~> 3.2.0)
+ sass (>= 3.1.10)
+ tilt (~> 1.3)
+ selenium-webdriver (2.20.0)
+ childprocess (>= 0.2.5)
+ ffi (~> 1.0)
+ multi_json (~> 1.0)
+ rubyzip
+ seo_meta (1.2.0)
+ railties (>= 3.0.0)
+ spork (0.9.0.rc9)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.5)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ truncate_html (0.5.4)
+ tzinfo (0.3.32)
+ uglifier (1.2.3)
+ execjs (>= 0.3.0)
+ multi_json (>= 1.0.2)
+ warden (1.1.1)
+ rack (>= 1.0)
+ will_paginate (3.0.3)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord-jdbcmysql-adapter
+ activerecord-jdbcpostgresql-adapter
+ activerecord-jdbcsqlite3-adapter
+ coffee-rails
+ generator_spec
+ growl (~> 1.0.3)
+ guard-spork
+ jquery-rails
+ jruby-openssl
+ mysql2
+ pg
+ rb-fchange (~> 0.0.5)
+ rb-fsevent (>= 0.3.9)
+ rb-notifu (~> 0.0.4)
+ refinerycms (~> 2.0.2)
+ refinerycms-calendar!
+ refinerycms-testing (~> 2.0.2)
+ sass-rails
+ spork (= 0.9.0.rc9)
+ sqlite3
+ uglifier
+ win32console
View
@@ -0,0 +1,27 @@
+guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
+ watch('config/application.rb')
+ watch('config/environment.rb')
+ watch(%r{^config/environments/.+\.rb$})
+ watch(%r{^config/initializers/.+\.rb$})
+ watch('spec/spec_helper.rb')
+ watch(%r{^spec/support/.+\.rb$})
+ watch(%r{^vendor/extensions/(.+)/spec/support/.+\.rb$})
+end
+
+guard 'rspec', :version => 2, :cli => "--color --drb --format Fuubar", :all_on_start => false, :all_after_pass => false do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/requests/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end
View
@@ -0,0 +1,20 @@
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+
+ENGINE_PATH = File.dirname(__FILE__)
+APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
+
+if File.exists?(APP_RAKEFILE)
+ load 'rails/tasks/engine.rake'
+end
+
+require "refinerycms-testing"
+Refinery::Testing::Railtie.load_tasks
+Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
+
+load File.expand_path('../tasks/testing.rake', __FILE__)
+load File.expand_path('../tasks/rspec.rake', __FILE__)
@@ -0,0 +1,11 @@
+module Refinery
+ module Calendar
+ module Admin
+ class EventsController < ::Refinery::AdminController
+
+ crudify :'refinery/calendar/event', :xhr_paging => true
+
+ end
+ end
+ end
+end
Oops, something went wrong.

0 comments on commit 5d10589

Please sign in to comment.