housekeeper-has_activity 0.4.0 → 0.4.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.
data/README.textile CHANGED
@@ -3,6 +3,9 @@ h1. HasActivity
3
3
 
4
4
  * Originally created by Cary Dunn
5
5
  * Modified functionality and additional features by HouseKeeper
6
+ ** Added the ability to sum a column - giving you a total ammount from a date until now or between 2 dates
7
+ ** Added Between functionality so you can get activity or sums between 2 specified dates
8
+ ** Created a gem version of this plugin
6
9
 
7
10
  A simple way to grab recent activity or a sum of values on a given model from a table grouped by day, hour,
8
11
  or week with only 1 SQL query and giving the ability to pad the results for days/weeks/hours with no activity.
@@ -17,10 +20,48 @@ NOTE: MySQL only because of date functions use.
17
20
 
18
21
  "Example Google Chart Generated":http://chart.apis.google.com/chart?cht=bvs&chs=200x50&chd=t:0,10,15,3,8,4,0,3,2,3,0,11,4,23,14,0,0,0,13,0,4,8,19,10,12,21,1&chco=336699&chbh=a,2&chds=0,23&chf=bg,s,EFEFEF&
19
22
 
20
- h2. USAGE / INSTALLATION
23
+ h2. INSTALLATION
21
24
  ------------------------
22
25
 
23
- <pre><code>script/plugin install git://github.com/cdunn/has_activity.git</pre></code>
26
+ h3. As a standard plugin
27
+
28
+ Run the following command in your projects root
29
+ <pre><code>
30
+
31
+ ruby script/plugin install git://github.com/housekeeper/has_activity.git
32
+
33
+ </code></pre>
34
+
35
+ h3. As a RubyGem
36
+
37
+
38
+ h4. Step one: Download the gem
39
+
40
+ Run the following commands
41
+
42
+ <pre><code>
43
+
44
+ gem sources -a http://gems.github.com (you only have to do this once)
45
+ sudo gem install housekeeper-has_activity
46
+
47
+ </code></pre>
48
+
49
+
50
+ h4. Step two: configure rails
51
+
52
+ Add the following line inside Rails::Initializer.run do
53
+
54
+ <pre><code>
55
+
56
+ config.gem 'housekeeper-has_activity', :lib => 'has_activity',
57
+ :source => 'http://gems.github.com'
58
+
59
+
60
+ </code></pre>
61
+
62
+
63
+ h2. USAGE
64
+ ------------------------
24
65
 
25
66
  <pre><code>
26
67
  class Feed < ActiveRecord::Base
@@ -189,7 +230,5 @@ h2. NOTES
189
230
  * Using sum and creating Bar Charts is not fully tested - HouseKeeper
190
231
  * Some work still needs to be done on the queries and a tidy up of has_activity.rb
191
232
 
192
- Copyright (c) 2009 Cary Dunn <cary.dunn@gmail.com> "http://elctech.com":http://elctech.com, released under the MIT license
193
- Modified by HouseKeeper
194
- - Added the ability to sum a column - giving you a total ammount from a date until now or between 2 dates
195
- - Added Between functionality so you can get activity or sums between 2 specified dates
233
+ Copyright (c) 2009 Cary Dunn <cary.dunn@gmail.com>, HouseKeeper <carl@house-keeping.com>, released under the MIT license
234
+
data/Rakefile CHANGED
@@ -2,6 +2,21 @@ require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'rake/rdoctask'
4
4
 
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gemspec|
8
+ gemspec.name = "has_activity"
9
+ gemspec.summary = "A simple way to grab recent activity or a columns sum on a given model from a table grouped by day, hour, or week with only 1 SQL query and giving the ability to pad the results for days/weeks/hours with no activity."
10
+ gemspec.email = "carl@house-keeping.com"
11
+ gemspec.homepage = "http://github.com/housekeeper/has_activity"
12
+ gemspec.description = "A simple way to grab recent activity or a columns sum on a given model from a table grouped by day, hour, or week with only 1 SQL query and giving the ability to pad the results for days/weeks/hours with no activity."
13
+ gemspec.authors = ["Cary Dunn", "Carl Burton"]
14
+ end
15
+ rescue LoadError
16
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
17
+ end
18
+
19
+
5
20
  desc 'Default: run unit tests.'
6
21
  task :default => :test
7
22
 
@@ -21,3 +36,19 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
21
36
  rdoc.rdoc_files.include('README')
22
37
  rdoc.rdoc_files.include('lib/**/*.rb')
23
38
  end
39
+
40
+ begin
41
+ require 'jeweler'
42
+ Jeweler::Tasks.new do |gemspec|
43
+ gemspec.name = "the-perfect-gem"
44
+ gemspec.summary = "Summarize your gem"
45
+ gemspec.description = "Describe your gem"
46
+ gemspec.email = "josh@technicalpickles.com"
47
+ gemspec.homepage = "http://github.com/technicalpickles/the-perfect-gem"
48
+ gemspec.description = "TODO"
49
+ gemspec.authors = ["Josh Nichols"]
50
+ end
51
+ rescue LoadError
52
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
53
+ end
54
+
data/VERSION.yml CHANGED
@@ -1,5 +1,4 @@
1
- ---
1
+ ---
2
2
  :major: 0
3
3
  :minor: 4
4
- :patch: 0
5
-
4
+ :patch: 3
data/has_activity.gemspec CHANGED
@@ -1,9 +1,12 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
1
4
  # -*- encoding: utf-8 -*-
2
-
5
+
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{has_activity}
5
- s.version = "0.4.0"
6
-
8
+ s.version = "0.4.3"
9
+
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Cary Dunn", "Carl Burton"]
9
12
  s.date = %q{2009-09-17}
@@ -13,35 +16,34 @@ Gem::Specification.new do |s|
13
16
  "README.textile"
14
17
  ]
15
18
  s.files = [
16
- "VERSION.yml",
17
- "uninstall.rb",
19
+ "MIT-LICENSE",
18
20
  "README.textile",
19
21
  "Rakefile",
20
- "MIT-LICENSE",
21
- "install.rb",
22
- "init.rb",
22
+ "VERSION.yml",
23
23
  "has_activity.gemspec",
24
- "test/test_helper.rb",
25
- "test/has_activity_test.rb",
26
- "tasks/has_activity_tasks.rake",
24
+ "init.rb",
25
+ "install.rb",
26
+ "lib/core_ext.rb",
27
27
  "lib/has_activity.rb",
28
- "lib/core_ext.rb"
28
+ "tasks/has_activity_tasks.rake",
29
+ "test/has_activity_test.rb",
30
+ "test/test_helper.rb",
31
+ "uninstall.rb"
29
32
  ]
30
- s.has_rdoc = false
31
33
  s.homepage = %q{http://github.com/housekeeper/has_activity}
32
34
  s.rdoc_options = ["--charset=UTF-8"]
33
35
  s.require_paths = ["lib"]
34
- s.rubygems_version = %q{1.3.1}
36
+ s.rubygems_version = %q{1.3.5}
35
37
  s.summary = %q{A simple way to grab recent activity or a columns sum on a given model from a table grouped by day, hour, or week with only 1 SQL query and giving the ability to pad the results for days/weeks/hours with no activity.}
36
38
  s.test_files = [
37
- "test/test_helper.rb",
38
- "test/has_activity_test.rb"
39
+ "test/has_activity_test.rb",
40
+ "test/test_helper.rb"
39
41
  ]
40
-
42
+
41
43
  if s.respond_to? :specification_version then
42
44
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
43
- s.specification_version = 2
44
-
45
+ s.specification_version = 3
46
+
45
47
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
46
48
  else
47
49
  end
data/lib/has_activity.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  #
2
2
  # => has_activity
3
3
  # => Cary Dunn <cary.dunn@gmail.com>
4
- # => Modified by HouseKeeper: added between methods and sum option
4
+ # => Modified by HouseKeeper: added between methods and sum option and added functionality for gem
5
5
 
6
6
  # HasActivity
7
7
 
8
8
  require 'core_ext'
9
+ require File.expand_path(File.join( File.dirname( __FILE__ ), '..', 'init.rb' ))
9
10
 
10
11
  module Elctech
11
12
  module Has #:nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: housekeeper-has_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cary Dunn
@@ -23,19 +23,19 @@ extensions: []
23
23
  extra_rdoc_files:
24
24
  - README.textile
25
25
  files:
26
- - VERSION.yml
27
- - uninstall.rb
26
+ - MIT-LICENSE
28
27
  - README.textile
29
28
  - Rakefile
30
- - MIT-LICENSE
31
- - install.rb
32
- - init.rb
29
+ - VERSION.yml
33
30
  - has_activity.gemspec
34
- - test/test_helper.rb
35
- - test/has_activity_test.rb
36
- - tasks/has_activity_tasks.rake
37
- - lib/has_activity.rb
31
+ - init.rb
32
+ - install.rb
38
33
  - lib/core_ext.rb
34
+ - lib/has_activity.rb
35
+ - tasks/has_activity_tasks.rake
36
+ - test/has_activity_test.rb
37
+ - test/test_helper.rb
38
+ - uninstall.rb
39
39
  has_rdoc: false
40
40
  homepage: http://github.com/housekeeper/has_activity
41
41
  licenses:
@@ -61,8 +61,8 @@ requirements: []
61
61
  rubyforge_project:
62
62
  rubygems_version: 1.3.5
63
63
  signing_key:
64
- specification_version: 2
64
+ specification_version: 3
65
65
  summary: A simple way to grab recent activity or a columns sum on a given model from a table grouped by day, hour, or week with only 1 SQL query and giving the ability to pad the results for days/weeks/hours with no activity.
66
66
  test_files:
67
- - test/test_helper.rb
68
67
  - test/has_activity_test.rb
68
+ - test/test_helper.rb