monocle 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,20 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "bundler", "~> 1.0.0"
10
+ gem "database_cleaner"
11
+ gem "jeweler", "~> 1.5.2"
12
+ gem "mocha"
13
+ gem "rails"
14
+ gem "rcov", ">= 0"
15
+ gem "rspec", "~> 2.3.0"
16
+ gem "sinatra"
17
+ gem "sqlite3"
18
+ gem "shoulda-matchers", "1.0.0.beta1"
19
+ gem "yard", "~> 0.6.0"
20
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Russ Smith
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = monocle
2
+
3
+ Description goes here.
4
+
5
+ == Contributing to monocle
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
+ * Fork the project
10
+ * Start a feature/bugfix branch
11
+ * Commit and push until you are happy with your contribution
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2011 Russ Smith. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,43 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "monocle"
16
+ gem.homepage = "http://github.com/russ/monocle"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{A history of view events.}
19
+ gem.description = %Q{A history of view events.}
20
+ gem.email = "russ@bashme.org"
21
+ gem.authors = ["Russ Smith"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ end
27
+ Jeweler::RubygemsDotOrgTasks.new
28
+
29
+ require 'rspec/core'
30
+ require 'rspec/core/rake_task'
31
+ RSpec::Core::RakeTask.new(:spec) do |spec|
32
+ spec.pattern = FileList['spec/**/*_spec.rb']
33
+ end
34
+
35
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
36
+ spec.pattern = 'spec/**/*_spec.rb'
37
+ spec.rcov = true
38
+ end
39
+
40
+ task :default => :spec
41
+
42
+ require 'yard'
43
+ YARD::Rake::YardocTask.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,17 @@
1
+ require "rails/generators/active_record"
2
+
3
+ module Monocle
4
+ class InstallGenerator < Rails::Generators::Base
5
+ include Rails::Generators::Migration
6
+
7
+ source_root File.expand_path("../templates", __FILE__)
8
+
9
+ def copy_migration
10
+ migration_template "migration.rb", "db/migrate/create_monocle_views.rb"
11
+ end
12
+
13
+ def self.next_migration_number(dirname)
14
+ ActiveRecord::Generators::Base.next_migration_number(dirname)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,21 @@
1
+ class CreateMonocleViews < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :views do |t|
4
+ t.string :viewable_type
5
+ t.integer :viewable_id
6
+ t.string :type
7
+ t.date :viewed_on_start_date
8
+ t.integer :views, :default => 0
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :views, [ :type, :viewable_type, :viewable_id, :views ], :name => :viewable_type_views
13
+ add_index :views, [ :type, :viewable_type, :viewed_on_start_date, :viewable_id, :views ], :name => :viewable_type_start_date_views
14
+ add_index :views, [ :type, :viewable_type, :viewed_on_start_date, :viewable_id ], :name => :unique_time_period_views, :unique => true
15
+ add_index :views, [ :viewable_type, :viewable_id], :name => :index_views_on_viewable_type_and_viewable_id
16
+ end
17
+
18
+ def self.down
19
+ drop_table :views
20
+ end
21
+ end
data/lib/monocle.rb ADDED
@@ -0,0 +1,11 @@
1
+ module Monocle
2
+ autoload :Server, "monocle/server"
3
+ autoload :Views, "monocle/views"
4
+
5
+ autoload :View, "monocle/view"
6
+ autoload :OverallView, "monocle/overall_view"
7
+ autoload :DailyView, "monocle/daily_view"
8
+ autoload :WeeklyView, "monocle/weekly_view"
9
+ autoload :MonthlyView, "monocle/monthly_view"
10
+ autoload :YearlyView, "monocle/yearly_view"
11
+ end
@@ -0,0 +1,22 @@
1
+ module Monocle
2
+ class DailyView < View
3
+ validates_presence_of :viewed_on_start_date
4
+
5
+ def view!
6
+ %w( Weekly Monthly Yearly Overall ).each do |time_span|
7
+ klass = "Monocle::#{time_span}View".constantize
8
+ start_date = nil
9
+
10
+ unless time_span == "Overall"
11
+ time_span.downcase!.gsub!("ly", "")
12
+ start_date = viewed_on_start_date.send("beginning_of_#{time_span}")
13
+ end
14
+
15
+ view = klass.find_or_create_by_viewable_type_and_viewable_id_and_viewed_on_start_date(viewable_type, viewable_id, start_date)
16
+ view.view!
17
+ end
18
+
19
+ super
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ module Monocle
2
+ class MonthlyView < View
3
+ validates_presence_of :viewed_on_start_date
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module Monocle
2
+ class OverallView < View
3
+ end
4
+ end
@@ -0,0 +1,15 @@
1
+ require "sinatra/base"
2
+
3
+ module Monocle
4
+ class Server < Sinatra::Base
5
+ post "/:type/:id" do
6
+ begin
7
+ params[:type].classify.constantize.find(params[:id]).view!
8
+ ActiveRecord::Base.clear_active_connections!
9
+ "o_0 +1"
10
+ rescue ActiveRecord::RecordNotFound
11
+ "o_0"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,38 @@
1
+ module Monocle
2
+ class View < ActiveRecord::Base
3
+ belongs_to :viewable, :polymorphic => true
4
+
5
+ validates_presence_of :viewable_id
6
+ validates_presence_of :viewable_type
7
+
8
+ def self.by_type(type)
9
+ where(:type => type)
10
+ end
11
+
12
+ def self.since(since, options = {})
13
+ options[:limit] ||= 10
14
+ options[:order] ||= "SUM(views) DESC"
15
+ options[:type] ||= :yearly
16
+
17
+ by_type("Monocle::" + options[:type].to_s.classify + "View")
18
+ .where("viewed_on_start_date >= ?", Date.today - since)
19
+ .group("viewable_type, viewable_id")
20
+ .order(options[:order])
21
+ .limit(options[:limit])
22
+ end
23
+
24
+ def self.all_time(options = {})
25
+ options[:limit] ||= 10
26
+ options[:order] ||= "views DESC"
27
+
28
+ by_type("Monocle::OverallView")
29
+ .group("viewable_type, viewable_id")
30
+ .order(options[:order])
31
+ .limit(options[:limit])
32
+ end
33
+
34
+ def view!
35
+ increment!(:views)
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ module Monocle
2
+ module Views
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ has_one :overall_view, :as => :viewable, :dependent => :destroy, :class_name => "Monocle::OverallView"
7
+
8
+ %w( daily weekly monthly yearly ).each do |time_span|
9
+ has_many "#{time_span}_views".to_sym, :as => :viewable, :dependent => :destroy, :class_name => "Monocle::#{time_span.classify}View"
10
+ end
11
+ end
12
+
13
+ module ClassMethods
14
+ def viewed_since(since, options = {})
15
+ View.since(since, { :viewable_type => self }.merge(options))
16
+ end
17
+ end
18
+
19
+ delegate :views, :to => :overall_view, :prefix => :overall, :allow_nil => true
20
+
21
+ def view!
22
+ view = DailyView.find_or_create_by_viewable_type_and_viewable_id_and_viewed_on_start_date(self.class.name, id, Date.today)
23
+ view.view!
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,5 @@
1
+ module Monocle
2
+ class WeeklyView < View
3
+ validates_presence_of :viewed_on_start_date
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Monocle
2
+ class YearlyView < View
3
+ validates_presence_of :viewed_on_start_date
4
+ end
5
+ end
data/monocle.gemspec ADDED
@@ -0,0 +1,100 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{monocle}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Russ Smith"]
12
+ s.date = %q{2011-05-02}
13
+ s.description = %q{A history of view events.}
14
+ s.email = %q{russ@bashme.org}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "LICENSE.txt",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "lib/generators/monocle/install_generator.rb",
28
+ "lib/generators/monocle/templates/migration.rb",
29
+ "lib/monocle.rb",
30
+ "lib/monocle/daily_view.rb",
31
+ "lib/monocle/monthly_view.rb",
32
+ "lib/monocle/overall_view.rb",
33
+ "lib/monocle/server.rb",
34
+ "lib/monocle/view.rb",
35
+ "lib/monocle/views.rb",
36
+ "lib/monocle/weekly_view.rb",
37
+ "lib/monocle/yearly_view.rb",
38
+ "monocle.gemspec",
39
+ "spec/db/migrate/20110502201938_create_viewables.rb",
40
+ "spec/db/migrate/20110502223022_create_monocle_views.rb",
41
+ "spec/spec_helper.rb",
42
+ "spec/view_spec.rb",
43
+ "spec/viewable_spec.rb"
44
+ ]
45
+ s.homepage = %q{http://github.com/russ/monocle}
46
+ s.licenses = ["MIT"]
47
+ s.require_paths = ["lib"]
48
+ s.rubygems_version = %q{1.5.0}
49
+ s.summary = %q{A history of view events.}
50
+ s.test_files = [
51
+ "spec/db/migrate/20110502201938_create_viewables.rb",
52
+ "spec/db/migrate/20110502223022_create_monocle_views.rb",
53
+ "spec/spec_helper.rb",
54
+ "spec/view_spec.rb",
55
+ "spec/viewable_spec.rb"
56
+ ]
57
+
58
+ if s.respond_to? :specification_version then
59
+ s.specification_version = 3
60
+
61
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
62
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
63
+ s.add_development_dependency(%q<database_cleaner>, [">= 0"])
64
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
65
+ s.add_development_dependency(%q<mocha>, [">= 0"])
66
+ s.add_development_dependency(%q<rails>, [">= 0"])
67
+ s.add_development_dependency(%q<rcov>, [">= 0"])
68
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
69
+ s.add_development_dependency(%q<sinatra>, [">= 0"])
70
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
71
+ s.add_development_dependency(%q<shoulda-matchers>, ["= 1.0.0.beta1"])
72
+ s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
73
+ else
74
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
75
+ s.add_dependency(%q<database_cleaner>, [">= 0"])
76
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
77
+ s.add_dependency(%q<mocha>, [">= 0"])
78
+ s.add_dependency(%q<rails>, [">= 0"])
79
+ s.add_dependency(%q<rcov>, [">= 0"])
80
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
81
+ s.add_dependency(%q<sinatra>, [">= 0"])
82
+ s.add_dependency(%q<sqlite3>, [">= 0"])
83
+ s.add_dependency(%q<shoulda-matchers>, ["= 1.0.0.beta1"])
84
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
85
+ end
86
+ else
87
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
88
+ s.add_dependency(%q<database_cleaner>, [">= 0"])
89
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
90
+ s.add_dependency(%q<mocha>, [">= 0"])
91
+ s.add_dependency(%q<rails>, [">= 0"])
92
+ s.add_dependency(%q<rcov>, [">= 0"])
93
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
94
+ s.add_dependency(%q<sinatra>, [">= 0"])
95
+ s.add_dependency(%q<sqlite3>, [">= 0"])
96
+ s.add_dependency(%q<shoulda-matchers>, ["= 1.0.0.beta1"])
97
+ s.add_dependency(%q<yard>, ["~> 0.6.0"])
98
+ end
99
+ end
100
+
@@ -0,0 +1,11 @@
1
+ class CreateViewables < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :viewables do |t|
4
+ t.timestamps
5
+ end
6
+ end
7
+
8
+ def self.down
9
+ drop_table :viewables
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ class CreateMonocleViews < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :views do |t|
4
+ t.string :viewable_type
5
+ t.integer :viewable_id
6
+ t.string :type
7
+ t.date :viewed_on_start_date
8
+ t.integer :views, :default => 0
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :views, [ :type, :viewable_type, :viewable_id, :views ], :name => :viewable_type_views
13
+ add_index :views, [ :type, :viewable_type, :viewed_on_start_date, :viewable_id, :views ], :name => :viewable_type_start_date_views
14
+ add_index :views, [ :type, :viewable_type, :viewed_on_start_date, :viewable_id ], :name => :unique_time_period_views, :unique => true
15
+ add_index :views, [ :viewable_type, :viewable_id], :name => :index_views_on_viewable_type_and_viewable_id
16
+ end
17
+
18
+ def self.down
19
+ drop_table :views
20
+ end
21
+ end
@@ -0,0 +1,44 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require "rspec"
4
+ require "monocle"
5
+
6
+ require "rails"
7
+ require "active_record"
8
+ require "database_cleaner"
9
+ require "shoulda-matchers"
10
+
11
+ ActiveRecord::Migration.verbose = false
12
+ ActiveRecord::Base.logger = Logger.new(nil)
13
+
14
+ ActiveRecord::Base.establish_connection(
15
+ :adapter => "sqlite3",
16
+ :database => File.expand_path("spec/db/monocle.sqlite3"))
17
+
18
+ ActiveRecord::Migrator.migrate(File.expand_path("spec/db/migrate"))
19
+
20
+ # Requires supporting files with custom matchers and macros, etc,
21
+ # in ./support/ and its subdirectories.
22
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
23
+
24
+ def create_view(options = {})
25
+ values = {
26
+ :viewable_type => "Viewable",
27
+ :viewable_id => 1,
28
+ :viewed_on_start_date => Time.now - 10.days,
29
+ :views => 10 }.merge(options)
30
+
31
+ %w( Daily Weekly Monthly Yearly Overall ).each do |time_span|
32
+ klass = "Monocle::#{time_span}View".constantize
33
+ klass.create(values)
34
+ end
35
+ end
36
+
37
+ RSpec.configure do |config|
38
+ config.mock_with :mocha
39
+
40
+ config.after(:each) do
41
+ DatabaseCleaner.strategy = :truncation
42
+ DatabaseCleaner.clean
43
+ end
44
+ end
data/spec/view_spec.rb ADDED
@@ -0,0 +1,36 @@
1
+ require "spec_helper"
2
+
3
+ include Monocle
4
+
5
+ describe View do
6
+ describe "since" do
7
+ before do
8
+ 50.times do |i|
9
+ create_view(
10
+ :viewable_id => i,
11
+ :viewed_on_start_date => Time.now - i.days,
12
+ :views => rand(100))
13
+ end
14
+ end
15
+
16
+ # TODO: Find a decent way to test this.
17
+ it "returns most viewed objects since the given date" do
18
+ View.since(7.days).all.count.should == 8
19
+ end
20
+ end
21
+
22
+ describe "all_time" do
23
+ before do
24
+ 50.times do |i|
25
+ create_view(
26
+ :viewable_id => i,
27
+ :viewed_on_start_date => Time.now - i.days,
28
+ :views => rand(100))
29
+ end
30
+ end
31
+
32
+ it "returns most viewed objects of all time" do
33
+ View.all_time.all.count.should == 10
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ require "spec_helper"
2
+
3
+ class Viewable < ActiveRecord::Base
4
+ include Monocle::Views
5
+ end
6
+
7
+ describe Viewable do
8
+ subject { Viewable.new }
9
+
10
+ it { should have_one(:overall_view) }
11
+ it { should have_many(:daily_views) }
12
+ it { should have_many(:weekly_views) }
13
+ it { should have_many(:monthly_views) }
14
+ it { should have_many(:yearly_views) }
15
+
16
+ describe "view!" do
17
+ before do
18
+ subject.save!
19
+ end
20
+
21
+ it "should increment overall view count" do
22
+ subject.view!
23
+ subject.overall_views.should == 1
24
+ end
25
+
26
+ %w( daily weekly monthly yearly ).each do |time_span|
27
+ it "should increment #{time_span} view count" do
28
+ 5.times do |i|
29
+ view = "#{time_span}_views"
30
+ subject.view!
31
+ subject.send(view).first.views.should == i + 1
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
metadata ADDED
@@ -0,0 +1,207 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: monocle
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Russ Smith
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-05-02 00:00:00 -07:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: bundler
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 1.0.0
24
+ type: :development
25
+ prerelease: false
26
+ version_requirements: *id001
27
+ - !ruby/object:Gem::Dependency
28
+ name: database_cleaner
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: jeweler
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.2
46
+ type: :development
47
+ prerelease: false
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: mocha
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: rails
62
+ requirement: &id005 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: "0"
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: rcov
73
+ requirement: &id006 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: "0"
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: rspec
84
+ requirement: &id007 !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 2.3.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: sinatra
95
+ requirement: &id008 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: "0"
101
+ type: :development
102
+ prerelease: false
103
+ version_requirements: *id008
104
+ - !ruby/object:Gem::Dependency
105
+ name: sqlite3
106
+ requirement: &id009 !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: "0"
112
+ type: :development
113
+ prerelease: false
114
+ version_requirements: *id009
115
+ - !ruby/object:Gem::Dependency
116
+ name: shoulda-matchers
117
+ requirement: &id010 !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - "="
121
+ - !ruby/object:Gem::Version
122
+ version: 1.0.0.beta1
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: yard
128
+ requirement: &id011 !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ~>
132
+ - !ruby/object:Gem::Version
133
+ version: 0.6.0
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: *id011
137
+ description: A history of view events.
138
+ email: russ@bashme.org
139
+ executables: []
140
+
141
+ extensions: []
142
+
143
+ extra_rdoc_files:
144
+ - LICENSE.txt
145
+ - README.rdoc
146
+ files:
147
+ - .document
148
+ - .rspec
149
+ - Gemfile
150
+ - LICENSE.txt
151
+ - README.rdoc
152
+ - Rakefile
153
+ - VERSION
154
+ - lib/generators/monocle/install_generator.rb
155
+ - lib/generators/monocle/templates/migration.rb
156
+ - lib/monocle.rb
157
+ - lib/monocle/daily_view.rb
158
+ - lib/monocle/monthly_view.rb
159
+ - lib/monocle/overall_view.rb
160
+ - lib/monocle/server.rb
161
+ - lib/monocle/view.rb
162
+ - lib/monocle/views.rb
163
+ - lib/monocle/weekly_view.rb
164
+ - lib/monocle/yearly_view.rb
165
+ - monocle.gemspec
166
+ - spec/db/migrate/20110502201938_create_viewables.rb
167
+ - spec/db/migrate/20110502223022_create_monocle_views.rb
168
+ - spec/spec_helper.rb
169
+ - spec/view_spec.rb
170
+ - spec/viewable_spec.rb
171
+ has_rdoc: true
172
+ homepage: http://github.com/russ/monocle
173
+ licenses:
174
+ - MIT
175
+ post_install_message:
176
+ rdoc_options: []
177
+
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ none: false
182
+ requirements:
183
+ - - ">="
184
+ - !ruby/object:Gem::Version
185
+ hash: -934015277967661700
186
+ segments:
187
+ - 0
188
+ version: "0"
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ none: false
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: "0"
195
+ requirements: []
196
+
197
+ rubyforge_project:
198
+ rubygems_version: 1.5.0
199
+ signing_key:
200
+ specification_version: 3
201
+ summary: A history of view events.
202
+ test_files:
203
+ - spec/db/migrate/20110502201938_create_viewables.rb
204
+ - spec/db/migrate/20110502223022_create_monocle_views.rb
205
+ - spec/spec_helper.rb
206
+ - spec/view_spec.rb
207
+ - spec/viewable_spec.rb