Skip to content

Commit

Permalink
clean up gemspec and add travis ci link
Browse files Browse the repository at this point in the history
  • Loading branch information
christospappas committed Dec 17, 2011
1 parent 6406810 commit 7800480
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 230 deletions.
44 changes: 3 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,4 @@
# rcov generated
coverage

# rdoc generated
rdoc

# yard generated
doc
.yardoc

# bundler
*.gem
.bundle

# jeweler generated
pkg

# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
#
# * Create a file at ~/.gitignore
# * Include files you want ignored
# * Run: git config --global core.excludesfile ~/.gitignore
#
# After doing this, these files will be ignored in all your git projects,
# saving you from having to 'pollute' every project you touch with them
#
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
#
# For MacOS:
#
#.DS_Store
#
# For TextMate
#*.tmproj
#tmtags
#
# For emacs:
#*~
#\#*
#.\#*
#
# For vim:
#*.swp
Gemfile.lock
pkg/*
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rvm:
- 1.9.2
10 changes: 2 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
source "http://rubygems.org"

gem "activesupport", "~> 3.0"
gem "mongoid", "~> 2.0"

group :development do
gem "rspec", "~> 2.3.0"
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.6.1"
end
# Specify your gem's dependencies in streama.gemspec
gemspec
67 changes: 35 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
PATH
remote: .
specs:
streama (0.3.2)

GEM
remote: http://rubygems.org/
specs:
activemodel (3.0.7)
activesupport (= 3.0.7)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activesupport (3.0.7)
bson (1.3.1)
builder (2.1.2)
diff-lcs (1.1.2)
git (1.2.5)
i18n (0.5.0)
jeweler (1.6.1)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
mongo (1.3.1)
bson (>= 1.3.1)
mongoid (2.0.2)
activemodel (~> 3.0)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activesupport (3.1.3)
multi_json (~> 1.0)
bson (1.4.0)
bson_ext (1.4.0)
builder (3.0.0)
diff-lcs (1.1.3)
i18n (0.6.0)
mongo (1.4.0)
bson (= 1.4.0)
mongoid (2.3.3)
activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
rake (0.9.0)
rspec (2.3.0)
rspec-core (~> 2.3.0)
rspec-expectations (~> 2.3.0)
rspec-mocks (~> 2.3.0)
rspec-core (2.3.1)
rspec-expectations (2.3.0)
multi_json (1.0.4)
rake (0.9.2.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.3.0)
tzinfo (0.3.27)
rspec-mocks (2.6.0)
tzinfo (0.3.31)

PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 3.0)
bundler (~> 1.0.0)
jeweler (~> 1.6.1)
mongoid (~> 2.0)
rspec (~> 2.3.0)
bson_ext (~> 1.4)
mongoid (~> 2.3)
rake
rspec (~> 2.5)
streama!
46 changes: 19 additions & 27 deletions README.rdoc → README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
= Streama
# Streama

**ALPHA**

Streama is a simple Ruby activity stream gem for use with the Mongoid ODM framework.

== Install
[![travis](https://secure.travis-ci.org/christospappas/streama.png)](http://travis-ci.org/christospappas/streama)

## Install

$ gem install streama

== Usage
## Usage

=== Define Activities
### Define Activities

Create an Activity model and define the activities and the fields you would like to cache within the activity.

Expand All @@ -37,7 +39,7 @@ e.g. Geraldine(actor) posted a photo(object) to her album(target)

This is based on the Activity Streams 1.0 specification (http://activitystrea.ms)

=== Setup Actors
### Setup Actors

Include the Actor module in a class and override the default followers method.

Expand All @@ -52,13 +54,13 @@ Include the Actor module in a class and override the default followers method.
end
end

=== Setup Indexes
### Setup Indexes

Create the indexes for the Activities collection. You can do so by calling the create_indexes method.

Activity.create_indexes

=== Publishing Activity
### Publishing Activity

In your controller or background worker:

Expand All @@ -71,7 +73,7 @@ To send your activity to different receievers, pass in an additional :receivers
current_user.publish_activity(:new_enquiry, :object => @enquiry, :target => @listing, :receivers => :friends) # calls friends method
current_user.publish_activity(:new_enquiry, :object => @enquiry, :target => @listing, :receivers => current_user.find(:all, :conditions => {:group_id => mygroup}))

== Retrieving Activity
## Retrieving Activity

To retrieve all activity for an actor

Expand All @@ -88,27 +90,17 @@ If you need to return the instance of an :actor, :object or :target from an acti
You can also refresh the cached activity data by calling the Activity#refresh_data method

activity.refresh_data

== Compatibility

Streama is developed against Ruby 1.9.2 and Mongoid 2

== TODO

* Write more documentation, YARD
* Write more tests
* Benchmarks

= License

Copyright © 2011 Christos Pappas

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:
# Contributing

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Once you've made your great commits

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.
1. Fork
1. Create a topic branch - git checkout -b my_branch
1. Push to your branch - git push origin my_branch
1. Create a Pull Request from your branch
1. That's it!

= Credits
# Contributors

Christos Pappas: christos dot pappas at gmail dot com
* Christos Pappas (@christospappas)
47 changes: 1 addition & 46 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'

require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "streama"
gem.homepage = "http://github.com/christospappas/streama"
gem.license = "MIT"
gem.summary = %Q{Streama is a simple activity stream gem for use with the Mongoid ODM framework.}
gem.description = %Q{Streama is a simple activity stream gem for use with the Mongoid ODM framework.}
gem.email = "christos.pappas@gmail.com"
gem.authors = ["Christos Pappas"]
end
Jeweler::RubygemsDotOrgTasks.new

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end

RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end

task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "streama #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require "bundler/gem_tasks"
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

14 changes: 7 additions & 7 deletions lib/streama.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'mongoid'
require 'streama/actor'
require 'streama/activity'
require 'streama/definition'
require 'streama/definition_dsl'
require 'streama/errors'

require "mongoid"
require "streama/version"
require "streama/actor"
require "streama/activity"
require "streama/definition"
require "streama/definition_dsl"
require "streama/errors"
3 changes: 3 additions & 0 deletions lib/streama/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module Streama
VERSION = "0.3.2"
end
Loading

0 comments on commit 7800480

Please sign in to comment.