monocle 0.1.0 → 0.1.1

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.rdoc CHANGED
@@ -1,6 +1,29 @@
1
1
  = monocle
2
2
 
3
- Description goes here.
3
+ Gemfile
4
+
5
+ gem "monocle"
6
+
7
+ Routes file
8
+
9
+ mount Monocle::Server.new, :at => "/monocle"
10
+
11
+ Your server config
12
+
13
+ location /monocle/ {
14
+ if ($request_method = GET) {
15
+ rewrite ^(/monocle/.*) /images/transparent.gif last;
16
+ }
17
+
18
+ if ($request_method = POST) {
19
+ proxy_pass http://application;
20
+ rewrite ^(/monocle/.*) $1 break;
21
+ }
22
+ }
23
+
24
+ Javascript in your views
25
+
26
+ $.post("/monocle/my_object_type/my_object_id.gif");
4
27
 
5
28
  == Contributing to monocle
6
29
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -2,7 +2,7 @@ require "sinatra/base"
2
2
 
3
3
  module Monocle
4
4
  class Server < Sinatra::Base
5
- post "/:type/:id" do
5
+ post "/:type/:id(.:format)" do
6
6
  begin
7
7
  params[:type].classify.constantize.find(params[:id]).view!
8
8
  ActiveRecord::Base.clear_active_connections!
@@ -11,10 +11,5 @@ module Monocle
11
11
  "o_0"
12
12
  end
13
13
  end
14
-
15
- get "/:type/:id" do
16
- content_type("image/gif")
17
- File.open(File.join(File.dirname(__FILE__), "..", "transparent.gif"))
18
- end
19
14
  end
20
15
  end
data/monocle.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{monocle}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Russ Smith"]
12
- s.date = %q{2011-08-30}
12
+ s.date = %q{2011-08-31}
13
13
  s.description = %q{A history of view events.}
14
14
  s.email = %q{russ@bashme.org}
15
15
  s.extra_rdoc_files = [
@@ -35,13 +35,13 @@ Gem::Specification.new do |s|
35
35
  "lib/monocle/views.rb",
36
36
  "lib/monocle/weekly_view.rb",
37
37
  "lib/monocle/yearly_view.rb",
38
- "lib/transparent.gif",
39
38
  "monocle.gemspec",
40
39
  "spec/db/migrate/20110502201938_create_viewables.rb",
41
40
  "spec/db/migrate/20110502223022_create_monocle_views.rb",
42
41
  "spec/spec_helper.rb",
43
42
  "spec/view_spec.rb",
44
- "spec/viewable_spec.rb"
43
+ "spec/viewable_spec.rb",
44
+ "transparent.gif"
45
45
  ]
46
46
  s.homepage = %q{http://github.com/russ/monocle}
47
47
  s.licenses = ["MIT"]
File without changes
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: monocle
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Russ Smith
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-30 00:00:00 -07:00
13
+ date: 2011-08-31 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -162,13 +162,13 @@ files:
162
162
  - lib/monocle/views.rb
163
163
  - lib/monocle/weekly_view.rb
164
164
  - lib/monocle/yearly_view.rb
165
- - lib/transparent.gif
166
165
  - monocle.gemspec
167
166
  - spec/db/migrate/20110502201938_create_viewables.rb
168
167
  - spec/db/migrate/20110502223022_create_monocle_views.rb
169
168
  - spec/spec_helper.rb
170
169
  - spec/view_spec.rb
171
170
  - spec/viewable_spec.rb
171
+ - transparent.gif
172
172
  has_rdoc: true
173
173
  homepage: http://github.com/russ/monocle
174
174
  licenses:
@@ -183,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - ">="
185
185
  - !ruby/object:Gem::Version
186
- hash: 1828198344324255211
186
+ hash: -1431136823852847594
187
187
  segments:
188
188
  - 0
189
189
  version: "0"