truncate_html 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -0,0 +1,7 @@
1
+ # Edit this Gemfile to bundle your application's dependencies.
2
+ source 'http://gemcutter.org'
3
+ group :development, :test do
4
+ gem 'jeweler'
5
+ gem "rails", "= 3.0.3"
6
+ gem 'rspec-rails', '= 2.3'
7
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,92 @@
1
+ GEM
2
+ remote: http://gemcutter.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionmailer (3.0.3)
6
+ actionpack (= 3.0.3)
7
+ mail (~> 2.2.9)
8
+ actionpack (3.0.3)
9
+ activemodel (= 3.0.3)
10
+ activesupport (= 3.0.3)
11
+ builder (~> 2.1.2)
12
+ erubis (~> 2.6.6)
13
+ i18n (~> 0.4)
14
+ rack (~> 1.2.1)
15
+ rack-mount (~> 0.6.13)
16
+ rack-test (~> 0.5.6)
17
+ tzinfo (~> 0.3.23)
18
+ activemodel (3.0.3)
19
+ activesupport (= 3.0.3)
20
+ builder (~> 2.1.2)
21
+ i18n (~> 0.4)
22
+ activerecord (3.0.3)
23
+ activemodel (= 3.0.3)
24
+ activesupport (= 3.0.3)
25
+ arel (~> 2.0.2)
26
+ tzinfo (~> 0.3.23)
27
+ activeresource (3.0.3)
28
+ activemodel (= 3.0.3)
29
+ activesupport (= 3.0.3)
30
+ activesupport (3.0.3)
31
+ arel (2.0.7)
32
+ builder (2.1.2)
33
+ diff-lcs (1.1.2)
34
+ erubis (2.6.6)
35
+ abstract (>= 1.0.0)
36
+ git (1.2.5)
37
+ i18n (0.5.0)
38
+ jeweler (1.5.2)
39
+ bundler (~> 1.0.0)
40
+ git (>= 1.2.5)
41
+ rake
42
+ mail (2.2.15)
43
+ activesupport (>= 2.3.6)
44
+ i18n (>= 0.4.0)
45
+ mime-types (~> 1.16)
46
+ treetop (~> 1.4.8)
47
+ mime-types (1.16)
48
+ polyglot (0.3.1)
49
+ rack (1.2.1)
50
+ rack-mount (0.6.13)
51
+ rack (>= 1.0.0)
52
+ rack-test (0.5.7)
53
+ rack (>= 1.0)
54
+ rails (3.0.3)
55
+ actionmailer (= 3.0.3)
56
+ actionpack (= 3.0.3)
57
+ activerecord (= 3.0.3)
58
+ activeresource (= 3.0.3)
59
+ activesupport (= 3.0.3)
60
+ bundler (~> 1.0)
61
+ railties (= 3.0.3)
62
+ railties (3.0.3)
63
+ actionpack (= 3.0.3)
64
+ activesupport (= 3.0.3)
65
+ rake (>= 0.8.7)
66
+ thor (~> 0.14.4)
67
+ rake (0.8.7)
68
+ rspec (2.3.0)
69
+ rspec-core (~> 2.3.0)
70
+ rspec-expectations (~> 2.3.0)
71
+ rspec-mocks (~> 2.3.0)
72
+ rspec-core (2.3.1)
73
+ rspec-expectations (2.3.0)
74
+ diff-lcs (~> 1.1.2)
75
+ rspec-mocks (2.3.0)
76
+ rspec-rails (2.3.0)
77
+ actionpack (~> 3.0)
78
+ activesupport (~> 3.0)
79
+ railties (~> 3.0)
80
+ rspec (~> 2.3.0)
81
+ thor (0.14.6)
82
+ treetop (1.4.9)
83
+ polyglot (>= 0.3.1)
84
+ tzinfo (0.3.24)
85
+
86
+ PLATFORMS
87
+ ruby
88
+
89
+ DEPENDENCIES
90
+ jeweler
91
+ rails (= 3.0.3)
92
+ rspec-rails (= 2.3)
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.5.0 2011-01-26
2
+ * Multibyte support. (smix, parndt)
3
+
4
+ == 0.4.0 2010-03-30
5
+ * Rails 3 support. This breaks rails 2 support.
6
+
1
7
  == 0.3.2 2010-03-23
2
8
  * Fix for autoloading of classes in older Rails versions. (kball)
3
9
  * Fix issue #5: autoloading of default configuration.
data/README.markdown CHANGED
@@ -38,19 +38,14 @@ like `config/initializers/truncate_html.rb`
38
38
  Installation
39
39
  ------------
40
40
 
41
- #### As a gem
42
- Add this to your <code>config/environment.rb</code>:
41
+ The latest gem version for the Rails 2.x series is 0.3.2.
42
+ To use truncate_html on a Rails 2 app, please install the 0.3.2 version:
43
43
 
44
- config.gem 'truncate_html',
45
- :source => 'http://gemcutter.org'
44
+ gem install truncate_html -v 0.3.2
46
45
 
47
- Then either
48
- <code>rake gems:install</code>
49
- or
50
- <code>gem install truncate_html</code>
46
+ For Rails 3, use the latest truncate_html:
51
47
 
52
- #### As a plugin:
53
- <code>script/plugin install git://github.com/hgimenez/truncate_html.git</code>
48
+ gem install truncate_html
54
49
 
55
50
  Issues or Suggestions
56
51
  ---------------------
@@ -60,12 +55,11 @@ Found an issue or have a suggestion? Please report it on [Github's issue tracker
60
55
  Testing
61
56
  -------
62
57
 
63
- Make sure the following gems are installed
58
+ bundle
59
+ rake
64
60
 
65
- rspec
66
- rpsec-rails
67
- rails > 2.3.4
68
-
69
- Clone the repo and run rake from the project's root. All green? Go hack.
61
+ All green? Go hack.
70
62
 
71
63
  Copyright (c) 2009 - 2010 Harold A. Giménez, released under the MIT license
64
+
65
+ Thanks to all the [https://github.com/hgimenez/truncate_html/contributors](contributors)!
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ begin
4
4
  require 'rspec/core'
5
5
  require 'rspec/core/rake_task'
6
6
  rescue MissingSourceFile
7
- module Rspec
7
+ module RSpec
8
8
  module Core
9
9
  class RakeTask
10
10
  def initialize(name)
@@ -30,7 +30,7 @@ task :default => :spec
30
30
  task :stats => "spec:statsetup"
31
31
 
32
32
  desc "Run RSpec code examples"
33
- Rspec::Core::RakeTask.new(:spec) do |t|
33
+ RSpec::Core::RakeTask.new(:spec) do |t|
34
34
  t.pattern = "./spec/**/*_spec.rb"
35
35
  end
36
36
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -8,7 +8,7 @@ module TruncateHtml
8
8
  end
9
9
 
10
10
  def html_tokens
11
- scan(/(?:<script.*>.*<\/script>)+|<\/?[^>]+>|[\w\|`~!@#\$%^&*\(\)\-_\+=\[\]{}:;'",\.\/?]+|\s+/).map do
11
+ scan(regex).map do
12
12
  |token| token.gsub(
13
13
  #remove newline characters
14
14
  /\n/,''
@@ -31,5 +31,10 @@ module TruncateHtml
31
31
  gsub(/<(\w+)\s?.*>/, '</\1>').strip
32
32
  end
33
33
 
34
+ private
35
+ def regex
36
+ /(?:<script.*>.*<\/script>)+|<\/?[^>]+>|[#{"[[:alpha:]]" if RUBY_VERSION >= '1.9'}\w\|`~!@#\$%^&*\(\)\-_\+=\[\]{}:;'",\.\/?]+|\s+/
37
+ end
38
+
34
39
  end
35
40
  end
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_WITHOUT: ""
@@ -1,4 +1,6 @@
1
1
  # Edit this Gemfile to bundle your application's dependencies.
2
2
  source 'http://gemcutter.org'
3
- gem "rails", "3.0.0.beta"
4
- gem 'rspec-rails', '>=2.0.0.beta.4', :group => :test
3
+ group :development, :test do
4
+ gem "rails", "= 3.0.3"
5
+ gem 'rspec-rails', '= 2.3'
6
+ end
@@ -0,0 +1,86 @@
1
+ GEM
2
+ remote: http://gemcutter.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionmailer (3.0.3)
6
+ actionpack (= 3.0.3)
7
+ mail (~> 2.2.9)
8
+ actionpack (3.0.3)
9
+ activemodel (= 3.0.3)
10
+ activesupport (= 3.0.3)
11
+ builder (~> 2.1.2)
12
+ erubis (~> 2.6.6)
13
+ i18n (~> 0.4)
14
+ rack (~> 1.2.1)
15
+ rack-mount (~> 0.6.13)
16
+ rack-test (~> 0.5.6)
17
+ tzinfo (~> 0.3.23)
18
+ activemodel (3.0.3)
19
+ activesupport (= 3.0.3)
20
+ builder (~> 2.1.2)
21
+ i18n (~> 0.4)
22
+ activerecord (3.0.3)
23
+ activemodel (= 3.0.3)
24
+ activesupport (= 3.0.3)
25
+ arel (~> 2.0.2)
26
+ tzinfo (~> 0.3.23)
27
+ activeresource (3.0.3)
28
+ activemodel (= 3.0.3)
29
+ activesupport (= 3.0.3)
30
+ activesupport (3.0.3)
31
+ arel (2.0.7)
32
+ builder (2.1.2)
33
+ diff-lcs (1.1.2)
34
+ erubis (2.6.6)
35
+ abstract (>= 1.0.0)
36
+ i18n (0.5.0)
37
+ mail (2.2.15)
38
+ activesupport (>= 2.3.6)
39
+ i18n (>= 0.4.0)
40
+ mime-types (~> 1.16)
41
+ treetop (~> 1.4.8)
42
+ mime-types (1.16)
43
+ polyglot (0.3.1)
44
+ rack (1.2.1)
45
+ rack-mount (0.6.13)
46
+ rack (>= 1.0.0)
47
+ rack-test (0.5.7)
48
+ rack (>= 1.0)
49
+ rails (3.0.3)
50
+ actionmailer (= 3.0.3)
51
+ actionpack (= 3.0.3)
52
+ activerecord (= 3.0.3)
53
+ activeresource (= 3.0.3)
54
+ activesupport (= 3.0.3)
55
+ bundler (~> 1.0)
56
+ railties (= 3.0.3)
57
+ railties (3.0.3)
58
+ actionpack (= 3.0.3)
59
+ activesupport (= 3.0.3)
60
+ rake (>= 0.8.7)
61
+ thor (~> 0.14.4)
62
+ rake (0.8.7)
63
+ rspec (2.3.0)
64
+ rspec-core (~> 2.3.0)
65
+ rspec-expectations (~> 2.3.0)
66
+ rspec-mocks (~> 2.3.0)
67
+ rspec-core (2.3.1)
68
+ rspec-expectations (2.3.0)
69
+ diff-lcs (~> 1.1.2)
70
+ rspec-mocks (2.3.0)
71
+ rspec-rails (2.3.0)
72
+ actionpack (~> 3.0)
73
+ activesupport (~> 3.0)
74
+ railties (~> 3.0)
75
+ rspec (~> 2.3.0)
76
+ thor (0.14.6)
77
+ treetop (1.4.9)
78
+ polyglot (>= 0.3.1)
79
+ tzinfo (0.3.24)
80
+
81
+ PLATFORMS
82
+ ruby
83
+
84
+ DEPENDENCIES
85
+ rails (= 3.0.3)
86
+ rspec-rails (= 2.3)
@@ -7,7 +7,8 @@ Bundler.require :default, Rails.env
7
7
 
8
8
  module TruncateHtmlSpec
9
9
  class Application < Rails::Application
10
- config.action_controller.session = { :key => "_myapp_session",
11
- :secret => "truncate_html_super_secret_dont_tell_anyone" }
10
+ config.active_support.deprecation = :stderr
11
+ config.session_store :cookie_store, :key => "_myapp_session"
12
+ config.secret_token = "truncate_html_super_secret_dont_tell_anyone"
12
13
  end
13
14
  end
@@ -1,2 +1,13 @@
1
1
  require 'rubygems'
2
- require 'bundler'
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
@@ -26,5 +26,4 @@ config.action_mailer.delivery_method = :test
26
26
  # This is necessary if your schema can't be completely dumped by the schema dumper,
27
27
  # like if you have constraints or database-specific column types
28
28
  # config.active_record.schema_format = :sql
29
-
30
- config.gem 'rspec-rails', :version => '>= 1.3.2', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
29
+ config.gem 'rspec-rails', :version => '>= 1.3.2', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,11 @@
1
1
  ENV["RAILS_ENV"] ||= 'test'
2
- rails_root = File.dirname(__FILE__) + '/rails_root'
2
+ rails_root = File.expand_path('../rails_root', __FILE__)
3
3
  require rails_root + '/config/environment.rb'
4
4
 
5
5
  require 'rspec/rails'
6
6
 
7
- require File.join(File.dirname(__FILE__), '..', 'lib', 'truncate_html')
7
+ require File.expand_path('../../lib/truncate_html', __FILE__)
8
8
 
9
- Rspec.configure do |config|
9
+ RSpec.configure do |config|
10
10
  config.mock_with :rspec
11
11
  end
@@ -1,3 +1,4 @@
1
+ # Encoding: UTF-8
1
2
  require File.join(File.dirname(__FILE__), '..', 'spec_helper')
2
3
 
3
4
  describe TruncateHtml::HtmlTruncator do
@@ -67,8 +68,18 @@ describe TruncateHtml::HtmlTruncator do
67
68
  end
68
69
  end
69
70
 
71
+ context 'when the characters are multibyte' do
72
+ before(:each) do
73
+ @html = '<p>Look at our multibyte characters ā ž <a href="awesomeful.net">this</a> link for randomness ā ž</p>'
74
+ end
75
+
76
+ it 'leaves the multibyte characters after truncation' do
77
+ truncate(@html, :length => @html.length).should == '<p>Look at our multibyte characters ā ž <a href="awesomeful.net">this</a> link for randomness ā ž</p>'
78
+ end
79
+ end
80
+
70
81
  #unusual, but just covering my ass
71
- context 'when the HTML tags are multiline' do
82
+ context 'when the HTML tags are multiline' do
72
83
  before(:each) do
73
84
  @html = <<-END_HTML
74
85
  <div id="foo"
@@ -1,101 +1,110 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{truncate_html}
8
- s.version = "0.4.0"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Harold A. Gimenez"]
12
- s.date = %q{2010-03-30}
12
+ s.date = %q{2011-01-26}
13
13
  s.description = %q{Truncates html so you don't have to}
14
14
  s.email = %q{harold.gimenez@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.markdown"
17
+ "README.markdown"
18
18
  ]
19
19
  s.files = [
20
- ".gitignore",
21
- "Gemfile",
22
- "History.txt",
23
- "LICENSE",
24
- "README.markdown",
25
- "Rakefile",
26
- "VERSION",
27
- "init.rb",
28
- "lib/app/helpers/truncate_html_helper.rb",
29
- "lib/truncate_html.rb",
30
- "lib/truncate_html/configuration.rb",
31
- "lib/truncate_html/html_string.rb",
32
- "lib/truncate_html/html_truncator.rb",
33
- "spec/helpers/truncate_html_helper_spec.rb",
34
- "spec/rails_root/.bundle/config",
35
- "spec/rails_root/Gemfile",
36
- "spec/rails_root/app/controllers/application_controller.rb",
37
- "spec/rails_root/app/helpers/application_helper.rb",
38
- "spec/rails_root/config/application.rb",
39
- "spec/rails_root/config/boot.rb",
40
- "spec/rails_root/config/database.yml",
41
- "spec/rails_root/config/environment.rb",
42
- "spec/rails_root/config/environments/development.rb",
43
- "spec/rails_root/config/environments/production.rb",
44
- "spec/rails_root/config/environments/test.rb",
45
- "spec/rails_root/config/initializers/backtrace_silencers.rb",
46
- "spec/rails_root/config/initializers/inflections.rb",
47
- "spec/rails_root/config/initializers/mime_types.rb",
48
- "spec/rails_root/config/initializers/new_rails_defaults.rb",
49
- "spec/rails_root/config/initializers/session_store.rb",
50
- "spec/rails_root/config/locales/en.yml",
51
- "spec/rails_root/config/routes.rb",
52
- "spec/rails_root/init.rb",
53
- "spec/rails_root/lib/app/helpers/truncate_html_helper.rb",
54
- "spec/rails_root/lib/tasks/rspec.rake",
55
- "spec/spec.opts",
56
- "spec/spec_helper.rb",
57
- "spec/truncate_html/configuration_spec.rb",
58
- "spec/truncate_html/html_string_spec.rb",
59
- "spec/truncate_html/html_truncator_spec.rb",
60
- "truncate_html.gemspec"
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "History.txt",
23
+ "LICENSE",
24
+ "README.markdown",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "init.rb",
28
+ "lib/app/helpers/truncate_html_helper.rb",
29
+ "lib/truncate_html.rb",
30
+ "lib/truncate_html/configuration.rb",
31
+ "lib/truncate_html/html_string.rb",
32
+ "lib/truncate_html/html_truncator.rb",
33
+ "spec/helpers/truncate_html_helper_spec.rb",
34
+ "spec/rails_root/.bundle/config",
35
+ "spec/rails_root/Gemfile",
36
+ "spec/rails_root/Gemfile.lock",
37
+ "spec/rails_root/app/controllers/application_controller.rb",
38
+ "spec/rails_root/app/helpers/application_helper.rb",
39
+ "spec/rails_root/config/application.rb",
40
+ "spec/rails_root/config/boot.rb",
41
+ "spec/rails_root/config/database.yml",
42
+ "spec/rails_root/config/environment.rb",
43
+ "spec/rails_root/config/environments/development.rb",
44
+ "spec/rails_root/config/environments/production.rb",
45
+ "spec/rails_root/config/environments/test.rb",
46
+ "spec/rails_root/config/initializers/backtrace_silencers.rb",
47
+ "spec/rails_root/config/initializers/inflections.rb",
48
+ "spec/rails_root/config/initializers/mime_types.rb",
49
+ "spec/rails_root/config/initializers/new_rails_defaults.rb",
50
+ "spec/rails_root/config/initializers/session_store.rb",
51
+ "spec/rails_root/config/locales/en.yml",
52
+ "spec/rails_root/config/routes.rb",
53
+ "spec/rails_root/init.rb",
54
+ "spec/rails_root/lib/app/helpers/truncate_html_helper.rb",
55
+ "spec/rails_root/lib/tasks/rspec.rake",
56
+ "spec/spec.opts",
57
+ "spec/spec_helper.rb",
58
+ "spec/truncate_html/configuration_spec.rb",
59
+ "spec/truncate_html/html_string_spec.rb",
60
+ "spec/truncate_html/html_truncator_spec.rb",
61
+ "truncate_html.gemspec"
61
62
  ]
62
63
  s.homepage = %q{http://github.com/hgimenez/truncate_html}
63
- s.rdoc_options = ["--charset=UTF-8"]
64
64
  s.require_paths = ["lib"]
65
- s.rubygems_version = %q{1.3.6}
65
+ s.rubygems_version = %q{1.3.7}
66
66
  s.summary = %q{Uses an API similar to Rails' truncate helper to truncate HTML and close any lingering open tags.}
67
67
  s.test_files = [
68
68
  "spec/helpers/truncate_html_helper_spec.rb",
69
- "spec/rails_root/app/controllers/application_controller.rb",
70
- "spec/rails_root/app/helpers/application_helper.rb",
71
- "spec/rails_root/config/application.rb",
72
- "spec/rails_root/config/boot.rb",
73
- "spec/rails_root/config/environment.rb",
74
- "spec/rails_root/config/environments/development.rb",
75
- "spec/rails_root/config/environments/production.rb",
76
- "spec/rails_root/config/environments/test.rb",
77
- "spec/rails_root/config/initializers/backtrace_silencers.rb",
78
- "spec/rails_root/config/initializers/inflections.rb",
79
- "spec/rails_root/config/initializers/mime_types.rb",
80
- "spec/rails_root/config/initializers/new_rails_defaults.rb",
81
- "spec/rails_root/config/initializers/session_store.rb",
82
- "spec/rails_root/config/routes.rb",
83
- "spec/rails_root/init.rb",
84
- "spec/rails_root/lib/app/helpers/truncate_html_helper.rb",
85
- "spec/spec_helper.rb",
86
- "spec/truncate_html/configuration_spec.rb",
87
- "spec/truncate_html/html_string_spec.rb",
88
- "spec/truncate_html/html_truncator_spec.rb"
69
+ "spec/rails_root/app/controllers/application_controller.rb",
70
+ "spec/rails_root/app/helpers/application_helper.rb",
71
+ "spec/rails_root/config/application.rb",
72
+ "spec/rails_root/config/boot.rb",
73
+ "spec/rails_root/config/environment.rb",
74
+ "spec/rails_root/config/environments/development.rb",
75
+ "spec/rails_root/config/environments/production.rb",
76
+ "spec/rails_root/config/environments/test.rb",
77
+ "spec/rails_root/config/initializers/backtrace_silencers.rb",
78
+ "spec/rails_root/config/initializers/inflections.rb",
79
+ "spec/rails_root/config/initializers/mime_types.rb",
80
+ "spec/rails_root/config/initializers/new_rails_defaults.rb",
81
+ "spec/rails_root/config/initializers/session_store.rb",
82
+ "spec/rails_root/config/routes.rb",
83
+ "spec/rails_root/init.rb",
84
+ "spec/rails_root/lib/app/helpers/truncate_html_helper.rb",
85
+ "spec/spec_helper.rb",
86
+ "spec/truncate_html/configuration_spec.rb",
87
+ "spec/truncate_html/html_string_spec.rb",
88
+ "spec/truncate_html/html_truncator_spec.rb"
89
89
  ]
90
90
 
91
91
  if s.respond_to? :specification_version then
92
92
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
93
93
  s.specification_version = 3
94
94
 
95
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
95
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
96
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
97
+ s.add_development_dependency(%q<rails>, ["= 3.0.3"])
98
+ s.add_development_dependency(%q<rspec-rails>, ["= 2.3"])
96
99
  else
100
+ s.add_dependency(%q<jeweler>, [">= 0"])
101
+ s.add_dependency(%q<rails>, ["= 3.0.3"])
102
+ s.add_dependency(%q<rspec-rails>, ["= 2.3"])
97
103
  end
98
104
  else
105
+ s.add_dependency(%q<jeweler>, [">= 0"])
106
+ s.add_dependency(%q<rails>, ["= 3.0.3"])
107
+ s.add_dependency(%q<rspec-rails>, ["= 2.3"])
99
108
  end
100
109
  end
101
110
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 4
7
+ - 5
8
8
  - 0
9
- version: 0.4.0
9
+ version: 0.5.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Harold A. Gimenez
@@ -14,10 +14,51 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-30 00:00:00 -04:00
17
+ date: 2011-01-26 00:00:00 -05:00
18
18
  default_executable:
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: jeweler
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: rails
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - "="
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 3
42
+ - 0
43
+ - 3
44
+ version: 3.0.3
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec-rails
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - "="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 2
57
+ - 3
58
+ version: "2.3"
59
+ type: :development
60
+ prerelease: false
61
+ version_requirements: *id003
21
62
  description: Truncates html so you don't have to
22
63
  email: harold.gimenez@gmail.com
23
64
  executables: []
@@ -28,8 +69,8 @@ extra_rdoc_files:
28
69
  - LICENSE
29
70
  - README.markdown
30
71
  files:
31
- - .gitignore
32
72
  - Gemfile
73
+ - Gemfile.lock
33
74
  - History.txt
34
75
  - LICENSE
35
76
  - README.markdown
@@ -44,6 +85,7 @@ files:
44
85
  - spec/helpers/truncate_html_helper_spec.rb
45
86
  - spec/rails_root/.bundle/config
46
87
  - spec/rails_root/Gemfile
88
+ - spec/rails_root/Gemfile.lock
47
89
  - spec/rails_root/app/controllers/application_controller.rb
48
90
  - spec/rails_root/app/helpers/application_helper.rb
49
91
  - spec/rails_root/config/application.rb
@@ -74,11 +116,12 @@ homepage: http://github.com/hgimenez/truncate_html
74
116
  licenses: []
75
117
 
76
118
  post_install_message:
77
- rdoc_options:
78
- - --charset=UTF-8
119
+ rdoc_options: []
120
+
79
121
  require_paths:
80
122
  - lib
81
123
  required_ruby_version: !ruby/object:Gem::Requirement
124
+ none: false
82
125
  requirements:
83
126
  - - ">="
84
127
  - !ruby/object:Gem::Version
@@ -86,6 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
129
  - 0
87
130
  version: "0"
88
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
+ none: false
89
133
  requirements:
90
134
  - - ">="
91
135
  - !ruby/object:Gem::Version
@@ -95,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
139
  requirements: []
96
140
 
97
141
  rubyforge_project:
98
- rubygems_version: 1.3.6
142
+ rubygems_version: 1.3.7
99
143
  signing_key:
100
144
  specification_version: 3
101
145
  summary: Uses an API similar to Rails' truncate helper to truncate HTML and close any lingering open tags.
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- pkg
2
- coverage
3
- profiling
4
- tmp
5
- spec/rails_root/log/*
6
- log/*.log
7
- .bundle