diff --git a/LICENSE b/LICENSE index 0b2dc47..6b135d3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ /* ***** BEGIN LICENSE BLOCK ***** - * + * * Copyright (c) <%= COPYRIGHT_YEAR %> Aptana, Inc. - * + * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without @@ -10,10 +10,10 @@ * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -22,5 +22,5 @@ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. - * + * * ***** END LICENSE BLOCK ***** */ diff --git a/Rakefile b/Rakefile index e105e2a..b3d68d3 100644 --- a/Rakefile +++ b/Rakefile @@ -7,18 +7,18 @@ require 'fileutils' module ActiveJSHelper ROOT_DIR = File.expand_path(File.dirname(__FILE__)) - + ASSETS_DIR = File.join(ROOT_DIR, 'assets') SRC_DIR = File.join(ROOT_DIR, 'src') DIST_DIR = File.join(ROOT_DIR, 'assets/downloads') DOCS_DIR = File.join(ROOT_DIR, 'docs') TEST_DIR = File.join(ROOT_DIR, 'test') VENDOR_DIR = File.join(ROOT_DIR, 'vendor') - + VERSION = YAML.load(IO.read(File.join(SRC_DIR, 'constants.yml')))['VERSION'] - + SOURCE_FILE_FOR_DOCS = File.join(DIST_DIR, 'source_for_docs.js') - + INCLUDES = { :swfaddress => [ File.join(VENDOR_DIR,'swfaddress/swfaddress.js') @@ -33,7 +33,7 @@ module ActiveJSHelper File.join(SRC_DIR,'active_support/initializer.js') ] } - + DISTRIBUTION_FOR_DOC_GENERATION = [ File.join(SRC_DIR,'active_support.js'), File.join(SRC_DIR,'builder.js'), @@ -43,7 +43,7 @@ module ActiveJSHelper File.join(SRC_DIR,'active_record.js'), File.join(SRC_DIR,'active_view.js') ] - + DISTRIBUTIONS = { 'dom.js' => [ File.join(SRC_DIR,'dom.js') @@ -86,7 +86,7 @@ module ActiveJSHelper File.join(SRC_DIR,'active_view.js'), File.join(SRC_DIR,'active_record.js'), INCLUDES[:swfaddress] - ], + ], #ActiveJS combined tests File.join('..','..','test','test.js') => [ Dir[File.join(TEST_DIR,'**/setup.js')], @@ -106,7 +106,7 @@ module ActiveJSHelper Dir[File.join(TEST_DIR,group + '/*.js')].reject{|item| item.match(/setup\.js$/)} ].flatten.reject{|item| item.match(/\/test.js$/)} end - + def self.sprocketize load_path = [SRC_DIR] DISTRIBUTIONS.each_pair do |distribution_name,source_files| @@ -121,7 +121,7 @@ module ActiveJSHelper secretary.concatenation.save_to(File.join(DIST_DIR, distribution_name)) end end - + def self.sprocketize_for_docs flattened_source_files = DISTRIBUTION_FOR_DOC_GENERATION.clone.flatten secretary = Sprockets::Secretary.new( @@ -140,7 +140,7 @@ task :dist, :copy_locations do |task,arguments| ActiveJSHelper.sprocketize ActiveJSHelper::DISTRIBUTIONS.each_pair do |target,payload| puts "Built #{File.expand_path(File.join(ActiveJSHelper::DIST_DIR,target))}" - end + end copy_locations = (arguments[:copy_locations] || '').split(',') copy_locations.each do |location_pair| source, target = location_pair.split(':') diff --git a/assets/samples/editable_list.html b/assets/samples/editable_list.html index 921c29b..cc61d8c 100644 --- a/assets/samples/editable_list.html +++ b/assets/samples/editable_list.html @@ -24,7 +24,7 @@ this.listView.insertListItem('Sample Item'); return element; }); - + ListView = ActiveView.create(function(builder,dom){ return builder.ul(); },{ @@ -35,7 +35,7 @@ }).getElement()); } }); - + ListItemView = ActiveView.create(function(builder,dom){ var element = builder.li( builder.span(this.get('content')), @@ -48,7 +48,7 @@ },this); return element; }); - + ActiveSupport.Element.observe(document,'ready',function(){ var example_container = document.getElementById('example_container'); example_container.appendChild(LayoutView.getInstance().getElement()); diff --git a/assets/samples/editable_list_with_database.html b/assets/samples/editable_list_with_database.html index 39aafef..8d219f9 100644 --- a/assets/samples/editable_list_with_database.html +++ b/assets/samples/editable_list_with_database.html @@ -8,11 +8,11 @@