polytexnic 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8e7de21594c8b7389b2644e15ea5cf098edff39
4
- data.tar.gz: 49867ac88a23d41ddf48903ada6f0269dd84d940
3
+ metadata.gz: b446df53404a9a04b877d6cca7d2e597c8aeb248
4
+ data.tar.gz: 306bbb15becc07f985e2d670aa783e9715e07164
5
5
  SHA512:
6
- metadata.gz: 0c58db6f0f1661a51c11c216c624960f4d9f405eaf2b201f88e810c9276c94e30539b322100c71cd9c36163480f43229d271fcb2520ffdd715889451db977ef7
7
- data.tar.gz: 015ba8b5a3034d4b2765b509d2fa9a58f1fc8f5f4a897c0a2724b7048e4f912deec4cd18c0d4635a5c5b98ab95c356be1c79ded81802f839fb804ad7650b7d47
6
+ metadata.gz: e9edb1dfa39ccd01042ee5990813dc2ee45e81c0eae11233a967e7285dfc81a05e089a69cfabe2708bc6061b3bd4769606ef52f1c87d2404e5b3f51efee94c5d
7
+ data.tar.gz: f829982d042ec3c585364dae133701ae3634957f1195a5d40678d6fe884920febc65a3d05c12425fd03a6e1f5ccfc879df612acd757a9bee49b54835876f7798
File without changes
@@ -9,7 +9,7 @@ module Polytexnic
9
9
  # Matches the line for code inclusion.
10
10
  # %= <</path/to/code.ext
11
11
  CODE_INCLUSION_REGEX = /^\s*%=\s+<<\s*\( # opening
12
- \s*([\w\/]+\.?(\w*)) # path
12
+ \s*([\w\/-]+\.?(\w*)) # path
13
13
  (?:,\s*lang:\s*(\w+))? # optional lang
14
14
  \s*\) # closing paren
15
15
  /x
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -157,6 +157,18 @@ def foo; "bar"; end
157
157
  it { should resemble '\label{code:lorem}' }
158
158
  it { should resemble '\end{codelisting}' }
159
159
  end
160
+
161
+ context "code inclusion inside codelisting" do
162
+ let(:source) do <<-'EOS'
163
+ \begin{codelisting}
164
+ \codecaption{Lorem ipsum.}
165
+ \label{code:lorem}
166
+ <<(/path/to/code)
167
+ \end{codelisting}
168
+ EOS
169
+ end
170
+ it { should resemble '%= <<(/path/to/code)' }
171
+ end
160
172
  end
161
173
 
162
174
  describe "source code" do
@@ -67,4 +67,25 @@ $ subl .gemrc
67
67
  expect { processed_text }.not_to raise_error
68
68
  end
69
69
  end
70
+
71
+ describe "containing code inclusion with a hyphen" do
72
+ before do
73
+ File.write(File.join('spec', 'fixtures', 'name-with-hyphens.txt'), '')
74
+ end
75
+ after do
76
+ FileUtils.rm(File.join('spec', 'fixtures', 'name-with-hyphens.txt'))
77
+ end
78
+ let(:polytex) do <<-'EOS'
79
+ \begin{codelisting}
80
+ \codecaption{Foo}
81
+ \label{code:foo}
82
+ %= <<(spec/fixtures/name-with-hyphens.txt, lang: text)
83
+ \end{codelisting}
84
+ EOS
85
+ end
86
+
87
+ it "should not raise an error" do
88
+ expect { processed_text }.not_to raise_error
89
+ end
90
+ end
70
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytexnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-14 00:00:00.000000000 Z
12
+ date: 2013-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -164,6 +164,7 @@ files:
164
164
  - .pull_requests/1383263695
165
165
  - .pull_requests/1383274008
166
166
  - .pull_requests/1383327328
167
+ - .pull_requests/1384446851
167
168
  - .rspec
168
169
  - .ruby-gemset
169
170
  - .ruby-version