kalibro_gatekeeper_client 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +2 -0
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +8 -6
  5. data/features/step_definitions/base_tool_steps.rb +5 -5
  6. data/features/step_definitions/configuration_steps.rb +5 -5
  7. data/features/step_definitions/metric_configuration_steps.rb +5 -3
  8. data/features/step_definitions/metric_result_steps.rb +6 -6
  9. data/features/step_definitions/module_result_steps.rb +5 -5
  10. data/features/step_definitions/processing_steps.rb +6 -6
  11. data/features/step_definitions/project_steps.rb +4 -4
  12. data/features/step_definitions/range_steps.rb +11 -11
  13. data/features/step_definitions/reading_group_steps.rb +2 -2
  14. data/features/step_definitions/reading_steps.rb +6 -3
  15. data/features/step_definitions/repository_steps.rb +7 -7
  16. data/kalibro_gatekeeper_client.gemspec +2 -2
  17. data/lib/kalibro_gatekeeper_client/entities/metric.rb +5 -1
  18. data/lib/kalibro_gatekeeper_client/version.rb +1 -1
  19. data/spec/entities/base_tool_spec.rb +13 -13
  20. data/spec/entities/configuration_spec.rb +5 -5
  21. data/spec/entities/date_metric_result_spec.rb +5 -5
  22. data/spec/entities/date_module_result_spec.rb +5 -5
  23. data/spec/entities/metric_configuration_snapshot_spec.rb +10 -10
  24. data/spec/entities/metric_configuration_spec.rb +14 -14
  25. data/spec/entities/metric_result_spec.rb +16 -16
  26. data/spec/entities/metric_spec.rb +22 -4
  27. data/spec/entities/model_spec.rb +33 -33
  28. data/spec/entities/module_result_spec.rb +14 -14
  29. data/spec/entities/process_time_spec.rb +2 -2
  30. data/spec/entities/processing_spec.rb +23 -23
  31. data/spec/entities/project_spec.rb +5 -5
  32. data/spec/entities/range_snapshot_spec.rb +5 -5
  33. data/spec/entities/range_spec.rb +21 -21
  34. data/spec/entities/reading_group_spec.rb +5 -5
  35. data/spec/entities/reading_spec.rb +11 -11
  36. data/spec/entities/repository_observer_spec.rb +14 -14
  37. data/spec/entities/repository_spec.rb +12 -12
  38. data/spec/entities/stack_trace_element_spec.rb +1 -1
  39. data/spec/entities/throwable_spec.rb +4 -4
  40. data/spec/helpers/aggregation_options_spec.rb +1 -1
  41. data/spec/helpers/hash_converters_spec.rb +10 -10
  42. data/spec/helpers/xml_converters_spec.rb +5 -5
  43. data/spec/kalibro_entities_spec.rb +9 -9
  44. data/spec/spec_helper.rb +61 -6
  45. metadata +7 -6
@@ -24,29 +24,29 @@ describe KalibroGatekeeperClient do
24
24
 
25
25
  describe 'config' do
26
26
  it 'should return the default configuration' do
27
- KalibroGatekeeperClient.config.should eq({
27
+ expect(KalibroGatekeeperClient.config).to eq({
28
28
  address: "http://localhost:8081"
29
29
  })
30
30
  end
31
31
  end
32
32
 
33
33
  describe 'configure' do
34
- after(:all) {KalibroGatekeeperClient.configure(config)}
34
+ after(:each) {KalibroGatekeeperClient.configure(config)}
35
35
 
36
36
  it 'should set the address' do
37
37
  KalibroGatekeeperClient.configure({address: 'http://test.test'})
38
- KalibroGatekeeperClient.config.should eq({address: 'http://test.test'})
38
+ expect(KalibroGatekeeperClient.config).to eq({address: 'http://test.test'})
39
39
  end
40
40
  end
41
41
 
42
42
  describe 'configure_with' do
43
43
  context 'with an existent YAML' do
44
- after(:all) {KalibroGatekeeperClient.configure(config)}
44
+ after(:each) {KalibroGatekeeperClient.configure(config)}
45
45
 
46
46
  it 'should set the config' do
47
47
  KalibroGatekeeperClient.configure_with('spec/savon/fixtures/config.yml')
48
48
 
49
- KalibroGatekeeperClient.config.should eq({address: 'http://test1.test1'})
49
+ expect(KalibroGatekeeperClient.config).to eq({address: 'http://test1.test1'})
50
50
  end
51
51
  end
52
52
 
@@ -58,7 +58,7 @@ describe KalibroGatekeeperClient do
58
58
 
59
59
  it 'should keep the defaults' do
60
60
  KalibroGatekeeperClient.configure_with('spec/savon/fixtures/inexistent_file.yml')
61
- KalibroGatekeeperClient.config.should eq({address: "http://localhost:8081"})
61
+ expect(KalibroGatekeeperClient.config).to eq({address: "http://localhost:8081"})
62
62
  end
63
63
 
64
64
  it 'should log an warning' do
@@ -76,7 +76,7 @@ describe KalibroGatekeeperClient do
76
76
 
77
77
  it 'should keep the defaults' do
78
78
  KalibroGatekeeperClient.configure_with('spec/savon/fixtures/invalid_config.yml')
79
- KalibroGatekeeperClient.config.should eq({address: "http://localhost:8081"})
79
+ expect(KalibroGatekeeperClient.config).to eq({address: "http://localhost:8081"})
80
80
  end
81
81
 
82
82
  it 'should log an warning' do
@@ -91,7 +91,7 @@ describe KalibroGatekeeperClient do
91
91
  context 'Logger' do
92
92
  describe 'logger' do
93
93
  it 'should return the default logger' do
94
- KalibroGatekeeperClient.logger.should be_a(Logger)
94
+ expect(KalibroGatekeeperClient.logger).to be_a(Logger)
95
95
  end
96
96
  end
97
97
 
@@ -101,7 +101,7 @@ describe KalibroGatekeeperClient do
101
101
 
102
102
  KalibroGatekeeperClient.logger = logger
103
103
 
104
- KalibroGatekeeperClient.logger.should eq(logger)
104
+ expect(KalibroGatekeeperClient.logger).to eq(logger)
105
105
  end
106
106
  end
107
107
  end
data/spec/spec_helper.rb CHANGED
@@ -41,16 +41,71 @@ require 'kalibro_gatekeeper_client'
41
41
  require 'factory_girl'
42
42
  FactoryGirl.find_definitions
43
43
 
44
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
45
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
46
+ # The generated `.rspec` file contains `--require rails_helper` which will cause this
47
+ # file to always be loaded, without a need to explicitly require it in any files.
48
+ #
49
+ # Given that it is always loaded, you are encouraged to keep this file as
50
+ # light-weight as possible. Requiring heavyweight dependencies from this file
51
+ # will add to the boot time of your test suite on EVERY test run, even for an
52
+ # individual file that may not need all of that loaded. Instead, make a
53
+ # separate helper file that requires this one and then use it only in the specs
54
+ # that actually need it.
55
+ #
56
+ # The `.rspec` file also contains a few flags that are not defaults but that
57
+ # users commonly want.
58
+ #
59
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
44
60
  RSpec.configure do |config|
45
- # Mock Framework
46
- config.mock_with :mocha
61
+ # The settings below are suggested to provide a good initial experience
62
+ # with RSpec, but feel free to customize to your heart's content.
63
+
64
+ # These two settings work together to allow you to limit a spec run
65
+ # to individual examples or groups you care about by tagging them with
66
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
67
+ # get run.
68
+ config.filter_run :focus
69
+ config.run_all_when_everything_filtered = true
70
+
71
+ # Many RSpec users commonly either run the entire suite or an individual
72
+ # file, and it's useful to allow more verbose output when running an
73
+ # individual spec file.
74
+ if config.files_to_run.one?
75
+ # Use the documentation formatter for detailed output,
76
+ # unless a formatter has already been configured
77
+ # (e.g. via a command-line flag).
78
+ config.default_formatter = 'doc'
79
+ end
80
+
81
+ # Print the 10 slowest examples and example groups at the
82
+ # end of the spec run, to help surface which specs are running
83
+ # particularly slow.
84
+ config.profile_examples = 10
47
85
 
48
86
  # Run specs in random order to surface order dependencies. If you find an
49
87
  # order dependency and want to debug it, you can fix the order by providing
50
88
  # the seed, which is printed after each run.
51
89
  # --seed 1234
52
- config.order = "random"
90
+ config.order = :random
91
+
92
+ # Seed global randomization in this process using the `--seed` CLI option.
93
+ # Setting this allows you to use `--seed` to deterministically reproduce
94
+ # test failures related to randomization by passing the same `--seed` value
95
+ # as the one that triggered the failure.
96
+ Kernel.srand config.seed
97
+
98
+ # rspec-expectations config goes here. You can use an alternate
99
+ # assertion/expectation library such as wrong or the stdlib/minitest
100
+ # assertions if you prefer.
101
+ config.expect_with :rspec do |expectations|
102
+ # Enable only the newer, non-monkey-patching expect syntax.
103
+ # For more details, see:
104
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
105
+ expectations.syntax = :expect
106
+ end
53
107
 
54
- # Colors
55
- config.color_enabled = true
56
- end
108
+ # rspec-mocks config goes here. You can use an alternate test double
109
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
110
+ config.mock_with :mocha
111
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kalibro_gatekeeper_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Araújo Martinez
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-04-23 00:00:00.000000000 Z
14
+ date: 2014-07-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -47,14 +47,14 @@ dependencies:
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '2.14'
50
+ version: 3.0.0
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '2.14'
57
+ version: 3.0.0
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cucumber
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -75,14 +75,14 @@ dependencies:
75
75
  requirements:
76
76
  - - "~>"
77
77
  - !ruby/object:Gem::Version
78
- version: 1.0.0
78
+ version: 1.1.0
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
82
82
  requirements:
83
83
  - - "~>"
84
84
  - !ruby/object:Gem::Version
85
- version: 1.0.0
85
+ version: 1.1.0
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: simplecov
88
88
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +165,7 @@ extensions: []
165
165
  extra_rdoc_files: []
166
166
  files:
167
167
  - ".gitignore"
168
+ - ".rspec"
168
169
  - ".ruby-gemset"
169
170
  - ".ruby-version"
170
171
  - ".travis.yml"