danica 2.7.2 → 2.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +71 -0
  3. data/.gitignore +6 -1
  4. data/.rubocop.yml +18 -0
  5. data/.rubocop_todo.yml +123 -0
  6. data/Dockerfile +22 -0
  7. data/Gemfile +2 -1
  8. data/README.md +9 -1
  9. data/Rakefile +4 -0
  10. data/config/check_specs.yml +13 -0
  11. data/config/rubycritc.rb +12 -0
  12. data/config/yardstick.rb +13 -0
  13. data/config/yardstick.yml +33 -0
  14. data/danica.gemspec +19 -10
  15. data/docker-compose.yml +14 -9
  16. data/lib/danica.rb +2 -1
  17. data/lib/danica/base_operations.rb +3 -0
  18. data/lib/danica/builder.rb +2 -0
  19. data/lib/danica/common.rb +8 -4
  20. data/lib/danica/dsl.rb +8 -6
  21. data/lib/danica/dsl/builder.rb +4 -1
  22. data/lib/danica/equation.rb +3 -3
  23. data/lib/danica/equation/builder.rb +2 -0
  24. data/lib/danica/exception.rb +3 -2
  25. data/lib/danica/expressable.rb +14 -8
  26. data/lib/danica/expression.rb +4 -2
  27. data/lib/danica/expression/gauss.rb +5 -5
  28. data/lib/danica/formatted.rb +27 -8
  29. data/lib/danica/function.rb +5 -3
  30. data/lib/danica/function/name.rb +2 -0
  31. data/lib/danica/operator.rb +13 -9
  32. data/lib/danica/operator/addition.rb +4 -3
  33. data/lib/danica/operator/chained.rb +4 -3
  34. data/lib/danica/operator/cos.rb +2 -1
  35. data/lib/danica/operator/division.rb +2 -1
  36. data/lib/danica/operator/exponential.rb +2 -1
  37. data/lib/danica/operator/functional.rb +3 -2
  38. data/lib/danica/operator/multiplication.rb +4 -2
  39. data/lib/danica/operator/power.rb +4 -3
  40. data/lib/danica/operator/sin.rb +2 -1
  41. data/lib/danica/operator/squared_root.rb +2 -1
  42. data/lib/danica/variables_holder.rb +7 -4
  43. data/lib/danica/variables_holder/alias_builder.rb +4 -4
  44. data/lib/danica/variables_holder/calculator.rb +2 -0
  45. data/lib/danica/variables_holder/store.rb +3 -2
  46. data/lib/danica/variables_holder/variables_builder.rb +2 -1
  47. data/lib/danica/version.rb +3 -1
  48. data/lib/danica/wrapper.rb +14 -9
  49. data/lib/danica/wrapper/constant.rb +10 -14
  50. data/lib/danica/wrapper/container.rb +3 -3
  51. data/lib/danica/wrapper/group.rb +3 -2
  52. data/lib/danica/wrapper/negative.rb +3 -1
  53. data/lib/danica/wrapper/number.rb +6 -3
  54. data/lib/danica/wrapper/plus_minus.rb +3 -1
  55. data/lib/danica/wrapper/variable.rb +13 -8
  56. data/scripts/check_readme.sh +6 -0
  57. data/scripts/rubycritic.sh +10 -0
  58. data/spec/integration/global/danica/formatted_spec.rb +87 -0
  59. data/spec/integration/global/danica/operator/addition_spec.rb +32 -0
  60. data/spec/integration/{multiplication_spec.rb → global/danica/operator/multiplication_spec.rb} +12 -9
  61. data/spec/integration/{power_spec.rb → global/danica/operator/power_spec.rb} +4 -2
  62. data/spec/integration/{negative_spec.rb → global/danica/wrapper/negative_spec.rb} +9 -8
  63. data/spec/integration/{plus_minus_spec.rb → global/danica/wrapper/plus_minus_spec.rb} +5 -4
  64. data/spec/integration/readme/constant_spec.rb +4 -1
  65. data/spec/integration/readme/danica/formatted_spec.rb +24 -0
  66. data/spec/integration/readme/danica_spec.rb +20 -4
  67. data/spec/integration/readme/equation_spec.rb +4 -2
  68. data/spec/integration/readme/expression_spec.rb +11 -8
  69. data/spec/integration/readme/function_spec.rb +11 -7
  70. data/spec/integration/readme/number_spec.rb +9 -8
  71. data/spec/integration/readme/operator_spec.rb +3 -1
  72. data/spec/integration/readme/variables_spec.rb +8 -6
  73. data/spec/lib/danica/common_spec.rb +71 -10
  74. data/spec/lib/danica/dsl_spec.rb +21 -18
  75. data/spec/lib/danica/equation_spec.rb +10 -8
  76. data/spec/lib/danica/expressable_spec.rb +5 -2
  77. data/spec/lib/danica/expression/gauss_spec.rb +6 -3
  78. data/spec/lib/danica/expression_spec.rb +48 -26
  79. data/spec/lib/danica/formatted_spec.rb +34 -13
  80. data/spec/lib/danica/function/name_spec.rb +3 -1
  81. data/spec/lib/danica/function_spec.rb +14 -10
  82. data/spec/lib/danica/operator/addition_spec.rb +16 -15
  83. data/spec/lib/danica/operator/cos_spec.rb +9 -8
  84. data/spec/lib/danica/operator/division_spec.rb +18 -17
  85. data/spec/lib/danica/operator/exponential_spec.rb +9 -8
  86. data/spec/lib/danica/operator/multiplication_spec.rb +16 -15
  87. data/spec/lib/danica/operator/power_spec.rb +17 -16
  88. data/spec/lib/danica/operator/sin_spec.rb +9 -8
  89. data/spec/lib/danica/operator/squared_root_spec.rb +9 -8
  90. data/spec/lib/danica/operator_spec.rb +13 -4
  91. data/spec/lib/danica/variables_holder/store_spec.rb +19 -13
  92. data/spec/lib/danica/variables_holder_spec.rb +76 -59
  93. data/spec/lib/danica/wrapper/constant_spec.rb +9 -2
  94. data/spec/lib/danica/wrapper/group_spec.rb +4 -1
  95. data/spec/lib/danica/wrapper/negative_spec.rb +4 -1
  96. data/spec/lib/danica/wrapper/number_spec.rb +8 -3
  97. data/spec/lib/danica/wrapper/plus_minus_spec.rb +4 -1
  98. data/spec/lib/danica/wrapper/variable_spec.rb +6 -3
  99. data/spec/lib/danica/wrapper_spec.rb +14 -12
  100. data/spec/lib/danica_spec.rb +6 -5
  101. data/spec/spec_helper.rb +3 -2
  102. data/spec/support/models/expression/baskara.rb +3 -3
  103. data/spec/support/models/expression/parabole.rb +2 -0
  104. data/spec/support/models/expression/quadratic_sum.rb +3 -1
  105. data/spec/support/models/expression/spatial.rb +2 -1
  106. data/spec/support/models/function/my_function.rb +3 -1
  107. data/spec/support/models/function/parabole.rb +1 -1
  108. data/spec/support/models/function/quadratic_sum.rb +2 -0
  109. data/spec/support/models/function/spatial.rb +2 -0
  110. data/spec/support/models/operator/inverse.rb +3 -1
  111. data/spec/support/models/operator/my_operator.rb +3 -1
  112. data/spec/support/models/variables_holder/dummy.rb +3 -1
  113. data/spec/support/shared_contexts/common.rb +4 -2
  114. data/spec/support/shared_examples/base_operations.rb +7 -4
  115. data/spec/support/shared_examples/common.rb +3 -1
  116. data/spec/support/shared_examples/operator/chained.rb +12 -6
  117. data/spec/support/shared_examples/operator/dual_term.rb +9 -8
  118. data/spec/support/shared_examples/operator/single_input.rb +7 -2
  119. data/spec/support/shared_examples/variable.rb +8 -4
  120. metadata +158 -36
  121. data/spec/integration/addition_spec.rb +0 -28
  122. data/spec/integration/formatted_spec.rb +0 -75
  123. data/spec/integration/readme/formatting_spec.rb +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 204973e375504667567ab1246d44e05a1375e407
4
- data.tar.gz: 0ec10d6273e79affbbb3624795cc00dd06321687
2
+ SHA256:
3
+ metadata.gz: 1dccde2458c9a43f929ebc30b1d517977382159df26407504e426dc3a98dcae4
4
+ data.tar.gz: 8b399f23a553b6e6a3b9f34a35a732b6de20feefdbbb5c87240e114593a434b5
5
5
  SHA512:
6
- metadata.gz: d63fd9fa21b3a5894d55d3a53d6af203f4bfb2f4f78162a9c7d38877f146c9a69f04851fffa6a331f03d2bd533f0945a3de70b88236e577af278e95fdc3cccae
7
- data.tar.gz: 21d8fb184a94220c656d8631cf9b230f6f4911cc675333b5188176b379177499cb2522c4e2a306107d4347aa86585ec2c9ee281cedab70e47eaff743668b567f
6
+ metadata.gz: 2ed53738deb35df3dbd7c3c49227a6c66254168d7df0583da7c9e4d5eeb8481a9e8918482b1ee3ae8df671bbaed628f1deabc71c53a5b74ebb7669166863f387
7
+ data.tar.gz: 6edb3553fdbf0d62c1b7935c15ce2c141c0d10821b4e906a2d7bade2a08b05733331237b2ed0ffddf6909cbd8513693337458632663ebb53243a80237a2cf3be
@@ -0,0 +1,71 @@
1
+ version: 2
2
+ workflows:
3
+ version: 2
4
+ test-and-build:
5
+ jobs:
6
+ - test:
7
+ filters:
8
+ tags:
9
+ only: /.*/
10
+ - build-and-release:
11
+ requires: [test]
12
+ filters:
13
+ tags:
14
+ only: /\d+\.\d+\.\d+/
15
+ branches:
16
+ only:
17
+ - master
18
+ jobs:
19
+ test:
20
+ docker:
21
+ - image: darthjee/circleci_ruby_250:0.6.2
22
+ environment:
23
+ PROJECT: danica
24
+ steps:
25
+ - checkout
26
+ - run:
27
+ name: Prepare Coverage Test Report
28
+ command: cc-test-reporter before-build
29
+ - run:
30
+ name: Bundle Install
31
+ command: bundle install
32
+ - run:
33
+ name: RSpec
34
+ command: bundle exec rspec
35
+ - run:
36
+ name: Rubocop
37
+ command: rubocop
38
+ - run:
39
+ name: Coverage Test Report
40
+ command: cc-test-reporter after-build --exit-code $?
41
+ - run:
42
+ name: Yardstick coverage check
43
+ command: bundle exec rake verify_measurements
44
+ - run:
45
+ name: Check version documentation
46
+ command: check_readme.sh
47
+ - run:
48
+ name: Rubycritcs check
49
+ command: rubycritic.sh
50
+ - run:
51
+ name: Check unit tests
52
+ command: check_specs
53
+ build-and-release:
54
+ docker:
55
+ - image: darthjee/circleci_ruby_250:0.6.2
56
+ environment:
57
+ PROJECT: danica
58
+ steps:
59
+ - checkout
60
+ - run:
61
+ name: Bundle Install
62
+ command: bundle install
63
+ - run:
64
+ name: Signin
65
+ command: build_gem.sh signin
66
+ - run:
67
+ name: Build Gem
68
+ command: build_gem.sh build
69
+ - run:
70
+ name: Push Gem
71
+ command: build_gem.sh push
data/.gitignore CHANGED
@@ -1,3 +1,8 @@
1
1
  coverage
2
- pkg
3
2
  Gemfile.lock
3
+ .yardoc
4
+ doc
5
+ pkg
6
+ measurement
7
+ **/*.swp
8
+ rubycritic/
data/.rubocop.yml ADDED
@@ -0,0 +1,18 @@
1
+ require: rubocop-rspec
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.5
6
+
7
+ Metrics/BlockLength:
8
+ Exclude:
9
+ - 'spec/**/*_spec.rb'
10
+
11
+ Style/HashEachMethods:
12
+ Enabled: true
13
+
14
+ Style/HashTransformKeys:
15
+ Enabled: true
16
+
17
+ Style/HashTransformValues:
18
+ Enabled: true
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,123 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2021-04-26 22:48:12 +0000 using RuboCop version 0.80.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ Metrics/AbcSize:
11
+ Max: 18
12
+
13
+ # Offense count: 8
14
+ # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
16
+ Metrics/BlockLength:
17
+ Max: 54
18
+
19
+ # Offense count: 4
20
+ # Configuration parameters: CountComments, ExcludedMethods.
21
+ Metrics/MethodLength:
22
+ Max: 16
23
+
24
+ # Offense count: 1
25
+ # Configuration parameters: CustomIncludeMethods.
26
+ RSpec/EmptyExampleGroup:
27
+ Exclude:
28
+ - 'spec/lib/danica/variables_holder/store_spec.rb'
29
+
30
+ # Offense count: 4
31
+ # Configuration parameters: CustomTransform, IgnoreMethods.
32
+ RSpec/FilePath:
33
+ Exclude:
34
+ - 'spec/integration/readme/constant_spec.rb'
35
+ - 'spec/integration/readme/equation_spec.rb'
36
+ - 'spec/integration/readme/number_spec.rb'
37
+ - 'spec/integration/readme/variables_spec.rb'
38
+
39
+ # Offense count: 1
40
+ RSpec/LeakyConstantDeclaration:
41
+ Exclude:
42
+ - 'spec/lib/danica/dsl_spec.rb'
43
+
44
+ # Offense count: 3
45
+ RSpec/MultipleDescribes:
46
+ Exclude:
47
+ - 'spec/integration/readme/expression_spec.rb'
48
+ - 'spec/integration/readme/function_spec.rb'
49
+ - 'spec/integration/readme/operator_spec.rb'
50
+
51
+ # Offense count: 241
52
+ # Configuration parameters: IgnoreSharedExamples.
53
+ RSpec/NamedSubject:
54
+ Enabled: false
55
+
56
+ # Offense count: 79
57
+ RSpec/NestedGroups:
58
+ Max: 6
59
+
60
+ # Offense count: 2
61
+ RSpec/RepeatedExampleGroupBody:
62
+ Exclude:
63
+ - 'spec/lib/danica/function_spec.rb'
64
+
65
+ # Offense count: 2
66
+ RSpec/RepeatedExampleGroupDescription:
67
+ Exclude:
68
+ - 'spec/integration/global/danica/operator/multiplication_spec.rb'
69
+
70
+ # Offense count: 35
71
+ # Cop supports --auto-correct.
72
+ # Configuration parameters: AutoCorrect, EnforcedStyle.
73
+ # SupportedStyles: nested, compact
74
+ Style/ClassAndModuleChildren:
75
+ Enabled: false
76
+
77
+ # Offense count: 36
78
+ Style/Documentation:
79
+ Enabled: false
80
+
81
+ # Offense count: 1
82
+ Style/EvalWithLocation:
83
+ Exclude:
84
+ - 'lib/danica/operator/functional.rb'
85
+
86
+ # Offense count: 1
87
+ # Configuration parameters: EnforcedStyle.
88
+ # SupportedStyles: left_coerce, right_coerce, single_coerce, fdiv
89
+ Style/FloatDivision:
90
+ Exclude:
91
+ - 'lib/danica/operator/division.rb'
92
+
93
+ # Offense count: 1
94
+ Style/MethodMissingSuper:
95
+ Exclude:
96
+ - 'lib/danica/formatted.rb'
97
+
98
+ # Offense count: 1
99
+ Style/MissingRespondToMissing:
100
+ Exclude:
101
+ - 'lib/danica/formatted.rb'
102
+
103
+ # Offense count: 1
104
+ Style/MultilineBlockChain:
105
+ Exclude:
106
+ - 'spec/lib/danica/function_spec.rb'
107
+
108
+ # Offense count: 2
109
+ # Cop supports --auto-correct.
110
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
111
+ # SupportedStyles: predicate, comparison
112
+ Style/NumericPredicate:
113
+ Exclude:
114
+ - 'spec/**/*'
115
+ - 'lib/danica/wrapper.rb'
116
+ - 'lib/danica/wrapper/number.rb'
117
+
118
+ # Offense count: 83
119
+ # Cop supports --auto-correct.
120
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
121
+ # URISchemes: http, https
122
+ Layout/LineLength:
123
+ Max: 181
data/Dockerfile ADDED
@@ -0,0 +1,22 @@
1
+ FROM darthjee/scripts:0.1.8 as scripts
2
+
3
+ FROM darthjee/ruby_250:0.7.0 as base
4
+
5
+ COPY --chown=app:app ./ /home/app/app/
6
+
7
+ ######################################
8
+
9
+ FROM base as builder
10
+
11
+ COPY --chown=app:app --from=scripts /home/scripts/builder/bundle_builder.sh /usr/local/sbin/bundle_builder.sh
12
+
13
+ ENV HOME_DIR /home/app
14
+ RUN bundle_builder.sh
15
+
16
+ #######################
17
+ #FINAL IMAGE
18
+ FROM base
19
+
20
+ COPY --chown=app:app --from=builder /home/app/bundle/ /usr/local/bundle/
21
+ RUN bundle install
22
+
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in credential_builder.gemspec
4
6
  gemspec
5
-
data/README.md CHANGED
@@ -1,9 +1,17 @@
1
1
  # danica
2
2
  [![Code Climate](https://codeclimate.com/github/darthjee/danica/badges/gpa.svg)](https://codeclimate.com/github/darthjee/danica)
3
3
  [![Test Coverage](https://codeclimate.com/github/darthjee/danica/badges/coverage.svg)](https://codeclimate.com/github/darthjee/danica/coverage)
4
+ [![Issue Count](https://codeclimate.com/github/darthjee/danica/badges/issue_count.svg)](https://codeclimate.com/github/darthjee/danica)
5
+ [![Gem Version](https://badge.fury.io/rb/danica.svg)](https://badge.fury.io/rb/danica)
6
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/7990acf6e4404787995fff3c0d6eb1dc)](https://www.codacy.com/gh/darthjee/danica/dashboard?utm_source=github.com&utm_medium=referral&utm_content=darthjee/danica&utm_campaign=Badge_Grade)
7
+ [![Inline docs](http://inch-ci.org/github/darthjee/danica.svg?branch=master)](http://inch-ci.org/github/darthjee/danica)
4
8
 
5
9
  A tool for math formulation on docs
6
10
 
11
+ Yard Documentation
12
+ -------------------
13
+ [https://www.rubydoc.info/gems/danica/2.7.7](https://www.rubydoc.info/gems/danica/2.7.7)
14
+
7
15
  ## How to use
8
16
  Add the gem to your project or just install the gem
9
17
 
@@ -613,7 +621,7 @@ which will have the returns of ```#to(format)``` obeying the following
613
621
  }
614
622
  ```
615
623
 
616
- ###Formatting
624
+ ### Formatting
617
625
  When generating the output, you can choose options or even
618
626
  create a formatted object
619
627
 
data/Rakefile CHANGED
@@ -1,5 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
5
+ require './config/yardstick'
6
+ require './config/rubycritc'
3
7
 
4
8
  task default: :spec
5
9
  task test: :spec
@@ -0,0 +1,13 @@
1
+ ignore:
2
+ - lib/danica/builder.rb
3
+ - lib/danica/dsl/builder.rb
4
+ - lib/danica/equation/builder.rb
5
+ - lib/danica/exception.rb
6
+ - lib/danica/operator/chained.rb
7
+ - lib/danica/operator/functional.rb
8
+ - lib/danica/variables_holder/alias_builder.rb
9
+ - lib/danica/variables_holder/calculator.rb
10
+ - lib/danica/variables_holder/variables_builder.rb
11
+ - lib/danica/wrapper/container.rb
12
+ - lib/danica/base_operations.rb
13
+ - lib/danica/version.rb
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubycritic/rake_task'
4
+
5
+ RubyCritic::RakeTask.new do |task|
6
+ options = %w[
7
+ --path rubycritic/
8
+ --no-browser
9
+ ]
10
+ task.options = options.join(' ')
11
+ task.paths = %w[lib]
12
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yardstick/rake/measurement'
4
+ require 'yardstick/rake/verify'
5
+ require 'yaml'
6
+
7
+ options = YAML.load_file('config/yardstick.yml')
8
+
9
+ Yardstick::Rake::Measurement.new(:yardstick_measure, options) do |measurement|
10
+ measurement.output = 'measurement/report.txt'
11
+ end
12
+
13
+ Yardstick::Rake::Verify.new(:verify_measurements, options)
@@ -0,0 +1,33 @@
1
+ threshold: 0
2
+ require_exact_threshold: false
3
+ rules:
4
+ ApiTag::Presence:
5
+ enabled: true
6
+ exclude: []
7
+ ApiTag::Inclusion:
8
+ enabled: true
9
+ exclude: []
10
+ ApiTag::ProtectedMethod:
11
+ enabled: true
12
+ exclude: []
13
+ ApiTag::PrivateMethod:
14
+ enabled: true
15
+ exclude: []
16
+ ExampleTag:
17
+ enabled: true
18
+ exclude: []
19
+ ReturnTag:
20
+ enabled: true
21
+ exclude: []
22
+ Summary::Presence:
23
+ enabled: true
24
+ exclude: []
25
+ Summary::Length:
26
+ enabled: true
27
+ exclude: []
28
+ Summary::Delimiter:
29
+ enabled: true
30
+ exclude: []
31
+ Summary::SingleLine:
32
+ enabled: true
33
+ exclude: []
data/danica.gemspec CHANGED
@@ -1,5 +1,6 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'danica/version'
5
6
 
@@ -15,13 +16,21 @@ Gem::Specification.new do |spec|
15
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
17
  spec.require_paths = ['lib']
17
18
 
18
- spec.add_runtime_dependency 'activesupport', '~> 5.1.4'
19
- spec.add_runtime_dependency 'darthjee-core_ext', '~> 1.5.0'
19
+ spec.add_runtime_dependency 'activesupport', '~> 5.2.x'
20
+ spec.add_runtime_dependency 'darthjee-core_ext', '~> 2.x'
20
21
 
21
- spec.add_development_dependency 'bundler', '~> 1.6'
22
- spec.add_development_dependency 'rake'
23
- spec.add_development_dependency 'rspec', '~> 2.14'
24
- spec.add_development_dependency 'rspec-mocks'
25
- spec.add_development_dependency 'pry-nav'
26
- spec.add_development_dependency 'simplecov'
22
+ spec.add_development_dependency 'bundler', '~> 1.16.1'
23
+ spec.add_development_dependency 'pry-nav', '~> 0.3.0'
24
+ spec.add_development_dependency 'rake', '>= 13.0.3'
25
+ spec.add_development_dependency 'rspec', '>= 3.9.0'
26
+ spec.add_development_dependency 'rspec-core', '>= 3.9.3'
27
+ spec.add_development_dependency 'rspec-expectations', '>= 3.9.4'
28
+ spec.add_development_dependency 'rspec-mocks', '>= 3.9.1'
29
+ spec.add_development_dependency 'rspec-support', '>= 3.9.4'
30
+ spec.add_development_dependency 'rubocop', '0.80.1'
31
+ spec.add_development_dependency 'rubocop-rspec', '1.38.1'
32
+ spec.add_development_dependency 'rubycritic', '>= 4.6.1'
33
+ spec.add_development_dependency 'simplecov', '~> 0.17.1'
34
+ spec.add_development_dependency 'yard', '>= 0.9.26'
35
+ spec.add_development_dependency 'yardstick', '>= 0.9.9'
27
36
  end
data/docker-compose.yml CHANGED
@@ -1,18 +1,23 @@
1
- version: '2'
1
+ version: '3'
2
2
  services:
3
3
  base: &base
4
- image: ruby:2.4.0
5
- working_dir: /home/app/danica
4
+ image: danica
5
+ working_dir: /home/app/app
6
6
  volumes:
7
- - .:/home/app/danica
8
- - danica_gems_2_4_0:/usr/local/bundle
7
+ - .:/home/app/app
9
8
 
10
- #################### CONTAINERS ####################
9
+ base_build:
10
+ <<: *base
11
+ build: .
12
+ command: echo done
11
13
 
12
14
  danica:
13
15
  <<: *base
14
16
  container_name: danica
15
- command: /bin/bash -c 'bundle install && bundle exec rspec'
17
+ depends_on: [base_build]
18
+ command: /bin/bash -c 'rspec'
16
19
 
17
- volumes:
18
- danica_gems_2_4_0:
20
+ test_all:
21
+ <<: *base
22
+ depends_on: [base_build]
23
+ command: /bin/bash -c 'rspec && yard && rake yardstick_measure && rake verify_measurements'