danica 2.7.1 → 2.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +9 -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 +16 -9
  15. data/docker-compose.yml +14 -9
  16. data/lib/danica.rb +3 -1
  17. data/lib/danica/base_operations.rb +15 -7
  18. data/lib/danica/builder.rb +2 -0
  19. data/lib/danica/common.rb +24 -16
  20. data/lib/danica/dsl.rb +15 -9
  21. data/lib/danica/dsl/builder.rb +40 -0
  22. data/lib/danica/equation.rb +3 -3
  23. data/lib/danica/equation/builder.rb +2 -0
  24. data/lib/danica/exception.rb +14 -2
  25. data/lib/danica/expressable.rb +20 -16
  26. data/lib/danica/expression.rb +4 -2
  27. data/lib/danica/expression/gauss.rb +5 -5
  28. data/lib/danica/formatted.rb +34 -11
  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 -7
  33. data/lib/danica/operator/chained.rb +4 -8
  34. data/lib/danica/operator/cos.rb +2 -1
  35. data/lib/danica/operator/division.rb +3 -2
  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 +5 -7
  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 +27 -24
  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 +17 -9
  49. data/lib/danica/wrapper/constant.rb +10 -14
  50. data/lib/danica/wrapper/container.rb +4 -4
  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/global/danica/operator/multiplication_spec.rb +106 -0
  61. data/spec/integration/{power_spec.rb → global/danica/operator/power_spec.rb} +4 -2
  62. data/spec/integration/global/danica/wrapper/negative_spec.rb +56 -0
  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 +79 -8
  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 +57 -24
  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 +18 -21
  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 +19 -20
  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 +22 -16
  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 +115 -30
  121. data/spec/integration/addition_spec.rb +0 -28
  122. data/spec/integration/multiplication_spec.rb +0 -44
  123. data/spec/integration/negative_spec.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b307b4b7177fbe4174f87da3d4bcad37028c635c
4
- data.tar.gz: ab3906ae623e2e99ce5223dffd5868bdac252a6f
2
+ SHA256:
3
+ metadata.gz: adec95bf637395e77d15b0ba8227e1dee950f3fe0e47fa23c7691dda7ed2c301
4
+ data.tar.gz: 2559adb6edd7c047fe13f30ca870d14b390587d0be404a3abc837d5774004241
5
5
  SHA512:
6
- metadata.gz: 6fd900f7a94701ef2717be6177b373e5065b153cfc412431abf3337a1b88636d28146280d298c189cb5d7fc2eca0c337a01331d7e964b4e66a0f1213eb4e47d7
7
- data.tar.gz: 1b048a9de7ab0123ba587eae9ec651ff16b0e4e6fd5205aa476894ef8e55eafa8bbd9c87a6ad207985589d744bb1fe7e2da18fed09c882618e02d27f3bbeb3c2
6
+ metadata.gz: b4810b520ec682ccb868d6b04fbdc7f45b997750f742ea61c907d50d81a2c2c001bc80f88fe623abf298db5396dacd1cb0e96861ee84764fde8deb2991b8b040
7
+ data.tar.gz: fe80a2a718db1f040803e5ca0afd75b275ebcac40e2a5d945d183faf0f4e44a9e0a558fbc00a20cd750d4b0621e958956b4d2d36c72744b8ebaa1cb7a1536017
@@ -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,9 @@
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'
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.6.2 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.6](https://www.rubydoc.info/gems/danica/2.7.6)
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,19 @@ 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', '~> 1.7.3'
21
+
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.1'
25
+ spec.add_development_dependency 'rspec', '>= 3.9.0'
26
+ spec.add_development_dependency 'rubocop', '0.80.1'
27
+ spec.add_development_dependency 'rubocop-rspec', '1.38.1'
28
+ spec.add_development_dependency 'rubycritic', '>= 4.4.1'
29
+ spec.add_development_dependency 'simplecov', '~> 0.17.1'
30
+ spec.add_development_dependency 'yard', '>= 0.9.24'
31
+ spec.add_development_dependency 'yardstick', '>= 0.9.9'
20
32
 
21
- spec.add_development_dependency 'bundler', '~> 1.6'
22
- spec.add_development_dependency 'rake'
23
- spec.add_development_dependency 'rspec', '~> 2.14'
24
33
  spec.add_development_dependency 'rspec-mocks'
25
- spec.add_development_dependency 'pry-nav'
26
- spec.add_development_dependency 'simplecov'
27
34
  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'