textile_toolbar 0.5.4 → 0.5.5

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e8cd3a7c13ee0807d9e7ada43c6753cb991de8af
4
+ data.tar.gz: 0bdcc489e0a6242f69056c1f5a87c4ec91aeaccc
5
+ SHA512:
6
+ metadata.gz: 8b54bf35910ffc80c0d99868ca7e5e2f14bbc30f41f2221ad02ea70198a1efae1bb878886c5c0da3fcf90bb04c1068c2ac9c90c798c7f94b894af840df00a83f
7
+ data.tar.gz: 1c2bd37e782b5e30d5c2664246ad4a322cebedf716d0d5cc66b5faffde627c8f1803a4d5ee51424d621088a123519eb1a37734005e6b120a8048c20a6a531936
data/.gitignore CHANGED
@@ -1 +1,17 @@
1
- pkg
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/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in textile_toolbar.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Matthew
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/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # Textile Toolbar
2
+
3
+ Adds a handy Textile toolbar to any text area. The toolbar currently offers
4
+ the following functions:
5
+
6
+ - Bold: select some text and click this button to make it bold.
7
+ - Italic: select some text and click this button to make it italic.
8
+ - Insert Hyperlink: select some text, click, enter URL, and link is inserted.
9
+ - Insert Image: click, enter image URL, and image is inserted at cursor.
10
+
11
+ A link to a Textile reference page is also shown beside the toolbar.
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ gem 'textile_toolbar'
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install textile_toolbar
26
+
27
+ ## Usage
28
+
29
+ Use the textile_area helper where you would normally use the text_area
30
+ helper. Yep, it's that simple!
31
+
32
+ <%= text_area :article, :body %> # plain old text area
33
+ <%= textile_area :article, :body %> # text area with Textile toolbar
34
+
35
+ Form blocks are supported, letting you do this also:
36
+
37
+ <% form_for :article do |f| -%>
38
+ <%= f.textile_area :body %>
39
+ <% end -%>
40
+
41
+ Any options that can be passed to text_area can also be passed to textile_area.
42
+ For example, to set the width and height:
43
+
44
+ <%= textile_area :article, :body, :rows => 5, :cols => 10 %>
45
+
46
+ ## Contributing
47
+
48
+ 1. Fork it
49
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
50
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
51
+ 4. Push to the branch (`git push origin my-new-feature`)
52
+ 5. Create new Pull Request
53
+
54
+ ## TODO
55
+
56
+ - Add specs for existing functionality
57
+ - Incorporate live preview? See http://jrm.cc/extras/live-textile-preview.php
58
+ - More buttons (check PHP bulletin board)
59
+ - Create Radiant extension for admin text areas
60
+ - Convert textile_toolbar.js to jQuery
61
+
62
+ ## Resources
63
+
64
+ Repository: http://github.com/pelargir/textile_toolbar/
65
+ Blog: http://matthewbass.com
66
+ Author: Matthew Bass
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
- require 'rubygems'
1
+ require 'bundler/gem_tasks'
2
+
2
3
  require 'rake'
3
4
  require 'rake/testtask'
4
- require 'rake/rdoctask'
5
5
 
6
6
  desc 'Default: run unit tests.'
7
7
  task :default => :test
@@ -12,28 +12,3 @@ Rake::TestTask.new(:test) do |t|
12
12
  t.pattern = 'test/**/*_test.rb'
13
13
  t.verbose = true
14
14
  end
15
-
16
- desc 'Generate documentation for the textile_toolbar plugin.'
17
- Rake::RDocTask.new(:rdoc) do |rdoc|
18
- rdoc.rdoc_dir = 'rdoc'
19
- rdoc.title = 'textile_toolbar'
20
- rdoc.options << '--line-numbers' << '--inline-source'
21
- rdoc.rdoc_files.include('README')
22
- rdoc.rdoc_files.include('lib/**/*.rb')
23
- end
24
-
25
- begin
26
- require 'jeweler'
27
- Jeweler::Tasks.new do |gemspec|
28
- gemspec.name = "textile_toolbar"
29
- gemspec.summary = "Adds a handy Textile toolbar to any text area."
30
- gemspec.description = "Adds a handy Textile toolbar to any text area."
31
- gemspec.email = "pelargir@gmail.com"
32
- gemspec.homepage = "http://github.com/pelargir/textile_toolbar"
33
- gemspec.authors = ["Matthew Bass"]
34
- end
35
- rescue LoadError
36
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
37
- end
38
-
39
- Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| puts ext; load ext }
@@ -1,4 +1,4 @@
1
- load File.expand_path(File.dirname(__FILE__) + '/../tasks/textile_toolbar.rake')
1
+ require 'textile_toolbar/version'
2
2
 
3
3
  module TextileToolbar
4
4
  def textile_area(object_name, method, options={})
@@ -0,0 +1,3 @@
1
+ module TextileToolbar
2
+ VERSION = "0.5.5"
3
+ end
data/test/test_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rubygems'
2
- require 'test/unit'
2
+ require 'minitest/autorun'
3
3
  require 'shoulda'
4
4
  require 'mocha'
5
5
  require 'action_controller'
6
6
 
7
- require File.expand_path(File.dirname(__FILE__) + '/../lib/textile_toolbar')
7
+ require_relative '../lib/textile_toolbar'
@@ -1,6 +1,7 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/test_helper')
1
+ require_relative 'test_helper'
2
2
 
3
3
  class TextileToolbarTest < Test::Unit::TestCase
4
+
4
5
  include TextileToolbar
5
6
  include ActionView::Helpers::TagHelper
6
7
  include ActionView::Helpers::AssetTagHelper
@@ -14,5 +15,5 @@ class TextileToolbarTest < Test::Unit::TestCase
14
15
  assert textile_area(:article, :body).include?("</textarea>")
15
16
  end
16
17
  end
17
- end
18
18
 
19
+ end
@@ -1,60 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'textile_toolbar/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = %q{textile_toolbar}
8
- s.version = "0.5.4"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "textile_toolbar"
8
+ spec.version = TextileToolbar::VERSION
9
+ spec.authors = ["Matthew Bass"]
10
+ spec.email = ["pelargir@gmail.com"]
11
+ spec.description = %q{Adds a handy Textile toolbar to any text area.}
12
+ spec.summary = %q{Adds a handy Textile toolbar to any text area.}
13
+ spec.homepage = "http://github.com/pelargir/textile_toolbar"
14
+ spec.license = "MIT"
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Matthew Bass"]
12
- s.date = %q{2013-02-08}
13
- s.description = %q{Adds a handy Textile toolbar to any text area.}
14
- s.email = %q{pelargir@gmail.com}
15
- s.extra_rdoc_files = [
16
- "README",
17
- "TODO"
18
- ]
19
- s.files = [
20
- ".gitignore",
21
- "CHANGELOG",
22
- "MIT-LICENSE",
23
- "README",
24
- "Rakefile",
25
- "TODO",
26
- "VERSION",
27
- "files/public/images/textile_toolbar/bold.png",
28
- "files/public/images/textile_toolbar/hyperlink.png",
29
- "files/public/images/textile_toolbar/image.png",
30
- "files/public/images/textile_toolbar/italic.png",
31
- "files/public/images/textile_toolbar/underline.png",
32
- "files/public/javascripts/textile_toolbar.js",
33
- "init.rb",
34
- "lib/textile_toolbar.rb",
35
- "tasks/textile_toolbar.rake",
36
- "test/test_helper.rb",
37
- "test/textile_toolbar_test.rb",
38
- "textile_toolbar.gemspec"
39
- ]
40
- s.homepage = %q{http://github.com/pelargir/textile_toolbar}
41
- s.rdoc_options = ["--charset=UTF-8"]
42
- s.require_paths = ["lib"]
43
- s.rubygems_version = %q{1.3.5}
44
- s.summary = %q{Adds a handy Textile toolbar to any text area.}
45
- s.test_files = [
46
- "test/test_helper.rb",
47
- "test/textile_toolbar_test.rb"
48
- ]
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
49
20
 
50
- if s.respond_to? :specification_version then
51
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
- s.specification_version = 3
53
-
54
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
55
- else
56
- end
57
- else
58
- end
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "shoulda"
24
+ spec.add_development_dependency "mocha"
25
+ spec.add_development_dependency "rails", "~> 3.2"
59
26
  end
60
-
metadata CHANGED
@@ -1,67 +1,131 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textile_toolbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
5
- prerelease:
4
+ version: 0.5.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matthew Bass
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-08 00:00:00.000000000 Z
13
- dependencies: []
11
+ date: 2013-08-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: shoulda
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '3.2'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '3.2'
14
83
  description: Adds a handy Textile toolbar to any text area.
15
- email: pelargir@gmail.com
84
+ email:
85
+ - pelargir@gmail.com
16
86
  executables: []
17
87
  extensions: []
18
- extra_rdoc_files:
19
- - README
20
- - TODO
88
+ extra_rdoc_files: []
21
89
  files:
22
90
  - .gitignore
23
- - CHANGELOG
24
- - MIT-LICENSE
25
- - README
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
26
94
  - Rakefile
27
- - TODO
28
- - VERSION
29
- - files/public/images/textile_toolbar/bold.png
30
- - files/public/images/textile_toolbar/hyperlink.png
31
- - files/public/images/textile_toolbar/image.png
32
- - files/public/images/textile_toolbar/italic.png
33
- - files/public/images/textile_toolbar/underline.png
34
- - files/public/javascripts/textile_toolbar.js
35
- - init.rb
95
+ - app/assets/images/textile_toolbar/bold.png
96
+ - app/assets/images/textile_toolbar/hyperlink.png
97
+ - app/assets/images/textile_toolbar/image.png
98
+ - app/assets/images/textile_toolbar/italic.png
99
+ - app/assets/images/textile_toolbar/underline.png
100
+ - app/assets/javascripts/textile_toolbar.js
36
101
  - lib/textile_toolbar.rb
37
- - tasks/textile_toolbar.rake
102
+ - lib/textile_toolbar/version.rb
38
103
  - test/test_helper.rb
39
104
  - test/textile_toolbar_test.rb
40
105
  - textile_toolbar.gemspec
41
106
  homepage: http://github.com/pelargir/textile_toolbar
42
- licenses: []
107
+ licenses:
108
+ - MIT
109
+ metadata: {}
43
110
  post_install_message:
44
- rdoc_options:
45
- - --charset=UTF-8
111
+ rdoc_options: []
46
112
  require_paths:
47
113
  - lib
48
114
  required_ruby_version: !ruby/object:Gem::Requirement
49
- none: false
50
115
  requirements:
51
- - - ! '>='
116
+ - - '>='
52
117
  - !ruby/object:Gem::Version
53
118
  version: '0'
54
119
  required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
120
  requirements:
57
- - - ! '>='
121
+ - - '>='
58
122
  - !ruby/object:Gem::Version
59
123
  version: '0'
60
124
  requirements: []
61
125
  rubyforge_project:
62
- rubygems_version: 1.8.24
126
+ rubygems_version: 2.0.3
63
127
  signing_key:
64
- specification_version: 3
128
+ specification_version: 4
65
129
  summary: Adds a handy Textile toolbar to any text area.
66
130
  test_files:
67
131
  - test/test_helper.rb
data/CHANGELOG DELETED
@@ -1,4 +0,0 @@
1
- 12/14/09 - fixed gem support [MJB]
2
- 12/14/09 - removed asset copying [MJB]
3
- 10/22/08 - added automatic asset copying [MJB]
4
- 08/21/08 - initial version [MJB]
data/MIT-LICENSE DELETED
@@ -1,16 +0,0 @@
1
- Copyright (c) 2007-2008 Matthew Bass (http://matthewbass.com)
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4
- and associated documentation files (the "Software"), to deal in the Software without
5
- restriction, including without limitation the rights to use, copy, modify, merge, publish,
6
- distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
7
- Software is furnished to do so, subject to the following conditions:
8
-
9
- The above copyright notice and this permission notice shall be included in all copies or
10
- substantial portions of the Software.
11
-
12
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
13
- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README DELETED
@@ -1,52 +0,0 @@
1
- = textile_toolbar
2
-
3
- Adds a handy Textile toolbar to any text area. The toolbar currently offers
4
- the following functions:
5
-
6
- - Bold: select some text and click this button to make it bold.
7
- - Italic: select some text and click this button to make it italic.
8
- - Insert Hyperlink: select some text, click, enter URL, and link is inserted.
9
- - Insert Image: click, enter image URL, and image is inserted at cursor.
10
-
11
- A link to a Textile reference page is also shown beside the toolbar.
12
-
13
- == Installation
14
-
15
- Install the gem directly:
16
-
17
- sudo gem install textile_toolbar
18
-
19
- Or install the gem in your Rails project as a plugin:
20
-
21
- script/plugin install git://github.com/pelargir/textile_toolbar.git
22
-
23
- Then copy the required image and JS files into your Rails project
24
-
25
- rake textile_toolbar:install
26
-
27
- == Usage
28
-
29
- Use the textile_area helper where you would normally use the text_area
30
- helper. Yep, it's that simple!
31
-
32
- <%= text_area :article, :body %> # plain old text area
33
- <%= textile_area :article, :body %> # text area with Textile toolbar
34
-
35
- Form blocks are supported, letting you do this also:
36
-
37
- <% form_for :article do |f| -%>
38
- <%= f.textile_area :body %>
39
- <% end -%>
40
-
41
- Any options that can be passed to text_area can also be passed to textile_area.
42
- For example, to set the width and height:
43
-
44
- <%= textile_area :article, :body, :rows => 5, :cols => 10 %>
45
-
46
- == Resources
47
-
48
- Repository: http://github.com/pelargir/textile_toolbar/
49
- Blog: http://matthewbass.com
50
- Author: Matthew Bass
51
-
52
- Extraction work sponsored by Terralien
data/TODO DELETED
@@ -1,5 +0,0 @@
1
- - Add specs for existing functionality
2
- - Incorporate live preview? See http://jrm.cc/extras/live-textile-preview.php
3
- - More buttons (check PHP bulletin board)
4
- - Create Radiant extension for admin text areas
5
- - Convert textile_toolbar.js to jQuery
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.5.1
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'textile_toolbar'
@@ -1,9 +0,0 @@
1
- require 'rake'
2
-
3
- namespace :textile_toolbar do
4
- desc "Install files required by textile_toolbar"
5
- task :install do
6
- source = File.expand_path(File.join(File.dirname(__FILE__), '..', 'files'))
7
- FileUtils.cp_r "#{source}/public", "#{RAILS_ROOT}"
8
- end
9
- end