Commit 560c305fe4ff7792724642686d2a23434d5f2dce
Committed by
Rafael Manzo
1 parent
c5a76ebf
Exists in
colab
and in
4 other branches
Updated gemfile version and replace the occurence of KalibroEntities:: by KalibroGem::
Signed-off by : Rafael Reggiani Manzo <rr.manzo@gmail.com>
Showing
25 changed files
with
35 additions
and
35 deletions
Show diff stats
Gemfile
@@ -37,7 +37,7 @@ gem 'jbuilder', '~> 1.2' | @@ -37,7 +37,7 @@ gem 'jbuilder', '~> 1.2' | ||
37 | gem 'devise', '~> 3.2.0' | 37 | gem 'devise', '~> 3.2.0' |
38 | 38 | ||
39 | # Kalibro integration | 39 | # Kalibro integration |
40 | -gem 'kalibro_entities', "~> 0.0.1.rc6" | 40 | +gem 'kalibro_gem', "~> 0.0.1.rc7" |
41 | 41 | ||
42 | # PostgreSQL integration | 42 | # PostgreSQL integration |
43 | gem "pg", "~> 0.17.0" | 43 | gem "pg", "~> 0.17.0" |
Gemfile.lock
@@ -105,7 +105,7 @@ GEM | @@ -105,7 +105,7 @@ GEM | ||
105 | railties (>= 3.0, < 5.0) | 105 | railties (>= 3.0, < 5.0) |
106 | thor (>= 0.14, < 2.0) | 106 | thor (>= 0.14, < 2.0) |
107 | json (1.8.1) | 107 | json (1.8.1) |
108 | - kalibro_entities (0.0.1.rc6) | 108 | + kalibro_gem (0.0.1.rc7) |
109 | activesupport (~> 4.0.1) | 109 | activesupport (~> 4.0.1) |
110 | savon-ng-1.6 (~> 2.4.1) | 110 | savon-ng-1.6 (~> 2.4.1) |
111 | konacha (3.0.0) | 111 | konacha (3.0.0) |
@@ -263,7 +263,7 @@ DEPENDENCIES | @@ -263,7 +263,7 @@ DEPENDENCIES | ||
263 | gruff (~> 0.5.1) | 263 | gruff (~> 0.5.1) |
264 | jbuilder (~> 1.2) | 264 | jbuilder (~> 1.2) |
265 | jquery-rails | 265 | jquery-rails |
266 | - kalibro_entities (~> 0.0.1.rc6) | 266 | + kalibro_gem (~> 0.0.1.rc7) |
267 | konacha (~> 3.0.0) | 267 | konacha (~> 3.0.0) |
268 | mocha | 268 | mocha |
269 | modernizr-rails | 269 | modernizr-rails |
app/controllers/repositories_controller.rb
@@ -11,7 +11,7 @@ class RepositoriesController < ApplicationController | @@ -11,7 +11,7 @@ class RepositoriesController < ApplicationController | ||
11 | # GET /projects/1/repositories/1/modules/1 | 11 | # GET /projects/1/repositories/1/modules/1 |
12 | # GET /projects/1/repositories/1/modules/1.json | 12 | # GET /projects/1/repositories/1/modules/1.json |
13 | def show | 13 | def show |
14 | - @configuration = KalibroEntities::Entities::Configuration.find(@repository.configuration_id) #FIXME: As soon as the Configuration model gets created refactor this! | 14 | + @configuration = KalibroGem::Entities::Configuration.find(@repository.configuration_id) #FIXME: As soon as the Configuration model gets created refactor this! |
15 | @processing = @repository.last_processing | 15 | @processing = @repository.last_processing |
16 | end | 16 | end |
17 | 17 |
app/models/date_module_result.rb
app/models/module_result.rb
1 | -class ModuleResult < KalibroEntities::Entities::ModuleResult | 1 | +class ModuleResult < KalibroGem::Entities::ModuleResult |
2 | include KalibroRecord | 2 | include KalibroRecord |
3 | 3 | ||
4 | def metric_results | 4 | def metric_results |
5 | - KalibroEntities::Entities::MetricResult.metric_results_of(@id) | 5 | + KalibroGem::Entities::MetricResult.metric_results_of(@id) |
6 | end | 6 | end |
7 | 7 | ||
8 | def history | 8 | def history |
app/models/processing.rb
app/models/project.rb
1 | require "validators/kalibro_uniqueness_validator.rb" | 1 | require "validators/kalibro_uniqueness_validator.rb" |
2 | 2 | ||
3 | -class Project < KalibroEntities::Entities::Project | 3 | +class Project < KalibroGem::Entities::Project |
4 | include KalibroRecord | 4 | include KalibroRecord |
5 | 5 | ||
6 | attr_accessor :name | 6 | attr_accessor :name |
app/models/repository.rb
app/views/repositories/_form.html.erb
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | 17 | ||
18 | <div class="form-group"> | 18 | <div class="form-group"> |
19 | <%= f.label :configuration, class: 'control-label' %><br/> | 19 | <%= f.label :configuration, class: 'control-label' %><br/> |
20 | - <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %> | 20 | + <% configuration_list = KalibroGem::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %> |
21 | <%= f.select( :configuration_id, configuration_list, {class: 'form-control'} ) %> | 21 | <%= f.select( :configuration_id, configuration_list, {class: 'form-control'} ) %> |
22 | </div> | 22 | </div> |
23 | 23 |
features/repository/create.feature
@@ -12,14 +12,14 @@ Scenario: repository creation | @@ -12,14 +12,14 @@ Scenario: repository creation | ||
12 | And I am at the New Repository page | 12 | And I am at the New Repository page |
13 | And I fill the Name field with "Kalibro" | 13 | And I fill the Name field with "Kalibro" |
14 | And I set the select field "Type" as "GIT" | 14 | And I set the select field "Type" as "GIT" |
15 | - And I fill the Address field with "https://github.com/mezuro/kalibro_entities.git" | 15 | + And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
16 | And I set the select field "repository_configuration_id" as "Java" | 16 | And I set the select field "repository_configuration_id" as "Java" |
17 | When I press the Save button | 17 | When I press the Save button |
18 | Then I should be in the Sample Project page | 18 | Then I should be in the Sample Project page |
19 | And I should not see There are no repositories yet! | 19 | And I should not see There are no repositories yet! |
20 | And I should see "Kalibro" | 20 | And I should see "Kalibro" |
21 | And I should see "GIT" | 21 | And I should see "GIT" |
22 | - And I should see "https://github.com/mezuro/kalibro_entities.git" | 22 | + And I should see "https://github.com/mezuro/kalibro_gem.git" |
23 | 23 | ||
24 | @kalibro_restart | 24 | @kalibro_restart |
25 | Scenario: repository creation blank validations | 25 | Scenario: repository creation blank validations |
@@ -44,7 +44,7 @@ Scenario: repository creation with name already taken | @@ -44,7 +44,7 @@ Scenario: repository creation with name already taken | ||
44 | And I am at the New Repository page | 44 | And I am at the New Repository page |
45 | And I fill the Name field with "KalibroEntities" | 45 | And I fill the Name field with "KalibroEntities" |
46 | And I set the select field "Type" as "GIT" | 46 | And I set the select field "Type" as "GIT" |
47 | - And I fill the Address field with "https://github.com/mezuro/kalibro_entities.git" | 47 | + And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
48 | And I set the select field "repository_configuration_id" as "Java" | 48 | And I set the select field "repository_configuration_id" as "Java" |
49 | When I press the Save button | 49 | When I press the Save button |
50 | Then I should see "There's already" | 50 | Then I should see "There's already" |
51 | \ No newline at end of file | 51 | \ No newline at end of file |
features/step_definitions/project_steps.rb
features/support/env.rb
@@ -25,7 +25,7 @@ require 'capybara/poltergeist' | @@ -25,7 +25,7 @@ require 'capybara/poltergeist' | ||
25 | #Capybara.default_driver = :poltergeist | 25 | #Capybara.default_driver = :poltergeist |
26 | Capybara.javascript_driver = :poltergeist | 26 | Capybara.javascript_driver = :poltergeist |
27 | 27 | ||
28 | -#require 'kalibro_entities/kalibro_cucumber_helpers/hooks' | 28 | +#require 'kalibro_gem/kalibro_cucumber_helpers/hooks' |
29 | 29 | ||
30 | # Capybara defaults to CSS3 selectors rather than XPath. | 30 | # Capybara defaults to CSS3 selectors rather than XPath. |
31 | # If you'd prefer to use XPath, just uncomment this line and adjust any | 31 | # If you'd prefer to use XPath, just uncomment this line and adjust any |
@@ -78,10 +78,10 @@ end | @@ -78,10 +78,10 @@ end | ||
78 | Cucumber::Rails::Database.javascript_strategy = :truncation | 78 | Cucumber::Rails::Database.javascript_strategy = :truncation |
79 | 79 | ||
80 | # Kalibro hooks | 80 | # Kalibro hooks |
81 | -require 'kalibro_entities/kalibro_cucumber_helpers/hooks' | 81 | +require 'kalibro_gem/kalibro_cucumber_helpers/hooks' |
82 | 82 | ||
83 | # Configuring the right hooks | 83 | # Configuring the right hooks |
84 | -KalibroEntities::KalibroCucumberHelpers.configure_from_yml("#{__dir__}/kalibro_cucumber_helpers.yml") | 84 | +KalibroGem::KalibroCucumberHelpers.configure_from_yml("#{__dir__}/kalibro_cucumber_helpers.yml") |
85 | 85 | ||
86 | # Warden test helpers so the user authentication can be as fast as possible | 86 | # Warden test helpers so the user authentication can be as fast as possible |
87 | include Warden::Test::Helpers | 87 | include Warden::Test::Helpers |
spec/controllers/repositories_controller_spec.rb
@@ -87,7 +87,7 @@ describe RepositoriesController do | @@ -87,7 +87,7 @@ describe RepositoriesController do | ||
87 | processing = FactoryGirl.build(:processing) | 87 | processing = FactoryGirl.build(:processing) |
88 | 88 | ||
89 | repository.expects(:last_processing).returns(processing) | 89 | repository.expects(:last_processing).returns(processing) |
90 | - KalibroEntities::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration)) | 90 | + KalibroGem::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration)) |
91 | Repository.expects(:find).with(repository.id).returns(repository) | 91 | Repository.expects(:find).with(repository.id).returns(repository) |
92 | 92 | ||
93 | get :show, id: repository.id.to_s, project_id: project.id.to_s | 93 | get :show, id: repository.id.to_s, project_id: project.id.to_s |
@@ -102,7 +102,7 @@ describe RepositoriesController do | @@ -102,7 +102,7 @@ describe RepositoriesController do | ||
102 | processing = FactoryGirl.build(:processing) | 102 | processing = FactoryGirl.build(:processing) |
103 | 103 | ||
104 | repository.expects(:last_processing).returns(processing) | 104 | repository.expects(:last_processing).returns(processing) |
105 | - KalibroEntities::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration)) | 105 | + KalibroGem::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration)) |
106 | Repository.expects(:find).with(repository.id).returns(repository) | 106 | Repository.expects(:find).with(repository.id).returns(repository) |
107 | 107 | ||
108 | get :show, id: repository.id.to_s, project_id: project.id.to_s | 108 | get :show, id: repository.id.to_s, project_id: project.id.to_s |
spec/factories/configurations.rb
1 | FactoryGirl.define do | 1 | FactoryGirl.define do |
2 | - factory :configuration, class: KalibroEntities::Entities::Configuration do | 2 | + factory :configuration, class: KalibroGem::Entities::Configuration do |
3 | id 1 | 3 | id 1 |
4 | name "Java" | 4 | name "Java" |
5 | description "Code metrics for Java." | 5 | description "Code metrics for Java." |
6 | end | 6 | end |
7 | 7 | ||
8 | - factory :another_configuration, class: KalibroEntities::Entities::Configuration do | 8 | + factory :another_configuration, class: KalibroGem::Entities::Configuration do |
9 | id 12 | 9 | id 12 |
10 | name "Perl" | 10 | name "Perl" |
11 | description "Code metrics for Perl." | 11 | description "Code metrics for Perl." |
spec/factories/metric_configurations.rb
1 | FactoryGirl.define do | 1 | FactoryGirl.define do |
2 | - factory :metric_configuration, class: KalibroEntities::Entities::MetricConfiguration do | 2 | + factory :metric_configuration, class: KalibroGem::Entities::MetricConfiguration do |
3 | id 1 | 3 | id 1 |
4 | code 'code' | 4 | code 'code' |
5 | metric {FactoryGirl.build(:metric)} | 5 | metric {FactoryGirl.build(:metric)} |
spec/factories/metric_configurations_snapshot.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | FactoryGirl.define do | 17 | FactoryGirl.define do |
18 | - factory :metric_configuration_snapshot, class: KalibroEntities::Entities::MetricConfigurationSnapshot do | 18 | + factory :metric_configuration_snapshot, class: KalibroGem::Entities::MetricConfigurationSnapshot do |
19 | code "code" | 19 | code "code" |
20 | weight "1.0" | 20 | weight "1.0" |
21 | aggregation_form 'AVERAGE' | 21 | aggregation_form 'AVERAGE' |
spec/factories/metric_results.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | FactoryGirl.define do | 17 | FactoryGirl.define do |
18 | - factory :metric_result, class: KalibroEntities::Entities::MetricResult do | 18 | + factory :metric_result, class: KalibroGem::Entities::MetricResult do |
19 | id "42" | 19 | id "42" |
20 | self.configuration { FactoryGirl.build(:metric_configuration_snapshot) } | 20 | self.configuration { FactoryGirl.build(:metric_configuration_snapshot) } |
21 | value "10.0" | 21 | value "10.0" |
spec/factories/metrics.rb
1 | FactoryGirl.define do | 1 | FactoryGirl.define do |
2 | - factory :metric, class: KalibroEntities::Entities::Metric do | 2 | + factory :metric, class: KalibroGem::Entities::Metric do |
3 | name "Total Abstract Classes" | 3 | name "Total Abstract Classes" |
4 | compound false | 4 | compound false |
5 | scope "SOFTWARE" | 5 | scope "SOFTWARE" |
@@ -8,7 +8,7 @@ FactoryGirl.define do | @@ -8,7 +8,7 @@ FactoryGirl.define do | ||
8 | language ["C", "CPP", "JAVA"] | 8 | language ["C", "CPP", "JAVA"] |
9 | end | 9 | end |
10 | 10 | ||
11 | - factory :loc, class: KalibroEntities::Entities::Metric do | 11 | + factory :loc, class: KalibroGem::Entities::Metric do |
12 | name "Lines of Code" | 12 | name "Lines of Code" |
13 | compound false | 13 | compound false |
14 | scope "CLASS" | 14 | scope "CLASS" |
spec/factories/modules.rb
spec/factories/process_times.rb
1 | FactoryGirl.define do | 1 | FactoryGirl.define do |
2 | - factory :process_time, class: KalibroEntities::Entities::ProcessTime do | 2 | + factory :process_time, class: KalibroGem::Entities::ProcessTime do |
3 | state "Ready" | 3 | state "Ready" |
4 | time "3600" | 4 | time "3600" |
5 | end | 5 | end |
6 | 6 | ||
7 | - factory :analyzing_process_time, class: KalibroEntities::Entities::ProcessTime do | 7 | + factory :analyzing_process_time, class: KalibroGem::Entities::ProcessTime do |
8 | state "Analyzing" | 8 | state "Analyzing" |
9 | time "12345" | 9 | time "12345" |
10 | end | 10 | end |
spec/factories/ranges.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | FactoryGirl.define do | 17 | FactoryGirl.define do |
18 | - factory :range, class: KalibroEntities::Entities::Range do | 18 | + factory :range, class: KalibroGem::Entities::Range do |
19 | beginning 1.1 | 19 | beginning 1.1 |
20 | self.end 5.1 | 20 | self.end 5.1 |
21 | reading_id 3 | 21 | reading_id 3 |
spec/factories/ranges_snapshot.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | FactoryGirl.define do | 17 | FactoryGirl.define do |
18 | - factory :range_snapshot, class: KalibroEntities::Entities::RangeSnapshot do | 18 | + factory :range_snapshot, class: KalibroGem::Entities::RangeSnapshot do |
19 | beginning 1.1 | 19 | beginning 1.1 |
20 | self.end 5.1 | 20 | self.end 5.1 |
21 | label "Snapshot" | 21 | label "Snapshot" |
spec/factories/reading_groups.rb
spec/factories/readings.rb
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | ||
17 | FactoryGirl.define do | 17 | FactoryGirl.define do |
18 | - factory :reading, class: KalibroEntities::Entities::Reading do | 18 | + factory :reading, class: KalibroGem::Entities::Reading do |
19 | id 42 | 19 | id 42 |
20 | label "Good" | 20 | label "Good" |
21 | grade 10.5 | 21 | grade 10.5 |
spec/models/module_result_spec.rb
@@ -6,7 +6,7 @@ describe ModuleResult do | @@ -6,7 +6,7 @@ describe ModuleResult do | ||
6 | 6 | ||
7 | describe 'metric_results' do | 7 | describe 'metric_results' do |
8 | it 'should call the metric_results_of method' do | 8 | it 'should call the metric_results_of method' do |
9 | - KalibroEntities::Entities::MetricResult.expects(:metric_results_of).with(subject.id).returns(nil) | 9 | + KalibroGem::Entities::MetricResult.expects(:metric_results_of).with(subject.id).returns(nil) |
10 | 10 | ||
11 | subject.metric_results | 11 | subject.metric_results |
12 | end | 12 | end |