linebreak-cli 2.0.0

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.
@@ -0,0 +1 @@
1
+ Abcdef
@@ -0,0 +1,2 @@
1
+ Abcdef
2
+ Abcdef
@@ -0,0 +1,3 @@
1
+ Abcdef
2
+ Abcdef
3
+ Abcdef
@@ -0,0 +1,3 @@
1
+ Abcdef
2
+ Abcdef
3
+ Abcdef
@@ -0,0 +1,3 @@
1
+ Abcdef
2
+ Abcdef
3
+ Abcdef
@@ -0,0 +1,3 @@
1
+ Abcdef
2
+ Abcdef
3
+ Abcdef
@@ -0,0 +1,2 @@
1
+ Abcdef
2
+ Abcdef
@@ -0,0 +1,116 @@
1
+ # encoding: UTF-8
2
+ =begin
3
+ Copyright Alexander E. Fischer <aef@raxys.net>, 2009-2012
4
+
5
+ This file is part of Linebreak::CLI.
6
+
7
+ Permission to use, copy, modify, and/or distribute this software for any
8
+ purpose with or without fee is hereby granted, provided that the above
9
+ copyright notice and this permission notice appear in all copies.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
13
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
+ PERFORMANCE OF THIS SOFTWARE.
18
+ =end
19
+
20
+ require 'bundler'
21
+
22
+ Bundler.setup
23
+
24
+ unless defined?(Rubinius)
25
+ require 'simplecov'
26
+ SimpleCov.start
27
+ end
28
+
29
+ require 'pry'
30
+ require 'rspec'
31
+ require 'tempfile'
32
+ require 'rbconfig'
33
+ require 'childprocess'
34
+ require 'aef/linebreak/cli'
35
+
36
+ module LinebreakSpecHelper
37
+ INTERPRETER = Pathname(RbConfig::CONFIG['bindir']) + RbConfig::CONFIG['ruby_install_name']
38
+ FIXTURES_DIR = Pathname('spec/fixtures')
39
+
40
+ def executable_path
41
+ "#{INTERPRETER} -Ilib bin/linebreak"
42
+ end
43
+
44
+ def command(arguments, options = {})
45
+ argument_array = arguments.split(' ')
46
+
47
+ process = ChildProcess.build(INTERPRETER.to_s, '-Ilib', 'bin/linebreak', *argument_array)
48
+ process.duplex = options[:duplex]
49
+
50
+ stdout, process.io.stdout = IO.pipe
51
+ stderr, process.io.stderr = IO.pipe
52
+
53
+ process.start
54
+
55
+ [process, stdout, stderr]
56
+ end
57
+
58
+ def fixture_path(name)
59
+ FIXTURES_DIR + name
60
+ end
61
+
62
+ def windows?
63
+ RbConfig::CONFIG['target_os'].downcase.include?('win')
64
+ end
65
+
66
+ def version_message
67
+ <<-EOS
68
+ Linebreak::CLI #{Aef::Linebreak::CLI::VERSION}
69
+ using Linebreak #{Aef::Linebreak::VERSION}
70
+
71
+ Project: https://github.com/aef/linebreak-cli/
72
+ Documentation: http://rdoc.info/github/aef/linebreak-cli/
73
+
74
+ Copyright Alexander E. Fischer <aef@raxys.net>, 2009-2012
75
+
76
+ This file is part of Linebreak::CLI.
77
+
78
+ Permission to use, copy, modify, and/or distribute this software for any
79
+ purpose with or without fee is hereby granted, provided that the above
80
+ copyright notice and this permission notice appear in all copies.
81
+
82
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
83
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
84
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
85
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
86
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
87
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
88
+ PERFORMANCE OF THIS SOFTWARE.
89
+ EOS
90
+ end
91
+
92
+ def env(environment = {})
93
+ raise ArgumentError, 'A block needs to be given' unless block_given?
94
+
95
+ backup = {}
96
+
97
+ environment.each do |key, value|
98
+ key, value = key.to_s, value.to_s
99
+
100
+ backup[key] = ENV[key]
101
+ ENV[key] = value
102
+ end
103
+
104
+ result = yield
105
+
106
+ backup.each do |key, value|
107
+ ENV[key] = value
108
+ end
109
+
110
+ result
111
+ end
112
+ end
113
+
114
+ RSpec.configure do |config|
115
+ config.include LinebreakSpecHelper
116
+ end
metadata ADDED
@@ -0,0 +1,223 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: linebreak-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alexander E. Fischer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain:
12
+ - ! '-----BEGIN CERTIFICATE-----
13
+
14
+ MIIDKDCCAhCgAwIBAgIBADANBgkqhkiG9w0BAQUFADA6MQwwCgYDVQQDDANhZWYx
15
+
16
+ FTATBgoJkiaJk/IsZAEZFgVyYXh5czETMBEGCgmSJomT8ixkARkWA25ldDAeFw0w
17
+
18
+ OTAyMjUyMDM5MDhaFw0xMDAyMjUyMDM5MDhaMDoxDDAKBgNVBAMMA2FlZjEVMBMG
19
+
20
+ CgmSJomT8ixkARkWBXJheHlzMRMwEQYKCZImiZPyLGQBGRYDbmV0MIIBIjANBgkq
21
+
22
+ hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoYtj0qad5/MpbdttITzBH0h1SNe6eO7R
23
+
24
+ 7qVeqNYu6qDQAQ0rYc0JhubJCWYrZEJorHEBhUFU6cdQgQOs78wiJaDgkeU7YfXB
25
+
26
+ q2l125kJ8aHkA1ukrK2/DRzp2AHEmzxHIYpXV5/63h+NWjCP+uKvTELYsotS2MKt
27
+
28
+ 3d43E0QajsPZu2ZuNFwkroqeue872gMHUldGOVy5WtSd9ajw2xI/CociY6746dL+
29
+
30
+ pYriV3QaYtR/ezeaLpKBLsc5T1UQ07t7Xs7mI281tdmRvpLdP5dQhjzInfio0CJv
31
+
32
+ 1Pf5bZUjGG0K9RW2Gb/tGPSYEETiLMubjH61OwBooXKiWR5cs4/1BQIDAQABozkw
33
+
34
+ NzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUSYvjhG2EWnR5kx5l
35
+
36
+ DAewXCkJOVEwDQYJKoZIhvcNAQEFBQADggEBAB2ryDbU4bQtnunKv/AXq4CuO3LS
37
+
38
+ kik9Xhye8E/5dTcsgitCZJXAqx0rHcK0u2EHnjA5CDcdF5JB7XgSvRrQkFWoW/9K
39
+
40
+ lCB4ih+sB2AI2IUiYBeoCGctXdBQ020prqop/oTQEudzFk/gyQ686lp06HdLRt+O
41
+
42
+ HoQjTIab8vmfgIubjPdIRzokMfHbelvhLi+mQfWVghRhs2jpEfdXbL0w5nNw+trp
43
+
44
+ rO70Dw59hduDUOpgpxew+PLbs4vP1tb1QKPG+39C+PZtosbbf1fai0hqYV1txMCx
45
+
46
+ 55akF+N8NbO6tpVDy6TMagqa10LfEpiQH6dvDHe/xdAqYOCrXKpmqzwu2PI=
47
+
48
+ -----END CERTIFICATE-----
49
+
50
+ '
51
+ date: 2012-03-10 00:00:00.000000000 Z
52
+ dependencies:
53
+ - !ruby/object:Gem::Dependency
54
+ name: linebreak
55
+ requirement: &24444060 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ version: 2.0.0
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: *24444060
64
+ - !ruby/object:Gem::Dependency
65
+ name: user-choices
66
+ requirement: &24443600 !ruby/object:Gem::Requirement
67
+ none: false
68
+ requirements:
69
+ - - ~>
70
+ - !ruby/object:Gem::Version
71
+ version: 1.1.6.1
72
+ type: :runtime
73
+ prerelease: false
74
+ version_requirements: *24443600
75
+ - !ruby/object:Gem::Dependency
76
+ name: bundler
77
+ requirement: &24443080 !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.21
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: *24443080
86
+ - !ruby/object:Gem::Dependency
87
+ name: rake
88
+ requirement: &24442600 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.9.2
94
+ type: :development
95
+ prerelease: false
96
+ version_requirements: *24442600
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: &24442000 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ~>
103
+ - !ruby/object:Gem::Version
104
+ version: 2.8.0
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: *24442000
108
+ - !ruby/object:Gem::Dependency
109
+ name: simplecov
110
+ requirement: &24441400 !ruby/object:Gem::Requirement
111
+ none: false
112
+ requirements:
113
+ - - ~>
114
+ - !ruby/object:Gem::Version
115
+ version: 0.6.1
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: *24441400
119
+ - !ruby/object:Gem::Dependency
120
+ name: pry
121
+ requirement: &24440520 !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ~>
125
+ - !ruby/object:Gem::Version
126
+ version: 0.9.8
127
+ type: :development
128
+ prerelease: false
129
+ version_requirements: *24440520
130
+ - !ruby/object:Gem::Dependency
131
+ name: yard
132
+ requirement: &24440040 !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ~>
136
+ - !ruby/object:Gem::Version
137
+ version: 0.7.5
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: *24440040
141
+ - !ruby/object:Gem::Dependency
142
+ name: childprocess
143
+ requirement: &24439580 !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ~>
147
+ - !ruby/object:Gem::Version
148
+ version: 0.3.1
149
+ type: :development
150
+ prerelease: false
151
+ version_requirements: *24439580
152
+ description: ! 'Linebreak::CLI is a Ruby command-line tool for conversion of text
153
+
154
+ between linebreak encoding formats of unix, windows or mac.
155
+
156
+
157
+ Before Linebreak 2.0.0 this tool was part of the linebreak gem.
158
+
159
+ Earlier versions of Linebreak were called BreakVerter.
160
+
161
+ '
162
+ email:
163
+ - aef@raxys.net
164
+ executables:
165
+ - linebreak
166
+ extensions: []
167
+ extra_rdoc_files:
168
+ - HISTORY.md
169
+ - LICENSE.md
170
+ files:
171
+ - .gitignore
172
+ - .rspec
173
+ - .travis.yml
174
+ - .yardopts
175
+ - Gemfile
176
+ - HISTORY.md
177
+ - LICENSE.md
178
+ - README.md
179
+ - Rakefile
180
+ - bin/linebreak
181
+ - lib/aef/linebreak/cli.rb
182
+ - lib/aef/linebreak/cli/commands/encode.rb
183
+ - lib/aef/linebreak/cli/commands/encodings.rb
184
+ - lib/aef/linebreak/cli/commands/version.rb
185
+ - lib/aef/linebreak/cli/pathname_conversion.rb
186
+ - lib/aef/linebreak/cli/version.rb
187
+ - linebreak-cli.gemspec
188
+ - spec/cli_spec.rb
189
+ - spec/fixtures/mac.txt
190
+ - spec/fixtures/mac_unix.txt
191
+ - spec/fixtures/unix.txt
192
+ - spec/fixtures/unix_windows.txt
193
+ - spec/fixtures/unix_windows_mac.txt
194
+ - spec/fixtures/windows.txt
195
+ - spec/fixtures/windows_mac.txt
196
+ - spec/spec_helper.rb
197
+ homepage: http://github.com/aef/linebreak-cli
198
+ licenses:
199
+ - ISC
200
+ post_install_message:
201
+ rdoc_options: []
202
+ require_paths:
203
+ - lib
204
+ required_ruby_version: !ruby/object:Gem::Requirement
205
+ none: false
206
+ requirements:
207
+ - - ! '>='
208
+ - !ruby/object:Gem::Version
209
+ version: 1.8.7
210
+ required_rubygems_version: !ruby/object:Gem::Requirement
211
+ none: false
212
+ requirements:
213
+ - - ! '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ requirements: []
217
+ rubyforge_project:
218
+ rubygems_version: 1.8.10
219
+ signing_key:
220
+ specification_version: 3
221
+ summary: Command-line linebreak system conversion tool
222
+ test_files: []
223
+ has_rdoc: yard
Binary file