Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Converting to gem.
  • Loading branch information
dlikhten committed Jul 10, 2013
1 parent c964b14 commit 3f5d064
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 15 deletions.
17 changes: 17 additions & 0 deletions .gitignore
@@ -0,0 +1,17 @@
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in backbone_filtered_collection.gemspec
gemspec
22 changes: 22 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,22 @@
Copyright (c) 2013 Dmitriy Likhten

MIT License

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 restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell 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
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 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.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -42,15 +42,15 @@ To clear the filtering completely, pass the value false to setFilter.

# Testing

`gem install jasmine --no-ri --no-rdoc` then just run `rake jasmine:ci`
it should be all set up and ready to run.
bundle install
rake jasmine

I also included a .rvmrc file incase you have rvm installed.

# Contributing

Please, do not contribute without a spec. Being tested is critically important
to this project, as it's a framework level component, and so it's failure
to this project, as it's a framework level component, and so its failure
will be damn hard to detect.

Also, no tab characters, 2 spaces only. Minifiers can handle this stuff for you.
11 changes: 3 additions & 8 deletions Rakefile
@@ -1,9 +1,4 @@
require "bundler/gem_tasks"

begin
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'
rescue LoadError
task :jasmine do
abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
end
end
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'
24 changes: 24 additions & 0 deletions backbone-filtered-collection.gemspec
@@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/backbone/filtered_collection/version', __FILE__)

Gem::Specification.new do |gem|
gem.name = "backbone-filtered-collection"
gem.version = Backbone::FilteredCollection::VERSION
gem.platform = Gem::Platform::RUBY
gem.authors = ["Dmitriy Likhten"]
gem.email = ["dlikhten@gmail.com"]
gem.description = %q{A filtered collection for backbone.js}
gem.summary = %q{Allowing implementation of a chain-of-responsibility pattern in backbone's collection filtering}
gem.homepage = "http://github.com/dlikhten/filtered-collection"
gem.license = "MIT"

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.require_paths = ["lib"]

gem.add_dependency "railties", ">= 3.0", "< 5.0"

gem.add_development_dependency 'rake'
gem.add_development_dependency 'jasmine'
end
1 change: 1 addition & 0 deletions lib/backbone-filtered-collection.rb
@@ -0,0 +1 @@
require "backbone/filtered_collection"
7 changes: 7 additions & 0 deletions lib/backbone/filtered_collection.rb
@@ -0,0 +1,7 @@
require 'backbone/filtered_collection/engine' if ::Rails.version >= '3.1'
require 'backbone/filtered_collection/version'

module Backbone
module FilteredCollection
end
end
6 changes: 6 additions & 0 deletions lib/backbone/filtered_collection/engine.rb
@@ -0,0 +1,6 @@
module Backbone
module FilteredCollection
class Engine < ::Rails::Engine
end
end
end
5 changes: 5 additions & 0 deletions lib/backbone/filtered_collection/version.rb
@@ -0,0 +1,5 @@
module Backbone
module FilteredCollection
VERSION = "1.0.0"
end
end
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions spec/javascripts/support/jasmine.yml
Expand Up @@ -11,10 +11,9 @@
# - dist/**/*.js
#
src_files:
- underscore.js
- backbone.js
- backbone-filtered-collection.js
- public/javascripts/**/*.js
- '__spec__/dependencies/underscore.js'
- '__spec__/dependencies/backbone.js'
- 'vendor/assets/javascripts/**/*.js'

# stylesheets
#
Expand Down
File renamed without changes.

0 comments on commit 3f5d064

Please sign in to comment.