pagelime-rack 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +62 -41
  3. data/pagelime-rack.gemspec +4 -3
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20b395260f6d73157b27aa561962d6ef43460ecf
4
- data.tar.gz: f0f2e5d5d24e8794b90ba0b44a0da6f4150e7640
3
+ metadata.gz: d3a122b7b63846454d19ab2b6d167fba6f6ae579
4
+ data.tar.gz: 35a8ac5a95173b235e4cd72eb251f3f7bfd4a86d
5
5
  SHA512:
6
- metadata.gz: 73dd79df207cc33834983fa1a5147462f3b5d7b1df1157e01dfee4fb82520200f593c95bf5bca74ec506f6c16306e43b1b5798d377c4cae05d9a9e48f99d73d8
7
- data.tar.gz: 0cc3d0a8f4c7ba00eb518610ae89dc59a5f2fdc10f9063a5d12db0e560434ccbf01ef71d62731ba46786309803eb0d425fcd6aca3bbd27f4f9414cd73c5d2fab
6
+ metadata.gz: 1c93b85cdee5e6958214820d2ed827d3c337382e426ba6aba0ef8f1beee75be30b573108376c0eadcb476aff7778d0eb7edede15688b676ef94079e31895cd39
7
+ data.tar.gz: f7554674b48afd006accc36ed67faade9033c7dc54b11dd37902fce68b180ce4f4d09c5550b4bd7dc4a84477f1b0ea83b6a57eb3fbdd411dfd3973a163730b32
data/README.md CHANGED
@@ -3,16 +3,23 @@ Pagelime Rack Plugin
3
3
 
4
4
  Easily add the Pagelime CMS to your Rack app.
5
5
 
6
- Pagelime is a simple CMS service that allows you to define editable regions in your content without installing any software on your site or app.
7
- Simply add a `class="cms-editable"` to any HTML element, and log-in to the Pagelime CMS service to edit your content and images with a nice UI.
6
+ Pagelime is a simple CMS service that allows you to define editable regions in your pages without installing any software on your website or app.
7
+ Simply add a `class="cms-editable"` to any HTML element, and log-in to the Pagelime CMS service to edit your content and images with a nice, simple UI.
8
8
  We host all of the code, content, and data until you publish a page.
9
- When you publish a page, we push the content to your site/app via secure FTP or web APIs.
9
+ When you publish a page, the PageLime CMS pushes the content to your website via secure FTP or an API.
10
+ Using the Rack middleware, we pull the new content into your app dynamically via an API.
10
11
 
11
- One line example:
12
+ ### Quick Start (1 line of code!)
12
13
 
13
- <div id="my_content" class="cms-editable">
14
- This content is now editable in Pagelime... no code... no databases... no fuss
15
- </div>
14
+ Simply add the `cms-editable` class and an `id` to make content editable:
15
+
16
+ ```html
17
+ <div id="my_content" class="cms-editable">
18
+ This content is now editable in Pagelime... no code... no databases... no fuss
19
+ </div>
20
+ ```
21
+
22
+ Done!
16
23
 
17
24
  Getting Started
18
25
  ---------------
@@ -26,11 +33,15 @@ Getting Started
26
33
 
27
34
  Edit your `Gemfile` and add
28
35
 
29
- gem "pagelime-rack"
36
+ ```ruby
37
+ gem "pagelime-rack"
38
+ ```
30
39
 
31
40
  then run
32
41
 
33
- bundle install
42
+ ```Bash
43
+ bundle install
44
+ ```
34
45
 
35
46
  ### Step 2: Setup your Pagelime credentials
36
47
 
@@ -43,28 +54,37 @@ Make sure that the "Integration Method" for your site on the advanced tab is set
43
54
 
44
55
  Set up your Environment variables: *(Skip if using Heroku add-on)*
45
56
 
46
- ENV['PAGELIME_ACCOUNT_KEY'] = "..."
47
- ENV['PAGELIME_ACCOUNT_SECRET'] = "..."
48
- ENV['PAGELIME_RACK_API_VERSION'] = "1.0"
57
+ ```ruby
58
+ ENV['PAGELIME_ACCOUNT_KEY'] = "..."
59
+ ENV['PAGELIME_ACCOUNT_SECRET'] = "..."
60
+ ENV['PAGELIME_RACK_API_VERSION'] = "1.0"
61
+ ```
49
62
 
50
63
  Optionally, enable caching:
51
64
 
52
- Pagelime.configure do |config|
53
- # object that responds to `fetch` and `delete`
54
- config.cache = ...
55
- # options passed to `fetch(key, options = {}, &block)`
56
- config.cache_fetch_options = { ... }
57
- end
65
+ ```ruby
66
+ Pagelime.configure do |config|
67
+
68
+ # object that responds to `fetch` and `delete`
69
+ config.cache = ...
70
+
71
+ # options passed to `fetch(key, options = {}, &block)`
72
+ config.cache_fetch_options = { ... }
73
+
74
+ end
75
+ ```
58
76
 
59
77
  ### Step 4: Make pages editable
60
78
 
61
79
  Create some editable regions in your views like so:
62
80
 
63
- <div id="my_content" class="cms-editable">
64
- this is now editable
65
- </div>
81
+ ```html
82
+ <div id="my_content" class="cms-editable">
83
+ this is now editable
84
+ </div>
85
+ ```
66
86
 
67
- *The ID and the class are required for the CMS to work*
87
+ *The `ID` and the `class` are required for the CMS to work*
68
88
 
69
89
  ### Step 5: Edit your pages!
70
90
 
@@ -78,27 +98,28 @@ From there you can edit any page in your Rack app!
78
98
 
79
99
  If you have a standalone Pagelime account, simply go to [pagelime.com](http://pagelime.com) and edit your site as usual (see Step 2).
80
100
 
81
-
82
101
  Sinatra Sample
83
102
  --------------
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
-
93
- require 'sinatra'
94
- require 'pagelime-rack'
95
-
96
- use Rack::Pagelime
97
-
98
- get '/page/about' do
99
- content_type "text/html"
100
- return '<div id="content" class="cms-editable">Hello World!</div>'
101
- end
103
+
104
+ ```ruby
105
+ # Set the environment variables BEFORE requiring the pagelime-rack gem
106
+
107
+ ENV['PAGELIME_ACCOUNT_KEY'] = "..."
108
+ ENV['PAGELIME_ACCOUNT_SECRET'] = "..."
109
+ ENV['PAGELIME_RACK_API_VERSION'] = "1.0"
110
+
111
+ # Setup Sinatra app
112
+
113
+ require 'sinatra'
114
+ require 'pagelime-rack'
115
+
116
+ use Rack::Pagelime
117
+
118
+ get '/page/about' do
119
+ content_type "text/html"
120
+ return '<div id="content" class="cms-editable">Hello World!</div>'
121
+ end
122
+ ```
102
123
 
103
124
  Copyright (c) 2013 Pagelime LLC, released under the MIT license
104
125
 
@@ -2,14 +2,15 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: pagelime-rack 0.4.6 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "pagelime-rack"
8
- s.version = "0.4.5"
9
+ s.version = "0.4.6"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
12
  s.authors = ["Emil Anticevic", "Joel Van Horn"]
12
- s.date = "2013-09-25"
13
+ s.date = "2014-02-11"
13
14
  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
15
  s.email = "emil@pagelime.com"
15
16
  s.extra_rdoc_files = [
@@ -40,7 +41,7 @@ Gem::Specification.new do |s|
40
41
  s.homepage = "http://github.com/eanticev/pagelime-rack"
41
42
  s.licenses = ["MIT"]
42
43
  s.require_paths = ["lib"]
43
- s.rubygems_version = "2.0.6"
44
+ s.rubygems_version = "2.1.5"
44
45
  s.summary = "Rack Middleware for integrating Pagelime into ruby frameworks"
45
46
 
46
47
  if s.respond_to? :specification_version then
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.5
4
+ version: 0.4.6
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-25 00:00:00.000000000 Z
12
+ date: 2014-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  version: '0'
145
145
  requirements: []
146
146
  rubyforge_project:
147
- rubygems_version: 2.0.6
147
+ rubygems_version: 2.1.5
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Rack Middleware for integrating Pagelime into ruby frameworks