firespring_dev_commands 2.1.14 → 2.5.0.pre.alpha.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab405907618e9d8d58ff0e045ee3808e7bafdd9102ea13cb90449e01ed429e6d
4
- data.tar.gz: 9d7115d8d8860a34b5bf4aea4fca0768defcd886a3ea47031bced230b4a569f8
3
+ metadata.gz: e146e8c9d9c3422dfd7641c6a09ca8c2cdfad6ed430d73aec5808de28ed5d880
4
+ data.tar.gz: 273923aae5ccce231fc77174ed89cbe0e4f5ad59b52219b04303f983e9966e1d
5
5
  SHA512:
6
- metadata.gz: 488975ad6a49e2ae5cd4a0fc6fe05884746193fd35755fa7149713d56c54ea955c733d5c0f73fdd3e50eadb120c0d40312d2272a36e70d0ee8b1e4b31392aad8
7
- data.tar.gz: 790d7efa6fd46c1e2bf894531a6a5a5780c4a78aa8354a6538f424a6e016aeabf665e935c0a847f71e60b8c06b5cd1df5d89f21dbecda969f0374e6382c3d712
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'.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
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
@@ -399,9 +399,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
399
399
  version: '3.1'
400
400
  required_rubygems_version: !ruby/object:Gem::Requirement
401
401
  requirements:
402
- - - ">="
402
+ - - ">"
403
403
  - !ruby/object:Gem::Version
404
- version: '0'
404
+ version: 1.3.1
405
405
  requirements: []
406
406
  rubygems_version: 3.4.10
407
407
  signing_key: