bfec_generator 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/bfec_generator.gemspec +24 -0
- data/lib/bfec_generator/version.rb +3 -0
- data/lib/bfrec_generator.rb +7 -0
- data/lib/generators/bfec/USAGE +8 -0
- data/lib/generators/bfec/bfec_generator.rb +29 -0
- data/lib/generators/bfec/templates/application.js.coffee.erb +8 -0
- metadata +69 -0
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "bfec_generator/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "bfec_generator"
|
7
|
+
s.version = Railbone::VERSION
|
8
|
+
s.authors = ["Chris Nelson"]
|
9
|
+
s.email = ["superchrisnelson@gmail.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Generates dir structure, adds gems for a backbone/coffeescript/jasmine rails 3.1 app.}
|
12
|
+
s.description = %q{Generates directories, adds gems for a backbone/coffeescript/jasmine application. Uses jaminerice to get jasmine on the rails 3.1 asset pipeline }
|
13
|
+
|
14
|
+
s.rubyforge_project = "railbone"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# specify any dependencies here; for example:
|
22
|
+
# s.add_development_dependency "rspec"
|
23
|
+
s.add_runtime_dependency "rails", ">= 3.1"
|
24
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "rails/generators"
|
2
|
+
|
3
|
+
class BfecGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path("../templates", __FILE__)
|
5
|
+
|
6
|
+
desc "create directories to hold our backbone classes"
|
7
|
+
def create_backbone_directories
|
8
|
+
empty_directory Rails.root.join("app", "assets", "javascripts", "models")
|
9
|
+
empty_directory Rails.root.join("app", "assets", "javascripts", "views")
|
10
|
+
empty_directory Rails.root.join("app", "assets", "javascripts", "routers")
|
11
|
+
empty_directory Rails.root.join("app", "assets", "javascripts", "collections")
|
12
|
+
empty_directory Rails.root.join("app", "assets", "templates")
|
13
|
+
end
|
14
|
+
|
15
|
+
def add_gems
|
16
|
+
gem 'npm_assets', :path => "/Users/superchris/dev/npm_assets"
|
17
|
+
gem "jasminerice", :git => "git://github.com/bradphelan/jasminerice.git"
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_jasminerice
|
21
|
+
empty_directory Rails.root.join("spec", "javascripts")
|
22
|
+
create_file Rails.root.join("spec", "javascripts", "spec.js.coffee"), "#= require application"
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_manifest
|
26
|
+
template "application.js.coffee.erb", "app/assets/javascripts/application.js.coffee"
|
27
|
+
remove_file "app/assets/javascripts/application.js"
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bfec_generator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Chris Nelson
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-11-05 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rails
|
17
|
+
requirement: &2153225040 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3.1'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *2153225040
|
26
|
+
description: ! 'Generates directories, adds gems for a backbone/coffeescript/jasmine
|
27
|
+
application. Uses jaminerice to get jasmine on the rails 3.1 asset pipeline '
|
28
|
+
email:
|
29
|
+
- superchrisnelson@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- .gitignore
|
35
|
+
- Gemfile
|
36
|
+
- Rakefile
|
37
|
+
- bfec_generator.gemspec
|
38
|
+
- lib/bfec_generator/version.rb
|
39
|
+
- lib/bfrec_generator.rb
|
40
|
+
- lib/generators/bfec/USAGE
|
41
|
+
- lib/generators/bfec/bfec_generator.rb
|
42
|
+
- lib/generators/bfec/templates/application.js.coffee.erb
|
43
|
+
has_rdoc: true
|
44
|
+
homepage: ''
|
45
|
+
licenses: []
|
46
|
+
post_install_message:
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
requirements: []
|
63
|
+
rubyforge_project: railbone
|
64
|
+
rubygems_version: 1.6.2
|
65
|
+
signing_key:
|
66
|
+
specification_version: 3
|
67
|
+
summary: Generates dir structure, adds gems for a backbone/coffeescript/jasmine rails
|
68
|
+
3.1 app.
|
69
|
+
test_files: []
|