rdm 0.4.14 → 0.4.19

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
- SHA1:
3
- metadata.gz: 4ae5738c0a6b6daefdcdc6d3cf7c75c299fbec69
4
- data.tar.gz: cd16a76625d211d29fcbf30b0b2d15059b622485
2
+ SHA256:
3
+ metadata.gz: 67aa6a9d7a25fc2a4453684a55772e59ca5304ff097b2f115eadbf6a4d3862a4
4
+ data.tar.gz: a35e83a3002b1a4143b6cf1b1f336e350caf8d3bec8c834e8ea5d5312e9b471d
5
5
  SHA512:
6
- metadata.gz: 24648c9f36d158e9bb75de5bb3b76ee330399320e9ad51484325021df3d5d3707a143de173e0a4ced317f0b4017d8a620494716d7337b5faf23bf170674187a2
7
- data.tar.gz: 00f3f4e83362075aafd25bdd50b9b1a3e68b842ed8cec7dd9010249dcda08f869a61e93f09c899b5fdab1fb04969bb14c8c68a71bacb0af6804aaefa25afa49d
6
+ metadata.gz: 3aa14248780cd0b00516e758ff9cc31c3c0b269d14d2f785cbdfbd7862175c9dedc720814f503b150614f62e5c9ebfb81d4e94f1c99d2e95d8ac02d7471a3f23
7
+ data.tar.gz: 5b33aa37a0e1ff1b07dd7c8704cfa21fbba11ac57ce620b95eee81d81e5a17e3d58843b9c07c750e65b1d5bca911c70f207dda407e175f357043c6aff7c450d6
@@ -1,34 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rdm (0.4.14)
4
+ rdm (0.4.19)
5
5
  activesupport
6
6
  commander (~> 4.4)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (5.1.2)
11
+ activesupport (5.2.4.4)
12
12
  concurrent-ruby (~> 1.0, >= 1.0.2)
13
- i18n (~> 0.7)
13
+ i18n (>= 0.7, < 2)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
16
  ast (2.3.0)
17
17
  byebug (9.0.6)
18
- codecov (0.1.10)
18
+ codecov (0.2.5)
19
+ colorize
19
20
  json
20
21
  simplecov
21
- url
22
- commander (4.4.3)
23
- highline (~> 1.7.2)
24
- concurrent-ruby (1.0.5)
22
+ colorize (0.8.1)
23
+ commander (4.5.2)
24
+ highline (~> 2.0.0)
25
+ concurrent-ruby (1.1.7)
25
26
  diff-lcs (1.3)
26
- docile (1.1.5)
27
- highline (1.7.8)
28
- i18n (0.9.1)
27
+ docile (1.3.2)
28
+ highline (2.0.3)
29
+ i18n (1.8.5)
29
30
  concurrent-ruby (~> 1.0)
30
- json (2.0.3)
31
- minitest (5.10.2)
31
+ json (2.3.1)
32
+ minitest (5.14.2)
32
33
  parser (2.3.3.1)
33
34
  ast (~> 2.2)
34
35
  powerpack (0.1.1)
@@ -54,22 +55,21 @@ GEM
54
55
  ruby-progressbar (~> 1.7)
55
56
  unicode-display_width (~> 1.0, >= 1.0.1)
56
57
  ruby-progressbar (1.8.1)
57
- simplecov (0.14.1)
58
- docile (~> 1.1.0)
58
+ simplecov (0.17.1)
59
+ docile (~> 1.1)
59
60
  json (>= 1.8, < 3)
60
61
  simplecov-html (~> 0.10.0)
61
- simplecov-html (0.10.0)
62
+ simplecov-html (0.10.2)
62
63
  thread_safe (0.3.6)
63
- tzinfo (1.2.4)
64
+ tzinfo (1.2.7)
64
65
  thread_safe (~> 0.1)
65
66
  unicode-display_width (1.1.2)
66
- url (0.3.2)
67
67
 
68
68
  PLATFORMS
69
69
  ruby
70
70
 
71
71
  DEPENDENCIES
72
- bundler (~> 1.3)
72
+ bundler
73
73
  byebug
74
74
  codecov
75
75
  rake
@@ -78,4 +78,4 @@ DEPENDENCIES
78
78
  rubocop (~> 0.46)
79
79
 
80
80
  BUNDLED WITH
81
- 1.16.0
81
+ 2.1.4
data/bin/rdm CHANGED
@@ -60,7 +60,7 @@ class RdmCliRunner
60
60
  c.action do |args, options|
61
61
  package_name = (args.first || "")
62
62
  defaults = {
63
- current_path: `pwd`.chomp,
63
+ current_path: File.expand_path(`pwd`.chomp),
64
64
  package_name: package_name,
65
65
  path: package_name.downcase.gsub(/\s+/, '_')
66
66
  }
@@ -82,7 +82,7 @@ class RdmCliRunner
82
82
  c.action do |args, options|
83
83
  revision = (args.first || "HEAD")
84
84
  options = {
85
- path: `pwd`.chomp,
85
+ path: File.expand_path(`pwd`.chomp),
86
86
  revision: revision,
87
87
  }
88
88
  Rdm::CLI::DiffPackage.run(options)
@@ -100,7 +100,7 @@ class RdmCliRunner
100
100
  c.action do |args, options|
101
101
  package_name = (args.first || "")
102
102
  opts = {
103
- project_path: `pwd`.chomp,
103
+ project_path: File.expand_path(`pwd`.chomp),
104
104
  package_name: package_name,
105
105
  compile_path: options.path
106
106
  }
@@ -125,7 +125,7 @@ class RdmCliRunner
125
125
 
126
126
  Rdm::CLI::TemplateGenerator.run(
127
127
  template_name: template_name,
128
- current_path: `pwd`.chomp,
128
+ current_path: File.expand_path(`pwd`.chomp),
129
129
  local_path: options_hash.delete(:path),
130
130
  locals: options_hash
131
131
  )
@@ -143,7 +143,7 @@ class RdmCliRunner
143
143
 
144
144
  Rdm::CLI::DependenciesController.run(
145
145
  package_name: package_name,
146
- project_path: `pwd`.chomp
146
+ project_path: File.expand_path(`pwd`.chomp)
147
147
  )
148
148
  end
149
149
  end
@@ -162,7 +162,7 @@ class RdmCliRunner
162
162
 
163
163
  Rdm::CLI::Config.run(
164
164
  config_name: config_name,
165
- current_path: `pwd`.chomp,
165
+ current_path: File.expand_path(`pwd`.chomp),
166
166
  config_data: options_hash
167
167
  )
168
168
  end
@@ -193,11 +193,11 @@ class RdmCliRunner
193
193
  options_hash = options.__hash__
194
194
  options_hash.delete(:trace)
195
195
 
196
- Rdm.root(`pwd`.chomp)
196
+ Rdm.root(File.expand_path(`pwd`.chomp))
197
197
  Rdm::SpecRunner.run(
198
198
  package: package_name,
199
199
  spec_matcher: spec_matcher,
200
- path: `pwd`.chomp,
200
+ path: File.expand_path(`pwd`.chomp),
201
201
  skip_ignored_packages: true,
202
202
  show_missing_packages: true,
203
203
  from: options_hash[:from]
@@ -221,11 +221,11 @@ class RdmCliRunner
221
221
  revision = args[0]
222
222
 
223
223
  ENV['RUBY_ENV'] = 'test'
224
- Rdm.root(`pwd`.chomp)
224
+ Rdm.root(File.expand_path(`pwd`.chomp))
225
225
 
226
226
  Rdm::CLI::DiffSpecRunner.run(
227
227
  revision: revision,
228
- path: `pwd`.chomp
228
+ path: File.expand_path(`pwd`.chomp)
229
229
  )
230
230
  end
231
231
  end
@@ -62,14 +62,14 @@ class Rdm::PackageImporter
62
62
 
63
63
  # also import local dependencies
64
64
  package.local_dependencies(group).each do |dependency|
65
- import_package(dependency, source: source)
65
+ import_package(dependency, source: source, group: group)
66
66
  end
67
67
 
68
68
  # also import config dependencies
69
69
  package.config_dependencies(group).each do |dependency|
70
70
  import_config(dependency, source: source)
71
71
  end
72
-
72
+
73
73
  # only after importing dependencies - require package itself
74
74
  begin
75
75
  require package_name
@@ -4,12 +4,11 @@ class Rdm::SpecRunner::Runner
4
4
 
5
5
  attr_accessor :no_specs_packages
6
6
  attr_accessor :prepared_command_params
7
- attr_accessor :command
8
-
7
+
9
8
  def initialize(
10
- package: nil,
11
- spec_matcher: nil,
12
- path: nil,
9
+ package: nil,
10
+ spec_matcher: nil,
11
+ path: nil,
13
12
  from: nil,
14
13
  show_missing_packages: true,
15
14
  skip_ignored_packages: false,
@@ -22,12 +21,13 @@ class Rdm::SpecRunner::Runner
22
21
  @spec_string_number = spec_matcher.to_s.split(':')[1].to_i
23
22
  @path = path
24
23
  @run_all = @package_name.nil?
25
- @show_missing_packages = show_missing_packages && !@package_name
24
+ @show_missing_packages = show_missing_packages && !@package_name
26
25
  @skip_ignored_packages = skip_ignored_packages
27
26
  @skipped_packages = []
28
27
  @stdout = stdout
29
28
  @show_output = show_output
30
29
  @from = from
30
+ @command_list = []
31
31
  end
32
32
 
33
33
  def run
@@ -37,7 +37,7 @@ class Rdm::SpecRunner::Runner
37
37
  when 0
38
38
  raise Rdm::Errors::SpecMatcherNoFiles, "No specs were found for '#{@spec_matcher}'"
39
39
  when 1
40
- format_string_number = @spec_string_number == 0 ? "" : ":#{@spec_string_number}"
40
+ format_string_number = @spec_string_number == 0 ? "" : ":#{@spec_string_number}"
41
41
  @spec_matcher = @spec_file_matches.first + format_string_number
42
42
 
43
43
  @stdout.puts "Following spec matches your input: #{@spec_matcher}"
@@ -51,7 +51,7 @@ class Rdm::SpecRunner::Runner
51
51
  display_missing_specs if @show_missing_packages
52
52
  display_ignored_specs if @skip_ignored_packages
53
53
  print_message view.specs_header_message if @show_missing_packages || @skip_ignored_packages
54
-
54
+
55
55
  execute_command
56
56
  end
57
57
 
@@ -98,7 +98,7 @@ class Rdm::SpecRunner::Runner
98
98
  def prepare!
99
99
  prepared_command_params = []
100
100
  no_specs_packages = []
101
- command = nil
101
+ @command_list = []
102
102
  prepare_command_params
103
103
  prepare_no_specs_packages
104
104
  prepare_command
@@ -108,8 +108,8 @@ class Rdm::SpecRunner::Runner
108
108
  @prepared_command_params ||= begin
109
109
  packages.map do |_name, package|
110
110
  Rdm::SpecRunner::CommandGenerator.new(
111
- package_name: package.name,
112
- package_path: package.path,
111
+ package_name: package.name,
112
+ package_path: package.path,
113
113
  spec_matcher: @spec_matcher,
114
114
  show_output: @show_output
115
115
  ).generate
@@ -124,23 +124,21 @@ class Rdm::SpecRunner::Runner
124
124
  end
125
125
 
126
126
  def prepare_command
127
- @command ||= begin
128
- if @package_name
129
- prepare_single_package_command(@package_name)
130
- else
131
- prepare_command_for_packages(prepared_command_params)
132
- end
127
+ if @package_name
128
+ @command_list += prepare_single_package_command(@package_name)
129
+ else
130
+ @command_list += prepare_commands_for_packages(prepared_command_params)
133
131
  end
134
132
  end
135
133
 
136
134
  def prepare_single_package_command(package_name)
137
- selected = prepared_command_params.select do |cmd_params|
135
+ selected = prepared_command_params.detect do |cmd_params|
138
136
  cmd_params.package_name == package_name
139
137
  end
140
- prepare_command_for_packages(selected)
138
+ prepare_commands_for_packages([selected])
141
139
  end
142
140
 
143
- def prepare_command_for_packages(packages_command_params)
141
+ def prepare_commands_for_packages(packages_command_params)
144
142
  if @skip_ignored_packages && !@package_name
145
143
  runignore_path = File.expand_path(File.join(Rdm.root_dir, RUNIGNORE_PATH))
146
144
  package_list = Rdm::SourceParser.read_and_init_source(Rdm.root).packages.keys
@@ -149,7 +147,7 @@ class Rdm::SpecRunner::Runner
149
147
  .lines
150
148
  .map(&:strip)
151
149
  .reject(&:empty?) rescue []
152
-
150
+
153
151
  @skipped_packages = skipped_package_list.select {|line| package_list.include?(line)}
154
152
  comment_runignore_lines = skipped_package_list.select {|line| line.start_with?(RUNIGNORE_COMMENT)}
155
153
  invalid_ignore_packages = skipped_package_list - @skipped_packages - comment_runignore_lines
@@ -170,7 +168,7 @@ class Rdm::SpecRunner::Runner
170
168
  start_from = running_packages.index {|cmd_params| cmd_params.package_name == @from}
171
169
 
172
170
  if start_from.nil?
173
- puts "Pacakge :#{@from} does not exists"
171
+ puts "Package :#{@from} does not exists"
174
172
  exit(1)
175
173
  end
176
174
 
@@ -188,10 +186,8 @@ class Rdm::SpecRunner::Runner
188
186
  #{(packages.keys - no_specs_packages).map {|pkg| " - #{pkg}"}.sort.join("\n")}\n
189
187
  EOF
190
188
  end
191
-
192
- running_packages
193
- .map(&:command)
194
- .join(' && ')
189
+
190
+ running_packages.map(&:command)
195
191
  end
196
192
 
197
193
  def display_missing_specs
@@ -207,10 +203,11 @@ class Rdm::SpecRunner::Runner
207
203
  end
208
204
 
209
205
  def execute_command
210
- eval(command)
211
- if $? && !$?.success?
212
- exit(1)
213
- end
206
+ has_failed_packages = @command_list
207
+ .map {|cmd| eval(cmd); $?}
208
+ .reject {|result| result.success?}
209
+ .any?
214
210
 
211
+ exit(1) if has_failed_packages
215
212
  end
216
213
  end
@@ -1,3 +1,3 @@
1
1
  module Rdm
2
- VERSION = '0.4.14'.freeze
2
+ VERSION = '0.4.19'.freeze
3
3
  end
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_development_dependency "bundler", "~> 1.3"
19
+ spec.add_development_dependency "bundler"
20
20
  spec.add_development_dependency "rake"
21
21
  spec.add_development_dependency "rspec"
22
22
  spec.add_development_dependency "byebug"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.14
4
+ version: 0.4.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droid Labs
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-12 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '4.4'
111
111
  description: Ruby Dependency Manager
112
- email:
112
+ email:
113
113
  executables:
114
114
  - rdm
115
115
  - rubocop
@@ -280,10 +280,10 @@ files:
280
280
  - spec/rdm/templates/template_detector_spec.rb
281
281
  - spec/rdm/templates/template_renderer_spec.rb
282
282
  - spec/spec_helper.rb
283
- homepage:
283
+ homepage:
284
284
  licenses: []
285
285
  metadata: {}
286
- post_install_message:
286
+ post_install_message:
287
287
  rdoc_options: []
288
288
  require_paths:
289
289
  - lib
@@ -298,9 +298,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0'
300
300
  requirements: []
301
- rubyforge_project:
302
- rubygems_version: 2.6.12
303
- signing_key:
301
+ rubygems_version: 3.0.8
302
+ signing_key:
304
303
  specification_version: 4
305
304
  summary: Ruby Dependency Manager
306
305
  test_files: