Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
Upgrade packages, including several improvements and bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Torres committed Feb 22, 2013
1 parent a0a8e5d commit 41e804b
Show file tree
Hide file tree
Showing 34 changed files with 35,889 additions and 22,445 deletions.
16 changes: 14 additions & 2 deletions .gitignore
@@ -1,5 +1,17 @@
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
pkg/*
spec/tmp/
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,3 +1,3 @@
source :rubygems
source 'https://rubygems.org'

gemspec
27 changes: 27 additions & 0 deletions README.md
@@ -0,0 +1,27 @@
# Ember.js Gem

TODO: Write a gem description

## Installation

From within `ember-gem`:

```console
$ bundle install
```

## Usage

To create an app named `foo` in your `~/Projects` directory:

```console
$ bundle exec ember new ~/Projects/foo
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
12 changes: 7 additions & 5 deletions ember.gemspec
@@ -1,19 +1,21 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/ember/version', __FILE__)
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'ember/version'

Gem::Specification.new do |gem|
gem.name = "ember"
gem.version = Ember::VERSION
gem.authors = ["Dudley Flanders", "Devin Torres"]
gem.email = ["dudley@steambone.org", "devin@devintorr.es"]
gem.description = %q{Development tools for Ember.js}
gem.summary = %q{Development tools for Ember.js}
gem.homepage = "http://emberjgem.com/"
gem.homepage = "http://emberjs.com/"

gem.files = `git ls-files`.split($\)
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "ember"
gem.require_paths = ["lib"]
gem.version = Ember::VERSION

gem.add_dependency 'thor'

Expand Down
35 changes: 28 additions & 7 deletions lib/ember/templates/app/Assetfile.tt
@@ -1,4 +1,7 @@
Dir.chdir File.dirname(__FILE__)

APPNAME = '<%= name %>'
VERSION = File.read('VERSION').strip

require 'json'
require 'rake-pipeline-web-filters'
Expand Down Expand Up @@ -36,16 +39,34 @@ class HandlebarsFilter < Filter
end
end

class VersionFilter < Filter
def generate_output(inputs, output)
inputs.each do |input|
code = input.read
code.gsub! %r/{{VERSION}}/, VERSION
output.write(code)
end
end
end

output 'assets'

input 'app' do
match '*.html' do
copy
end

match 'lib/core.js' do
filter VersionFilter
end

match 'lib/**/*.js' do
filter LoaderFilter,
:module_id_generator => proc { |input|
input.path.sub(/^lib\//, "#{APPNAME}/").sub(/\.js$/, '')
}

if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
filter EmberAssertFilter
uglify {|input| input}
end
Expand All @@ -58,7 +79,7 @@ input 'app' do
input.path.sub(/^vendor\//, '').sub(/\.js$/, '')
}

if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
filter EmberAssertFilter
uglify {|input| input}
end
Expand All @@ -70,15 +91,15 @@ input 'app' do
end

match 'modules/**/*.js' do
if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
filter EmberAssertFilter
uglify {|input| input}
end
concat 'app.js'
end

match 'plugins/**/*.js' do
if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
uglify {|input| input}
end
concat do |input|
Expand All @@ -92,7 +113,7 @@ input 'app' do
:module_id_generator => proc { |input|
input.path.sub(/^templates\//, "#{APPNAME}/~templates/").sub(/\.handlebars$/, '')
}
if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
uglify {|input| input}
end
concat 'app.js'
Expand All @@ -107,15 +128,15 @@ input 'app' do
end

match 'css/**/*.css' do
if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
yui_css
end
concat ['bootstrap.css', 'main.css'], 'app.css'
end

match 'css/**/*.scss' do
sass
if ENV['RAKEP_MODE'] == 'production'
if ENV['RAKEP_ENV'] == 'production'
yui_css
end
concat 'app.css'
Expand Down
27 changes: 16 additions & 11 deletions lib/ember/templates/app/Gemfile
@@ -1,19 +1,24 @@
source :rubygems
source 'https://rubygems.org'

gem 'colored'

gem 'guard'
gem 'guard-rake'

gem 'rack'
gem 'rack-rewrite'
# gem 'rack-streaming-proxy'

gem 'sass'
gem 'compass'

gem 'uglifier'
gem 'yui-compressor'

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'

group :dev do
gem 'guard'
gem 'guard-rake'

gem 'rack'
gem 'rack-rewrite'
gem 'rack-streaming-proxy'
end

group :prod do
gem 'therubyracer'
gem 'uglifier'
gem 'yui-compressor'
end
23 changes: 12 additions & 11 deletions lib/ember/templates/app/LICENSE
@@ -1,13 +1,14 @@
Copyright (c) Your Name Here
Copyright (c) 2013, Your Name <you@example.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
4 changes: 2 additions & 2 deletions lib/ember/templates/app/README.md
Expand Up @@ -50,8 +50,8 @@ which you need to have installed.

Or you can run the tests via:

$ bundle exec rackup
$ open http://localhost:9292/tests/index.html
$ bundle exec rackup -p 9293 tests/config.ru
$ open http://localhost:9293/

If you want to continuously run the tests every time a file changes, invoke:

Expand Down
8 changes: 3 additions & 5 deletions lib/ember/templates/app/Rakefile.tt
@@ -1,14 +1,12 @@
APPNAME = '<%= name %>'

require 'colored'
require 'rake-pipeline'

desc "Build #{APPNAME}"
desc "Build the app"
task :build do
Rake::Pipeline::Project.new('Assetfile').invoke
end

desc "Run tests with PhantomJS"
desc "Run app tests"
task :test => :build do
unless system("which phantomjs > /dev/null 2>&1")
abort "PhantomJS is not installed. Download from http://phantomjs.org/"
Expand All @@ -17,7 +15,7 @@ task :test => :build do
cmd = "phantomjs tests/run-tests.js \"file://#{File.dirname(__FILE__)}/tests/index.html\""

# Run the tests
puts "Running #{APPNAME} tests"
puts "Running project tests"
success = system(cmd)

if success
Expand Down
1 change: 1 addition & 0 deletions lib/ember/templates/app/VERSION
@@ -0,0 +1 @@
0.1.0

0 comments on commit 41e804b

Please sign in to comment.