kalibro_entities 0.0.1.rc1
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.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +21 -0
- data/AUTHORS +4 -0
- data/COPYING +674 -0
- data/COPYING.LESSER +165 -0
- data/Gemfile +4 -0
- data/README.md +77 -0
- data/Rakefile +6 -0
- data/cucumber.yml +1 -0
- data/features/base_tool/all_names.feature +8 -0
- data/features/base_tool/find_by_name.feature +12 -0
- data/features/configuration/all.feature +10 -0
- data/features/metric_configuration/find.feature +18 -0
- data/features/metric_configuration/metric_configurations_of.feature +18 -0
- data/features/metric_result/descendant_results.feature +19 -0
- data/features/metric_result/history_of.feature +20 -0
- data/features/metric_result/metric_results_of.feature +19 -0
- data/features/module_result/children.feature +18 -0
- data/features/module_result/find.feature +15 -0
- data/features/module_result/history_of.feature +11 -0
- data/features/processing/first_processing_after.feature +18 -0
- data/features/processing/first_processing_of.feature +18 -0
- data/features/processing/has_processing.feature +18 -0
- data/features/processing/has_processing_after.feature +18 -0
- data/features/processing/has_processing_before.feature +18 -0
- data/features/processing/has_ready_processing.feature +18 -0
- data/features/processing/last_processing_before.feature +18 -0
- data/features/processing/last_processing_of.feature +18 -0
- data/features/processing/last_processing_state_of.feature +18 -0
- data/features/processing/last_ready_processing_of.feature +18 -0
- data/features/processing/processing_of.feature +32 -0
- data/features/processing/processing_with_date_of.feature +32 -0
- data/features/project/all.feature +10 -0
- data/features/project/creation.feature +9 -0
- data/features/project/destroy.feature +10 -0
- data/features/project/exists.feature +9 -0
- data/features/project/find.feature +10 -0
- data/features/range/ranges_of.feature +22 -0
- data/features/range/save.feature +32 -0
- data/features/reading/find.feature +11 -0
- data/features/reading/readings_of.feature +11 -0
- data/features/reading_group/all.feature +10 -0
- data/features/repository/all.feature +14 -0
- data/features/repository/cancel_processing.feature +14 -0
- data/features/repository/find.feature +14 -0
- data/features/repository/of.feature +15 -0
- data/features/repository/process.feature +16 -0
- data/features/repository/types.feature +9 -0
- data/features/step_definitions/base_tool_steps.rb +28 -0
- data/features/step_definitions/configuration_steps.rb +11 -0
- data/features/step_definitions/metric_configuration_steps.rb +52 -0
- data/features/step_definitions/metric_result_steps.rb +29 -0
- data/features/step_definitions/metric_steps.rb +3 -0
- data/features/step_definitions/module_result_steps.rb +30 -0
- data/features/step_definitions/processing_steps.rb +91 -0
- data/features/step_definitions/project_steps.rb +48 -0
- data/features/step_definitions/range_steps.rb +41 -0
- data/features/step_definitions/reading_group_steps.rb +19 -0
- data/features/step_definitions/reading_steps.rb +20 -0
- data/features/step_definitions/repository_steps.rb +57 -0
- data/features/support/env.rb +25 -0
- data/features/support/kalibro_cucumber_helpers.yml.sample +10 -0
- data/kalibro_entities.gemspec +48 -0
- data/lib/kalibro_entities.rb +61 -0
- data/lib/kalibro_entities/entities.rb +37 -0
- data/lib/kalibro_entities/entities/base_tool.rb +54 -0
- data/lib/kalibro_entities/entities/configuration.rb +33 -0
- data/lib/kalibro_entities/entities/date_metric_result.rb +39 -0
- data/lib/kalibro_entities/entities/date_module_result.rb +39 -0
- data/lib/kalibro_entities/entities/metric.rb +21 -0
- data/lib/kalibro_entities/entities/metric_configuration.rb +70 -0
- data/lib/kalibro_entities/entities/metric_configuration_snapshot.rb +57 -0
- data/lib/kalibro_entities/entities/metric_result.rb +63 -0
- data/lib/kalibro_entities/entities/model.rb +162 -0
- data/lib/kalibro_entities/entities/module.rb +27 -0
- data/lib/kalibro_entities/entities/module_result.rb +69 -0
- data/lib/kalibro_entities/entities/process_time.rb +31 -0
- data/lib/kalibro_entities/entities/processing.rb +113 -0
- data/lib/kalibro_entities/entities/project.rb +34 -0
- data/lib/kalibro_entities/entities/range.rb +75 -0
- data/lib/kalibro_entities/entities/range_snapshot.rb +37 -0
- data/lib/kalibro_entities/entities/reading.rb +51 -0
- data/lib/kalibro_entities/entities/reading_group.rb +43 -0
- data/lib/kalibro_entities/entities/repository.rb +78 -0
- data/lib/kalibro_entities/entities/repository_observer.rb +50 -0
- data/lib/kalibro_entities/entities/stack_trace_element.rb +31 -0
- data/lib/kalibro_entities/entities/throwable.rb +42 -0
- data/lib/kalibro_entities/errors.rb +18 -0
- data/lib/kalibro_entities/errors/record_not_found.rb +22 -0
- data/lib/kalibro_entities/errors/standard.rb +24 -0
- data/lib/kalibro_entities/helpers/aggregation_options.rb +25 -0
- data/lib/kalibro_entities/helpers/hash_converters.rb +48 -0
- data/lib/kalibro_entities/helpers/request_methods.rb +47 -0
- data/lib/kalibro_entities/helpers/xml_converters.rb +20 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers.rb +40 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/configuration.rb +39 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/hooks.rb +50 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/delete_all_kalibro_entries.sh +23 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/prepare_kalibro_query_file.sh +38 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/put_kalibro_on_test_mode.sh +35 -0
- data/lib/kalibro_entities/kalibro_cucumber_helpers/scripts/return_kalibro_from_test_mode.sh +26 -0
- data/lib/kalibro_entities/version.rb +19 -0
- data/lib/rake/test_task.rb +57 -0
- data/spec/entities/base_tool_spec.rb +168 -0
- data/spec/entities/configuration_spec.rb +61 -0
- data/spec/entities/date_metric_result_spec.rb +62 -0
- data/spec/entities/date_module_result_spec.rb +61 -0
- data/spec/entities/metric_configuration_snapshot_spec.rb +107 -0
- data/spec/entities/metric_configuration_spec.rb +149 -0
- data/spec/entities/metric_result_spec.rb +193 -0
- data/spec/entities/metric_spec.rb +47 -0
- data/spec/entities/model_spec.rb +275 -0
- data/spec/entities/module_result_spec.rb +135 -0
- data/spec/entities/process_time_spec.rb +33 -0
- data/spec/entities/processing_spec.rb +334 -0
- data/spec/entities/project_spec.rb +68 -0
- data/spec/entities/range_snapshot_spec.rb +50 -0
- data/spec/entities/range_spec.rb +181 -0
- data/spec/entities/reading_group_spec.rb +90 -0
- data/spec/entities/reading_spec.rb +106 -0
- data/spec/entities/repository_observer_spec.rb +123 -0
- data/spec/entities/repository_spec.rb +167 -0
- data/spec/entities/stack_trace_element_spec.rb +26 -0
- data/spec/entities/throwable_spec.rb +51 -0
- data/spec/factories/base_tools.rb +31 -0
- data/spec/factories/configurations.rb +29 -0
- data/spec/factories/date_metric_results.rb +28 -0
- data/spec/factories/date_module_results.rb +22 -0
- data/spec/factories/metric_configurations.rb +28 -0
- data/spec/factories/metric_configurations_snapshot.rb +26 -0
- data/spec/factories/metric_results.rb +24 -0
- data/spec/factories/metrics.rb +35 -0
- data/spec/factories/models.rb +20 -0
- data/spec/factories/module_results.rb +33 -0
- data/spec/factories/modules.rb +22 -0
- data/spec/factories/process_times.rb +27 -0
- data/spec/factories/processings.rb +25 -0
- data/spec/factories/projects.rb +29 -0
- data/spec/factories/ranges.rb +30 -0
- data/spec/factories/ranges_snapshot.rb +26 -0
- data/spec/factories/reading_groups.rb +23 -0
- data/spec/factories/readings.rb +25 -0
- data/spec/factories/repositories.rb +34 -0
- data/spec/factories/repository_observers.rb +24 -0
- data/spec/factories/stack_trace_elements.rb +24 -0
- data/spec/factories/throwables.rb +23 -0
- data/spec/helpers/aggregation_options_spec.rb +31 -0
- data/spec/helpers/hash_converters_spec.rb +111 -0
- data/spec/helpers/xml_converters_spec.rb +64 -0
- data/spec/kalibro_entities_spec.rb +108 -0
- data/spec/savon/fixtures/config.yml +1 -0
- data/spec/savon/fixtures/invalid_config.yml +2 -0
- data/spec/savon/fixtures/project/does_not_exists.xml +1 -0
- data/spec/savon/savon_test_helper.rb +14 -0
- data/spec/spec_helper.rb +60 -0
- metadata +461 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class Project < Model
|
22
|
+
|
23
|
+
attr_accessor :id, :name, :description
|
24
|
+
|
25
|
+
def id=(value)
|
26
|
+
@id = value.to_i
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.all
|
30
|
+
create_objects_array_from_hash request(:all_projects)[:project]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class Range < Model
|
22
|
+
|
23
|
+
attr_accessor :id, :beginning, :end, :reading_id, :comments
|
24
|
+
|
25
|
+
def id=(value)
|
26
|
+
@id = value.to_i
|
27
|
+
end
|
28
|
+
|
29
|
+
def reading_id=(value)
|
30
|
+
@reading_id = value.to_i
|
31
|
+
end
|
32
|
+
|
33
|
+
def beginning=(value)
|
34
|
+
@beginning = value == "-INF" ? value : value.to_f
|
35
|
+
end
|
36
|
+
|
37
|
+
def end=(value)
|
38
|
+
@end = value == "INF" ? value : value.to_f
|
39
|
+
end
|
40
|
+
|
41
|
+
def label
|
42
|
+
reading.label
|
43
|
+
end
|
44
|
+
|
45
|
+
def grade
|
46
|
+
reading.grade
|
47
|
+
end
|
48
|
+
|
49
|
+
def color
|
50
|
+
reading.color
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.ranges_of(metric_configuration_id)
|
54
|
+
self.create_objects_array_from_hash request(:ranges_of, {metric_configuration_id: metric_configuration_id} )[:range]
|
55
|
+
end
|
56
|
+
|
57
|
+
def save(metric_configuration_id)
|
58
|
+
begin
|
59
|
+
@id = self.class.request(:save_range, {:range => self.to_hash, :metric_configuration_id => metric_configuration_id})[:range_id]
|
60
|
+
true
|
61
|
+
rescue Exception => exception
|
62
|
+
add_error exception
|
63
|
+
false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
|
69
|
+
def reading
|
70
|
+
@reading ||= KalibroEntities::Entities::Reading.find(reading_id)
|
71
|
+
@reading
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class RangeSnapshot < Model
|
22
|
+
attr_accessor :beginning, :end, :label, :grade, :color, :comments
|
23
|
+
|
24
|
+
def beginning=(value)
|
25
|
+
@beginning = ((value == "-INF") ? -1.0/0 : value.to_f)
|
26
|
+
end
|
27
|
+
|
28
|
+
def end=(value)
|
29
|
+
@end = ((value == "INF") ? 1.0/0 : value.to_f)
|
30
|
+
end
|
31
|
+
|
32
|
+
def grade=(value)
|
33
|
+
@grade = value.to_f
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
module KalibroEntities
|
18
|
+
module Entities
|
19
|
+
class Reading < Model
|
20
|
+
|
21
|
+
attr_accessor :id, :label, :grade, :color, :group_id
|
22
|
+
|
23
|
+
def id=(value)
|
24
|
+
@id = value.to_i
|
25
|
+
end
|
26
|
+
|
27
|
+
def grade=(value)
|
28
|
+
@grade = value.to_f
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.find(id)
|
32
|
+
begin
|
33
|
+
new request(:get_reading, {:reading_id => id})[:reading]
|
34
|
+
rescue Savon::SOAPFault
|
35
|
+
raise KalibroEntities::Errors::RecordNotFound
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.readings_of(group_id)
|
40
|
+
create_objects_array_from_hash request(:readings_of, {:group_id => group_id})[:reading]
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def save_params
|
46
|
+
{:reading => self.to_hash, :group_id => group_id}
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
module KalibroEntities
|
18
|
+
module Entities
|
19
|
+
class ReadingGroup < Model
|
20
|
+
|
21
|
+
attr_accessor :id, :name, :description
|
22
|
+
|
23
|
+
def id=(value)
|
24
|
+
@id = value.to_i
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.all
|
28
|
+
create_objects_array_from_hash request(:all_reading_groups)[:reading_group]
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def self.id_params(id)
|
34
|
+
{:group_id => id}
|
35
|
+
end
|
36
|
+
|
37
|
+
def destroy_params
|
38
|
+
{:group_id => self.id}
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class Repository < Model
|
22
|
+
|
23
|
+
attr_accessor :id, :name, :description, :license, :process_period, :type, :address, :configuration_id, :project_id, :send_email
|
24
|
+
|
25
|
+
def self.repository_types
|
26
|
+
request(:supported_repository_types)[:supported_type].to_a
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.repositories_of(project_id)
|
30
|
+
repositories = create_objects_array_from_hash request(:repositories_of, {:project_id => project_id})[:repository]
|
31
|
+
repositories.map { |repository| repository.project_id = project_id; repository }
|
32
|
+
end
|
33
|
+
|
34
|
+
def id=(value)
|
35
|
+
@id = value.to_i
|
36
|
+
end
|
37
|
+
|
38
|
+
def process_period=(value)
|
39
|
+
@process_period = value.to_i
|
40
|
+
end
|
41
|
+
|
42
|
+
def configuration_id=(value)
|
43
|
+
@configuration_id = value.to_i
|
44
|
+
end
|
45
|
+
|
46
|
+
def process
|
47
|
+
self.class.request(:process_repository, {:repository_id => self.id})
|
48
|
+
end
|
49
|
+
|
50
|
+
def cancel_processing_of_repository
|
51
|
+
self.class.request(:cancel_processing_of_repository, {:repository_id => self.id})
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.all
|
55
|
+
projects = Project.all
|
56
|
+
repositories = []
|
57
|
+
|
58
|
+
projects.each do |project|
|
59
|
+
repositories.concat(repositories_of(project.id))
|
60
|
+
end
|
61
|
+
|
62
|
+
return repositories
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.find(id)
|
66
|
+
all.each { |repository| return repository if repository.id == id }
|
67
|
+
|
68
|
+
raise KalibroEntities::Errors::RecordNotFound
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def save_params
|
74
|
+
{:repository => self.to_hash, :project_id => project_id}
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class RepositoryObserver < Model
|
22
|
+
attr_accessor :id, :repository_id, :name, :email
|
23
|
+
|
24
|
+
def id=(value)
|
25
|
+
@id = value.to_i
|
26
|
+
end
|
27
|
+
|
28
|
+
def repository_id=(value)
|
29
|
+
@repository_id = value.to_i
|
30
|
+
end
|
31
|
+
|
32
|
+
def name=(value)
|
33
|
+
@name = value
|
34
|
+
end
|
35
|
+
|
36
|
+
def email=(value)
|
37
|
+
@email = value
|
38
|
+
end
|
39
|
+
|
40
|
+
# FIXME: the index of the second parameter of the request must be repository_id. It can't be fixed here until Kalibro webservice remain with this name!
|
41
|
+
def self.repository_observers_of(value)
|
42
|
+
create_objects_array_from_hash request(:repository_observers_of, {:repository_observer_id => value})[:repository_observer]
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.all
|
46
|
+
create_objects_array_from_hash request(:all_repository_observers)[:repository_observer]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class StackTraceElement < Model
|
22
|
+
|
23
|
+
attr_accessor :declaring_class, :method_name, :file_name, :line_number
|
24
|
+
|
25
|
+
def line_number=(value)
|
26
|
+
@line_number = value.to_i
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# This file is part of KalibroEntities
|
2
|
+
# Copyright (C) 2013 it's respectives authors (please see the AUTHORS file)
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
17
|
+
require "kalibro_entities/entities/model"
|
18
|
+
|
19
|
+
module KalibroEntities
|
20
|
+
module Entities
|
21
|
+
class Throwable < Model
|
22
|
+
|
23
|
+
attr_accessor :target_string, :message, :cause, :stack_trace_element
|
24
|
+
|
25
|
+
def stack_trace_element=(value)
|
26
|
+
@stack_trace_element = KalibroEntities::Entities::StackTraceElement.to_objects_array value
|
27
|
+
end
|
28
|
+
|
29
|
+
def stack_trace
|
30
|
+
@stack_trace_element
|
31
|
+
end
|
32
|
+
|
33
|
+
def stack_trace=(stack_trace)
|
34
|
+
@stack_trace_element = stack_trace
|
35
|
+
end
|
36
|
+
|
37
|
+
def cause=(cause_value)
|
38
|
+
@cause = KalibroEntities::Entities::Throwable.to_object cause_value
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|