contentment 0.7.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.3@contentment --create
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in contentment.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Bob Larrick
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'contentment/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "contentment"
8
+ gem.version = Contentment::VERSION
9
+ gem.authors = ["Bob Larrick"]
10
+ gem.email = ["larrick@gmail.com"]
11
+ gem.description = "Rails Engine for simple content management. See readme on github for details."
12
+ gem.extra_rdoc_files = ["README.rdoc"]
13
+
14
+ gem.summary = "Rails Engine for simple content management."
15
+ gem.homepage = "https://github.com/deathbob/Contentment"
16
+ gem.rubyforge_project = "contentment"
17
+
18
+ gem.files = `git ls-files`.split($/)
19
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
+ gem.require_paths = ["lib"]
22
+
23
+ gem.add_runtime_dependency 'tinymce-rails'
24
+ end
data/lib/contentment.rb CHANGED
@@ -1,8 +1,5 @@
1
+ require "contentment/version"
2
+
1
3
  module Contentment
2
- # This require basically states that we're going to require the engine
3
- # if you are using rails and your rails version is 3.x..
4
- require 'contentment/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
4
+ require 'contentment/engine'
5
5
  end
6
- # Adding a couple of extra files here and you can view all of the source
7
- # to see what they have in them.
8
- require 'extensions/action_controller/base'
@@ -1,5 +1,7 @@
1
1
  require "contentment"
2
2
  require "rails"
3
+ require 'tinymce-rails'
4
+
3
5
  #require "action_controller"
4
6
 
5
7
  # http://edgeapi.rubyonrails.org/classes/Rails/Engine.html
@@ -0,0 +1,3 @@
1
+ module Contentment
2
+ VERSION = "0.8.3"
3
+ end
@@ -1,36 +1,40 @@
1
- <%= content_for :scripts do %>
2
- <script src='/javascripts/tinymce_hammer.js' type='text/javascript'></script>
3
- <script type='text/javascript'>
4
- TinymceHammer = {
5
- init : function() {
6
- var init = { paste_convert_headers_to_strong : true,
7
- paste_convert_middot_lists : true,
8
- paste_remove_spans : true,
9
- paste_remove_styles : true,
10
- paste_strip_class_attributes : true,
11
- theme : "advanced",
12
- theme_advanced_buttons1 : "undo,redo,cut,copy,paste,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,|,cleanup,code",
13
- theme_advanced_buttons2 : "",
14
- theme_advanced_buttons3 : "",
15
- theme_advanced_toolbar_align : "left",
16
- theme_advanced_toolbar_location : "top",
17
- valid_elements : "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",
18
- setup : function(ed) { ed.onKeyUp.add(function(ed, evt) { var iframe = document.getElementById('content_body_ifr'); var paul = iframe.contentWindow.document.body.innerHTML; $('.content_preview_body').html(paul); }); } };
19
- init.mode = 'specific_textareas';
20
- init.editor_selector = 'tinymce';
21
- init.plugins = 'paste';
22
- init.language = 'en';
23
-
24
- tinyMCE.init(init);
25
- },
1
+ <%= tinymce_assets %>
2
+
3
+ <%= content_for :javascript do %>
4
+ <script type="text/javascript">
5
+ $(document).ready(function(){$('.edit_content').keyup(function(){$('.content_preview_title').html($('#content_title').val());});})
6
+ </script>
7
+
8
+ <script type="text/javascript">
9
+ tinyMCE.init({
10
+ mode: 'specific_textareas',
11
+ plugins: 'paste',
12
+ language: 'en',
26
13
  addEditor : function(dom_id) {
27
14
  tinyMCE.execCommand('mceAddControl', true, dom_id);
28
- }
29
- }
30
- DomReady.ready(TinymceHammer.init);
15
+ },
16
+ setup : function(ed) {
17
+ ed.onKeyUp.add(function(ed, evt) {
18
+ var iframe = document.getElementById('content_body_ifr'); var paul = iframe.contentWindow.document.body.innerHTML; $('.content_preview_body').html(paul);
19
+ });
20
+ },
21
+ paste_convert_headers_to_strong : true,
22
+ paste_convert_middot_lists : true,
23
+ paste_remove_spans : true,
24
+ paste_remove_styles : true,
25
+ paste_strip_class_attributes : true,
26
+ theme : "advanced",
27
+ theme_advanced_buttons1 : "undo,redo,cut,copy,paste,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,|,cleanup,code",
28
+ theme_advanced_buttons2 : "",
29
+ theme_advanced_buttons3 : "",
30
+ theme_advanced_toolbar_align : "left",
31
+ theme_advanced_toolbar_location : "top",
32
+ valid_elements : "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big"
33
+ });
31
34
  </script>
32
35
  <% end %>
33
36
 
37
+
34
38
  <%= link_to 'New content', new_content_path, :class => 'button', :id => "add-content" %>
35
39
  <%= link_to "Back to Content List", contents_path, :class => 'button', :id => 'back-to-contents' %>
36
40
  <div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contentment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,17 +9,17 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-17 00:00:00.000000000 Z
12
+ date: 2012-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: jeweler
15
+ name: tinymce-rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
- type: :development
22
+ type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
@@ -29,15 +29,25 @@ dependencies:
29
29
  version: '0'
30
30
  description: Rails Engine for simple content management. See readme on github for
31
31
  details.
32
- email: larrick@gmail.com
32
+ email:
33
+ - larrick@gmail.com
33
34
  executables: []
34
35
  extensions: []
35
36
  extra_rdoc_files:
36
37
  - README.rdoc
37
38
  files:
39
+ - .gitignore
40
+ - .rvmrc
41
+ - Gemfile
42
+ - Gemfile.lock
43
+ - LICENSE.txt
44
+ - README.rdoc
45
+ - Rakefile
38
46
  - config/routes.rb
47
+ - contentment.gemspec
39
48
  - lib/contentment.rb
40
49
  - lib/contentment/engine.rb
50
+ - lib/contentment/version.rb
41
51
  - lib/extensions/action_controller/base.rb
42
52
  - lib/generators/contentment/contentment_views_templates/contents/_form.html.erb
43
53
  - lib/generators/contentment/contentment_views_templates/contents/_preview.html.erb
@@ -52,7 +62,7 @@ files:
52
62
  - lib/generators/contentment/templates/migration.rb
53
63
  - lib/generators/contentment_generator.rb
54
64
  - lib/generators/contentment_views_generator.rb
55
- - README.rdoc
65
+ - pkg/contentment-0.7.1.gem
56
66
  homepage: https://github.com/deathbob/Contentment
57
67
  licenses: []
58
68
  post_install_message: