Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
nepalez committed Aug 25, 2015
0 parents commit 432abce
Show file tree
Hide file tree
Showing 33 changed files with 773 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
service_name: travis-ci
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.gem
*.lock
.bundle/
.yardoc/
coverage/
doc/
log/
pkg/
tmp/
9 changes: 9 additions & 0 deletions .metrics
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Settings for metric_fu and its packages are collected in the `config/metrics`
# and loaded by the Hexx::Suit::Metrics::MetricFu.

begin
require "hexx-suit"
Hexx::Suit::Metrics::MetricFu.load
rescue LoadError
puts "The 'hexx-suit' gem is not installed"
end
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--require spec_helper
--color
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
inherit_from: "./config/metrics/rubocop.yml"
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
language: ruby
sudo: false
cache: bundler
bundler_args: --without metrics
before_script: service cassandra status
script: bundle exec rake test:coverage:run
services:
- cassandra
env:
global:
- JRUBY_OPTS="-Xcli.debug=true --debug"
rvm:
- '1.9.3'
- '2.0'
- '2.1'
- '2.2'
- ruby-head
- rbx-2
- jruby-1.7-19mode
- jruby-1.7-21mode
- jruby-9.0.0.0
- jruby-head
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
3 changes: 3 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--asset LICENSE
--exclude lib/rom-cassandra/version.rb
--output doc/api
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## v0.0.1 to-be-released
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gemspec

group :metrics do
gem "hexx-suit", "~> 2.3" if RUBY_ENGINE == "ruby"
end
14 changes: 14 additions & 0 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# encoding: utf-8

guard :rspec, cmd: "bundle exec rspec", all_on_start: true do

watch(%r{^spec/.+_spec\.rb$})

watch(%r{^lib/rom-cassandra/(.+)\.rb}) do |m|
"spec/unit/#{m[1]}_spec.rb"
end

watch("lib/rom-cassandra.rb") { "spec" }
watch("spec/spec_helper.rb") { "spec" }

end # guard :rspec
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2015 Andrew Kozin (nepalez), andrew.kozin@gmail.com

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.
81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
[WIP] ROM::Cassandra
====================

[![Gem Version](https://img.shields.io/gem/v/rom-cassandra.svg?style=flat)][gem]
[![Build Status](https://img.shields.io/travis/rom-rb/rom-cassandra/master.svg?style=flat)][travis]
[![Dependency Status](https://img.shields.io/gemnasium/rom-rb/rom-cassandra.svg?style=flat)][gemnasium]
[![Code Climate](https://img.shields.io/codeclimate/github/rom-rb/rom-cassandra.svg?style=flat)][codeclimate]
[![Coverage](https://img.shields.io/coveralls/rom-rb/rom-cassandra.svg?style=flat)][coveralls]
[![Inline docs](http://inch-ci.org/github/rom-rb/rom-cassandra.svg)][inch]

[codeclimate]: https://codeclimate.com/github/rom-rb/rom-cassandra
[coveralls]: https://coveralls.io/r/rom-rb/rom-cassandra
[gem]: https://rubygems.org/gems/rom-cassandra
[gemnasium]: https://gemnasium.com/rom-rb/rom-cassandra
[travis]: https://travis-ci.org/rom-rb/rom-cassandra
[inch]: https://inch-ci.org/github/rom-rb/rom-cassandra

[Apache Cassandra] support for [Ruby Object Mapper].

Based on the official datastax [ruby driver] and [query_builder] CQL constructor.

[Apache Cassandra]: http://www.planetcassandra.org/
[Ruby Object Mapper]: https://rom-rb.org
[ruby driver]: https://github.com/datastax/ruby-driver
[query_builder]: https://github.com/nepalez/query_builder

Synopsis
--------

@todo

Installation
------------

Add this line to your application's Gemfile:

```ruby
# Gemfile
gem "rom-cassandra"
```

Then execute:

```
bundle
```

Or add it manually:

```
gem install rom-cassandra
```

Compatibility
-------------

Compatible to ROM 0.8+, Cassandra Query Language v3 (CQL3), Apache Cassandra 1.2+.

Tested under rubies [compatible to MRI 1.9.3+](.travis.yml).

Uses [RSpec] 3.0+ for testing and [hexx-suit] for dev/test tools collection.

[RSpec]: http://rspec.org
[hexx-suit]: https://github.com/nepalez/hexx-suit

Contributing
------------

* [Fork the project](https://github.com/rom-rb/rom-cassandra)
* Create your feature branch (`git checkout -b my-new-feature`)
* Add tests for it
* Run `rubocop` and `inch --pedantic` to ensure the style and inline docs are ok
* Run `rake mutant` or `rake exhort` to ensure 100% mutation testing coverage
* Commit your changes (`git commit -am '[UPDATE] Add some feature'`)
* Push to the branch (`git push origin my-new-feature`)
* Create a new Pull Request

License
-------

See the [MIT LICENSE](LICENSE).
34 changes: 34 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# encoding: utf-8

require "rubygems"
require "bundler/setup"

# Loads bundler tasks
Bundler::GemHelper.install_tasks

# Loads the Hexx::RSpec and its tasks
begin
require "hexx-suit"
Hexx::Suit.install_tasks
rescue LoadError
require "hexx-rspec"
Hexx::RSpec.install_tasks
end

# Sets the Hexx::RSpec :test task to default
task :default do
system "bundle exec rake test:coverage:run"
end

desc "Runs mutation metric for testing"
task :mutant do
system "mutant -r rom-cassandra --use rspec ROM::Cassandra* --fail-fast"
end

desc "Exhort all evils"
task :exhort do
system "mutant -r rom-cassandra --use rspec ROM::Cassandra*"
end

desc "Runs all the necessary metrics before making a commit"
task prepare: %w(exhort check:inch check:rubocop check:fu)
Loading

0 comments on commit 432abce

Please sign in to comment.