mucgly 0.2.0 → 0.2.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,5 +1,5 @@
1
1
  module Mucgly
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  def Mucgly.version
4
4
  Mucgly::VERSION
5
5
  end
@@ -0,0 +1,17 @@
1
+ /* Test that mucgly can help text editor's language mode to be in sync
2
+ with the mucgly macros. */
3
+
4
+
5
+ int my_func( int a1, int a2 )
6
+ {
7
+ int c;
8
+
9
+ if ( a1 >= a2 )
10
+ c = a1 - a2;
11
+ else
12
+ c = a2 - a1;
13
+
14
+ c = c * a1;
15
+
16
+ return c;
17
+ }
@@ -0,0 +1,17 @@
1
+ /* Test that mucgly can help text editor's language mode to be in sync
2
+ with the mucgly macros. */
3
+
4
+
5
+ int my_func( int a1, int a2 )
6
+ {
7
+ int c;
8
+
9
+ if ( a1 >= a2 )
10
+ c = a1 - a2;
11
+ else
12
+ c = a2 - a1;
13
+
14
+ c = c * a1;
15
+
16
+ return c;
17
+ }
@@ -0,0 +1,25 @@
1
+ /* Test that mucgly can help text editor's language mode to be in sync
2
+ with the mucgly macros. */
3
+ /*-<+ # Create a function that is inlined with mucgly.
4
+ def inline_mult( a, b )
5
+ Mucgly.write "#{a} * #{b}"
6
+ end
7
+ >-*/
8
+ /*-<+:eater @>-*/
9
+ /*-<+Mucgly.seteater( "@" )>-*/
10
+ /*-<+Mucgly.multihook( [ "rx(", ")", "(" ] )>-*/
11
+
12
+
13
+ int my_func( int a1, int a2 )
14
+ {
15
+ int c;
16
+
17
+ if ( a1 >= a2 )
18
+ c = a1 - a2;
19
+ else
20
+ c = a2 - a1;
21
+
22
+ c = rx( inline_mult( String.new("c"), "a1" )\@" );
23
+ \@"
24
+ return c;
25
+ }
@@ -10,7 +10,7 @@ def runTest( cmdopts, test, sep = ".rx.txt" )
10
10
  system( "export RUBYLIB=../lib; ../bin/mucgly -i -m #{cmdopts} -f #{test}#{sep} -o #{rf}" )
11
11
 
12
12
  if false
13
- # if true
13
+ #if true
14
14
  # Populate golden files after inspection.
15
15
  system( "cp #{rf} #{gf}" )
16
16
  end
@@ -51,4 +51,6 @@ class MucglyTest < Test::Unit::TestCase
51
51
 
52
52
  def test_multihook_cli() runTest( "-u '/*..' -u '..*/' -u '_L/*' -u '_J*/'", "test_multihook_cli", ".rx.c" ); end
53
53
 
54
+ def test_langmode() runTest( "-b '/*-<' -e '>-*/'", "test_langmode", ".rx.c" ); end
55
+
54
56
  end
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mucgly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Tero Isannainen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2016-04-24 00:00:00.000000000 Z
12
+ date: 2016-10-24 00:00:00.000000000 Z
12
13
  dependencies: []
13
- description: |-
14
- Mucgly is a macro expander for inline macros that exist in the middle
14
+ description: ! 'Mucgly is a macro expander for inline macros that exist in the middle
15
+
15
16
  of body text. Mucgly is useful for code generation and all kinds of
17
+
16
18
  templating systems. The macros are expected to be mostly regular Ruby
17
- code, but a few special commands are also available.
19
+
20
+ code, but a few special commands are also available.'
18
21
  email: tero.isannainen@gmail.com
19
22
  executables:
20
23
  - mucgly
@@ -23,81 +26,85 @@ extensions:
23
26
  extra_rdoc_files:
24
27
  - README.rdoc
25
28
  files:
29
+ - README.rdoc
26
30
  - CHANGELOG.rdoc
27
31
  - LICENSE
28
- - README.rdoc
29
- - bin/mucgly
30
- - doc/Mucgly.html
31
- - doc/_index.html
32
- - doc/class_list.html
32
+ - lib/version.rb
33
+ - ext/mucgly/extconf.rb
34
+ - ext/mucgly/mucgly.c
35
+ - doc/top-level-namespace.html
36
+ - doc/js/full_list.js
37
+ - doc/js/app.js
38
+ - doc/js/jquery.js
39
+ - doc/index.html
33
40
  - doc/css/common.css
34
41
  - doc/css/full_list.css
35
42
  - doc/css/style.css
36
- - doc/file.CHANGELOG.html
37
43
  - doc/file.README.html
44
+ - doc/method_list.html
38
45
  - doc/file_list.html
46
+ - doc/Mucgly.html
47
+ - doc/class_list.html
48
+ - doc/_index.html
49
+ - doc/file.CHANGELOG.html
39
50
  - doc/frames.html
40
- - doc/index.html
41
- - doc/js/app.js
42
- - doc/js/full_list.js
43
- - doc/js/jquery.js
44
- - doc/method_list.html
45
- - doc/top-level-namespace.html
46
- - ext/mucgly/extconf.rb
47
- - ext/mucgly/mucgly.c
48
- - lib/version.rb
49
- - test/doit
50
- - test/golden/test_basic.txt
51
+ - test/test_skip.txt
51
52
  - test/golden/test_block.txt
53
+ - test/golden/test_basic.txt
54
+ - test/golden/test_specials_cli.txt
55
+ - test/golden/test_multihook_cli.txt
52
56
  - test/golden/test_file_ctrl.txt
53
57
  - test/golden/test_multihook.txt
54
- - test/golden/test_multihook_cli.txt
55
58
  - test/golden/test_redirect.txt
56
- - test/golden/test_specials_cli.txt
57
59
  - test/golden/test_specials_cmd.txt
58
- - test/result/test_basic.txt
60
+ - test/golden/test_langmode.txt
61
+ - test/test_multihook_cli.rx.c
62
+ - test/doit
63
+ - test/test_multihook.rx.c
64
+ - test/test_block.rx.txt
65
+ - test/test_specials_cmd.rx.txt
66
+ - test/test_langmode.rx.c
67
+ - test/test_include.rb
68
+ - test/test_include.txt
69
+ - test/test_basic.rx.txt
70
+ - test/test_specials_cli.rx.txt
71
+ - test/test_mucgly.rb
72
+ - test/test_file_ctrl.rx.txt
59
73
  - test/result/test_block.txt
74
+ - test/result/test_basic.txt
75
+ - test/result/test_specials_cli.txt
76
+ - test/result/test_multihook_cli.txt
60
77
  - test/result/test_file_ctrl.txt
61
78
  - test/result/test_multihook.txt
62
- - test/result/test_multihook_cli.txt
79
+ - test/result/test_specials_cmd2.txt
63
80
  - test/result/test_redirect.txt
64
- - test/result/test_specials_cli.txt
65
81
  - test/result/test_specials_cmd.txt
66
- - test/result/test_specials_cmd2.txt
67
- - test/test_basic.rx.txt
68
- - test/test_block.rx.txt
69
- - test/test_file_ctrl.rx.txt
70
- - test/test_include.rb
71
- - test/test_include.txt
72
- - test/test_mucgly.rb
73
- - test/test_multihook.rx.c
74
- - test/test_multihook_cli.rx.c
75
- - test/test_skip.txt
76
- - test/test_specials_cli.rx.txt
77
- - test/test_specials_cmd.rx.txt
82
+ - test/result/test_langmode.txt
83
+ - bin/mucgly
78
84
  homepage:
79
85
  licenses:
80
86
  - Ruby
81
- metadata: {}
82
87
  post_install_message: Check README...
83
88
  rdoc_options: []
84
89
  require_paths:
85
90
  - lib
86
91
  required_ruby_version: !ruby/object:Gem::Requirement
92
+ none: false
87
93
  requirements:
88
- - - ">="
94
+ - - ! '>='
89
95
  - !ruby/object:Gem::Version
90
96
  version: 2.0.0
91
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
92
99
  requirements:
93
- - - ">="
100
+ - - ! '>='
94
101
  - !ruby/object:Gem::Version
95
102
  version: '0'
96
103
  requirements: []
97
104
  rubyforge_project:
98
- rubygems_version: 2.2.2
105
+ rubygems_version: 1.8.23
99
106
  signing_key:
100
- specification_version: 4
107
+ specification_version: 3
101
108
  summary: Mucgly processes inline macros.
102
109
  test_files:
103
110
  - test/test_skip.txt
@@ -109,11 +116,13 @@ test_files:
109
116
  - test/golden/test_multihook.txt
110
117
  - test/golden/test_redirect.txt
111
118
  - test/golden/test_specials_cmd.txt
119
+ - test/golden/test_langmode.txt
112
120
  - test/test_multihook_cli.rx.c
113
121
  - test/doit
114
122
  - test/test_multihook.rx.c
115
123
  - test/test_block.rx.txt
116
124
  - test/test_specials_cmd.rx.txt
125
+ - test/test_langmode.rx.c
117
126
  - test/test_include.rb
118
127
  - test/test_include.txt
119
128
  - test/test_basic.rx.txt
@@ -129,4 +138,4 @@ test_files:
129
138
  - test/result/test_specials_cmd2.txt
130
139
  - test/result/test_redirect.txt
131
140
  - test/result/test_specials_cmd.txt
132
- has_rdoc:
141
+ - test/result/test_langmode.txt
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 5cfa79d284e275ab42157047bc80f2fcf41698a9
4
- data.tar.gz: c24ba9a87c3c465d7694a2cd46e4169d362a943b
5
- SHA512:
6
- metadata.gz: 656bb80bac123cce4fb236aeb374dddfd11961732c8a59b00a190804f4117453163af9d988b1e472f9577891a60a7ef53fa67568bab6beda041dc23616581466
7
- data.tar.gz: a91653486da910a3a38a6961962d7391a0e2947365e1e0448186afb107937130c9e30049722b36a7bdfe0bd49ee69070b52e8026270429060e33d90eb88c981c