drep 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.3.3 2009-07-20
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/Manifest.txt ADDED
@@ -0,0 +1,20 @@
1
+ History.txt
2
+ Manifest.txt
3
+ PostInstall.txt
4
+ README.rdoc
5
+ README.txt
6
+ Rakefile
7
+ assets/providers/drep_ml_provider.rb
8
+ assets/rules/drep_wa_rules.rb
9
+ assets/templates/drep_tda_template.erb
10
+ bin/drep
11
+ lib/drep.rb
12
+ lib/drep/alterers/drep_extenders.rb
13
+ lib/drep/alterers/drep_helpers.rb
14
+ lib/drep/alterers/drep_validators.rb
15
+ lib/drep/core/drep_binder.rb
16
+ lib/drep/core/drep_environment.rb
17
+ lib/drep/core/drep_executer.rb
18
+ lib/drep/core/interfaces/drep_runnable.rb
19
+ lib/drep/drep_cli.rb
20
+ �opying.txt
data/PostInstall.txt ADDED
@@ -0,0 +1,6 @@
1
+ Thank you for installing the DRep system
2
+
3
+ Please be sure to read Readme.rdoc and History.rdoc
4
+ for useful information about this release.
5
+
6
+ For more information on DRep, see http:/85.17.184.9/drep
data/README.rdoc ADDED
@@ -0,0 +1,93 @@
1
+ = Dango Report
2
+
3
+ == Description
4
+
5
+ DRep is a simple data collector and report generator. It can collect data through a specific
6
+ data provider and generate a report by populating a specified template with the picked up data.
7
+
8
+ == Features:
9
+
10
+ * Data source-agnostic report generator
11
+ * Predefined examples to help you to get started
12
+
13
+ == Requirements
14
+
15
+ * Ruby 1.8.6 or later
16
+
17
+ === Extra Dependencies
18
+
19
+ * nokogiri (version 1.3.2 or later)
20
+
21
+ Required for the bundled example and most likely for the majority of custom data providers
22
+ Use <em>--ignore-dependencies</em> Gem flag if you do not want to install this library alongside with the DRep
23
+
24
+ === Extra Development Dependencies
25
+
26
+ * newgem (version 1.5.1 or later)
27
+
28
+ == Installation
29
+
30
+ === Gem Installation
31
+
32
+ In order to setup DRep you will need to have RubyGems installed.
33
+ If you have it, then you can proceed with the following command:
34
+
35
+ gem install drep
36
+
37
+ Note that you must have the correspondent account privileges
38
+ on your system in order to use this commands.
39
+
40
+ For other software bundles (including links for the source code packages)
41
+ consider visiting the official page of the project.
42
+
43
+ * http://85.17.184.9/drep
44
+
45
+ == Synopsis
46
+
47
+ For now, DRep can only be used as a standalone command line application.
48
+
49
+ === Command Line Usage
50
+
51
+ The list of command line options can be obtained from the DRep executable with one of the following commands:
52
+
53
+ drep -h
54
+ drep --help
55
+
56
+ == Development
57
+
58
+ === Source Repositories
59
+
60
+ DRep is currently hosted at RubyForge and GitHub.
61
+
62
+ The RubyForge page is
63
+ * http://rubyforge.org/projects/drep
64
+
65
+ The github web page is
66
+ * http://github.com/tda/drep
67
+
68
+ The public git clone URL is
69
+ * http://github.com/tda/drep.git
70
+
71
+ == Additional Information
72
+
73
+ Author:: Toksaitov Dmitrii Alexandrovich <toksaitov.d@gmail.com>
74
+
75
+ Project web site:: http://85.17.184.9/drep
76
+ Project forum:: http://groups.google.com/group/drep-system
77
+
78
+ == License
79
+
80
+ (The GNU General Public License)
81
+
82
+ DRep is a simple data collector and report generator.
83
+ Copyright (C) 2009 Toksaitov Dmitrii Alexandrovich
84
+
85
+ This program is free software: you can redistribute it and/or modify
86
+ it under the terms of the GNU General Public License as published by
87
+ the Free Software Foundation, either version 3 of the License, or
88
+ (at your option) any later version.
89
+
90
+ This program is distributed in the hope that it will be useful,
91
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
92
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93
+ GNU General Public License for more details.
data/README.txt ADDED
@@ -0,0 +1,93 @@
1
+ = Dango Report
2
+
3
+ == Description
4
+
5
+ DRep is a simple data collector and report generator. It can collect data through a specific
6
+ data provider and generate a report by populating a specified template with the picked up data.
7
+
8
+ == Features:
9
+
10
+ * Data source-agnostic report generator
11
+ * Predefined examples to help you to get started
12
+
13
+ == Requirements
14
+
15
+ * Ruby 1.8.6 or later
16
+
17
+ === Extra Dependencies
18
+
19
+ * nokogiri (version 1.3.2 or later)
20
+
21
+ Required for the bundled example and most likely for the majority of custom data providers
22
+ Use "--ignore- dependencies" Gem flag if you do not want to install this library alongside with the DRep
23
+
24
+ === Extra Development Dependencies
25
+
26
+ * newgem (version 1.5.1 or later)
27
+
28
+ == Installation
29
+
30
+ === Gem Installation
31
+
32
+ In order to setup DRep you will need to have RubyGems installed.
33
+ If you have it, then you can proceed with the following command:
34
+
35
+ gem install drep
36
+
37
+ Note that you must have the correspondent account privileges
38
+ on your system in order to use this commands.
39
+
40
+ For other software bundles (including links for the source code packages)
41
+ consider visiting the official page of the project.
42
+
43
+ * http://85.17.184.9/drep
44
+
45
+ == Synopsis
46
+
47
+ For now, DRep can only be used as a standalone command line application.
48
+
49
+ === Command Line Usage
50
+
51
+ The list of command line options can be obtained from the DRep executable with one of the following commands:
52
+
53
+ drep -h
54
+ drep --help
55
+
56
+ == Development
57
+
58
+ === Source Repositories
59
+
60
+ DRep is currently hosted at RubyForge and GitHub.
61
+
62
+ The RubyForge page is
63
+ * http://rubyforge.org/projects/drep
64
+
65
+ The github web page is
66
+ * http://github.com/tda/drep
67
+
68
+ The public git clone URL is
69
+ * http://github.com/tda/drep.git
70
+
71
+ == Additional Information
72
+
73
+ Author:: Toksaitov Dmitrii Alexandrovich <toksaitov.d@gmail.com>
74
+
75
+ Project web site:: http://85.17.184.9/drep
76
+ Project forum:: http://groups.google.com/group/drep-system
77
+
78
+ == License
79
+
80
+ (The GNU General Public License)
81
+
82
+ DRep is a simple data collector and report generator.
83
+ Copyright (C) 2009 Toksaitov Dmitrii Alexandrovich
84
+
85
+ This program is free software: you can redistribute it and/or modify
86
+ it under the terms of the GNU General Public License as published by
87
+ the Free Software Foundation, either version 3 of the License, or
88
+ (at your option) any later version.
89
+
90
+ This program is distributed in the hope that it will be useful,
91
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
92
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93
+ GNU General Public License for more details.
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ # DRep - Modular Open Software Tester.
2
+ # Copyright (C) 2009 Dmitrii Toksaitov
3
+ #
4
+ # This file is part of DRep.
5
+ #
6
+ # DRep is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # DRep is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with DRep. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ require 'rubygems'
20
+
21
+ gem 'hoe', '>= 2.1.0'
22
+ require 'hoe'
23
+
24
+ DREP_ROOT = File.expand_path(File.dirname(__FILE__))
25
+ require File.expand_path(File.join(DREP_ROOT, 'lib', 'drep'))
26
+
27
+ Hoe.plugin :newgem
28
+
29
+ # Generate all the Rake tasks
30
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
31
+ $hoe = Hoe.spec DRep::UNIX_NAME do
32
+ self.developer DRep::AUTHOR, DRep::EMAIL
33
+ self.version = DRep::VERSION
34
+
35
+ self.post_install_message = File.read('PostInstall.txt')
36
+ self.readme_file = 'README.txt'
37
+
38
+ self.extra_deps = [['nokogiri', '>= 1.3.2']]
39
+ self.extra_dev_deps = [['newgem', '>= 1.5.1']]
40
+ end
41
+
42
+ require 'newgem/tasks'
43
+
44
+ Dir[File.join(DREP_ROOT, 'tasks', '**', '*.{rb,task,tasks}')].each do |file| require(file) end
@@ -0,0 +1,122 @@
1
+ require 'open-uri'
2
+ require 'nokogiri'
3
+
4
+ module DRep
5
+
6
+ class Task
7
+ NAME = 'DRep .*ML Parser'
8
+ DESCRIPTION = 'Simple HTML/XML values extractor based on Nokogiri and Open-URI libs.'
9
+
10
+ attr_reader :env
11
+
12
+ def initialize(environment)
13
+ unless environment.nil?
14
+ @env = environment
15
+ else
16
+ raise(ArgumentError, "Invalid environment", caller())
17
+ end
18
+ end
19
+
20
+ def run(specs)
21
+ result = {}
22
+
23
+ sources, rules_list = specs[:sources], specs[:rules]
24
+
25
+ raise "Invalid sources list" unless sources.is_a?(Enumerable)
26
+ raise "Invalid rules list" unless rules_list.is_a?(Enumerable)
27
+
28
+ sources.each do |source|
29
+ doc = load_doc(source)
30
+ valid doc do
31
+ rules_list.each do |rules|
32
+ temp_res = process_rules_sources(doc, rules)
33
+ result.update(temp_res) unless temp_res.nil?
34
+ end
35
+ end
36
+ end
37
+
38
+ return result
39
+ end
40
+
41
+ private
42
+ def load_doc(source)
43
+ result = nil
44
+
45
+ begin
46
+ msg("Processing source: #{source}")
47
+ open(source) do |html|
48
+ result = Nokogiri::HTML(html.read, nil, html.charset)
49
+ end
50
+ rescue Exception => e
51
+ err("Failed to load the source: #{e.message}")
52
+ end
53
+
54
+ return result
55
+ end
56
+
57
+ def process_rules_sources(mldoc, rules)
58
+ result = nil
59
+
60
+ begin
61
+ msg("Loading rules source: #{rules}")
62
+ require File.expand_path(rules)
63
+
64
+ if defined? Rules.new()
65
+ msg("Processing rules source: #{rules}")
66
+ result = process_rules(mldoc, Rules.new(@env).get())
67
+ else
68
+ err("The source with rules was not defined in: #{rules}")
69
+ end
70
+ rescue Exception => e
71
+ err("Failed to process source with rules: #{e.message}")
72
+ end
73
+
74
+ return result
75
+ end
76
+
77
+ def process_rules(mldoc, rules)
78
+ result = {}
79
+
80
+ raise "Rules are invalid" unless rules.is_a?(Hash)
81
+
82
+ rules.each do |var, rule|
83
+ temp_res = extract_var(mldoc, rule)
84
+
85
+ if valid?(var, temp_res) and not temp_res.empty?
86
+ msg("Extracted #{var}: #{temp_res.inspect()}") if @env.options.debug
87
+ result[var] = temp_res
88
+ else
89
+ err("Failed to extract #{var.nil? ? 'a variable' : "variable: #{var}"}")
90
+ end
91
+ end
92
+
93
+ msg("Number of extracted vars: #{result.size}")
94
+
95
+ return result
96
+ end
97
+
98
+ def extract_var(mldoc, rule)
99
+ result = []
100
+
101
+ xpath, str_proc = nil
102
+ xpath, str_proc = rule[0], rule[1] if rule.is_a?(Array)
103
+
104
+ if valid?(xpath, mldoc)
105
+ mldoc.xpath(xpath).each do |elem|
106
+ query_res = elem.to_html()
107
+ result << query_res unless query_res.nil?
108
+ end
109
+ if str_proc.is_a?(Proc)
110
+ begin
111
+ result = str_proc.call(result)
112
+ rescue Exception => e
113
+ err("Rule lambda execution failed: #{e.message}")
114
+ end
115
+ end
116
+ end
117
+
118
+ return result
119
+ end
120
+ end
121
+
122
+ end
@@ -0,0 +1,151 @@
1
+ module DRep
2
+
3
+ class Rules
4
+ NAME = 'DRep WA Rules'
5
+ PROVIDER = 'drep_ml_provider'
6
+
7
+ VERSION = '0.0.1'
8
+ VALID_DATE = '23.07.2009'
9
+ DESCRIPTION = "Rules for WA section."
10
+
11
+ WA_RULES =
12
+ {
13
+ :ru_title =>
14
+ [
15
+ "//meta[@name='description']/@content",
16
+ lambda { |strs| /content="(.*)"/.match(first_text(strs))[1] }
17
+ ],
18
+ :alt_title =>
19
+ [
20
+ "//a[@class='estimation']/parent::font/parent::td/text()",
21
+ lambda { |strs| first_text(strs, /[a-z0-9\(\)\[\]{}\s:]+/i) }
22
+ ],
23
+ :year =>
24
+ [
25
+ "//a[@class='estimation']/parent::font/parent::td/a",
26
+ lambda { |strs| first_text(strs) }
27
+ ],
28
+
29
+ :all_alt_titles =>
30
+ [
31
+ "//a[@class='estimation']/parent::font/parent::td/text()",
32
+ lambda { |strs| strs.strip_tags() }
33
+ ],
34
+
35
+ :country =>
36
+ [
37
+ "//a[@class='estimation']/parent::font",
38
+ lambda { |strs| first_text(first_text(strs).split("\n"), /������������:.*/).lspart(':') }
39
+ ],
40
+ :genres =>
41
+ [
42
+ "//a[@class='estimation']/parent::font",
43
+ lambda { |strs| first_text(first_text(strs).split("\n"), /����:.*/).lspart(':') }
44
+ ],
45
+ :type =>
46
+ [
47
+ "//a[@class='estimation']/parent::font",
48
+ lambda { |strs| first_text(first_text(strs).split("\n"), /���:.*/).lspart(':') }
49
+ ],
50
+ :release_date =>
51
+ [
52
+ "//a[@class='estimation']/parent::font",
53
+ lambda { |strs| first_text(first_text(strs).split("\n"), /��������:.*/).lspart(':') }
54
+ ],
55
+ :air_period =>
56
+ [
57
+ "//a[@class='estimation']/parent::font",
58
+ lambda { |strs| first_text(first_text(strs).split("\n"), /������:.*/).lspart(':') }
59
+ ],
60
+ :air_time =>
61
+ [
62
+ "//a[@class='estimation']/parent::font",
63
+ lambda { |strs| first_text(first_text(strs).split("\n"), /������ �.*/).lspart('�') }
64
+ ],
65
+ :director =>
66
+ [
67
+ "//a[@class='estimation']/parent::font",
68
+ lambda { |strs| first_text(first_text(strs).split("\n"), /�������:.*/).lspart(':') }
69
+ ],
70
+ :screenwriter =>
71
+ [
72
+ "//a[@class='estimation']/parent::font",
73
+ lambda { |strs| first_text(first_text(strs).split("\n"), /��������:.*/).lspart(':') }
74
+ ],
75
+ :original_work_author=>
76
+ [
77
+ "//a[@class='estimation']/parent::font",
78
+ lambda { |strs| first_text(first_text(strs).split("\n"), /����� ���������:.*/).lspart(':') }
79
+ ],
80
+ :original_work =>
81
+ [
82
+ "//a[@class='estimation']/parent::font",
83
+ lambda { |strs| first_text(first_text(strs).split("\n"), /����� ��.*/).rspart(':') }
84
+ ],
85
+ :original_work_name =>
86
+ [
87
+ "//a[@class='estimation']/parent::font",
88
+ lambda { |strs| first_text(first_text(strs).split("\n"), /����� ��.*/).lspart(':') }
89
+ ],
90
+
91
+ :raiting_avg_score =>
92
+ [
93
+ "//a[@class='estimation']/parent::font",
94
+ lambda { |strs| first_text(first_text(strs).split("\n"), /������� ����:.*/).lspart(':') }
95
+ ],
96
+
97
+ :raiting_pos =>
98
+ [
99
+ "//a[@class='estimation']/parent::font",
100
+ lambda { |strs| first_text(first_text(strs).split("\n"), /����� � ��������:.*/).lspart(':') }
101
+ ],
102
+ :votes_num =>
103
+ [
104
+ "//a[@class='estimation']/parent::font",
105
+ lambda { |strs|
106
+ first_text(first_text(strs).split("\n"), /�������������:.*/).lspart(':').gsub(/\[.+\]/, '')
107
+ }
108
+ ],
109
+
110
+ :brief_content =>
111
+ [
112
+ "//p[@class='review']",
113
+ lambda { |strs| first_text(strs) }
114
+ ],
115
+
116
+ :logical_view_order =>
117
+ [
118
+ "//table[descendant::*[@background='img/pixel.gif']]/following-sibling::table[1]",
119
+ lambda { |strs| first_text(strs, /(\s*#\d+[^#]*)+/).gsub(/(#\d+)/, "\n\\1").safe_strip() }
120
+ ],
121
+ :episodes =>
122
+ [
123
+ "//table[descendant::*[@background='img/pixel.gif']]/following-sibling::table[1]",
124
+ lambda { |strs| first_text(strs, /(\d+[\d\s\[\]\(\)]*\.).*/m) }
125
+ ],
126
+
127
+ :all_general_info =>
128
+ [
129
+ "//a[@class='estimation']/parent::font",
130
+ lambda { |strs| first_text(strs).sub('������ �', '������ �:') }
131
+ ]
132
+ }
133
+
134
+ attr_reader :env
135
+
136
+ def initialize(environment)
137
+ unless environment.nil?
138
+ @env = environment
139
+ else
140
+ raise(ArgumentError, "Invalid environment", caller())
141
+ end
142
+ end
143
+
144
+ def get()
145
+ msg("Rules are predefined. Number of rules: #{WA_RULES.size}")
146
+
147
+ return WA_RULES
148
+ end
149
+ end
150
+
151
+ end
@@ -0,0 +1,110 @@
1
+ <%# Simple WA to BBCode template %>
2
+ <%# Version: 0.0.1 %>
3
+ <%# Date: 22.07.2009 %>
4
+ <%# Type: BBCode %>
5
+ <%# Language: Russian %>
6
+ <%# --------------------------------------------------------------------------------- %>
7
+ <%# Board Title %>
8
+ <%= @ru_title %> / <%= @alt_title %>, (<%= @year %>) [<%= @genres %>] ToDo:RipType {ToDo:SubsInfo}
9
+ <%# Topic Title %>
10
+ [font="Tahoma"][size=20][b]<%= @ru_title %> [color=#AAAAAA]/[/color] <%= @alt_title %> [[color=<%= @year.to_i() == Time.now.year ? "darkred" : "darkblue" %>]<%= @year %>[/color]][/b][/size][/font]
11
+
12
+ <%# Cover %>
13
+ [img]<%= first_valid(@main_cover, 'ToDo') %>[/img]
14
+
15
+ <%# Other possible titles %>
16
+ <% @all_alt_titles.each do |title| %>
17
+ <%= title %>
18
+
19
+ <% end %>
20
+
21
+ <%# General information %>
22
+ <% valid(@country) do %>
23
+ [b]������������:[/b] <%= @country %>
24
+ <% end %>
25
+ <% valid(@genres) do %>
26
+ [b]�����:[/b] <%= @genres %>
27
+ <% end %>
28
+ <% valid(@type) do %>
29
+ [b]���:[/b] <%= @type %>
30
+ <% end %>
31
+ <% valid(@release_date) do %>
32
+ [b]��������:[/b] <%= @release_date %>
33
+ <% end %>
34
+ <% valid(@air_period) do %>
35
+ [b]������:[/b] <%= @air_period %>
36
+ <% end %>
37
+ <% valid(@air_time) do %>
38
+ [b]������ �:[/b] <%= @air_time %>
39
+ <% end %>
40
+
41
+ <% valid(@director) do %>
42
+ [b]�������:[/b] <%= @director %>
43
+ <% end %>
44
+ <% valid(@screenwriter) do %>
45
+ [b]��������:[/b] <%= @screenwriter %>
46
+ <% end %>
47
+ <% valid(@original_work_author) do %>
48
+ [b]����� ���������:[/b] <%= @original_work_author %>
49
+ <% end %>
50
+
51
+ <% valid(@original_work, @original_work_name) do %>
52
+ [b]<%= @original_work %>:[/b] <%= @original_work_name %>
53
+ <% end %>
54
+
55
+ <%# Studio Logotype %>
56
+ [img]<%= first_valid(@studio_logo, 'ToDo') %>[/img]
57
+
58
+ <%# Rating information %>
59
+ ������� �� ����� [i]<%= @site_name %>[/i]:
60
+
61
+ [tab][b]������� ����:[/b] <%= first_valid(@raiting_avg_score, '---') %>
62
+ [tab][b]����� � ��������:[/b] <%= first_valid(@raiting_pos, '---') %>
63
+ [tab][b]�������������:[/b] <%= first_valid(@votes_num, '---') %>
64
+
65
+ [tab][size=10]���������� � �������� �� [i]<%= Time.now.strftime('%d.%m.%Y') %>[/i][/size]
66
+ [hr]
67
+
68
+ <%# Content and other stuff %>
69
+ [quote]
70
+ [b]����������:[/b]
71
+
72
+ [align=justify]<%= first_valid(@brief_content, 'ToDo') %>[/align]
73
+ <% valid(@logical_view_order) do %>
74
+ [hr]
75
+ [b]������� ��������� ���� �����: [/b]
76
+
77
+ <%= @logical_view_order.gsub(/(^#\d+)/, '[tab][b]\1[/b]') %>
78
+
79
+ <% end %>
80
+ [/quote]
81
+ <%# Episodes %>
82
+ <% valid(@episodes) do %>
83
+ [hr]
84
+ [spoiler="�������:"]
85
+ <%= @episodes.gsub(/(^\d+[\d\s\[\]\(\)]*\.)/, '[tab][b]\1[/b]') %>
86
+
87
+ [/spoiler]
88
+ <% end %>
89
+ [hr]
90
+ <%# Screenshots %>
91
+ [quote]
92
+ [img]<%= first_valid(@main_screenshot, 'ToDo') %>[/img]
93
+ [hr]
94
+ [spoiler="��� ��������� � ������������ �������:"]
95
+ [img]<%= first_valid(@first_additional_screenshot, 'ToDo') %>[/img]
96
+ [img]<%= first_valid(@second_additional_screenshot, 'ToDo') %>[/img]
97
+ [img]<%= first_valid(@third_additional_screenshot, 'ToDo') %>[/img]
98
+ [/spoiler]
99
+ [/quote]
100
+ [hr]
101
+ <%# File specs %>
102
+ [quote]
103
+ ToDo
104
+ [/quote]
105
+ [hr]
106
+ <%# Custom stuff %>
107
+ [b]������ ������:[/b] [i]---[/i]
108
+ [b]��������:[/b] [i]ToDo[/i]
109
+ [hr]
110
+ [color=gray]This page was generated by [b]DangoRep[/b][/color]
data/bin/drep ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # DRep - Modular Open Software Tester.
4
+ # Copyright (C) 2009 Dmitrii Toksaitov
5
+ #
6
+ # This file is part of DRep.
7
+ #
8
+ # DRep is free software: you can redistribute it and/or modify
9
+ # it under the terms of the GNU General Public License as published by
10
+ # the Free Software Foundation, either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # DRep is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with DRep. If not, see <http://www.gnu.org/licenses/>.
20
+
21
+ require 'rubygems'
22
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/drep')
23
+
24
+ DRep::EXEC.new(STDIN, STDOUT, STDERR, ARGV).run()