firespring_dev_commands 2.1.14.pre.alpha.3 → 2.5.0.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c538ccb5986e06a222a6f68c6800ec3fa3abd5c183a12a103ef3ce2d0016292e
4
- data.tar.gz: eb79878157371a911c7173cd65cc8429aaa1a23652a337a3ba6951f4afc1bda2
3
+ metadata.gz: e146e8c9d9c3422dfd7641c6a09ca8c2cdfad6ed430d73aec5808de28ed5d880
4
+ data.tar.gz: 273923aae5ccce231fc77174ed89cbe0e4f5ad59b52219b04303f983e9966e1d
5
5
  SHA512:
6
- metadata.gz: cbf6c55887a571ac13037720efcf4ff1776a5323cd7b62780d11194045923066df3606066c39da439b08b9f8b039e86a5518783e6d82399f452498a271333cd8
7
- data.tar.gz: e6b87d597be01d292bd241ee4a7e0fb08d1792d2f56813c927077f795b619fae50967964c8e4b85bee089a907e9794da346f54ea0c794da8f8a4fe9aed8882b3
6
+ metadata.gz: 67223e6ba12a10f798d7fee6b1cab844da41cd3dc65a449330e8c8bd0ef86180cc297889b7365b7b68f5ca8054919e9881693707ecfde02e539d0a7e22c6af51
7
+ data.tar.gz: ada0e13a3f2d8022687a2542503bad6bc847bf32fc17604116d17e06ed46ee7efa18aea35635c31a26c07f5ccdd6a3c5083235edaafd77684528bc487c17f3c7
@@ -96,7 +96,7 @@ module Dev
96
96
  test
97
97
  end
98
98
 
99
- # Build the node test command
99
+ # Build the node test (with coverage) command
100
100
  def test_coverage_command
101
101
  test = base_command
102
102
  test << 'run' << 'test:coverage'
@@ -58,12 +58,9 @@ module Dev
58
58
  end
59
59
 
60
60
  # Build the command to fix any security vulnerabilities that were found
61
- # def audit_fix_command
62
- # audit_fix = base_command
63
- # audit_fix << 'audit' << 'fix'
64
- # audit_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
65
- # audit_fix
66
- # end
61
+ def audit_fix_command
62
+ raise 'not implemented'
63
+ end
67
64
 
68
65
  # Build the php install command
69
66
  def install_command
@@ -76,7 +73,7 @@ module Dev
76
73
  # Build the php lint command
77
74
  def lint_command
78
75
  lint = base_command
79
- lint << 'lint'
76
+ lint << 'run' << 'lint'
80
77
  lint.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
81
78
  lint
82
79
  end
@@ -84,7 +81,7 @@ module Dev
84
81
  # Build the php lint fix command
85
82
  def lint_fix_command
86
83
  lint_fix = base_command
87
- lint_fix << 'lint-fix'
84
+ lint_fix << 'run' << 'lint-fix'
88
85
  lint_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
89
86
  lint_fix
90
87
  end
@@ -92,18 +89,14 @@ module Dev
92
89
  # Build the php test command
93
90
  def test_command
94
91
  test = []
95
- test << './vendor/bin/phpunit'
92
+ lint_fix << 'run' << 'test'
96
93
  test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
97
94
  test
98
95
  end
99
96
 
100
- # Build the php fast test command
101
- def test_fast_command(processes = 4)
102
- test = []
103
- test << './vendor/bin/paratest'
104
- test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
105
- test << "-p#{processes}" << '--runner=WrapperRunner'
106
- test
97
+ # Build the php test (with coverage) command
98
+ def test_coverage_command
99
+ raise 'not implemented'
107
100
  end
108
101
  end
109
102
  end
@@ -1,4 +1,5 @@
1
1
  require_relative '../../base_interface'
2
+ require 'securerandom'
2
3
 
3
4
  module Dev
4
5
  module Template
@@ -7,11 +8,15 @@ module Dev
7
8
  module Php
8
9
  # Class for default rake tasks associated with a php project
9
10
  class Application < Dev::Template::ApplicationInterface
10
- attr_reader :php
11
+ attr_reader :php, :siloed_tests
11
12
 
12
13
  # Allow for custom container path for the application
13
- def initialize(application, container_path: nil, local_path: nil, exclude: [])
14
+ def initialize(application, container_path: nil, local_path: nil, siloed_tests: nil, exclude: [])
14
15
  @php = Dev::Php.new(container_path:, local_path:)
16
+ # TODO: Better name
17
+ # TODO: Should this apply to all or just tests?
18
+ @siloed_tests = siloed_tests
19
+
15
20
  super(application, exclude:)
16
21
  end
17
22
 
@@ -102,6 +107,7 @@ module Dev
102
107
  def create_test_task!
103
108
  application = @name
104
109
  php = @php
110
+ siloed_tests = @siloed_tests
105
111
  exclude = @exclude
106
112
  return if exclude.include?(:test)
107
113
 
@@ -117,9 +123,13 @@ module Dev
117
123
  task test: %w(init_docker up) do
118
124
  LOG.debug("Running all php tests in the #{application} codebase")
119
125
 
126
+ project_name = nil
127
+ project_name = SecureRandom.hex if siloed_tests
128
+
120
129
  options = []
121
130
  options << '-T' if Dev::Common.new.running_codebuild?
122
- Dev::Docker::Compose.new(services: application, options:).exec(*php.test_command)
131
+ Dev::Docker::Compose.new(project_name:, services: application, options:).exec(*php.test_command)
132
+ # TODO: Add clean if we are siloed
123
133
  end
124
134
  end
125
135
  end
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '2.1.14.pre.alpha.3'.freeze
9
+ VERSION = '2.5.0.pre.alpha.1'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firespring_dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.14.pre.alpha.3
4
+ version: 2.5.0.pre.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2023-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport