diff --git a/Gemfile b/Gemfile
index 0aaa799..9c4c590 100644
--- a/Gemfile
+++ b/Gemfile
@@ -37,7 +37,7 @@ gem 'jbuilder', '~> 1.2'
gem 'devise', '~> 3.2.0'
# Kalibro integration
-gem 'kalibro_entities', "~> 0.0.1.rc6"
+gem 'kalibro_gem', "~> 0.0.1.rc7"
# PostgreSQL integration
gem "pg", "~> 0.17.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 9c3bc80..8cd750e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -105,7 +105,7 @@ GEM
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
- kalibro_entities (0.0.1.rc6)
+ kalibro_gem (0.0.1.rc7)
activesupport (~> 4.0.1)
savon-ng-1.6 (~> 2.4.1)
konacha (3.0.0)
@@ -263,7 +263,7 @@ DEPENDENCIES
gruff (~> 0.5.1)
jbuilder (~> 1.2)
jquery-rails
- kalibro_entities (~> 0.0.1.rc6)
+ kalibro_gem (~> 0.0.1.rc7)
konacha (~> 3.0.0)
mocha
modernizr-rails
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 7bc0488..7182309 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -11,7 +11,7 @@ class RepositoriesController < ApplicationController
# GET /projects/1/repositories/1/modules/1
# GET /projects/1/repositories/1/modules/1.json
def show
- @configuration = KalibroEntities::Entities::Configuration.find(@repository.configuration_id) #FIXME: As soon as the Configuration model gets created refactor this!
+ @configuration = KalibroGem::Entities::Configuration.find(@repository.configuration_id) #FIXME: As soon as the Configuration model gets created refactor this!
@processing = @repository.last_processing
end
diff --git a/app/models/date_module_result.rb b/app/models/date_module_result.rb
index 77f8b46..4f6e68f 100644
--- a/app/models/date_module_result.rb
+++ b/app/models/date_module_result.rb
@@ -1,4 +1,4 @@
-class DateModuleResult < KalibroEntities::Entities::DateModuleResult
+class DateModuleResult < KalibroGem::Entities::DateModuleResult
include KalibroRecord
def module_result
diff --git a/app/models/module_result.rb b/app/models/module_result.rb
index 29a2b83..b988b73 100644
--- a/app/models/module_result.rb
+++ b/app/models/module_result.rb
@@ -1,8 +1,8 @@
-class ModuleResult < KalibroEntities::Entities::ModuleResult
+class ModuleResult < KalibroGem::Entities::ModuleResult
include KalibroRecord
def metric_results
- KalibroEntities::Entities::MetricResult.metric_results_of(@id)
+ KalibroGem::Entities::MetricResult.metric_results_of(@id)
end
def history
diff --git a/app/models/processing.rb b/app/models/processing.rb
index 150a809..eb11b43 100644
--- a/app/models/processing.rb
+++ b/app/models/processing.rb
@@ -1,4 +1,4 @@
-class Processing < KalibroEntities::Entities::Processing
+class Processing < KalibroGem::Entities::Processing
include KalibroRecord
def ready?
diff --git a/app/models/project.rb b/app/models/project.rb
index d797ce3..d288bf0 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1,6 +1,6 @@
require "validators/kalibro_uniqueness_validator.rb"
-class Project < KalibroEntities::Entities::Project
+class Project < KalibroGem::Entities::Project
include KalibroRecord
attr_accessor :name
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 2a99fca..2f3e5f1 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1,4 +1,4 @@
-class Repository < KalibroEntities::Entities::Repository
+class Repository < KalibroGem::Entities::Repository
include KalibroRecord
validates :name, presence: true, kalibro_uniqueness: true
diff --git a/app/views/repositories/_form.html.erb b/app/views/repositories/_form.html.erb
index 96bf605..08008ae 100644
--- a/app/views/repositories/_form.html.erb
+++ b/app/views/repositories/_form.html.erb
@@ -17,7 +17,7 @@
<%= f.label :configuration, class: 'control-label' %>
- <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %>
+ <% configuration_list = KalibroGem::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %>
<%= f.select( :configuration_id, configuration_list, {class: 'form-control'} ) %>
diff --git a/features/repository/create.feature b/features/repository/create.feature
index 376e1aa..1fdf9ee 100644
--- a/features/repository/create.feature
+++ b/features/repository/create.feature
@@ -12,14 +12,14 @@ Scenario: repository creation
And I am at the New Repository page
And I fill the Name field with "Kalibro"
And I set the select field "Type" as "GIT"
- And I fill the Address field with "https://github.com/mezuro/kalibro_entities.git"
+ And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git"
And I set the select field "repository_configuration_id" as "Java"
When I press the Save button
Then I should be in the Sample Project page
And I should not see There are no repositories yet!
And I should see "Kalibro"
And I should see "GIT"
- And I should see "https://github.com/mezuro/kalibro_entities.git"
+ And I should see "https://github.com/mezuro/kalibro_gem.git"
@kalibro_restart
Scenario: repository creation blank validations
@@ -44,7 +44,7 @@ Scenario: repository creation with name already taken
And I am at the New Repository page
And I fill the Name field with "KalibroEntities"
And I set the select field "Type" as "GIT"
- And I fill the Address field with "https://github.com/mezuro/kalibro_entities.git"
+ And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git"
And I set the select field "repository_configuration_id" as "Java"
When I press the Save button
Then I should see "There's already"
\ No newline at end of file
diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb
index 3fdf596..5bdaaf0 100644
--- a/features/step_definitions/project_steps.rb
+++ b/features/step_definitions/project_steps.rb
@@ -1,4 +1,4 @@
-require 'kalibro_entities/errors'
+require 'kalibro_gem/errors'
Given(/^I am at the All Projects page$/) do
visit projects_path
diff --git a/features/support/env.rb b/features/support/env.rb
index 4cee7dc..fa550f2 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -25,7 +25,7 @@ require 'capybara/poltergeist'
#Capybara.default_driver = :poltergeist
Capybara.javascript_driver = :poltergeist
-#require 'kalibro_entities/kalibro_cucumber_helpers/hooks'
+#require 'kalibro_gem/kalibro_cucumber_helpers/hooks'
# Capybara defaults to CSS3 selectors rather than XPath.
# If you'd prefer to use XPath, just uncomment this line and adjust any
@@ -78,10 +78,10 @@ end
Cucumber::Rails::Database.javascript_strategy = :truncation
# Kalibro hooks
-require 'kalibro_entities/kalibro_cucumber_helpers/hooks'
+require 'kalibro_gem/kalibro_cucumber_helpers/hooks'
# Configuring the right hooks
-KalibroEntities::KalibroCucumberHelpers.configure_from_yml("#{__dir__}/kalibro_cucumber_helpers.yml")
+KalibroGem::KalibroCucumberHelpers.configure_from_yml("#{__dir__}/kalibro_cucumber_helpers.yml")
# Warden test helpers so the user authentication can be as fast as possible
include Warden::Test::Helpers
diff --git a/spec/controllers/repositories_controller_spec.rb b/spec/controllers/repositories_controller_spec.rb
index 5fc567a..3bc8ae3 100644
--- a/spec/controllers/repositories_controller_spec.rb
+++ b/spec/controllers/repositories_controller_spec.rb
@@ -87,7 +87,7 @@ describe RepositoriesController do
processing = FactoryGirl.build(:processing)
repository.expects(:last_processing).returns(processing)
- KalibroEntities::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration))
+ KalibroGem::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration))
Repository.expects(:find).with(repository.id).returns(repository)
get :show, id: repository.id.to_s, project_id: project.id.to_s
@@ -102,7 +102,7 @@ describe RepositoriesController do
processing = FactoryGirl.build(:processing)
repository.expects(:last_processing).returns(processing)
- KalibroEntities::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration))
+ KalibroGem::Entities::Configuration.expects(:find).with(repository.id).returns(FactoryGirl.build(:configuration))
Repository.expects(:find).with(repository.id).returns(repository)
get :show, id: repository.id.to_s, project_id: project.id.to_s
diff --git a/spec/factories/configurations.rb b/spec/factories/configurations.rb
index 49c2780..ee78317 100644
--- a/spec/factories/configurations.rb
+++ b/spec/factories/configurations.rb
@@ -1,11 +1,11 @@
FactoryGirl.define do
- factory :configuration, class: KalibroEntities::Entities::Configuration do
+ factory :configuration, class: KalibroGem::Entities::Configuration do
id 1
name "Java"
description "Code metrics for Java."
end
- factory :another_configuration, class: KalibroEntities::Entities::Configuration do
+ factory :another_configuration, class: KalibroGem::Entities::Configuration do
id 12
name "Perl"
description "Code metrics for Perl."
diff --git a/spec/factories/metric_configurations.rb b/spec/factories/metric_configurations.rb
index 0967e01..86345ab 100644
--- a/spec/factories/metric_configurations.rb
+++ b/spec/factories/metric_configurations.rb
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :metric_configuration, class: KalibroEntities::Entities::MetricConfiguration do
+ factory :metric_configuration, class: KalibroGem::Entities::MetricConfiguration do
id 1
code 'code'
metric {FactoryGirl.build(:metric)}
diff --git a/spec/factories/metric_configurations_snapshot.rb b/spec/factories/metric_configurations_snapshot.rb
index ea8b806..254ab35 100644
--- a/spec/factories/metric_configurations_snapshot.rb
+++ b/spec/factories/metric_configurations_snapshot.rb
@@ -15,7 +15,7 @@
# along with this program. If not, see .
FactoryGirl.define do
- factory :metric_configuration_snapshot, class: KalibroEntities::Entities::MetricConfigurationSnapshot do
+ factory :metric_configuration_snapshot, class: KalibroGem::Entities::MetricConfigurationSnapshot do
code "code"
weight "1.0"
aggregation_form 'AVERAGE'
diff --git a/spec/factories/metric_results.rb b/spec/factories/metric_results.rb
index 99b11c8..0c0b582 100644
--- a/spec/factories/metric_results.rb
+++ b/spec/factories/metric_results.rb
@@ -15,7 +15,7 @@
# along with this program. If not, see .
FactoryGirl.define do
- factory :metric_result, class: KalibroEntities::Entities::MetricResult do
+ factory :metric_result, class: KalibroGem::Entities::MetricResult do
id "42"
self.configuration { FactoryGirl.build(:metric_configuration_snapshot) }
value "10.0"
diff --git a/spec/factories/metrics.rb b/spec/factories/metrics.rb
index 918b7a2..5114bc8 100644
--- a/spec/factories/metrics.rb
+++ b/spec/factories/metrics.rb
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :metric, class: KalibroEntities::Entities::Metric do
+ factory :metric, class: KalibroGem::Entities::Metric do
name "Total Abstract Classes"
compound false
scope "SOFTWARE"
@@ -8,7 +8,7 @@ FactoryGirl.define do
language ["C", "CPP", "JAVA"]
end
- factory :loc, class: KalibroEntities::Entities::Metric do
+ factory :loc, class: KalibroGem::Entities::Metric do
name "Lines of Code"
compound false
scope "CLASS"
diff --git a/spec/factories/modules.rb b/spec/factories/modules.rb
index a0af19f..ae8910e 100644
--- a/spec/factories/modules.rb
+++ b/spec/factories/modules.rb
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :module, class: KalibroEntities::Entities::Module do
+ factory :module, class: KalibroGem::Entities::Module do
name 'Qt-Calculator'
granularity 'APPLICATION'
end
diff --git a/spec/factories/process_times.rb b/spec/factories/process_times.rb
index e642fc1..69f25ef 100644
--- a/spec/factories/process_times.rb
+++ b/spec/factories/process_times.rb
@@ -1,10 +1,10 @@
FactoryGirl.define do
- factory :process_time, class: KalibroEntities::Entities::ProcessTime do
+ factory :process_time, class: KalibroGem::Entities::ProcessTime do
state "Ready"
time "3600"
end
- factory :analyzing_process_time, class: KalibroEntities::Entities::ProcessTime do
+ factory :analyzing_process_time, class: KalibroGem::Entities::ProcessTime do
state "Analyzing"
time "12345"
end
diff --git a/spec/factories/ranges.rb b/spec/factories/ranges.rb
index 3d23b98..8fb51fb 100644
--- a/spec/factories/ranges.rb
+++ b/spec/factories/ranges.rb
@@ -15,7 +15,7 @@
# along with this program. If not, see .
FactoryGirl.define do
- factory :range, class: KalibroEntities::Entities::Range do
+ factory :range, class: KalibroGem::Entities::Range do
beginning 1.1
self.end 5.1
reading_id 3
diff --git a/spec/factories/ranges_snapshot.rb b/spec/factories/ranges_snapshot.rb
index 8bd64f3..f38dd67 100644
--- a/spec/factories/ranges_snapshot.rb
+++ b/spec/factories/ranges_snapshot.rb
@@ -15,7 +15,7 @@
# along with this program. If not, see .
FactoryGirl.define do
- factory :range_snapshot, class: KalibroEntities::Entities::RangeSnapshot do
+ factory :range_snapshot, class: KalibroGem::Entities::RangeSnapshot do
beginning 1.1
self.end 5.1
label "Snapshot"
diff --git a/spec/factories/reading_groups.rb b/spec/factories/reading_groups.rb
index f2945a2..b36e671 100644
--- a/spec/factories/reading_groups.rb
+++ b/spec/factories/reading_groups.rb
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :reading_group, class: KalibroEntities::Entities::ReadingGroup do
+ factory :reading_group, class: KalibroGem::Entities::ReadingGroup do
id 1
name "Mussum"
description "Cacildis!"
diff --git a/spec/factories/readings.rb b/spec/factories/readings.rb
index a0c8606..bcc14a6 100644
--- a/spec/factories/readings.rb
+++ b/spec/factories/readings.rb
@@ -15,7 +15,7 @@
# along with this program. If not, see .
FactoryGirl.define do
- factory :reading, class: KalibroEntities::Entities::Reading do
+ factory :reading, class: KalibroGem::Entities::Reading do
id 42
label "Good"
grade 10.5
diff --git a/spec/models/module_result_spec.rb b/spec/models/module_result_spec.rb
index 061590e..bd1d430 100644
--- a/spec/models/module_result_spec.rb
+++ b/spec/models/module_result_spec.rb
@@ -6,7 +6,7 @@ describe ModuleResult do
describe 'metric_results' do
it 'should call the metric_results_of method' do
- KalibroEntities::Entities::MetricResult.expects(:metric_results_of).with(subject.id).returns(nil)
+ KalibroGem::Entities::MetricResult.expects(:metric_results_of).with(subject.id).returns(nil)
subject.metric_results
end
--
libgit2 0.21.2