backaid 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -22
- data/backaid.gemspec +1 -1
- data/lib/generators/backaid/backaid_generator.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a2efb6441d8795f3609679a5f99936d483559ca
|
4
|
+
data.tar.gz: 96a01186b55bd2bb9e685a98e21902da9379f1d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c79b938fdb4924ad02d9e7f0521a45c1f012d54575b1962f7fc4577c004937384f43215330beab59d479fc28f68afae3408b0913da75b37b77ef2288d7cd9505
|
7
|
+
data.tar.gz: a20bc2efb5763d47d4f8d1e5402d3b4f2f48a4e52b68df21c196f2c14f27513f2fdda078e352190136498200615b01c9c1278410b664834022c5706e816e9bf2
|
data/README.md
CHANGED
@@ -1,29 +1,25 @@
|
|
1
|
-
# Backaid
|
1
|
+
# Backaid - require depedencies and create a directory structure for your Backbone app
|
2
|
+
|
3
|
+
### Installation
|
2
4
|
|
3
|
-
|
5
|
+
In your Gemfile, add this line:
|
4
6
|
|
5
|
-
|
7
|
+
gem 'backaid', '~> 0.1.8'
|
8
|
+
|
9
|
+
Then run the following commands:
|
6
10
|
|
7
|
-
|
11
|
+
bundle install
|
12
|
+
rails generate backaid
|
8
13
|
|
9
|
-
|
14
|
+
### Layout and namespacing
|
10
15
|
|
11
|
-
|
16
|
+
Running `rails g backaid` will create the following directory structure under `app/assets/javascripts/backbone`:
|
17
|
+
|
18
|
+
routers/
|
19
|
+
models/
|
20
|
+
collections/
|
21
|
+
templates/
|
22
|
+
views/
|
12
23
|
|
13
|
-
|
24
|
+
It will also add your Underscore & Backbone dependencies to your vendor/assets & include application.js in application.html.erb.
|
14
25
|
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install backaid
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Contributing
|
24
|
-
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
data/backaid.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'backaid/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "backaid"
|
8
|
-
spec.version = "0.1.
|
8
|
+
spec.version = "0.1.9"#Backaid::VERSION
|
9
9
|
spec.authors = ["daviskoh"]
|
10
10
|
spec.email = ["koh.davis.0@gmail.com"]
|
11
11
|
spec.description = %q{Use backbone with rails}
|
@@ -4,8 +4,8 @@ class BackaidGenerator < Rails::Generators::Base #NamedBase means name is requir
|
|
4
4
|
|
5
5
|
# all public methods inside generator file execute when generator run
|
6
6
|
def gen_backbone_dir_structure
|
7
|
-
puts "
|
8
|
-
|
7
|
+
puts "Holla at your directories: models, collections, templates, views, routers"
|
8
|
+
|
9
9
|
Dir.mkdir("app/assets/javascripts/backbone")
|
10
10
|
["models", "collections", "views", "routers", "templates"].each do |dir|
|
11
11
|
Dir.mkdir("app/assets/javascripts/backbone/#{dir}")
|
@@ -14,7 +14,7 @@ class BackaidGenerator < Rails::Generators::Base #NamedBase means name is requir
|
|
14
14
|
|
15
15
|
def require_backbone
|
16
16
|
append_specific 'app/assets/javascripts/application.js' do |line|
|
17
|
-
line = line == "//= require_tree .\n" ? "//= require underscore\n//= require backbone\n//= require_tree ./backbone/models\n//= require_tree ./backbone/collections\n//= require_tree ./backbone/
|
17
|
+
line = line == "//= require_tree .\n" ? "//= require underscore\n//= require backbone\n//= require_tree ./backbone/models\n//= require_tree ./backbone/collections\n//= require_tree ./backbone/templates\n//= require_tree ./backbone/views\n//= require_tree ./backbone/routers" : line
|
18
18
|
end
|
19
19
|
|
20
20
|
append_specific 'app/views/layouts/application.html.erb' do |line|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backaid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- daviskoh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|