Permalink
Browse files

Adds an LRU cache to the identity map.

Added rake-pipeline to compose a distribution JS file.
  • Loading branch information...
shajith committed Mar 27, 2012
1 parent 3a67468 commit 403560127b291cddd513fd84bcca68ecc9e4f5c8
Showing with 1,855 additions and 19 deletions.
  1. +1 −0 .gitignore
  2. +11 −0 AssetFile
  3. +3 −1 Gemfile
  4. +17 −2 Rakefile
  5. +1,461 −0 dist/ember-resource.js
  6. +58 −0 spec/javascripts/identityMapSpec.js
  7. +1 −1 spec/javascripts/support/jasmine.yml
  8. +10 −0 src/base.js
  9. +13 −15 src/ember-resource.js
  10. +31 −0 src/identity_map.js
  11. +249 −0 src/vendor/lru.js
View
@@ -1,2 +1,3 @@
Gemfile.lock
.jhw-cache
+tmp
View
@@ -0,0 +1,11 @@
+require 'rake-pipeline-web-filters'
+
+output "dist"
+
+files = ["vendor/lru.js", "base.js", "identity_map.js", "ember-resource.js"]
+
+input "src" do
+ match "{#{files.join(',')}}" do
+ concat files, "ember-resource.js"
+ end
+end
View
@@ -1,6 +1,8 @@
source "http://rubygems.org"
gem 'jasmine', '1.1.0'
-gem 'jshint'
+gem 'JSHint', :git => 'https://github.com/rquinlivan/jshint-gem.git'
gem 'rake'
+gem 'rake-pipeline', :git => 'https://github.com/livingsocial/rake-pipeline.git'
+gem 'rake-pipeline-web-filters', :git => 'https://github.com/wycats/rake-pipeline-web-filters.git'
gem 'rails', ">= 3.0" #for some reason travis-ci.org wants this
View
@@ -1,6 +1,21 @@
require 'bundler/setup'
require 'pathname'
+require 'rake-pipeline'
+namespace :dist do
+ task :build do
+ Rake::Pipeline::Project.new('Assetfile').invoke
+ end
+
+ task :clean do
+ Rake::Pipeline::Project.new('Assetfile').clean
+ end
+
+ task :cleanup_tmpdir do
+ Rake::Pipeline::Project.new('Assetfile').cleanup_tmpdir
+ end
+
+end
namespace :jasmine do
task :require do
@@ -17,7 +32,7 @@ namespace :jasmine do
end
desc "Run continuous integration tests"
- task :ci => ["jasmine:require_json", "jasmine:require"] do
+ task :ci => ["jasmine:require_json", "jasmine:require", "dist:build"] do
if Jasmine::rspec2?
require "rspec"
require "rspec/core/rake_task"
@@ -42,7 +57,7 @@ namespace :jasmine do
Rake::Task["jasmine_continuous_integration_runner"].invoke
end
- task :server => "jasmine:require" do
+ task :server => ["jasmine:require", "dist:build"] do
jasmine_config_overrides = File.join(Jasmine::Config.new.project_root, 'spec', 'javascripts' ,'support' ,'jasmine_config.rb')
require jasmine_config_overrides if File.exist?(jasmine_config_overrides)
Oops, something went wrong.

0 comments on commit 4035601

Please sign in to comment.