pagelime-rack 0.4.4 → 0.4.5

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: fdec71cd996f8f302c5fd9bef4554d1189c7ad61
4
- data.tar.gz: e1ae03616bbb61da3a4f261b359d22df1eba153f
3
+ metadata.gz: 20b395260f6d73157b27aa561962d6ef43460ecf
4
+ data.tar.gz: f0f2e5d5d24e8794b90ba0b44a0da6f4150e7640
5
5
  SHA512:
6
- metadata.gz: 349138a21b9189f7bad9bc7c7dfdf51247b666344b0ffdd025b96b3f14d0c954e866edf314694b04521a4836121024bfb626bde56612a02ec9517824af819a64
7
- data.tar.gz: 8e1b9e818b8f3ce2f4405829309de29758449e927b1d4d26068d245d74964ad33440d8ed0ebd96f70a82394656999c5a9287638ebda389703662908142092efc
6
+ metadata.gz: 73dd79df207cc33834983fa1a5147462f3b5d7b1df1157e01dfee4fb82520200f593c95bf5bca74ec506f6c16306e43b1b5798d377c4cae05d9a9e48f99d73d8
7
+ data.tar.gz: 0cc3d0a8f4c7ba00eb518610ae89dc59a5f2fdc10f9063a5d12db0e560434ccbf01ef71d62731ba46786309803eb0d425fcd6aca3bbd27f4f9414cd73c5d2fab
data/README.md CHANGED
@@ -81,16 +81,18 @@ If you have a standalone Pagelime account, simply go to [pagelime.com](http://pa
81
81
 
82
82
  Sinatra Sample
83
83
  --------------
84
-
84
+
85
+ # Set the environment variables BEFORE requiring the pagelime-rack gem
86
+
87
+ ENV['PAGELIME_ACCOUNT_KEY'] = "..."
88
+ ENV['PAGELIME_ACCOUNT_SECRET'] = "..."
89
+ ENV['PAGELIME_RACK_API_VERSION'] = "1.0"
90
+
91
+ # Setup Sinatra app
92
+
85
93
  require 'sinatra'
86
94
  require 'pagelime-rack'
87
95
 
88
- configure :development do
89
- ENV['PAGELIME_ACCOUNT_KEY'] = "..."
90
- ENV['PAGELIME_ACCOUNT_SECRET'] = "..."
91
- ENV['PAGELIME_RACK_API_VERSION'] = "1.0"
92
- end
93
-
94
96
  use Rack::Pagelime
95
97
 
96
98
  get '/page/about' do
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.4.5
@@ -4,6 +4,9 @@ module Pagelime
4
4
  module Clients
5
5
  class XmlProcessor
6
6
 
7
+ EDITABLE_REGION_CSS_SELECTOR = ".cms-editable"
8
+ SHARED_REGION_CSS_SELECTOR = ".cms-shared"
9
+
7
10
  def process_document(storage, html, page_path = false)
8
11
  Pagelime.logger.debug "PAGELIME CMS RACK PLUGIN: Document HTML: #{html.inspect}"
9
12
 
@@ -50,8 +53,8 @@ module Pagelime
50
53
  end
51
54
 
52
55
  # use nokogiri to replace contents
53
- editable_regions = doc.css(".cms-editable")
54
- shared_regions = doc.css(".cms-shared")
56
+ editable_regions = doc.css(EDITABLE_REGION_CSS_SELECTOR)
57
+ shared_regions = doc.css(SHARED_REGION_CSS_SELECTOR)
55
58
 
56
59
  patch_regions editable_regions, editable_content
57
60
  patch_regions shared_regions, shared_content
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pagelime-rack"
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5"
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 = "The Pagelime Rack Middleware will process outgoing HTML, look for editable areas, and replace the content with the appropriate HTML from the Pagelime CDN and cache it in memory if possible."
14
14
  s.email = "emil@pagelime.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagelime-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
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: nokogiri