pagelime-rails 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddac54bee1ac47332a0054f74466c9b5e9a1a971
4
- data.tar.gz: 5c10ca005226fa7c5cdc4c0b1fd1e9b8389458d3
3
+ metadata.gz: fa1a0e99acbcdfb19c39cbfb2691e14939026d5f
4
+ data.tar.gz: 2ed9b3b3d00bc9c357b1b500197f57256152de17
5
5
  SHA512:
6
- metadata.gz: ee0f1f4b425a75ece577bdab6c018f03a3378029d4a52cb1deee1df9d3714e9ba4bd18230773d43b0703ff9f7c18a15ed1d767861c97bb546c300f4c3c39bc12
7
- data.tar.gz: a733dec1d73bb52d5a0dc769c1aba2686bba6aac0511547227ee229dc426ccc0bb6b836dd58b09add9c6fac9c876ff54640777e48df83e9a98fb658fad024105
6
+ metadata.gz: c3070f871611ac2b907772bae1c329c2dec404eed073f82682c3c578d3790b0771752d6b79c0d50606da747d0381a1366055694eff1ba1e80bfb59001e3ce2b5
7
+ data.tar.gz: fb2ac21c1ff0b9be04c823d2fd1c5f74b29ff218db25a37493aef2632df77bc48d6aa13c0d152b6391a49080ae90949847b4ccf7083f19e1d11ca751407dd0a5
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source "http://rubygems.org"
3
3
  # Example:
4
4
 
5
5
  gem 'pagelime-rack', '>= 0.4.4'
6
+ gem 'rails', '>= 2.3'
6
7
 
7
8
  # Add dependencies to develop your gem here.
8
9
  # Include everything needed to run rake, tests, features, etc.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -4,24 +4,15 @@ require 'pagelime/rails'
4
4
 
5
5
  Pagelime.logger.debug "PAGELIME CMS RAILS PLUGIN: pagelime-rails gem loaded"
6
6
 
7
- # start plugin
8
- if Rails::VERSION::MAJOR == 2
9
-
10
- # TODO: Use pagelime-rack for Rails 2.3+ instead of routes and controllers
11
-
12
- require_relative 'pagelime/rails2/routing_extensions'
13
-
14
- ActionController::Routing::RouteSet::Mapper.send :include, ::Pagelime::Rails::RoutingExtensions
15
-
16
- controllers_path = File.expand_path File.join(File.dirname(__FILE__), 'pagelime', 'rails2', 'controllers')
17
-
18
- # add dependencies to load paths
19
- $LOAD_PATH << controllers_path
20
- load_paths << controllers_path
21
- load_once_paths.delete(controllers_path)
7
+ # Support Rails 2.3+
8
+
9
+ if Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR >= 3
22
10
 
23
11
  Pagelime::Rails.initialize!
24
12
 
13
+ ::Rails.application.config.middleware.use Rack::Pagelime
14
+
25
15
  elsif Rails::VERSION::MAJOR >= 3
26
16
  require_relative 'pagelime/rails/engine'
27
- end
17
+ end
18
+
@@ -10,6 +10,11 @@ module Pagelime
10
10
  editable_content = capture(&block)
11
11
  processed_html = ::Pagelime.process_region(editable_content, request.path)
12
12
 
13
+ # tell pagelime-rack NOT to parse response body for whole page.
14
+ # this helper method automatically disables auto-processing,
15
+ # so all editable areas on this page need to use this helper method.
16
+ ::Rack::Pagelime.disable_processing_for_request(request)
17
+
13
18
  # output the final content
14
19
  concat(processed_html)
15
20
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pagelime-rails"
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Emil Anticevic", "Joel Van Horn"]
12
- s.date = "2013-09-24"
12
+ s.date = "2013-09-25"
13
13
  s.description = ""
14
14
  s.email = "emil@pagelime.com"
15
15
  s.extra_rdoc_files = [
@@ -29,8 +29,6 @@ Gem::Specification.new do |s|
29
29
  "lib/pagelime/rails/controller_extensions.rb",
30
30
  "lib/pagelime/rails/engine.rb",
31
31
  "lib/pagelime/rails/view_helper.rb",
32
- "lib/pagelime/rails2/controllers/pagelime_receiver_controller.rb",
33
- "lib/pagelime/rails2/routing_extensions.rb",
34
32
  "lib/tasks/pagelime.rake",
35
33
  "pagelime-rails.gemspec",
36
34
  "rails/init.rb",
@@ -49,15 +47,18 @@ Gem::Specification.new do |s|
49
47
 
50
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
49
  s.add_runtime_dependency(%q<pagelime-rack>, [">= 0.4.4"])
50
+ s.add_runtime_dependency(%q<rails>, [">= 2.3"])
52
51
  s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
53
52
  s.add_development_dependency(%q<jeweler>, [">= 1.6.4"])
54
53
  else
55
54
  s.add_dependency(%q<pagelime-rack>, [">= 0.4.4"])
55
+ s.add_dependency(%q<rails>, [">= 2.3"])
56
56
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
57
57
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
58
58
  end
59
59
  else
60
60
  s.add_dependency(%q<pagelime-rack>, [">= 0.4.4"])
61
+ s.add_dependency(%q<rails>, [">= 2.3"])
61
62
  s.add_dependency(%q<bundler>, [">= 1.0.0"])
62
63
  s.add_dependency(%q<jeweler>, [">= 1.6.4"])
63
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagelime-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Anticevic
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-24 00:00:00.000000000 Z
12
+ date: 2013-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pagelime-rack
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: 0.4.4
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '2.3'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '2.3'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: bundler
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -73,8 +87,6 @@ files:
73
87
  - lib/pagelime/rails/controller_extensions.rb
74
88
  - lib/pagelime/rails/engine.rb
75
89
  - lib/pagelime/rails/view_helper.rb
76
- - lib/pagelime/rails2/controllers/pagelime_receiver_controller.rb
77
- - lib/pagelime/rails2/routing_extensions.rb
78
90
  - lib/tasks/pagelime.rake
79
91
  - pagelime-rails.gemspec
80
92
  - rails/init.rb
@@ -1,16 +0,0 @@
1
- class PagelimeReceiverController < ApplicationController
2
-
3
- def index
4
- ::Rails.logger.debug "PAGELIME RAILS RECEIVER index"
5
- status, headers, body = Rack::Pagelime.handle_status_check(request)
6
-
7
- render :inline => body.string, :status => status
8
- end
9
-
10
- def after_publish_callback
11
- ::Rails.logger.debug "PAGELIME RAILS RECEIVER after_publish_callback"
12
- status, headers, body = Rack::Pagelime.handle_publish_callback(request)
13
-
14
- render :inline => body.string, :status => status
15
- end
16
- end
@@ -1,9 +0,0 @@
1
- module Pagelime #:nodoc:
2
- module Rails2 #:nodoc:
3
- module RoutingExtensions
4
- def cms_routes
5
- @set.add_route "/pagelime/:action", :controller => "pagelime_receiver"
6
- end
7
- end
8
- end
9
- end