furnace 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,6 +3,7 @@ require 'bundler/setup'
3
3
 
4
4
  task :default => :test
5
5
 
6
+ desc "Run test suite"
6
7
  task :test do
7
8
  require 'bacon'
8
9
  Bacon.summary_at_exit
@@ -13,9 +14,10 @@ end
13
14
 
14
15
  PAGES_REPO = 'git@github.com:whitequark/furnace'
15
16
 
17
+ desc "Build and deploy documentation to GitHub pages"
16
18
  task :pages do
17
- system "git clone #{PAGES_REPO} gh-temp/ -b gh-pages; rm gh-temp/* -rf" or abort
18
- system "yardoc -o gh-temp/; cd gh-temp/; git add -A; git commit -m 'Updated pages.'" or abort
19
- system "cd gh-temp/; git push -f origin gh-pages" or abort
19
+ system "git clone #{PAGES_REPO} gh-temp/ -b gh-pages; rm gh-temp/* -rf; touch gh-temp/.nojekyll" or abort
20
+ system "yardoc -o gh-temp/; cp gh-temp/frames.html gh-temp/index.html; sed s,index.html,_index.html, -i gh-temp/index.html" or abort
21
+ system "cd gh-temp/; git add -A; git commit -m 'Updated pages.'; git push -f origin gh-pages" or abort
20
22
  FileUtils.rm_rf 'gh-temp'
21
- end
23
+ end
@@ -230,18 +230,18 @@ module Furnace::AST
230
230
  # @param [AST::Node, nil] node
231
231
  # @return [AST::Node]
232
232
  def process(node)
233
- if node
234
- # Invoke a specific handler
235
- on_handler = :"on_#{node.type}"
236
- if respond_to? on_handler
237
- new_node = send on_handler, node
238
- else
239
- new_node = handler_missing(node)
240
- end
233
+ node = node.to_ast
241
234
 
242
- node = new_node if new_node
235
+ # Invoke a specific handler
236
+ on_handler = :"on_#{node.type}"
237
+ if respond_to? on_handler
238
+ new_node = send on_handler, node
239
+ else
240
+ new_node = handler_missing(node)
243
241
  end
244
242
 
243
+ node = new_node if new_node
244
+
245
245
  node
246
246
  end
247
247
 
@@ -1,3 +1,3 @@
1
1
  module Furnace
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -177,4 +177,9 @@ describe AST::Processor do
177
177
  | (integer 3)))
178
178
  SEXP
179
179
  end
180
+
181
+ it 'should refuse to process non-nodes' do
182
+ -> { @processor.process(nil) }.should.raise NoMethodError, %r|to_ast|
183
+ -> { @processor.process([]) }.should.raise NoMethodError, %r|to_ast|
184
+ end
180
185
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: furnace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-23 00:00:00.000000000 Z
12
+ date: 2012-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 3607178250975202722
121
+ hash: -2809790994543949274
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: 3607178250975202722
130
+ hash: -2809790994543949274
131
131
  requirements: []
132
132
  rubyforge_project:
133
133
  rubygems_version: 1.8.23