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