backbars 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a1277a35c95c5460735d9000ea38188c98791c46
4
+ data.tar.gz: b9042fd7ebfc3ee7eda5a27819b429957f26ac81
5
+ SHA512:
6
+ metadata.gz: 0379a7d7844fbd64ba78c38365f451966467127bf9b504ff702ba06b3451a88df4bdb5e1708b03ecde1356e268b1c1643d71de5c55dac5d13a7de213573aeac9
7
+ data.tar.gz: 5df949f007a234c729de49bc8fc7af48cad3db4eac64141dcf16849af67903b11e6b492c41ae110524855c611068ae9b95f2991d90a2718571cd6f1a4b606473
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in backbars.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 DrRobotmck
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Backbars
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'backbars'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install backbars
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/backbars/fork )
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 a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/backbars.gemspec ADDED
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'backbars/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "backbars"
8
+ spec.version = Backbars::VERSION
9
+ spec.authors = ["DrRobotmck"]
10
+ spec.email = ["mckenneth.scott@icloud.com"]
11
+ spec.summary = %q{Configure Backbone and Handlebars with all dependencies}
12
+ spec.description = %q{Boilerplate Backbone and Handlebars installation}
13
+ spec.homepage = "https://github.com/DrRobotmck/Backbars"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "handlebars_assets"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.6"
24
+ spec.add_development_dependency "rake"
25
+ end
@@ -0,0 +1,3 @@
1
+ module Backbars
2
+ VERSION = "0.0.3"
3
+ end
data/lib/backbars.rb ADDED
@@ -0,0 +1,6 @@
1
+ require "backbars/version"
2
+ require "handlebars_assets"
3
+
4
+ module Backbars
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate backbars Thing
6
+
7
+ This will create:
8
+ what/will/it/create
@@ -0,0 +1,33 @@
1
+ class BackbarsGenerator < Rails::Generators::Base
2
+ source_root File.expand_path('../vendor', __FILE__)
3
+
4
+ def generate_folders
5
+ # Creates folders to store Backbone related files
6
+ empty_directory 'app/assets/javascripts/backbone/routers'
7
+ empty_directory 'app/assets/javascripts/backbone/models'
8
+ empty_directory 'app/assets/javascripts/backbone/collections'
9
+ empty_directory 'app/assets/javascripts/backbone/views'
10
+
11
+ # Creates a folder for Handlebars Template files
12
+ empty_directory 'app/assets/javascripts/templates'
13
+
14
+ # Adds a .keep file to prevent git from ignoring empty directories
15
+ create_file 'app/assets/javascripts/backbone/routers/.keep'
16
+ create_file 'app/assets/javascripts/backbone/models/.keep'
17
+ create_file 'app/assets/javascripts/backbone/collections/.keep'
18
+ create_file 'app/assets/javascripts/backbone/views/.keep'
19
+ create_file 'app/assets/javascripts/templates/.keep'
20
+ end
21
+
22
+ def include_dependencies
23
+ # Adds underscore, backbone and handlebars library to vendor folder
24
+ copy_file 'assets/underscore.js', 'vendor/assets/javascripts/underscore.js'
25
+ copy_file 'assets/backbone.js', 'vendor/assets/javascripts/backbone.js'
26
+
27
+ # Inserts require statements into application.js file
28
+ insert_into_file 'app/assets/javascripts/application.js',"//= require underscore\n//= require backbone\n//= require handlebars\n//= require_tree ./backbone/routers\n//= require_tree ./backbone/models\n//= require_tree ./backbone/collections\n//= require_tree ./backbone/views\n//= require_tree ./templates\n" , after: "//= require turbolinks\n"
29
+ end
30
+
31
+
32
+
33
+ end