Commit 560c305fe4ff7792724642686d2a23434d5f2dce

Authored by Fellipe Souto Sampaio
Committed by Rafael Manzo
1 parent c5a76ebf

Updated gemfile version and replace the occurence of KalibroEntities:: by KalibroGem::

Signed-off by : Rafael Reggiani Manzo <rr.manzo@gmail.com>
Gemfile
... ... @@ -37,7 +37,7 @@ gem &#39;jbuilder&#39;, &#39;~&gt; 1.2&#39;
37 37 gem 'devise', '~> 3.2.0'
38 38  
39 39 # Kalibro integration
40   -gem 'kalibro_entities', "~> 0.0.1.rc6"
  40 +gem 'kalibro_gem', "~> 0.0.1.rc7"
41 41  
42 42 # PostgreSQL integration
43 43 gem "pg", "~> 0.17.0"
... ...
Gemfile.lock
... ... @@ -105,7 +105,7 @@ GEM
105 105 railties (>= 3.0, < 5.0)
106 106 thor (>= 0.14, < 2.0)
107 107 json (1.8.1)
108   - kalibro_entities (0.0.1.rc6)
  108 + kalibro_gem (0.0.1.rc7)
109 109 activesupport (~> 4.0.1)
110 110 savon-ng-1.6 (~> 2.4.1)
111 111 konacha (3.0.0)
... ... @@ -263,7 +263,7 @@ DEPENDENCIES
263 263 gruff (~> 0.5.1)
264 264 jbuilder (~> 1.2)
265 265 jquery-rails
266   - kalibro_entities (~> 0.0.1.rc6)
  266 + kalibro_gem (~> 0.0.1.rc7)
267 267 konacha (~> 3.0.0)
268 268 mocha
269 269 modernizr-rails
... ...
app/controllers/repositories_controller.rb
... ... @@ -11,7 +11,7 @@ class RepositoriesController &lt; ApplicationController
11 11 # GET /projects/1/repositories/1/modules/1
12 12 # GET /projects/1/repositories/1/modules/1.json
13 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 15 @processing = @repository.last_processing
16 16 end
17 17  
... ...
app/models/date_module_result.rb
1   -class DateModuleResult < KalibroEntities::Entities::DateModuleResult
  1 +class DateModuleResult < KalibroGem::Entities::DateModuleResult
2 2 include KalibroRecord
3 3  
4 4 def module_result
... ...
app/models/module_result.rb
1   -class ModuleResult < KalibroEntities::Entities::ModuleResult
  1 +class ModuleResult < KalibroGem::Entities::ModuleResult
2 2 include KalibroRecord
3 3  
4 4 def metric_results
5   - KalibroEntities::Entities::MetricResult.metric_results_of(@id)
  5 + KalibroGem::Entities::MetricResult.metric_results_of(@id)
6 6 end
7 7  
8 8 def history
... ...
app/models/processing.rb
1   -class Processing < KalibroEntities::Entities::Processing
  1 +class Processing < KalibroGem::Entities::Processing
2 2 include KalibroRecord
3 3  
4 4 def ready?
... ...
app/models/project.rb
1 1 require "validators/kalibro_uniqueness_validator.rb"
2 2  
3   -class Project < KalibroEntities::Entities::Project
  3 +class Project < KalibroGem::Entities::Project
4 4 include KalibroRecord
5 5  
6 6 attr_accessor :name
... ...
app/models/repository.rb
1   -class Repository < KalibroEntities::Entities::Repository
  1 +class Repository < KalibroGem::Entities::Repository
2 2 include KalibroRecord
3 3  
4 4 validates :name, presence: true, kalibro_uniqueness: true
... ...
app/views/repositories/_form.html.erb
... ... @@ -17,7 +17,7 @@
17 17  
18 18 <div class="form-group">
19 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 21 <%= f.select( :configuration_id, configuration_list, {class: 'form-control'} ) %>
22 22 </div>
23 23  
... ...
features/repository/create.feature
... ... @@ -12,14 +12,14 @@ Scenario: repository creation
12 12 And I am at the New Repository page
13 13 And I fill the Name field with "Kalibro"
14 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 16 And I set the select field "repository_configuration_id" as "Java"
17 17 When I press the Save button
18 18 Then I should be in the Sample Project page
19 19 And I should not see There are no repositories yet!
20 20 And I should see "Kalibro"
21 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 24 @kalibro_restart
25 25 Scenario: repository creation blank validations
... ... @@ -44,7 +44,7 @@ Scenario: repository creation with name already taken
44 44 And I am at the New Repository page
45 45 And I fill the Name field with "KalibroEntities"
46 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 48 And I set the select field "repository_configuration_id" as "Java"
49 49 When I press the Save button
50 50 Then I should see "There's already"
51 51 \ No newline at end of file
... ...
features/step_definitions/project_steps.rb
1   -require 'kalibro_entities/errors'
  1 +require 'kalibro_gem/errors'
2 2  
3 3 Given(/^I am at the All Projects page$/) do
4 4 visit projects_path
... ...
features/support/env.rb
... ... @@ -25,7 +25,7 @@ require &#39;capybara/poltergeist&#39;
25 25 #Capybara.default_driver = :poltergeist
26 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 30 # Capybara defaults to CSS3 selectors rather than XPath.
31 31 # If you'd prefer to use XPath, just uncomment this line and adjust any
... ... @@ -78,10 +78,10 @@ end
78 78 Cucumber::Rails::Database.javascript_strategy = :truncation
79 79  
80 80 # Kalibro hooks
81   -require 'kalibro_entities/kalibro_cucumber_helpers/hooks'
  81 +require 'kalibro_gem/kalibro_cucumber_helpers/hooks'
82 82  
83 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 86 # Warden test helpers so the user authentication can be as fast as possible
87 87 include Warden::Test::Helpers
... ...
spec/controllers/repositories_controller_spec.rb
... ... @@ -87,7 +87,7 @@ describe RepositoriesController do
87 87 processing = FactoryGirl.build(:processing)
88 88  
89 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 91 Repository.expects(:find).with(repository.id).returns(repository)
92 92  
93 93 get :show, id: repository.id.to_s, project_id: project.id.to_s
... ... @@ -102,7 +102,7 @@ describe RepositoriesController do
102 102 processing = FactoryGirl.build(:processing)
103 103  
104 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 106 Repository.expects(:find).with(repository.id).returns(repository)
107 107  
108 108 get :show, id: repository.id.to_s, project_id: project.id.to_s
... ...
spec/factories/configurations.rb
1 1 FactoryGirl.define do
2   - factory :configuration, class: KalibroEntities::Entities::Configuration do
  2 + factory :configuration, class: KalibroGem::Entities::Configuration do
3 3 id 1
4 4 name "Java"
5 5 description "Code metrics for Java."
6 6 end
7 7  
8   - factory :another_configuration, class: KalibroEntities::Entities::Configuration do
  8 + factory :another_configuration, class: KalibroGem::Entities::Configuration do
9 9 id 12
10 10 name "Perl"
11 11 description "Code metrics for Perl."
... ...
spec/factories/metric_configurations.rb
1 1 FactoryGirl.define do
2   - factory :metric_configuration, class: KalibroEntities::Entities::MetricConfiguration do
  2 + factory :metric_configuration, class: KalibroGem::Entities::MetricConfiguration do
3 3 id 1
4 4 code 'code'
5 5 metric {FactoryGirl.build(:metric)}
... ...
spec/factories/metric_configurations_snapshot.rb
... ... @@ -15,7 +15,7 @@
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16  
17 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 19 code "code"
20 20 weight "1.0"
21 21 aggregation_form 'AVERAGE'
... ...
spec/factories/metric_results.rb
... ... @@ -15,7 +15,7 @@
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16  
17 17 FactoryGirl.define do
18   - factory :metric_result, class: KalibroEntities::Entities::MetricResult do
  18 + factory :metric_result, class: KalibroGem::Entities::MetricResult do
19 19 id "42"
20 20 self.configuration { FactoryGirl.build(:metric_configuration_snapshot) }
21 21 value "10.0"
... ...
spec/factories/metrics.rb
1 1 FactoryGirl.define do
2   - factory :metric, class: KalibroEntities::Entities::Metric do
  2 + factory :metric, class: KalibroGem::Entities::Metric do
3 3 name "Total Abstract Classes"
4 4 compound false
5 5 scope "SOFTWARE"
... ... @@ -8,7 +8,7 @@ FactoryGirl.define do
8 8 language ["C", "CPP", "JAVA"]
9 9 end
10 10  
11   - factory :loc, class: KalibroEntities::Entities::Metric do
  11 + factory :loc, class: KalibroGem::Entities::Metric do
12 12 name "Lines of Code"
13 13 compound false
14 14 scope "CLASS"
... ...
spec/factories/modules.rb
1 1 FactoryGirl.define do
2   - factory :module, class: KalibroEntities::Entities::Module do
  2 + factory :module, class: KalibroGem::Entities::Module do
3 3 name 'Qt-Calculator'
4 4 granularity 'APPLICATION'
5 5 end
... ...
spec/factories/process_times.rb
1 1 FactoryGirl.define do
2   - factory :process_time, class: KalibroEntities::Entities::ProcessTime do
  2 + factory :process_time, class: KalibroGem::Entities::ProcessTime do
3 3 state "Ready"
4 4 time "3600"
5 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 8 state "Analyzing"
9 9 time "12345"
10 10 end
... ...
spec/factories/ranges.rb
... ... @@ -15,7 +15,7 @@
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16  
17 17 FactoryGirl.define do
18   - factory :range, class: KalibroEntities::Entities::Range do
  18 + factory :range, class: KalibroGem::Entities::Range do
19 19 beginning 1.1
20 20 self.end 5.1
21 21 reading_id 3
... ...
spec/factories/ranges_snapshot.rb
... ... @@ -15,7 +15,7 @@
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16  
17 17 FactoryGirl.define do
18   - factory :range_snapshot, class: KalibroEntities::Entities::RangeSnapshot do
  18 + factory :range_snapshot, class: KalibroGem::Entities::RangeSnapshot do
19 19 beginning 1.1
20 20 self.end 5.1
21 21 label "Snapshot"
... ...
spec/factories/reading_groups.rb
1 1 FactoryGirl.define do
2   - factory :reading_group, class: KalibroEntities::Entities::ReadingGroup do
  2 + factory :reading_group, class: KalibroGem::Entities::ReadingGroup do
3 3 id 1
4 4 name "Mussum"
5 5 description "Cacildis!"
... ...
spec/factories/readings.rb
... ... @@ -15,7 +15,7 @@
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16  
17 17 FactoryGirl.define do
18   - factory :reading, class: KalibroEntities::Entities::Reading do
  18 + factory :reading, class: KalibroGem::Entities::Reading do
19 19 id 42
20 20 label "Good"
21 21 grade 10.5
... ...
spec/models/module_result_spec.rb
... ... @@ -6,7 +6,7 @@ describe ModuleResult do
6 6  
7 7 describe 'metric_results' do
8 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 11 subject.metric_results
12 12 end
... ...