webget_ruby_dsl_reader 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig ADDED
@@ -0,0 +1 @@
1
+ ;�뤉�jm17l�ٙ�lCq�ݐCr}~�-J�N4 {�ԡD������������=�W���,TEY4!�cRQX�R&�Ϲ*�
@@ -0,0 +1,33 @@
1
+ =begin rdoc
2
+
3
+ = WebGet Ruby Gem: DSL Reader for Domain Specific Languages
4
+
5
+ Author:: Joel Parker Henderson, joelparkerhenderson@gmail.com
6
+ Copyright:: Copyright (c) 2006-2010 Joel Parker Henderson
7
+ License:: CreativeCommons License, Non-commercial Share Alike
8
+ License:: LGPL, GNU Lesser General Public License
9
+
10
+ Abstraction of DSL Reader from Declarative Authorization plugin
11
+
12
+ =end
13
+
14
+ require 'webget_ruby_dsl_error'
15
+ require 'webget_ruby_dsl_methods'
16
+
17
+ class DSLReader
18
+
19
+ def initialize(dsl_methods=nil)
20
+ @dsl_methods=dsl_methods
21
+ end
22
+
23
+ # Parse DSL text by calling DSLMethods instance_eval
24
+ #
25
+ # Rescue SyntaxError, NoMethodError, NameError => Raise DSLError
26
+
27
+ def parse (dsl_text)
28
+ DSLMethods.new(self).instance_eval(dsl_text)
29
+ rescue SyntaxError, NoMethodError, NameError => e
30
+ raise DSLError, "DSL Error: #{e}"
31
+ end
32
+
33
+ end
@@ -0,0 +1,19 @@
1
+ require 'test/unit'
2
+ require 'webget_ruby_dsl_reader'
3
+ require 'webget_ruby_dsl_methods'
4
+
5
+ class Testing < Test::Unit::TestCase
6
+
7
+ def test_parse
8
+ reader=DSLReader.new
9
+ assert_nothing_raised{
10
+ result = reader.parse("def foo \n return 1 \n end")
11
+ }
12
+ end
13
+
14
+ end
15
+
16
+ class MyDSLMethods < DSLMethods
17
+ def foo
18
+ end
19
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webget_ruby_dsl_reader
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ platform: ruby
6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UEBxMNU2FuIEZyYW5jaXNjbzETMBEGA1UEChMKV2ViR2V0LmNvbTETMBEGA1UE
28
+ CxMKV2ViR2V0LmNvbTETMBEGA1UEAxMKV2ViR2V0LmNvbTEgMB4GCSqGSIb3DQEJ
29
+ ARYRd2ViZ2V0QHdlYmdldC5jb22CCQCJUqhJA0GmSDAMBgNVHRMEBTADAQH/MA0G
30
+ CSqGSIb3DQEBBQUAA4GBADzVXlwuff0/w3yK4LflGKKhtC3oChIrwmSyP6tk628N
31
+ BHokpc4Kz63xSXqzYTnBS7rFBwlYThtNalQeWmoUjGh3Z0ZR0JlhU0ln8899LuJ3
32
+ DXnLFY0cVuBnNDMOOFl8vk1qIcZjcTovhzgcixpG6Uk5qmUsKHRLQf4oQJx7TfLK
33
+ -----END CERTIFICATE-----
34
+
35
+ date: 2010-02-17 00:00:00 -08:00
36
+ default_executable:
37
+ dependencies:
38
+ - !ruby/object:Gem::Dependency
39
+ name: webget_ruby_dsl_error
40
+ type: :runtime
41
+ version_requirement:
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.0.4
47
+ version:
48
+ - !ruby/object:Gem::Dependency
49
+ name: webget_ruby_dsl_methods
50
+ type: :runtime
51
+ version_requirement:
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.0.4
57
+ version:
58
+ description:
59
+ email: webget@webget.com
60
+ executables: []
61
+
62
+ extensions: []
63
+
64
+ extra_rdoc_files: []
65
+
66
+ files:
67
+ - lib/webget_ruby_dsl_reader.rb
68
+ has_rdoc: true
69
+ homepage: http://webget.com/
70
+ licenses: []
71
+
72
+ post_install_message:
73
+ rdoc_options: []
74
+
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: "0"
82
+ version:
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: "0"
88
+ version:
89
+ requirements: []
90
+
91
+ rubyforge_project:
92
+ rubygems_version: 1.3.5
93
+ signing_key:
94
+ specification_version: 3
95
+ summary: "WebGet Ruby Gem: Domain Specific Language Reader to parse DSL text"
96
+ test_files:
97
+ - test/webget_ruby_dsl_reader_test.rb
metadata.gz.sig ADDED
Binary file