breakdown 0.0.1
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.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/breakdown.gemspec +24 -0
- data/lib/breakdown.rb +75 -0
- data/lib/breakdown/version.rb +3 -0
- data/spec/breakdown_spec.rb +49 -0
- data/spec/examples/example.md +3 -0
- data/spec/examples/five_stars.md +3 -0
- data/spec/examples/star_space_star_space_star_space.md +3 -0
- data/spec/examples/star_star_star.md +3 -0
- data/spec/examples/the-tachypomp-and-other-stories.md +3831 -0
- data/spec/examples/thirty_nine_dashes.md +3 -0
- data/spec/examples/three_dashes.md +3 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/tachypomp_spec.rb +30 -0
- metadata +122 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
# Use color in STDOUT
|
3
|
+
config.color_enabled = true
|
4
|
+
|
5
|
+
# Use color not only in STDOUT but also in pagers and files
|
6
|
+
config.tty = true
|
7
|
+
|
8
|
+
# Use the specified formatter
|
9
|
+
config.formatter = :documentation # :progress, :html, :textmate
|
10
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require './spec/spec_helper'
|
2
|
+
require './lib/breakdown'
|
3
|
+
|
4
|
+
describe Breakdown do
|
5
|
+
describe "when processing Tachypomp" do
|
6
|
+
|
7
|
+
def filecount(dir)
|
8
|
+
Dir[File.join(dir, '/**/*')].count { |file| File.file?(file) }
|
9
|
+
end
|
10
|
+
|
11
|
+
before(:all) do
|
12
|
+
@output_dir = "./spec/tmp/output/."
|
13
|
+
end
|
14
|
+
|
15
|
+
before(:each) do
|
16
|
+
FileUtils.rm_rf(@output_dir, secure: true) # Clean out the output dir
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should break into several sections" do
|
20
|
+
filecount(@output_dir).should equal(0)
|
21
|
+
Breakdown::process './spec/examples/the-tachypomp-and-other-stories.md', @output_dir
|
22
|
+
filecount(@output_dir).should equal(9)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
metadata
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: breakdown
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- N.T. Tuddenham
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-04-22 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Breaks large text files into many smaller ones using simple markup commands
|
63
|
+
email:
|
64
|
+
- ferrisoxide@gmail.com
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .gitignore
|
70
|
+
- Gemfile
|
71
|
+
- LICENSE.txt
|
72
|
+
- README.md
|
73
|
+
- Rakefile
|
74
|
+
- breakdown.gemspec
|
75
|
+
- lib/breakdown.rb
|
76
|
+
- lib/breakdown/version.rb
|
77
|
+
- spec/breakdown_spec.rb
|
78
|
+
- spec/examples/example.md
|
79
|
+
- spec/examples/five_stars.md
|
80
|
+
- spec/examples/star_space_star_space_star_space.md
|
81
|
+
- spec/examples/star_star_star.md
|
82
|
+
- spec/examples/the-tachypomp-and-other-stories.md
|
83
|
+
- spec/examples/thirty_nine_dashes.md
|
84
|
+
- spec/examples/three_dashes.md
|
85
|
+
- spec/spec_helper.rb
|
86
|
+
- spec/tachypomp_spec.rb
|
87
|
+
homepage: ''
|
88
|
+
licenses:
|
89
|
+
- MIT
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
require_paths:
|
93
|
+
- lib
|
94
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
102
|
+
requirements:
|
103
|
+
- - ! '>='
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '0'
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 1.8.25
|
109
|
+
signing_key:
|
110
|
+
specification_version: 3
|
111
|
+
summary: Preprocessor for large text files
|
112
|
+
test_files:
|
113
|
+
- spec/breakdown_spec.rb
|
114
|
+
- spec/examples/example.md
|
115
|
+
- spec/examples/five_stars.md
|
116
|
+
- spec/examples/star_space_star_space_star_space.md
|
117
|
+
- spec/examples/star_star_star.md
|
118
|
+
- spec/examples/the-tachypomp-and-other-stories.md
|
119
|
+
- spec/examples/thirty_nine_dashes.md
|
120
|
+
- spec/examples/three_dashes.md
|
121
|
+
- spec/spec_helper.rb
|
122
|
+
- spec/tachypomp_spec.rb
|