pagelime-rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWI4NGZiMTQ5ZGY4YWE4NmQxN2I3YzFkNzYzMzJhYTNjMDEyMTA4Yw==
4
+ MTViNzIyMTI1MzU3ZTc4MzljNmQyMzg5ZjVhYjI1ZTRhYThhYWJhYQ==
5
5
  data.tar.gz: !binary |-
6
- OGMxNTZlMThjZjM0MjEyNWFlMmRiM2E5YjVhM2I2NzI3MGQzN2FkYg==
6
+ ZWMwY2YxZGJkMmY3ZjEzYWI3ZTg0NjQ0NmE1MzA3OTUzZjZmZTIzMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- OTg4MjQwMTEwZGMyNTFjYjNkNjc1NTU1OWNkMThmMTg1NDZhYWU4YjZmMmRh
10
- M2M1MzY3MWUyOTUyZWU5YzEwODc2YWUzZDFlNmUwMjU4Mjg5Y2UwNzJiYmVm
11
- OTUzMGQ5ZmUyOWMyMGM3MjEyMDU3NTMwMjExYjQwOWE2M2U3YzE=
9
+ MTRlNGQ0ODdjMjcxNTJmODRkNmUxYjFhN2VmZDhkY2Q3MGYxNjk2YjVhYzMy
10
+ NWUxYzIzMDNkMGEwNjAzOGVmOTg1YTViYzliZjIzNDg0NThmNWJhYTFlNGI1
11
+ MTU0MzBkMjZkMmE3YWI5MGJhZWNiZGM3MGMxNDc4YzAyMmQwN2M=
12
12
  data.tar.gz: !binary |-
13
- NDE0OWZiZDA5ZjNiNzM3NzI3M2JjMjQ4ZDllN2ExMTc4OWFlNDdiYzkxNzhj
14
- ZWQ4MTM1MmI0ZmFkOGUyMTNhMTE5MzMxMGJlOTljMGY5ZjI3ZTViYTZiYjc4
15
- MDg1ZTRiMzZmNTIxYmZhMjg5YmM2M2YwNzcxYWI3ZGZjNzNkOGU=
13
+ YTQ1ZGFlZGE2NTBhNzFhYTg4NWQ3YzQ4ODA1YTBlMGQ0NjRhNWJmNzczMjdi
14
+ OGUyZWNmYmFmOTdhZjM0YjRjZDU3NTQwY2ZhNWRlYzlhMTFkMTZmZGFjNjlm
15
+ NjEwNGI4NWFkZDkwZDExYTdhMWE0MWI4NGIzZjk5ZGE3MjEwNDY=
data/Readme.md CHANGED
@@ -1,81 +1,102 @@
1
1
  Pagelime Rails Plugin
2
2
  =====================
3
3
 
4
- Easily add the Pagelime CMS to your rails app.
4
+ Easily add the Pagelime CMS to your Rails 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. 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. We host all of the code, content, and data until you publish a page. When you publish a page, we push the content to your site/app via secure FTP or web APIs.
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.
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.
7
10
 
8
11
  One line example:
9
- `<div id="my_content" class="cms-editable">This content is now editable in Pagelime... no code... no databases... no fuss</div>`
12
+
13
+ <div id="my_content" class="cms-editable">
14
+ This content is now editable in Pagelime... no code... no databases... no fuss
15
+ </div>
10
16
 
11
17
  Getting Started
12
18
  ---------------
13
19
 
14
- Requirements:
15
-
16
- * Pagelime account (either a standalone from pagelime.com or as a Heroku add-on)
17
- * Nokogiri gem
20
+ ### Requirements
18
21
 
19
- ### Step 1. (Skip if using Heroku add-on)
20
- If NOT on Heroku, set up a site for your Rails app in Pagelime. Make sure that the "Integration Method" for your site on the advanced tab is set to "web services"
22
+ * Pagelime account (either standalone [pagelime.com](http://pagelime.com) or via the [Pagelime Heroku add-on](https://addons.heroku.com/pagelime))
23
+ * [Pagelime Rack gem](https://github.com/eanticev/pagelime_rack) (`pagelime-rack`)
21
24
 
22
- ### Step 2.
23
- Require the **pagelime_rails** gem
25
+ ### Step 1: Install the Pagelime Rails gem
24
26
 
25
27
  #### For Rails 2
26
- edit your `config/environment.rb` file and add:
27
28
 
28
- `config.gem "pagelime_rails"`
29
+ Edit your `config/environment.rb` file and add:
30
+
31
+ config.gem "pagelime-rails"
29
32
 
30
33
  then run
31
34
 
32
- `rake gems:install`
35
+ rake gems:install
33
36
 
34
37
  #### For Rails 3
35
- edit your `Gemfile` and add
36
38
 
37
- `gem "pagelime_rails"`
39
+ Edit your `Gemfile` and add
40
+
41
+ gem "pagelime-rails"
38
42
 
39
43
  then run
40
44
 
41
- `bundle install`
45
+ bundle install
42
46
 
43
- ### Step 3. (Only for Rails 2.3.X)
44
- Add the plugin routes to your `config/routes.rb` configuration:
47
+ ### Step 2: Setup your Pagelime credentials
45
48
 
46
- `map.cms_routes`
49
+ *(Skip if using Heroku add-on)*
47
50
 
48
- These routes are used by Pagelime to clear any caches after save and publish events on your files.
51
+ If you are NOT using the [Pagelime Heroku add-on](https://addons.heroku.com/pagelime), set up an account at [pagelime.com](http://pagelime.com).
52
+ Make sure that the "Integration Method" for your site on the advanced tab is set to "web services".
49
53
 
50
- *Rails 3 does not need this statement, as the plugin will behave as an engine*
54
+ ### Step 3: Configure your application
51
55
 
52
- ### Step 4.
53
- For any controller that renders views that you want editable, add the acts_as_cms_editable behavior like so:
56
+ For any controller that renders views that you want editable, add the `acts_as_cms_editable` behavior like so:
54
57
 
55
58
  class CmsPagesController < ApplicationController
56
- # attach the cms behavior to the controller
57
- acts_as_cms_editable
58
-
59
- def index
60
- end
59
+ # attach the cms behavior to the controller
60
+ acts_as_cms_editable
61
+
62
+ def index
63
+ end
61
64
  end
62
65
 
63
66
  You can pass an `:except` parameter just like with a filter like so:
64
67
 
65
- `acts_as_cms_editable :except => :index`
68
+ acts_as_cms_editable :except => :index
69
+
70
+ #### Only for Rails 2.3.x
71
+
72
+ Add the plugin routes to your `config/routes.rb` configuration:
73
+
74
+ map.cms_routes
75
+
76
+ These routes are used by Pagelime to clear any caches after save and publish events on your files.
77
+
78
+ *Rails 3 does not need this statement, as the plugin will behave as an engine*
79
+
80
+ #### Additional configuration options
81
+
82
+ *Read the [`pagelime-rack`](https://github.com/eanticev/pagelime_rack) documentation for more configuration options.*
83
+
84
+ ### Step 4: Make pages editable
66
85
 
67
- ### Step 5.
68
86
  Create some editable regions in your views like so:
69
87
 
70
- `<div id="my_content" class="cms-editable">this is now editable</div>`
88
+ <div id="my_content" class="cms-editable">
89
+ this is now editable
90
+ </div>
71
91
 
72
92
  *The ID and the class are required for the CMS to work*
73
93
 
74
- ### Step 6. (OPTIONAL)
75
- If you don't want to have your entire controller CMS editable for some reason, you can sorround areas in your view with a code block like so:
94
+ Optionally: If you don't want to have your entire controller CMS editable for some reason, you can sorround areas in your view with a code block like so:
76
95
 
77
- <% cms_content do %>
78
- <div id="my_content" class="cms-editable">hello world</div>
79
- <% end %>
96
+ <% cms_content do %>
97
+ <div id="my_content" class="cms-editable">
98
+ hello world
99
+ </div>
100
+ <% end %>
80
101
 
81
- Copyright (c) 2011 Pagelime LLC, released under the MIT license
102
+ Copyright (c) 2013 Pagelime LLC, released under the MIT license
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -1,3 +1,4 @@
1
+ require 'pagelime-rack'
1
2
  require 'pagelime'
2
3
  require 'pagelime/rails'
3
4
  require 'pagelime/s3_rails_cache'
@@ -1,5 +1,5 @@
1
1
  module Pagelime
2
- class S3RailsCache < Pagelime::S3Client
2
+ class S3RailsCache < S3Client
3
3
  module ClassMethods
4
4
  def generate_cache_key(page_path, format = default_format)
5
5
  "pagelime:cms:#{format}:page:#{Base64.encode64(page_path)}"
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "pagelime-rails"
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
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"]
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Anticevic