zomg 1.0.0 → 1.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.
@@ -1,3 +1,9 @@
1
+ === 1.0.1
2
+
3
+ * 1 bugfix
4
+
5
+ * Prefix modules must be split
6
+
1
7
  === 1.0.0 / 2008-07-22
2
8
 
3
9
  * 1 major enhancement
@@ -13,9 +13,9 @@ module ZOMG
13
13
 
14
14
  class Lexer < Racc::Parser
15
15
 
16
- module_eval <<'..end lib/yacc.y modeval..id83b5753790', 'lib/yacc.y', 861
16
+ module_eval <<'..end lib/yacc.y modeval..ideff8129053', 'lib/yacc.y', 861
17
17
  include ZOMG::IDL::Nodes
18
- ..end lib/yacc.y modeval..id83b5753790
18
+ ..end lib/yacc.y modeval..ideff8129053
19
19
 
20
20
  ##### racc 1.4.5 generates ###
21
21
 
@@ -31,7 +31,9 @@ module ZOMG
31
31
  r2r = Ruby2Ruby.new
32
32
  ruby_code = r2r.process(to_ruby_sexp)
33
33
  if prefix
34
- "module #{prefix}\n#{ruby_code}\nend"
34
+ modules = prefix.split(/::/).map { |m| "module #{m}\n" }
35
+ ends = modules.map { |m| "end" }.join("\n")
36
+ "#{modules}#{ruby_code}\n#{ends}"
35
37
  else
36
38
  ruby_code
37
39
  end
@@ -1,3 +1,3 @@
1
1
  module ZOMG
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -10,6 +10,7 @@ class NodeTest < ZOMG::Test
10
10
  @tree.to_ruby
11
11
  }
12
12
  ruby_with_prefix = @tree.to_ruby('A::B')
13
- assert_match(/module A::B/, ruby_with_prefix)
13
+ assert_match(/module A/, ruby_with_prefix)
14
+ assert_match(/module B/, ruby_with_prefix)
14
15
  end
15
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zomg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-18 00:00:00 -07:00
12
+ date: 2008-08-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency