Commit d82722907da775727428da9402eb86ab95369343

Authored by Heitor
Committed by Rafael Manzo
1 parent fd9f3328

[WIP] Removed KalibroGatekeeperClient gem, fixing tests

Signed off by: Daniel Alves <danpaulalves@gmail.com>
@@ -31,7 +31,6 @@ gem &#39;jbuilder&#39;, &#39;~&gt; 2.2.2&#39; @@ -31,7 +31,6 @@ gem &#39;jbuilder&#39;, &#39;~&gt; 2.2.2&#39;
31 gem 'devise', '~> 3.4.0' 31 gem 'devise', '~> 3.4.0'
32 32
33 # Kalibro integration 33 # Kalibro integration
34 -gem 'kalibro_gatekeeper_client', '~> 1.0.0'  
35 gem 'kalibro_client', git: 'https://github.com/mezuro/kalibro_client' 34 gem 'kalibro_client', git: 'https://github.com/mezuro/kalibro_client'
36 35
37 # PostgreSQL integration 36 # PostgreSQL integration
@@ -131,10 +131,6 @@ GEM @@ -131,10 +131,6 @@ GEM
131 factory_girl_rails (4.5.0) 131 factory_girl_rails (4.5.0)
132 factory_girl (~> 4.5.0) 132 factory_girl (~> 4.5.0)
133 railties (>= 3.0.0) 133 railties (>= 3.0.0)
134 - faraday (0.9.0)  
135 - multipart-post (>= 1.2, < 3)  
136 - faraday_middleware (0.9.1)  
137 - faraday (>= 0.7.4, < 0.10)  
138 gherkin (2.12.2) 134 gherkin (2.12.2)
139 multi_json (~> 1.3) 135 multi_json (~> 1.3)
140 google-analytics-rails (0.0.6) 136 google-analytics-rails (0.0.6)
@@ -146,13 +142,10 @@ GEM @@ -146,13 +142,10 @@ GEM
146 jquery-rails (3.1.2) 142 jquery-rails (3.1.2)
147 railties (>= 3.0, < 5.0) 143 railties (>= 3.0, < 5.0)
148 thor (>= 0.14, < 2.0) 144 thor (>= 0.14, < 2.0)
149 - jquery-ui-rails (5.0.2) 145 + jquery-ui-rails (5.0.3)
150 railties (>= 3.2.16) 146 railties (>= 3.2.16)
151 json (1.8.1) 147 json (1.8.1)
152 - kalibro_gatekeeper_client (1.0.0)  
153 - activesupport (>= 2.2.1)  
154 - faraday_middleware (~> 0.9.0)  
155 - konacha (3.3.0) 148 + konacha (3.2.5)
156 actionpack (>= 3.1, < 5) 149 actionpack (>= 3.1, < 5)
157 capybara 150 capybara
158 colorize 151 colorize
@@ -169,12 +162,11 @@ GEM @@ -169,12 +162,11 @@ GEM
169 metaclass (~> 0.0.1) 162 metaclass (~> 0.0.1)
170 multi_json (1.10.1) 163 multi_json (1.10.1)
171 multi_test (0.1.1) 164 multi_test (0.1.1)
172 - multipart-post (2.0.0)  
173 net-scp (1.2.1) 165 net-scp (1.2.1)
174 net-ssh (>= 2.6.5) 166 net-ssh (>= 2.6.5)
175 net-ssh (2.9.1) 167 net-ssh (2.9.1)
176 netrc (0.8.0) 168 netrc (0.8.0)
177 - nokogiri (1.6.4.1) 169 + nokogiri (1.6.5)
178 mini_portile (~> 0.6.0) 170 mini_portile (~> 0.6.0)
179 orm_adapter (0.5.0) 171 orm_adapter (0.5.0)
180 pg (0.17.1) 172 pg (0.17.1)
@@ -203,8 +195,8 @@ GEM @@ -203,8 +195,8 @@ GEM
203 activesupport (= 4.1.6) 195 activesupport (= 4.1.6)
204 rake (>= 0.8.7) 196 rake (>= 0.8.7)
205 thor (>= 0.18.1, < 2.0) 197 thor (>= 0.18.1, < 2.0)
206 - rake (10.4.2)  
207 - rdoc (4.2.0) 198 + rake (10.4.0)
  199 + rdoc (4.1.2)
208 json (~> 1.4) 200 json (~> 1.4)
209 ref (1.0.5) 201 ref (1.0.5)
210 responders (1.1.2) 202 responders (1.1.2)
@@ -229,10 +221,10 @@ GEM @@ -229,10 +221,10 @@ GEM
229 rspec-support (~> 3.1.0) 221 rspec-support (~> 3.1.0)
230 rspec-support (3.1.2) 222 rspec-support (3.1.2)
231 sass (3.2.19) 223 sass (3.2.19)
232 - sass-rails (4.0.4) 224 + sass-rails (4.0.5)
233 railties (>= 4.0.0, < 5.0) 225 railties (>= 4.0.0, < 5.0)
234 sass (~> 3.2.2) 226 sass (~> 3.2.2)
235 - sprockets (~> 2.8, < 2.12) 227 + sprockets (~> 2.8, < 3.0)
236 sprockets-rails (~> 2.0) 228 sprockets-rails (~> 2.0)
237 sdoc (0.4.1) 229 sdoc (0.4.1)
238 json (~> 1.7, >= 1.7.7) 230 json (~> 1.7, >= 1.7.7)
@@ -244,8 +236,8 @@ GEM @@ -244,8 +236,8 @@ GEM
244 multi_json (~> 1.0) 236 multi_json (~> 1.0)
245 simplecov-html (~> 0.8.0) 237 simplecov-html (~> 0.8.0)
246 simplecov-html (0.8.0) 238 simplecov-html (0.8.0)
247 - spring (1.1.3)  
248 - sprockets (2.11.3) 239 + spring (1.2.0)
  240 + sprockets (2.12.3)
249 hike (~> 1.2) 241 hike (~> 1.2)
250 multi_json (~> 1.0) 242 multi_json (~> 1.0)
251 rack (~> 1.0) 243 rack (~> 1.0)
@@ -306,8 +298,7 @@ DEPENDENCIES @@ -306,8 +298,7 @@ DEPENDENCIES
306 jquery-rails 298 jquery-rails
307 jquery-ui-rails (~> 5.0.0) 299 jquery-ui-rails (~> 5.0.0)
308 kalibro_client! 300 kalibro_client!
309 - kalibro_gatekeeper_client (~> 1.0.0)  
310 - konacha (~> 3.3.0) 301 + konacha (~> 3.2.0)
311 mocha 302 mocha
312 pg (~> 0.17.0) 303 pg (~> 0.17.0)
313 poltergeist (~> 1.5.0) 304 poltergeist (~> 1.5.0)
spec/factories/metric_collectors.rb
1 FactoryGirl.define do 1 FactoryGirl.define do
2 - factory :metric_collector, class: KalibroGatekeeperClient::Entities::MetricCollector do 2 + factory :metric_collector, class: MetricCollector do
3 name 'Analizo' 3 name 'Analizo'
4 supported_metrics { { "total_abstract_classes" => FactoryGirl.build(:metric).to_hash, "loc" => FactoryGirl.build(:loc).to_hash } } 4 supported_metrics { { "total_abstract_classes" => FactoryGirl.build(:metric).to_hash, "loc" => FactoryGirl.build(:loc).to_hash } }
5 end 5 end
spec/factories/metric_configurations.rb
@@ -13,10 +13,10 @@ FactoryGirl.define do @@ -13,10 +13,10 @@ FactoryGirl.define do
13 factory :compound_metric_configuration, class: MetricConfiguration do 13 factory :compound_metric_configuration, class: MetricConfiguration do
14 id 1 14 id 1
15 code 'compound' 15 code 'compound'
16 - metric {FactoryGirl.build(:compound_metric, {script: 'native*2;'})} 16 + metric {FactoryGirl.build(:compound_metric, script: 'native*2;')}
17 weight 1 17 weight 1
18 aggregation_form "AVERAGE" 18 aggregation_form "AVERAGE"
19 reading_group_id 1 19 reading_group_id 1
20 configuration_id 1 20 configuration_id 1
21 end 21 end
22 -end  
23 \ No newline at end of file 22 \ No newline at end of file
  23 +end
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: KalibroGatekeeperClient::Entities::MetricConfigurationSnapshot do 18 + factory :metric_configuration_snapshot, class: KalibroClient::Configurations::MetricSnapshot do
19 code "code" 19 code "code"
20 weight "1.0" 20 weight "1.0"
21 aggregation_form 'AVERAGE' 21 aggregation_form 'AVERAGE'
@@ -23,4 +23,4 @@ FactoryGirl.define do @@ -23,4 +23,4 @@ FactoryGirl.define do
23 metric_collector_name "Analizo" 23 metric_collector_name "Analizo"
24 range {FactoryGirl.build(:range_snapshot)} 24 range {FactoryGirl.build(:range_snapshot)}
25 end 25 end
26 -end  
27 \ No newline at end of file 26 \ No newline at end of file
  27 +end
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: KalibroGatekeeperClient::Entities::MetricResult do 18 + factory :metric_result, class: KalibroClient::Processor::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: KalibroGatekeeperClient::Entities::Metric do 2 + factory :metric, class: KalibroClient::Processor::Metric do
3 name "Total Abstract Classes" 3 name "Total Abstract Classes"
4 code "total_abstract_classes" 4 code "total_abstract_classes"
5 compound false 5 compound false
6 scope "SOFTWARE" 6 scope "SOFTWARE"
7 description nil 7 description nil
8 - script ""  
9 - language ["C", "CPP", "JAVA"] 8 +
  9 + initialize_with { new(compound, name, code, scope) }
10 end 10 end
11 11
12 - factory :loc, class: KalibroGatekeeperClient::Entities::Metric do 12 + factory :loc, class: KalibroClient::Processor::Metric do
13 name "Lines of Code" 13 name "Lines of Code"
14 code "loc" 14 code "loc"
15 compound false 15 compound false
16 scope "CLASS" 16 scope "CLASS"
17 description nil 17 description nil
18 - script ""  
19 - language ["C", "CPP", "JAVA"] 18 +
  19 + initialize_with { new(compound, name, code, scope) }
20 end 20 end
21 21
22 - factory :compound_metric, class: KalibroGatekeeperClient::Entities::Metric do 22 + factory :compound_metric, class: KalibroClient::Processor::Metric do
23 name "Compound" 23 name "Compound"
24 code "compound" 24 code "compound"
25 compound true 25 compound true
@@ -27,5 +27,7 @@ FactoryGirl.define do @@ -27,5 +27,7 @@ FactoryGirl.define do
27 description nil 27 description nil
28 script "" 28 script ""
29 language ["C", "CPP", "JAVA"] 29 language ["C", "CPP", "JAVA"]
  30 +
  31 + initialize_with { new(compound, name, code, scope) }
30 end 32 end
31 -end  
32 \ No newline at end of file 33 \ No newline at end of file
  34 +end
spec/factories/modules.rb
1 FactoryGirl.define do 1 FactoryGirl.define do
2 - factory :module, class: KalibroGatekeeperClient::Entities::Module do 2 + factory :module, class: KalibroClient::Processor::KalibroModule do
3 name 'Qt-Calculator' 3 name 'Qt-Calculator'
4 granularity 'APPLICATION' 4 granularity 'APPLICATION'
5 end 5 end
6 -end  
7 \ No newline at end of file 6 \ No newline at end of file
  7 +end
spec/factories/process_times.rb
1 FactoryGirl.define do 1 FactoryGirl.define do
2 - factory :process_time, class: KalibroGatekeeperClient::Entities::ProcessTime do 2 + factory :process_time, class: KalibroClient::Processor::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: KalibroGatekeeperClient::Entities::ProcessTime do 7 + factory :analyzing_process_time, class: KalibroClient::Processor::ProcessTime do
8 state "Analyzing" 8 state "Analyzing"
9 time "12345" 9 time "12345"
10 end 10 end
11 -end  
12 \ No newline at end of file 11 \ No newline at end of file
  12 +end
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: KalibroGatekeeperClient::Entities::RangeSnapshot do 18 + factory :range_snapshot, class: KalibroClient::Configurations::KalibroRange 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"
@@ -23,4 +23,4 @@ FactoryGirl.define do @@ -23,4 +23,4 @@ FactoryGirl.define do
23 color "FF2284" 23 color "FF2284"
24 comments "Comment" 24 comments "Comment"
25 end 25 end
26 -end  
27 \ No newline at end of file 26 \ No newline at end of file
  27 +end