Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

further adjustments to make the project into an engine *and* application

  • Loading branch information...
commit cffc782b34fa2059bc197a16b1d167543812b13d 1 parent ab9c8cc
@jejacks0n jejacks0n authored
View
20 Gemfile
@@ -3,19 +3,21 @@ source 'http://rubygems.org'
gem 'rails', '3.1.0.rc4'
gem 'jeweler'
-gem 'mysql2'
-gem 'sass'
+# Database
+gem 'sqlite3'
+
+# Assets and forms
+gem 'paperclip'
+gem 'formtastic', git: 'git://github.com/justinfrench/formtastic.git'
+
+# Asset template engines
+gem 'json'
+gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'
gem 'haml'
-gem 'haml-rails'
-
-gem 'paperclip', git: 'git://github.com/thoughtbot/paperclip.git'
-gem 'formtastic', git: 'git://github.com/justinfrench/formtastic.git'
-gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
-gem 'em-hiredis'
-gem 'em-websocket'
+gem 'jquery-rails'
group :development, :test do
gem 'thin'
View
54 Gemfile.lock
@@ -1,10 +1,4 @@
GIT
- remote: git://github.com/eventmachine/eventmachine.git
- revision: d326bb323aae552f662a2b8db0964691b743ae51
- specs:
- eventmachine (1.0.0.beta.3)
-
-GIT
remote: git://github.com/jnicklas/evergreen.git
revision: 0402087fd081a3244ea0d2ca69a58966accb4797
submodules: true
@@ -23,15 +17,6 @@ GIT
formtastic (2.0.0.rc2)
rails (~> 3.0)
-GIT
- remote: git://github.com/thoughtbot/paperclip.git
- revision: 28746ecf206808ac80a77b10143446ae979f0655
- specs:
- paperclip (2.3.10)
- activerecord (>= 2.3.0)
- activesupport (>= 2.3.2)
- cocaine (>= 0.0.2)
-
GEM
remote: http://rubygems.org/
specs:
@@ -65,7 +50,6 @@ GEM
activesupport (= 3.1.0.rc4)
activesupport (3.1.0.rc4)
multi_json (~> 1.0)
- addressable (2.2.6)
archive-tar-minitar (0.5.2)
arel (2.1.1)
bcrypt-ruby (2.1.4)
@@ -84,7 +68,6 @@ GEM
celerity (0.8.9)
childprocess (0.1.9)
ffi (~> 1.0.6)
- cocaine (0.1.0)
coffee-script (2.2.0)
coffee-script-source
execjs
@@ -105,12 +88,8 @@ GEM
daemons (1.1.3)
database_cleaner (0.6.7)
diff-lcs (1.1.2)
- em-hiredis (0.1.0)
- hiredis (~> 0.3.0)
- em-websocket (0.3.0)
- addressable (>= 2.1.1)
- eventmachine (>= 0.12.9)
erubis (2.7.0)
+ eventmachine (0.12.10)
execjs (1.1.3)
multi_json (~> 1.0)
ffi (1.0.9)
@@ -118,18 +97,15 @@ GEM
json (>= 1.4.6)
git (1.2.5)
haml (3.1.2)
- haml-rails (0.3.4)
- actionpack (~> 3.0)
- activesupport (~> 3.0)
- haml (~> 3.0)
- railties (~> 3.0)
hike (1.1.0)
- hiredis (0.3.2)
i18n (0.6.0)
jeweler (1.6.2)
bundler (~> 1.0)
git (>= 1.2.5)
rake
+ jquery-rails (1.0.11)
+ railties (~> 3.0)
+ thor (~> 0.14)
json (1.5.2)
json_pure (1.5.2)
launchy (0.4.0)
@@ -143,8 +119,10 @@ GEM
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
- mysql2 (0.3.6)
nokogiri (1.4.5)
+ paperclip (2.3.11)
+ activerecord (>= 2.3.0)
+ activesupport (>= 2.3.2)
polyglot (0.3.1)
rack (1.3.0)
rack-cache (1.0.2)
@@ -184,6 +162,11 @@ GEM
archive-tar-minitar (>= 0.5.2)
rubyzip (0.9.4)
sass (3.1.2)
+ sass-rails (3.1.0.rc.2)
+ actionpack (~> 3.1.0.rc1)
+ railties (~> 3.1.0.rc1)
+ sass (>= 3.1.2)
+ sprockets (>= 2.0.0.beta.9)
selenium-webdriver (0.2.1)
childprocess (>= 0.1.7)
ffi (>= 1.0.7)
@@ -196,6 +179,7 @@ GEM
hike (~> 1.0)
rack (~> 1.0)
tilt (!= 1.3.0, ~> 1.1)
+ sqlite3 (1.3.3)
term-ansicolor (1.0.5)
thin (1.2.11)
daemons (>= 1.0.9)
@@ -221,18 +205,16 @@ DEPENDENCIES
coffee-script
cucumber-rails
database_cleaner
- em-hiredis
- em-websocket
- eventmachine!
evergreen!
formtastic!
haml
- haml-rails
jeweler
- mysql2
- paperclip!
+ jquery-rails
+ json
+ paperclip
rails (= 3.1.0.rc4)
ruby-debug19
- sass
+ sass-rails (~> 3.1.0.rc)
+ sqlite3
thin
uglifier
View
3  README.rdoc
@@ -106,7 +106,6 @@ The feature list is actually pretty long, so this list is only the top 10 (impor
* Image Uploading: drag images from your desktop to any editable region and they'll be uploaded and inserted
* Table Editing: advanced table editing and creation
* Snippets: insert and edit reusable bits of markup/code that are predefined using drag and drop
-* Drag and Drop Ordering: snippets can be moved around by dragging and dropping them (in snippet regions)
-* Notes and Todos: attach notes and todos to any page
+* Notes: attach notes to any page
* Customizable Toolbars: remove any of the existing toolbar items, or easily add your own custom buttons
* Colaborative Authoring: edit any page while others are also editing (and watch what they're doing)
View
14 Rakefile
@@ -5,17 +5,3 @@
require File.expand_path('../config/application', __FILE__)
Mercury::Application.load_tasks
-
-require 'jeweler'
-Jeweler::Tasks.new do |gem|
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
- gem.name = "mercury-rails"
- gem.homepage = "http://github.com/jejacks0n/mercury"
- gem.license = "MIT"
- gem.summary = %Q{A fully featured and advanced HTML5 WYSIWYG editor written in CoffeeScript on top of Rails 3.1}
- gem.description = %Q{A fully featured and advanced HTML5 WYSIWYG editor written in CoffeeScript on top of Rails 3.1}
- gem.email = "jejacks0n@gmail.com"
- gem.authors = ["Jeremy Jackson"]
- # dependencies defined in Gemfile
-end
-Jeweler::RubygemsDotOrgTasks.new
View
3  app/assets/javascripts/mercury/mercury.js.coffee
@@ -2,12 +2,9 @@
#= require jquery-1.6
#= require jquery-ui-1.8.13.custom.min
#= require jquery-ui-1.8.13.sortable.custom
-#= require jquery.cookie
#= require jquery.easing
#= require jquery.json2
#= require jquery.ujs
-#= require jquery.uri
-#= require jquery.websocket
#= require jquery.serialize_object
#= require liquidmetal
#
View
2  app/controllers/images_controller.rb
@@ -1,4 +1,4 @@
-class ImagesController < ApplicationController
+class ImagesController < MercuryController
respond_to :json
View
24 config/database.yml
@@ -1,26 +1,10 @@
development:
- adapter: mysql2
- database: mercury_development
- user: root
- password:
- encoding: utf8
- host: localhost
+ adapter: sqlite3
+ database: db/development.sqlite3
test: &test
- adapter: mysql2
- database: mercury_test
- user: root
- password:
- encoding: utf8
- host: localhost
+ adapter: sqlite3
+ database: db/test.sqlite3
cucumber:
<<: *test
-
-production:
- adapter: mysql2
- database: mercury_production
- user: root
- password:
- encoding: utf8
- host: localhost
View
27 config/environments/development.rb
@@ -0,0 +1,27 @@
+Mercury::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Log error messages when you accidentally call methods on nil.
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger
+ config.active_support.deprecation = :log
+
+ # Only use best-standards-support built into browsers
+ config.action_dispatch.best_standards_support = :builtin
+
+ # Do not compress assets
+ config.assets.compress = false
+end
View
39 config/environments/test.rb
@@ -0,0 +1,39 @@
+MercuryDemo::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Configure static asset server for tests with Cache-Control for performance
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Log error messages when you accidentally call methods on nil
+ config.whiny_nils = true
+
+ # Show full error reports and disable caching
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
+ # like if you have constraints or database-specific column types
+ # config.active_record.schema_format = :sql
+
+ # Print deprecation notices to the stderr
+ config.active_support.deprecation = :stderr
+end
View
7 config/initializers/backtrace_silencers.rb
@@ -1,7 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
-# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
-
-# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
-# Rails.backtrace_cleaner.remove_silencers!
View
74 config/initializers/formtastic.rb
@@ -1,74 +0,0 @@
-# encoding: utf-8
-
-# --------------------------------------------------------------------------------------------------
-# Please note: If you're subclassing Formtastic::FormBuilder, Formtastic uses
-# class_attribute for these configuration attributes instead of the deprecated
-# class_inheritable_attribute. The behaviour is slightly different with subclasses (especially
-# around attributes with Hash or Array) values, so make sure you understand what's happening.
-# See the documentation for class_attribute in ActiveSupport for more information.
-# --------------------------------------------------------------------------------------------------
-
-# Set the default text field size when input is a string. Default is nil.
-# Formtastic::FormBuilder.default_text_field_size = 50
-
-# Set the default text area height when input is a text. Default is 20.
-# Formtastic::FormBuilder.default_text_area_height = 5
-
-# Set the default text area width when input is a text. Default is nil.
-# Formtastic::FormBuilder.default_text_area_width = 50
-
-# Should all fields be considered "required" by default?
-# Rails 2 only, ignored by Rails 3 because it will never fall back to this default.
-# Defaults to true.
-# Formtastic::FormBuilder.all_fields_required_by_default = true
-
-# Should select fields have a blank option/prompt by default?
-# Defaults to true.
-# Formtastic::FormBuilder.include_blank_for_select_by_default = true
-
-# Set the string that will be appended to the labels/fieldsets which are required
-# It accepts string or procs and the default is a localized version of
-# '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
-# in your locale, it will replace the abbr title properly. But if you don't want to use
-# abbr tag, you can simply give a string as below
-# Formtastic::FormBuilder.required_string = "(required)"
-
-# Set the string that will be appended to the labels/fieldsets which are optional
-# Defaults to an empty string ("") and also accepts procs (see required_string above)
-# Formtastic::FormBuilder.optional_string = "(optional)"
-
-# Set the way inline errors will be displayed.
-# Defaults to :sentence, valid options are :sentence, :list, :first and :none
-# Formtastic::FormBuilder.inline_errors = :sentence
-# Formtastic uses the following classes as default for hints, inline_errors and error list
-
-# If you override the class here, please ensure to override it in your formtastic_changes.css stylesheet as well
-# Formtastic::FormBuilder.default_hint_class = "inline-hints"
-# Formtastic::FormBuilder.default_inline_error_class = "inline-errors"
-# Formtastic::FormBuilder.default_error_list_class = "errors"
-
-# Set the method to call on label text to transform or format it for human-friendly
-# reading when formtastic is used without object. Defaults to :humanize.
-# Formtastic::FormBuilder.label_str_method = :humanize
-
-# Set the array of methods to try calling on parent objects in :select and :radio inputs
-# for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
-# that is found on the object will be used.
-# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
-# Formtastic::FormBuilder.collection_label_methods = [
-# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
-
-# Additionally, you can customize the order for specific types of inputs.
-# This is configured on a type basis and if a type is not found it will
-# fall back to the default order as defined by #inline_order
-# Formtastic::FormBuilder.custom_inline_order[:checkbox] = [:errors, :hints, :input]
-# Formtastic::FormBuilder.custom_inline_order[:select] = [:hints, :input, :errors]
-
-# Specifies if labels/hints for input fields automatically be looked up using I18n.
-# Default value: true. Overridden for specific fields by setting value to true,
-# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
-# Formtastic::FormBuilder.i18n_lookups_by_default = false
-
-# You can add custom inputs or override parts of Formtastic by subclassing Formtastic::FormBuilder and
-# specifying that class here. Defaults to Formtastic::FormBuilder.
-# Formtastic::Helpers::FormHelper.builder = MyCustomBuilder
View
2  config/initializers/secret_token.rb
@@ -4,4 +4,4 @@
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
-Rails.application.config.secret_token = 'a3d5cd98078f032a81a26868464e582207929ed489825cc2259c1c92e86782698ee37e50d7de9c0d300900a1f523a2f3d153b90c104415ebd6b77dcabef7aae5'
+Mercury::Application.config.secret_token = 'a3d5cd98078f032a81a26868464e582207929ed489825cc2259c1c92e86782698ee37e50d7de9c0d300900a1f523a2f3d153b90c104415ebd6b77dcabef7aae5'
View
5 config/locales/en.yml
@@ -1,5 +0,0 @@
-# Sample localization file for English. Add more files in this directory for other locales.
-# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
-
-en:
- hello: "Hello world"
View
61 config/routes.rb
@@ -1,61 +1,5 @@
Rails.application.routes.draw do
- # The priority is based upon order of creation:
- # first created -> highest priority.
-
- # Sample of regular route:
- # match 'products/:id' => 'catalog#view'
- # Keep in mind you can assign values other than :controller and :action
-
- # Sample of named route:
- # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
- # This route can be invoked with purchase_url(:id => product.id)
-
- # Sample resource route (maps HTTP verbs to controller actions automatically):
- # resources :products
-
- # Sample resource route with options:
- # resources :products do
- # member do
- # get 'short'
- # post 'toggle'
- # end
- #
- # collection do
- # get 'sold'
- # end
- # end
-
- # Sample resource route with sub-resources:
- # resources :products do
- # resources :comments, :sales
- # resource :seller
- # end
-
- # Sample resource route with more complex sub-resources
- # resources :products do
- # resources :comments
- # resources :sales do
- # get 'recent', :on => :collection
- # end
- # end
-
- # Sample resource route within a namespace:
- # namespace :admin do
- # # Directs /admin/products/* to Admin::ProductsController
- # # (app/controllers/admin/products_controller.rb)
- # resources :products
- # end
-
- # You can have the root of your site routed with "root"
- # just remember to delete public/index.html.
- # root :to => 'welcome#index'
-
- # See how all your routes lay out with "rake routes"
-
- # This is a legacy wild controller route that's not recommended for RESTful applications.
- # Note: This route will make all actions in every controller accessible via GET requests.
-
resources :images
match '/edit(/*requested_uri)' => "mercury#edit"
@@ -65,6 +9,7 @@
match 'snippets/:name/preview' => "mercury#snippet_preview"
end
- root to: "application#show"
-
+ if Mercury::Application
+ root to: "application#show"
+ end
end
View
7 db/seeds.rb
@@ -1,7 +0,0 @@
-# This file should contain all the record creation needed to seed the database with its default values.
-# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
-#
-# Examples:
-#
-# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
-# Mayor.create(name: 'Daley', city: cities.first)
View
40 lib/mercury/websocket_server.rb
@@ -1,40 +0,0 @@
-module Mercury
- class WebsocketServer
-
- def initialize
- @channel = EM::Channel.new
- @publisher = EM::Hiredis.connect
- init_subscriber
- end
-
- def init_subscriber
- @subscriber = EM::Hiredis.connect
- @subscriber.psubscribe('mercury:*')
- @subscriber.on(:pmessage) do |channel, message|
- @channel.push "{channel: #{channel}, message: #{message}}"
- end
- end
-
- def start
- puts 'Booting WebsocketServer'
- puts 'Listening on 0.0.0.0:8080, CTRL+C to stop'
-
- EventMachine::WebSocket.start(:host => '0.0.0.0', :port => 8080, :debug => true) do |ws|
- ws.onopen do
- sid = @channel.subscribe do |msg|
- ws.send "{sid: #{sid}, packet: #{msg}"
- end
-
- ws.onmessage do |msg|
- @publisher.publish "{sid: #{sid}, packet: #{msg}}"
- end
-
- ws.onclose do
- @channel.unsubscribe(sid)
- end
- end
- end
- end
-
- end
-end
View
40 lib/tasks/jeweler.rake
@@ -0,0 +1,40 @@
+require 'jeweler'
+Jeweler::Tasks.new do |gem|
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
+ gem.name = "mercury-rails"
+ gem.homepage = "http://github.com/jejacks0n/mercury"
+ gem.license = "MIT"
+ gem.summary = %Q{A fully featured and advanced HTML5 WYSIWYG editor written in CoffeeScript on top of Rails 3.1}
+ gem.description = %Q{A fully featured and advanced HTML5 WYSIWYG editor written in CoffeeScript on top of Rails 3.1}
+ gem.email = "jejacks0n@gmail.com"
+ gem.authors = ["Jeremy Jackson"]
+ # dependencies defined in Gemfile
+ ['app/controllers/application_controller.rb',
+ 'app/views/application/*',
+ 'app/views/layouts/application.html.haml',
+ 'config/environments/*',
+ 'config/initializers/*',
+ 'config/application.rb',
+ 'config/boot.rb',
+ 'config/cucumber.yml',
+ 'config/database.yml',
+ 'config/environment.rb',
+ 'config/evergreen.rb',
+ 'db/*.sqlite3',
+ 'db/schema.rb',
+ 'lib/tasks/*',
+ 'public/*',
+ 'script/*',
+ 'log/*',
+ '.gitignore',
+ '.pairs',
+ '.rvmrc',
+ 'config.ru',
+ 'Gemfile',
+ 'Gemfile.lock',
+ 'Rakefile',
+ ].each do |file_or_dir|
+ gem.files.exclude file_or_dir
+ end
+end
+Jeweler::RubygemsDotOrgTasks.new
View
80 mercury-rails.gemspec
@@ -17,13 +17,8 @@ Gem::Specification.new do |s|
"README.rdoc"
]
s.files = [
- ".pairs",
- ".rvmrc",
- "Gemfile",
- "Gemfile.lock",
"LICENSE",
"README.rdoc",
- "Rakefile",
"VERSION",
"app/assets/images/mercury/button.png",
"app/assets/images/mercury/clippy.png",
@@ -93,12 +88,9 @@ Gem::Specification.new do |s|
"app/assets/stylesheets/mercury/toolbar.scss",
"app/assets/stylesheets/mercury/tooltip.scss",
"app/assets/stylesheets/mercury/uploader.scss",
- "app/controllers/application_controller.rb",
"app/controllers/images_controller.rb",
"app/controllers/mercury_controller.rb",
"app/models/image.rb",
- "app/views/application/intro.html.haml",
- "app/views/layouts/application.html.haml",
"app/views/layouts/mercury.html.haml",
"app/views/mercury/modals/character.html.haml",
"app/views/mercury/modals/htmleditor.html.haml",
@@ -116,22 +108,9 @@ Gem::Specification.new do |s|
"app/views/mercury/selects/style.html.haml",
"app/views/mercury/snippets/example.html.haml",
"app/views/mercury/snippets/example_options.html.haml",
- "config.ru",
- "config/application.rb",
- "config/boot.rb",
- "config/cucumber.yml",
- "config/database.yml",
"config/engine.rb",
- "config/environment.rb",
- "config/evergreen.rb",
- "config/initializers/backtrace_silencers.rb",
- "config/initializers/formtastic.rb",
- "config/initializers/secret_token.rb",
- "config/locales/en.yml",
"config/routes.rb",
"db/migrate/20110526035601_create_images.rb",
- "db/schema.rb",
- "db/seeds.rb",
"features/editing/basic.feature",
"features/step_definitions/debug_steps.rb",
"features/step_definitions/web_steps.rb",
@@ -139,18 +118,8 @@ Gem::Specification.new do |s|
"features/support/paths.rb",
"features/support/selectors.rb",
"lib/mercury-rails.rb",
- "lib/mercury/websocket_server.rb",
- "lib/tasks/cucumber.rake",
"log/.gitkeep",
"mercury-rails.gemspec",
- "public/404.html",
- "public/422.html",
- "public/500.html",
- "public/favicon.ico",
- "public/robots.txt",
- "public/websocket.html",
- "script/cucumber",
- "script/rails",
"spec/javascripts/mercury/dialog_spec.js.coffee",
"spec/javascripts/mercury/history_buffer_spec.js.coffee",
"spec/javascripts/mercury/mercury_spec.js.coffee",
@@ -195,17 +164,12 @@ Gem::Specification.new do |s|
"vendor/assets/javascripts/jquery-1.6.js",
"vendor/assets/javascripts/jquery-ui-1.8.13.custom.min.js",
"vendor/assets/javascripts/jquery-ui-1.8.13.sortable.custom.js",
- "vendor/assets/javascripts/jquery.cookie.js",
"vendor/assets/javascripts/jquery.easing.js",
"vendor/assets/javascripts/jquery.json2.js",
"vendor/assets/javascripts/jquery.serialize_object.js",
"vendor/assets/javascripts/jquery.ujs.js",
- "vendor/assets/javascripts/jquery.uri.js",
- "vendor/assets/javascripts/jquery.websocket.js",
"vendor/assets/javascripts/liquidmetal.js",
- "vendor/assets/javascripts/showdown.js",
- "vendor/plugins/.gitkeep",
- "websocket-server"
+ "vendor/assets/javascripts/showdown.js"
]
s.homepage = %q{http://github.com/jejacks0n/mercury}
s.licenses = ["MIT"]
@@ -219,34 +183,30 @@ Gem::Specification.new do |s|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rails>, ["= 3.1.0.rc4"])
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
- s.add_runtime_dependency(%q<mysql2>, [">= 0"])
- s.add_runtime_dependency(%q<sass>, [">= 0"])
+ s.add_runtime_dependency(%q<sqlite3>, [">= 0"])
+ s.add_runtime_dependency(%q<paperclip>, [">= 0"])
+ s.add_runtime_dependency(%q<formtastic>, [">= 0"])
+ s.add_runtime_dependency(%q<json>, [">= 0"])
+ s.add_runtime_dependency(%q<sass-rails>, ["~> 3.1.0.rc"])
s.add_runtime_dependency(%q<coffee-script>, [">= 0"])
s.add_runtime_dependency(%q<uglifier>, [">= 0"])
s.add_runtime_dependency(%q<haml>, [">= 0"])
- s.add_runtime_dependency(%q<haml-rails>, [">= 0"])
- s.add_runtime_dependency(%q<paperclip>, [">= 0"])
- s.add_runtime_dependency(%q<formtastic>, [">= 0"])
- s.add_runtime_dependency(%q<eventmachine>, [">= 0"])
- s.add_runtime_dependency(%q<em-hiredis>, [">= 0"])
- s.add_runtime_dependency(%q<em-websocket>, [">= 0"])
+ s.add_runtime_dependency(%q<jquery-rails>, [">= 0"])
s.add_development_dependency(%q<thin>, [">= 0"])
s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
s.add_development_dependency(%q<evergreen>, [">= 0"])
else
s.add_dependency(%q<rails>, ["= 3.1.0.rc4"])
s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<mysql2>, [">= 0"])
- s.add_dependency(%q<sass>, [">= 0"])
+ s.add_dependency(%q<sqlite3>, [">= 0"])
+ s.add_dependency(%q<paperclip>, [">= 0"])
+ s.add_dependency(%q<formtastic>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
+ s.add_dependency(%q<sass-rails>, ["~> 3.1.0.rc"])
s.add_dependency(%q<coffee-script>, [">= 0"])
s.add_dependency(%q<uglifier>, [">= 0"])
s.add_dependency(%q<haml>, [">= 0"])
- s.add_dependency(%q<haml-rails>, [">= 0"])
- s.add_dependency(%q<paperclip>, [">= 0"])
- s.add_dependency(%q<formtastic>, [">= 0"])
- s.add_dependency(%q<eventmachine>, [">= 0"])
- s.add_dependency(%q<em-hiredis>, [">= 0"])
- s.add_dependency(%q<em-websocket>, [">= 0"])
+ s.add_dependency(%q<jquery-rails>, [">= 0"])
s.add_dependency(%q<thin>, [">= 0"])
s.add_dependency(%q<ruby-debug19>, [">= 0"])
s.add_dependency(%q<evergreen>, [">= 0"])
@@ -254,17 +214,15 @@ Gem::Specification.new do |s|
else
s.add_dependency(%q<rails>, ["= 3.1.0.rc4"])
s.add_dependency(%q<jeweler>, [">= 0"])
- s.add_dependency(%q<mysql2>, [">= 0"])
- s.add_dependency(%q<sass>, [">= 0"])
+ s.add_dependency(%q<sqlite3>, [">= 0"])
+ s.add_dependency(%q<paperclip>, [">= 0"])
+ s.add_dependency(%q<formtastic>, [">= 0"])
+ s.add_dependency(%q<json>, [">= 0"])
+ s.add_dependency(%q<sass-rails>, ["~> 3.1.0.rc"])
s.add_dependency(%q<coffee-script>, [">= 0"])
s.add_dependency(%q<uglifier>, [">= 0"])
s.add_dependency(%q<haml>, [">= 0"])
- s.add_dependency(%q<haml-rails>, [">= 0"])
- s.add_dependency(%q<paperclip>, [">= 0"])
- s.add_dependency(%q<formtastic>, [">= 0"])
- s.add_dependency(%q<eventmachine>, [">= 0"])
- s.add_dependency(%q<em-hiredis>, [">= 0"])
- s.add_dependency(%q<em-websocket>, [">= 0"])
+ s.add_dependency(%q<jquery-rails>, [">= 0"])
s.add_dependency(%q<thin>, [">= 0"])
s.add_dependency(%q<ruby-debug19>, [">= 0"])
s.add_dependency(%q<evergreen>, [">= 0"])
View
26 public/404.html
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>The page you were looking for doesn't exist (404)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
-</head>
-
-<body>
- <!-- This file lives in public/404.html -->
- <div class="dialog">
- <h1>The page you were looking for doesn't exist.</h1>
- <p>You may have mistyped the address or the page may have moved.</p>
- </div>
-</body>
-</html>
View
26 public/422.html
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>The change you wanted was rejected (422)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
-</head>
-
-<body>
- <!-- This file lives in public/422.html -->
- <div class="dialog">
- <h1>The change you wanted was rejected.</h1>
- <p>Maybe you tried to change something you didn't have access to.</p>
- </div>
-</body>
-</html>
View
26 public/500.html
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>We're sorry, but something went wrong (500)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
-</head>
-
-<body>
- <!-- This file lives in public/500.html -->
- <div class="dialog">
- <h1>We're sorry, but something went wrong.</h1>
- <p>We've been notified about this issue and we'll take a look at it shortly.</p>
- </div>
-</body>
-</html>
View
5 public/robots.txt
@@ -1,5 +0,0 @@
-# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
-#
-# To ban all spiders from the entire site uncomment the next two lines:
-# User-Agent: *
-# Disallow: /
View
21 public/websocket.html
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
- <title>Websockets!</title>
- <script type="text/javascript">
- function onMessage(evt) {
- con = document.getElementById("console");
- con.innerHTML += evt.data;
- con.innerHTML += '<br />';
- }
- websocket = new WebSocket("ws://localhost:8080");
- websocket.onmessage = function(evt) { onMessage(evt); };
- </script>
-</head>
-
-<body>
- <div id="console">
- </div>
-</body>
-</html>
View
96 vendor/assets/javascripts/jquery.cookie.js
@@ -1,96 +0,0 @@
-/**
- * Cookie plugin
- *
- * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- */
-
-/**
- * Create a cookie with the given name and value and other optional parameters.
- *
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Set the value of a cookie.
- * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
- * @desc Create a cookie with all available options.
- * @example $.cookie('the_cookie', 'the_value');
- * @desc Create a session cookie.
- * @example $.cookie('the_cookie', null);
- * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
- * used when the cookie was set.
- *
- * @param String name The name of the cookie.
- * @param String value The value of the cookie.
- * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
- * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
- * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
- * If set to null or omitted, the cookie will be a session cookie and will not be retained
- * when the the browser exits.
- * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
- * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
- * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
- * require a secure protocol (like HTTPS).
- * @type undefined
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-
-/**
- * Get the value of a cookie with the given name.
- *
- * @example $.cookie('the_cookie');
- * @desc Get the value of a cookie.
- *
- * @param String name The name of the cookie.
- * @return The value of the cookie.
- * @type String
- *
- * @name $.cookie
- * @cat Plugins/Cookie
- * @author Klaus Hartl/klaus.hartl@stilbuero.de
- */
-jQuery.cookie = function(name, value, options) {
- if (typeof value != 'undefined') { // name and value given, set cookie
- options = options || {};
- if (value === null) {
- value = '';
- options.expires = -1;
- }
- var expires = '';
- if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
- var date;
- if (typeof options.expires == 'number') {
- date = new Date();
- date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
- } else {
- date = options.expires;
- }
- expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
- }
- // CAUTION: Needed to parenthesize options.path and options.domain
- // in the following expressions, otherwise they evaluate to undefined
- // in the packed version for some reason...
- var path = options.path ? '; path=' + (options.path) : '';
- var domain = options.domain ? '; domain=' + (options.domain) : '';
- var secure = options.secure ? '; secure' : '';
- document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
- } else { // only name given, get cookie
- var cookieValue = null;
- if (document.cookie && document.cookie != '') {
- var cookies = document.cookie.split(';');
- for (var i = 0; i < cookies.length; i++) {
- var cookie = jQuery.trim(cookies[i]);
- // Does this cookie string begin with the name we want?
- if (cookie.substring(0, name.length + 1) == (name + '=')) {
- cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
- break;
- }
- }
- }
- return cookieValue;
- }
-};
View
25 vendor/assets/javascripts/jquery.uri.js
@@ -1,25 +0,0 @@
-(function($) {
- $.uri = function(uri) {
- var parts = uri.match(/^((http[s]?|ftp):\/\/)?(((.+)@)?([^:\/\?#\s]+)(:(\d+))?)?(\/?[^\?#]+)?(\?([^#]+))?(#(.*))?$/i);
- parts = {scheme: parts[2], credentials: parts[5], host: parts[6], port: parts[8], path: parts[9], query: parts[11], hash: parts[13]};
- var out = {};
- out.uri = uri;
- out.scheme = (parts.scheme === undefined) ? window.location.protocol.toString().match(/^([a-z]+)/i)[1] : parts.scheme;
- out.host = (parts.host === undefined) ? (document.domain) ? document.domain : 'localhost' : parts.host;
- out.port = (parts.port === undefined) ? 80 : parts.port;
- out.credentials = (parts.credentials === undefined) ? false : parts.credentials.split(':');
- out.path = (parts.path === undefined) ? (window.location.pathname) ? window.location.pathname : '' : (parts.path == '') ? '/' : parts.path;
- out.query = (parts.query === undefined) ? (window.location.search) ? window.location.search.replace('?', '') : '' : parts.query;
- out.hash = (parts.hash === undefined) ? (window.location.hash) ? window.location.hash.replace('#') : '' : parts.hash;
- out.args = {};
- out.query.replace(/([^&=]*)=([^&=]*)/g, function (m, attr, value) {
- if (out.args[attr] === undefined) {
- out.args[attr] = value;
- } else {
- if (typeof(out.args[attr]) != 'object') out.args[attr] = [out.args[attr]];
- out.args[attr].push(value);
- }
- });
- return out;
- };
-})(jQuery);
View
57 vendor/assets/javascripts/jquery.websocket.js
@@ -1,57 +0,0 @@
-/*
- * jQuery Web Sockets Plugin v0.0.1
- * http://code.google.com/p/jquery-websocket/
- *
- * This document is licensed as free software under the terms of the
- * MIT License: http://www.opensource.org/licenses/mit-license.php
- *
- * Copyright (c) 2010 by shootaroo (Shotaro Tsubouchi).
- */
-(function($){
- $.websocketSettings = {
- open: function(){},
- close: function(){},
- message: function(){},
- options: {},
- events: {}
- };
-
- $.websocket = function(url, s) {
- var ws = WebSocket ? new WebSocket(url) : {
- send: function() { return false },
- close: function() {}
- };
-
- $(ws).bind('open', $.websocketSettings.open);
- $(ws).bind('close', $.websocketSettings.close);
- $(ws).bind('message', $.websocketSettings.message);
- $(ws).bind('message', function(e) {
- var json = $.evalJSON(e.originalEvent.data);
-
- if (json['wsinitialize']) {
- this.sid = json['wsinitialize'];
- return;
- }
-
- if (json['sid'] == this.sid) return;
-
- for (var action in json.message) {
- var f = $.websocketSettings[action];
- if (f) f.call(this, json.message[action]);
- }
- });
-
- ws._settings = $.extend($.websocketSettings, s);
- ws._send = ws.send;
- ws.send = function(m) {
- return this._send($.toJSON(m));
- };
-
- $(window).unload(function() {
- ws.close();
- ws = null;
- });
-
- return ws;
- };
-})(jQuery);
View
0  vendor/plugins/.gitkeep
No changes.
View
10 websocket-server
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-require 'rubygems'
-require 'bundler/setup'
-require 'em-websocket'
-require 'em-hiredis'
-require File.expand_path('../lib/mercury/websocket_server', __FILE__)
-
-EM.run do
- Mercury::WebsocketServer.new.start
-end
Please sign in to comment.
Something went wrong with that request. Please try again.