bootswatch_rails 3.2.0.5 → 3.2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3c344b92b61ceb173ea1790efddd1f91107e295
4
- data.tar.gz: 4844ff5a0da9ac97382b9c2902484ab935d83af1
3
+ metadata.gz: f6a54686faadd2437f11022775b8576a65dd4db6
4
+ data.tar.gz: 2bff2c7b5dcd811048bf33df4b3a029b7cff6579
5
5
  SHA512:
6
- metadata.gz: 7805469a5f9c97aeea9ff23250d9e978ad2de60f42b1050f8aabf3128d8846d89af8341249da891753e8110e11f2f58fb506b285843304161cf00ca5cc60192d
7
- data.tar.gz: 0f1675486651aec502d9c22e1fe2ad0d8d329992aff85780e6ebeb2de2df457ce1701e7925b206be401257eb00603417c6c465e4bd5f0cf9cc3b6de89a2f8978
6
+ metadata.gz: 239e699fc376fcdfbf0340a2465173eca8949e3e91908c4d899156a9b5aeada1bd3ab189ca11f417995fd5648364c48ed1c277340b0a630c7117a243e38974c3
7
+ data.tar.gz: d5cb72490e9a1865e59c00d9b2ae6da03f5b107c89f73fa6e049e71f4a45c80db1f23fba29e66a3da0643dcbca5d3477e22173a38bda846ab82da17f8d95c5a3
@@ -1,5 +1,5 @@
1
1
  module BootswatchRails
2
- VERSION = "3.2.0.5"
2
+ VERSION = "3.2.0.6"
3
3
  THEMES = [:amelia, :cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
4
4
  DEFAULT = 1
5
5
  end
@@ -0,0 +1,29 @@
1
+ require 'rails/generators/active_record'
2
+
3
+ module BootswatchRails
4
+ module Generators
5
+ class CleditorGenerator < ActiveRecord::Generators::Base
6
+ desc "Turn text_area(s) into rich edit fields with CLEditor"
7
+ argument :name, type: :string,
8
+ desc: "The resource with textareas to be enhanced"
9
+ argument :columns, type: :array, banner: "COLUMN [...]",
10
+ desc: "The names of the textarea columns"
11
+ source_root File.expand_path('../templates', __FILE__)
12
+
13
+ def add_to_assets
14
+ file = "app/assets/javascripts/application.js"
15
+ inject_into_file file, "\n//= require jquery.cleditor", after: /require jquery_ujs$/
16
+ file = "app/assets/stylesheets/application.css"
17
+ inject_into_file file, " *= require jquery.cleditor\n", before: /^.*require_self/
18
+ end
19
+
20
+ def add_to_view
21
+ file = "app/views/#{table_name}/_form.html.erb"
22
+ columns.each do |column|
23
+ gsub_file file, /(input :#{column}) /, "\\1, input_html: { class: 'cleditor' } "
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.5
4
+ version: 3.2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2014-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -95,6 +95,7 @@ files:
95
95
  - lib/generators/bootswatch_rails/carrierwave/templates/carrierwave_migration.rb
96
96
  - lib/generators/bootswatch_rails/carrierwave/templates/document_uploader.rb
97
97
  - lib/generators/bootswatch_rails/carrierwave/templates/picture_uploader.rb
98
+ - lib/generators/bootswatch_rails/cleditor/cleditor_generator.rb
98
99
  - lib/generators/bootswatch_rails/install/install_generator.rb
99
100
  - lib/generators/bootswatch_rails/install/templates/app/assets/images/Rails_logo_80.jpg
100
101
  - lib/generators/bootswatch_rails/install/templates/app/helpers/application_helper.rb