linebreak 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,12 +1,22 @@
1
+ === 1.3.1 / 2009-09-14
2
+
3
+ * 1 major bugfix
4
+
5
+ * Fixed issues with loading the gem in some situations
6
+
7
+ * 1 minor enhancement
8
+
9
+ * Implemented autoloading
10
+
1
11
  === 1.3.0 / 2009-08-11
2
12
 
3
- * major enhancements
13
+ * 3 major enhancements
4
14
 
5
15
  * Included methods for linebreak system detection and ensuring
6
16
  * Overhauled commandline tool to support detection and ensuring
7
17
  * BreakVerter renamed to Linebreak for better recognition
8
18
 
9
- * minor enhancements
19
+ * 4 minor enhancements
10
20
 
11
21
  * String extension now loadable via require
12
22
  * Most of the specifications now run on JRuby
@@ -11,7 +11,6 @@ lib/aef/linebreak/commands/encodings.rb
11
11
  lib/aef/linebreak/commands/version.rb
12
12
  lib/aef/linebreak/pathname_conversion.rb
13
13
  lib/aef/linebreak/linebreak.rb
14
- lib/aef.rb
15
14
  spec/spec_helper.rb
16
15
  spec/linebreak_spec.rb
17
16
  spec/spec.opts
@@ -185,7 +185,7 @@ is no way to install the gem securely. Therefore this is not recommended.
185
185
  You can test this package through rspec on your system. First find the path
186
186
  where the gem was installed to:
187
187
 
188
- gem which linebreak
188
+ gem which aef/linebreak
189
189
 
190
190
  Go into the root directory of the installed gem and run the following command
191
191
  to start the test runner:
data/Rakefile CHANGED
@@ -15,6 +15,7 @@ Hoe.spec('linebreak') do
15
15
  :rdoc_options => ['--main', 'README.rdoc', '--inline-source', '--line-numbers', '--title', 'Linebreak']
16
16
  }
17
17
  self.rspec_options = ['--options', 'spec/spec.opts']
18
+ self.remote_rdoc_dir = ''
18
19
  end
19
20
 
20
21
  # vim: syntax=Ruby
@@ -18,6 +18,7 @@
18
18
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  require 'rubygems'
21
+ require 'aef/linebreak'
21
22
 
22
23
  # User friendly message if user-choices is not available
23
24
  begin
@@ -26,8 +27,6 @@ rescue LoadError
26
27
  warn "This command needs the user-choices gem to be installed.\n\nSolution: gem install user-choices"; exit false
27
28
  end
28
29
 
29
- require 'lib/aef/linebreak/pathname_conversion' rescue LoadError require 'aef/linebreak/pathname_conversion'
30
-
31
30
  commands_available = {
32
31
  :encode => 'Convert all linebreak encodings of a file',
33
32
  :encodings => 'Detect linebreak encoding systems of a file',
@@ -57,12 +56,6 @@ else
57
56
  command_name = commands_available[command_name]
58
57
  end
59
58
 
60
- begin
61
- require "lib/aef/linebreak/commands/#{command_name}"
62
- rescue LoadError
63
- require "aef/linebreak/commands/#{command_name}"
64
- end
65
-
66
59
  command = Aef::Linebreak.const_get("#{command_name.to_s.capitalize}Command").new
67
60
  S4tUtils.with_pleasant_exceptions {command.execute}
68
61
  end
@@ -15,4 +15,13 @@
15
15
  # You should have received a copy of the GNU General Public License
16
16
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
- require 'lib/aef/linebreak/linebreak' rescue LoadError require 'aef/linebreak/linebreak'
18
+ # Namespace for projects of Alexander E. Fischer <aef@raxys.net>
19
+ #
20
+ # If you want to be able to simply type Example instead of Aef::Example to
21
+ # address classes in this namespace simply write the following before using the
22
+ # classes:
23
+ #
24
+ # include Aef
25
+ module Aef
26
+ autoload :Linebreak, 'aef/linebreak/linebreak'
27
+ end
@@ -17,7 +17,7 @@
17
17
 
18
18
  # TODO: If user-choices patch gets accepted, use :upcase for environment variables
19
19
 
20
- require 'lib/aef/linebreak' rescue LoadError require 'aef/linebreak'
20
+ require 'aef/linebreak/pathname_conversion'
21
21
 
22
22
  class Aef::Linebreak::EncodeCommand < UserChoices::Command
23
23
  include UserChoices
@@ -15,7 +15,7 @@
15
15
  # You should have received a copy of the GNU General Public License along with
16
16
  # this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
- require 'lib/aef/linebreak' rescue LoadError require 'aef/linebreak'
18
+ require 'aef/linebreak/pathname_conversion'
19
19
 
20
20
  class Aef::Linebreak::EncodingsCommand < UserChoices::Command
21
21
  include UserChoices
@@ -15,15 +15,15 @@
15
15
  # You should have received a copy of the GNU General Public License along with
16
16
  # this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
- require 'lib/aef/linebreak' rescue LoadError require 'aef/linebreak'
18
+ require 'aef/linebreak/pathname_conversion'
19
19
 
20
20
  class Aef::Linebreak::VersionCommand
21
21
  def execute
22
22
  name = 'Linebreak'
23
23
  puts "#{name} #{Aef::Linebreak::VERSION}"
24
24
  puts
25
- puts 'Project: https://rubyforge.org/projects/aef/'
26
- puts "RDoc: http://aef.rubyforge.org/#{name.downcase}/"
25
+ puts 'Project: https://rubyforge.org/projects/linebreak/'
26
+ puts "RDoc: http://#{name.downcase}.rubyforge.org/"
27
27
  puts "Github: http://github.com/aef/#{name.downcase}/"
28
28
  puts
29
29
  puts 'Copyright 2009 Alexander E. Fischer <aef@raxys.net>'
@@ -17,9 +17,6 @@
17
17
 
18
18
  require 'pathname'
19
19
  require 'set'
20
- require 'rubygems'
21
-
22
- require 'lib/aef' rescue LoadError require 'aef'
23
20
 
24
21
  # Linebreak is Ruby library and commandline tool for conversion of text
25
22
  # between linebreak encoding formats of unix, windows or mac.
@@ -29,7 +26,12 @@ require 'lib/aef' rescue LoadError require 'aef'
29
26
  #
30
27
  # require 'aef/linebreak/string_extension'
31
28
  module Aef::Linebreak
32
- VERSION = '1.3.0'
29
+ autoload :ConversionToPathname, 'aef/linebreak/pathname_conversion'
30
+ autoload :EncodeCommand, 'aef/linebreak/commands/encode'
31
+ autoload :EncodingsCommand, 'aef/linebreak/commands/encodings'
32
+ autoload :VersionCommand, 'aef/linebreak/commands/version'
33
+
34
+ VERSION = '1.3.1'
33
35
 
34
36
  BREAK_BY_SYSTEM = {
35
37
  :unix => "\n",
@@ -16,7 +16,7 @@
16
16
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
18
  # This class adds the type :pathname to user-choices
19
- class ConversionToPathname < UserChoices::Conversion
19
+ class Aef::Linebreak::ConversionToPathname < UserChoices::Conversion
20
20
  def self.described_by?(conversion_tag)
21
21
  conversion_tag == :pathname
22
22
  end
@@ -15,9 +15,7 @@
15
15
  # You should have received a copy of the GNU General Public License
16
16
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
 
18
- require 'rubygems'
19
-
20
- require 'lib/aef/linebreak' rescue LoadError require 'aef/linebreak'
18
+ require 'aef/linebreak'
21
19
 
22
20
  class String
23
21
  include Aef::Linebreak
@@ -20,14 +20,16 @@ require 'rbconfig'
20
20
  require 'rubygems'
21
21
  require 'popen4'
22
22
 
23
- require 'lib/aef/linebreak/string_extension'
23
+ $LOAD_PATH.unshift('lib')
24
+
25
+ require 'aef/linebreak/string_extension'
24
26
 
25
27
  module LinebreakSpecHelper
26
28
  INTERPRETER = Pathname(RbConfig::CONFIG['bindir']) + RbConfig::CONFIG['ruby_install_name']
27
29
  FIXTURES_DIR = Pathname('spec/fixtures')
28
30
 
29
31
  def executable_path
30
- "#{INTERPRETER} bin/linebreak"
32
+ "#{INTERPRETER} -Ilib bin/linebreak"
31
33
  end
32
34
 
33
35
  def fixture_path(name)
@@ -78,8 +80,8 @@ module LinebreakSpecHelper
78
80
  <<-EOS
79
81
  Linebreak #{Aef::Linebreak::VERSION}
80
82
 
81
- Project: https://rubyforge.org/projects/aef/
82
- RDoc: http://aef.rubyforge.org/linebreak/
83
+ Project: https://rubyforge.org/projects/linebreak/
84
+ RDoc: http://linebreak.rubyforge.org/
83
85
  Github: http://github.com/aef/linebreak/
84
86
 
85
87
  Copyright 2009 Alexander E. Fischer <aef@raxys.net>
@@ -135,4 +137,4 @@ end
135
137
 
136
138
  Spec::Runner.configure do |config|
137
139
  config.include LinebreakSpecHelper
138
- end
140
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linebreak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander E. Fischer
@@ -29,7 +29,7 @@ cert_chain:
29
29
  55akF+N8NbO6tpVDy6TMagqa10LfEpiQH6dvDHe/xdAqYOCrXKpmqzwu2PI=
30
30
  -----END CERTIFICATE-----
31
31
 
32
- date: 2009-08-21 00:00:00 +02:00
32
+ date: 2009-09-14 00:00:00 +02:00
33
33
  default_executable:
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
@@ -100,7 +100,6 @@ files:
100
100
  - lib/aef/linebreak/commands/version.rb
101
101
  - lib/aef/linebreak/pathname_conversion.rb
102
102
  - lib/aef/linebreak/linebreak.rb
103
- - lib/aef.rb
104
103
  - spec/spec_helper.rb
105
104
  - spec/linebreak_spec.rb
106
105
  - spec/spec.opts
@@ -140,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
139
  requirements: []
141
140
 
142
141
  rubyforge_project: linebreak
143
- rubygems_version: 1.3.4
142
+ rubygems_version: 1.3.5
144
143
  signing_key:
145
144
  specification_version: 3
146
145
  summary: Linebreak is a Ruby library and commandline tool for conversion of text between linebreak encoding formats of unix, windows or mac.
metadata.gz.sig CHANGED
Binary file
data/lib/aef.rb DELETED
@@ -1,27 +0,0 @@
1
- # Copyright 2009 Alexander E. Fischer <aef@raxys.net>
2
- #
3
- # This file is part of Linebreak.
4
- #
5
- # Linebreak is free software: you can redistribute it and/or modify
6
- # it under the terms of the GNU General Public License as published by
7
- # the Free Software Foundation, either version 3 of the License, or
8
- # (at your option) any later version.
9
- #
10
- # This program is distributed in the hope that it will be useful,
11
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- # GNU General Public License for more details.
14
- #
15
- # You should have received a copy of the GNU General Public License
16
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
17
-
18
- # Namespace for projects of Alexander E. Fischer <aef@raxys.net>
19
- #
20
- # If you want to be able to simply type Example instead of Aef::Example to
21
- # address classes in this namespace simply write the following before using the
22
- # classes:
23
- #
24
- # include Aef
25
- module Aef
26
-
27
- end