skippy 0.4.3.a → 0.5.0.a

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: 991d733215aa26f37690ad9c68cd6d515e648c287584c1acaa91d54ddfb74544
4
- data.tar.gz: c5da843a98f179df55787c15805b3e0ea7b614bad8dcd450d1b503b0295050f9
3
+ metadata.gz: caf9e8f9363445b164e56aacb76d61cdb1395532d6128dc173c6ac55900eae85
4
+ data.tar.gz: c122744a1c428a3cb22e73e35f217603e81c931397f60878189ec1c6c0805699
5
5
  SHA512:
6
- metadata.gz: 4d095d565fc66112b57b16ab89d807ce8b2d3f4a8dc0dd8edd27f5456224a37b906b5b023bf9937fdb8fd533ea18fac75af7fad9ef61f735f003854c225f1ade
7
- data.tar.gz: 2cc778b7b6b08973447c1868944302c2debb5a3b6e7ba03474873997f45c6b1dcd7af32866aab776740035eb0a4b3050c07dcbb7fa5f41837ee09ce1301fc748
6
+ metadata.gz: f837fa5d0d6b7dc18570ba8037ba1cb25373dad59daaf0433e56799468600c99e9dc0df2e579fb667eed4dfdd5c56065e1f23519a349be240944ad49211cbd42
7
+ data.tar.gz: e022d61b5268000d120fb0226a996c665fbcc2f03a159c9d68b7defc959b31d8d791d58b234e8564b900aed08aef8c791131197e0c2bb13f333d4b8218492b5a
data/.appveyor.yml CHANGED
@@ -15,8 +15,11 @@ environment:
15
15
 
16
16
  install:
17
17
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
18
- - gem update --no-document --system 2.7.8
19
- - gem install bundler --no-document --version="<2.0.0"
18
+ # - gem update --no-document --system 2.7.8
19
+ # - gem install bundler --no-document --version="<3.0.0"
20
+ #
21
+ # https://github.com/ruby/psych/issues/519
22
+ - gem uninstall psych # Workaround bug. (https://stackoverflow.com/a/69088551)
20
23
  - bundle config --local path vendor/bundle
21
24
  - bundle install
22
25
  - git submodule update --init --recursive
data/.rubocop.yml CHANGED
@@ -1,5 +1,9 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
+ require:
4
+ - rubocop-minitest
5
+ - rubocop-rake
6
+
3
7
  AllCops:
4
8
  Exclude:
5
9
  - 'bin/**/*'
@@ -10,8 +14,9 @@ AllCops:
10
14
  DisplayCopNames: true
11
15
 
12
16
 
13
- Layout/AlignParameters:
17
+ Layout/ArgumentAlignment:
14
18
  EnforcedStyle: with_fixed_indentation
19
+ # IndentationWidth: 2
15
20
 
16
21
  # It's ok to have more than one empty line to create a 'paragrapth'.
17
22
  Layout/EmptyLines:
@@ -27,6 +32,7 @@ Layout/EmptyLinesAroundModuleBody:
27
32
 
28
33
  # Normally one line in between, but two allowed for "paragraphs".
29
34
  Layout/EmptyLineBetweenDefs:
35
+ AllowAdjacentOneLineDefs: true
30
36
  NumberOfEmptyLines: [1, 2]
31
37
 
32
38
  # Rely on Git to normalize end of lines.
@@ -37,6 +43,13 @@ Layout/EndOfLine:
37
43
  Layout/EmptyLinesAroundBlockBody:
38
44
  Enabled: false
39
45
 
46
+ Layout/LineLength:
47
+ Exclude:
48
+ - features/step_definitions/**/*
49
+
50
+ Layout/ParameterAlignment:
51
+ EnforcedStyle: with_fixed_indentation
52
+
40
53
 
41
54
  Naming/RescuedExceptionsVariableName:
42
55
  PreferredName: error
@@ -55,10 +68,6 @@ Metrics/ClassLength:
55
68
  Metrics/CyclomaticComplexity:
56
69
  Enabled: false
57
70
 
58
- Metrics/LineLength:
59
- Exclude:
60
- - features/step_definitions/**/*
61
-
62
71
  Metrics/MethodLength:
63
72
  Exclude:
64
73
  - test/**/*
@@ -68,6 +77,10 @@ Metrics/PerceivedComplexity:
68
77
  Enabled: false
69
78
 
70
79
 
80
+ # Nah, sometimes easier to read with accessors having separate grouping.
81
+ Style/AccessorGrouping:
82
+ Enabled: false
83
+
71
84
  # Prefer { ... } over do ... end except for control flow and
72
85
  # method defintions. Unfortunatly, no cop configuration for this.
73
86
  # https://github.com/chneukirchen/styleguide/blob/e60de37b478d3f892f6985a58d573016f33f0269/RUBY-STYLE#L63-L67
@@ -109,6 +122,13 @@ Style/IfUnlessModifier:
109
122
  Style/ModuleFunction:
110
123
  Enabled: false
111
124
 
125
+ # Excluding some files that copies the Thor implementation.
126
+ # TODO: Investigate if Thor changed their implementation.
127
+ Style/OptionalBooleanParameter:
128
+ Exclude:
129
+ - lib/skippy/cli.rb
130
+ - lib/skippy/command.rb
131
+
112
132
  # %w and %i etc isn't really intuitive unless you are really familiar with the
113
133
  # syntax. %w seems used often enough. But [:symbol, :foo] reads clearer than
114
134
  # %i(symbol foo).
@@ -121,3 +141,135 @@ Style/TrailingCommaInArrayLiteral:
121
141
 
122
142
  Style/TrailingCommaInHashLiteral:
123
143
  EnforcedStyleForMultiline: consistent_comma
144
+
145
+
146
+ # Not testing computed values, but serialized values.
147
+ # Ignoring floating point tolerance is fine (and wanted) in this case.
148
+ Minitest/AssertInDelta:
149
+ Enabled: false
150
+
151
+ # Too many false positives.
152
+ Minitest/AssertWithExpectedArgument:
153
+ Enabled: false
154
+
155
+ # No such thing as too many assertions.
156
+ Minitest/MultipleAssertions:
157
+ Enabled: false
158
+
159
+
160
+ ################################################################################
161
+ # Enabling new cops:
162
+
163
+ Gemspec/DateAssignment: # new in 1.10
164
+ Enabled: true
165
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
166
+ Enabled: true
167
+ Layout/SpaceBeforeBrackets: # new in 1.7
168
+ Enabled: true
169
+ Lint/AmbiguousAssignment: # new in 1.7
170
+ Enabled: true
171
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
172
+ Enabled: true
173
+ Lint/AmbiguousRange: # new in 1.19
174
+ Enabled: true
175
+ Lint/DeprecatedConstants: # new in 1.8
176
+ Enabled: true
177
+ Lint/DuplicateBranch: # new in 1.3
178
+ Enabled: true
179
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
180
+ Enabled: true
181
+ Lint/EmptyBlock: # new in 1.1
182
+ Enabled: true
183
+ Lint/EmptyClass: # new in 1.3
184
+ Enabled: true
185
+ Lint/EmptyInPattern: # new in 1.16
186
+ Enabled: true
187
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
188
+ Enabled: true
189
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
190
+ Enabled: true
191
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
192
+ Enabled: true
193
+ Lint/NumberedParameterAssignment: # new in 1.9
194
+ Enabled: true
195
+ Lint/OrAssignmentToConstant: # new in 1.9
196
+ Enabled: true
197
+ Lint/RedundantDirGlobSort: # new in 1.8
198
+ Enabled: true
199
+ Lint/RequireRelativeSelfPath: # new in 1.22
200
+ Enabled: true
201
+ Lint/SymbolConversion: # new in 1.9
202
+ Enabled: true
203
+ Lint/ToEnumArguments: # new in 1.1
204
+ Enabled: true
205
+ Lint/TripleQuotes: # new in 1.9
206
+ Enabled: true
207
+ Lint/UnexpectedBlockArity: # new in 1.5
208
+ Enabled: true
209
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
210
+ Enabled: true
211
+ Security/IoMethods: # new in 1.22
212
+ Enabled: true
213
+ Style/ArgumentsForwarding: # new in 1.1
214
+ Enabled: true
215
+ Style/CollectionCompact: # new in 1.2
216
+ Enabled: true
217
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
218
+ Enabled: true
219
+ Style/EndlessMethod: # new in 1.8
220
+ Enabled: true
221
+ Style/HashConversion: # new in 1.10
222
+ Enabled: true
223
+ Style/HashExcept: # new in 1.7
224
+ Enabled: true
225
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
226
+ Enabled: true
227
+ Style/InPatternThen: # new in 1.16
228
+ Enabled: true
229
+ Style/MultilineInPatternThen: # new in 1.16
230
+ Enabled: true
231
+ Style/NegatedIfElseCondition: # new in 1.2
232
+ Enabled: true
233
+ Style/NilLambda: # new in 1.3
234
+ Enabled: true
235
+ Style/NumberedParameters: # new in 1.22
236
+ Enabled: true
237
+ Style/NumberedParametersLimit: # new in 1.22
238
+ Enabled: true
239
+ Style/QuotedSymbols: # new in 1.16
240
+ Enabled: true
241
+ Style/RedundantArgument: # new in 1.4
242
+ Enabled: true
243
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
244
+ Enabled: true
245
+ Style/SelectByRegexp: # new in 1.22
246
+ Enabled: true
247
+ Style/StringChars: # new in 1.12
248
+ Enabled: true
249
+ Style/SwapValues: # new in 1.1
250
+ Enabled: true
251
+
252
+ Minitest/AssertionInLifecycleHook: # new in 0.10
253
+ Enabled: true
254
+ Minitest/AssertKindOf: # new in 0.10
255
+ Enabled: true
256
+ Minitest/AssertOutput: # new in 0.10
257
+ Enabled: true
258
+ Minitest/AssertPathExists: # new in 0.10
259
+ Enabled: true
260
+ Minitest/AssertSilent: # new in 0.10
261
+ Enabled: true
262
+ Minitest/LiteralAsActualArgument: # new in 0.10
263
+ Enabled: true
264
+ Minitest/RefuteInDelta: # new in 0.10
265
+ Enabled: true
266
+ Minitest/RefuteKindOf: # new in 0.10
267
+ Enabled: true
268
+ Minitest/RefutePathExists: # new in 0.10
269
+ Enabled: true
270
+ Minitest/TestMethodName: # new in 0.10
271
+ Enabled: true
272
+ Minitest/UnreachableAssertion: # new in 0.14
273
+ Enabled: true
274
+ Minitest/UnspecifiedException: # new in 0.10
275
+ Enabled: true
@@ -0,0 +1,27 @@
1
+ {
2
+ // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3
+ // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4
+ // List of extensions which should be recommended for users of this workspace.
5
+ "recommendations": [
6
+ // Spell checking code and comments are important.
7
+ "streetsidesoftware.code-spell-checker",
8
+
9
+ // Will make VSCode pick up .editorconfig.
10
+ "editorconfig.editorconfig",
11
+
12
+ // Essential for Ruby syntax highlighting and debugging.
13
+ "rebornix.ruby",
14
+
15
+ // For code insight and auto-complete.
16
+ "castwide.solargraph",
17
+
18
+ // Test Explorer UI and adapter
19
+ "hbenl.vscode-test-explorer",
20
+ "matepek.vscode-catch2-test-adapter",
21
+
22
+ // Cucumber highlighting and more.
23
+ "alexkrechik.cucumberautocomplete"
24
+ ],
25
+ // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
26
+ "unwantedRecommendations": []
27
+ }
data/Gemfile CHANGED
@@ -1,19 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in skippy.gemspec
4
6
  gemspec
5
7
 
6
8
  group :development do
7
- # Original fork with bug-fix. Appear to be gone now.
8
- # gem 'aruba', git: 'https://github.com/daynix/aruba.git', branch: 'd-win-fix'
9
- # Backup fork of the bug fix:
10
- gem 'aruba', git: 'https://github.com/thomthom/aruba.git',
11
- branch: 'd-win-fix'
12
- # TODO: This might be a newer fix:
13
- # gem 'aruba', git: 'https://github.com/rbld/aruba.git',
14
- # branch: 'aruba-win-fix'
15
9
  gem 'pry'
16
- gem 'rubocop', '~> 0.67.2', require: false
17
- gem 'rubocop-performance', '~> 1.1.0', require: false
10
+ gem 'rubocop', '~> 1.0', require: false
11
+ gem 'rubocop-minitest', '~> 0.15', require: false
12
+ gem 'rubocop-performance', '~> 1.0', require: false
13
+ gem 'rubocop-rake', '~> 0.6', require: false
18
14
  gem 'webmock', '~> 3.1'
19
15
  end
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rake/testtask'
3
5
 
data/app/boot.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  # Set the program name explicitly. Otherwise Thor will use the filename in the
4
5
  # banner for the command help.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/namespace'
2
4
 
3
5
  class Debug < Skippy::Command
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  require 'skippy/app'
data/app/commands/lib.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'fileutils'
2
4
  require 'json'
3
5
 
@@ -20,7 +22,7 @@ class Lib < Skippy::Command
20
22
  say
21
23
  say "#{library.name} (#{library.version})", [:bold, :yellow]
22
24
  library.modules.each { |lib_module|
23
- lib_info = " #{lib_module}"
25
+ lib_info = +" #{lib_module}"
24
26
  lib_info << ' (installed)' if project.modules.installed?(lib_module)
25
27
  say lib_info, :green
26
28
  }
@@ -75,7 +77,7 @@ class Lib < Skippy::Command
75
77
  private
76
78
 
77
79
  def install_options(cli_options)
78
- options = cli_options.map { |k, v| [k.to_sym, v] }.to_h
80
+ options = cli_options.transform_keys(&:to_sym)
79
81
  # The CLI options "version" is internally a "requirement".
80
82
  if options.key?(:version)
81
83
  options[:requirement] = options[:version]
data/app/commands/new.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  require 'skippy/app'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'stringio'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Template < Skippy::Command
2
4
 
3
5
  desc 'list', 'List all known templates'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Hello < Skippy::Command
2
4
 
3
5
  desc 'world PERSON', 'Oh, hi there!'
data/cucumber.yml ADDED
@@ -0,0 +1 @@
1
+ default: --publish-quiet
data/lib/skippy/app.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  require 'skippy'
@@ -55,7 +57,7 @@ class Skippy::App
55
57
  # Load the default skippy commands.
56
58
  path_commands = File.join(path, 'commands')
57
59
  commands_pattern = File.join(path_commands, '*.rb')
58
- Dir.glob(commands_pattern) { |filename|
60
+ Dir.glob(commands_pattern).sort.each { |filename|
59
61
  # noinspection RubyResolve
60
62
  require filename
61
63
  }
data/lib/skippy/cli.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  require 'skippy/app'
@@ -57,7 +59,7 @@ class Skippy::CLI < Skippy::Command
57
59
  end
58
60
  end
59
61
 
60
- # rubocop:disable Style/MethodMissingSuper,Style/MissingRespondToMissing
62
+ # rubocop:disable Style/MissingRespondToMissing
61
63
  # Verbatim copy from Thor::Runner:
62
64
  # If a command is not found on Thor::Runner, method missing is invoked and
63
65
  # Thor::Runner is then responsible for finding the command in all classes.
@@ -70,15 +72,15 @@ class Skippy::CLI < Skippy::Command
70
72
  args.unshift(command) if command
71
73
  klass.start(args, shell: shell)
72
74
  end
73
- # rubocop:enable Style/MethodMissingSuper,Style/MissingRespondToMissing
75
+ # rubocop:enable Style/MissingRespondToMissing
74
76
 
75
77
  # Verbatim copy from Thor::Runner:
76
78
  desc 'list [SEARCH]',
77
79
  "List the available #{$PROGRAM_NAME} commands (--substring means .*SEARCH)"
78
80
  method_options substring: :boolean,
79
- group: :string,
80
- all: :boolean,
81
- debug: :boolean
81
+ group: :string,
82
+ all: :boolean,
83
+ debug: :boolean
82
84
  def list(search = '')
83
85
  initialize_thorfiles
84
86
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thor'
2
4
 
3
5
  module Skippy
data/lib/skippy/config.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'pathname'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'pathname'
3
5
 
data/lib/skippy/error.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skippy
2
4
  class Error < StandardError
3
5
  end
data/lib/skippy/group.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thor/group'
2
4
 
3
5
  require 'skippy/command'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skippy::Helpers
2
4
  module File
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'git'
2
4
  require 'naturally'
3
5
  require 'pathname'
@@ -27,13 +29,12 @@ class Skippy::GitLibraryInstaller < Skippy::LibraryInstaller
27
29
  end
28
30
  begin
29
31
  checkout_branch(git, source.branch) if source.branch
30
- checkout_tag(git, source.requirement) unless edge_version?(source.requirement) # rubocop:disable Metrics/LineLength
32
+ checkout_tag(git, source.requirement) unless edge_version?(source.requirement)
31
33
  rescue Skippy::Error
32
34
  git.checkout(previous_commit) if previous_commit
33
35
  raise
34
36
  end
35
- library = Skippy::Library.new(target, source: source)
36
- library
37
+ Skippy::Library.new(target, source: source)
37
38
  end
38
39
 
39
40
  private
@@ -55,7 +56,7 @@ class Skippy::GitLibraryInstaller < Skippy::LibraryInstaller
55
56
  git = Git.open(target)
56
57
  previous_commit = git.object('HEAD^').class
57
58
  git.reset_hard
58
- git.pull
59
+ git.fetch
59
60
  [git, previous_commit]
60
61
  end
61
62
 
@@ -107,7 +108,7 @@ class Skippy::GitLibraryInstaller < Skippy::LibraryInstaller
107
108
 
108
109
  # @param [String] version
109
110
  def edge_version?(version)
110
- version && version.casecmp('edge').zero?
111
+ version&.casecmp('edge')&.zero?
111
112
  end
112
113
 
113
114
  # @param [String] version
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  require 'skippy/installer'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/lib_source'
2
4
  require 'skippy/library'
3
5
  require 'skippy/project'
@@ -28,7 +30,7 @@ class Skippy::LibraryInstaller
28
30
  # @param [Symbol] type
29
31
  # @param [String] message
30
32
  def status(type, message)
31
- @messager.call(type, message) if @messager
33
+ @messager&.call(type, message)
32
34
  end
33
35
 
34
36
  # @param [String] message
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pathname'
2
4
 
3
5
  require 'skippy/library'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'digest'
2
4
  require 'net/http'
3
5
  require 'pathname'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'pathname'
3
5
 
@@ -12,7 +14,7 @@ class Skippy::Library
12
14
 
13
15
  include Skippy::Helpers::File
14
16
 
15
- CONFIG_FILENAME = 'skippy.json'.freeze
17
+ CONFIG_FILENAME = 'skippy.json'
16
18
 
17
19
  attr_reader :path, :source, :requirement
18
20
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'git'
2
4
  require 'json'
3
5
  require 'naturally'
@@ -35,8 +37,8 @@ class Skippy::LibraryManager
35
37
  end
36
38
 
37
39
  # @yield [Skippy::Library]
38
- def each
39
- @libraries.each { |library| yield library }
40
+ def each(&block)
41
+ @libraries.each(&block)
40
42
  self
41
43
  end
42
44
 
@@ -85,7 +87,7 @@ class Skippy::LibraryManager
85
87
 
86
88
  installer = get_installer(lib_source)
87
89
  if block_given?
88
- installer.on_status { |type, message|
90
+ installer.on_status { |type, message| # rubocop:disable Style/ExplicitBlockArgument
89
91
  yield type, message
90
92
  }
91
93
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'fileutils'
2
4
  require 'json'
3
5
  require 'pathname'
@@ -23,8 +25,8 @@ class Skippy::ModuleManager
23
25
  end
24
26
 
25
27
  # @yield [Skippy::LibModule]
26
- def each
27
- @modules.each { |lib_module| yield lib_module }
28
+ def each(&block)
29
+ @modules.each(&block)
28
30
  self
29
31
  end
30
32
 
@@ -41,7 +43,7 @@ class Skippy::ModuleManager
41
43
  # @param [Skippy::LibModule, String] lib_module
42
44
  def installed?(lib_module)
43
45
  module_name = lib_module.name
44
- modules = project && project.config.get(:modules, [])
46
+ modules = project&.config&.get(:modules, [])
45
47
  modules.any? { |mod| mod.casecmp(module_name).zero? }
46
48
  end
47
49
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/error'
2
4
 
3
5
  class Skippy::Namespace
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Skippy::OSCommon
2
4
 
3
5
  # @param [String] command
@@ -15,7 +17,7 @@ class Skippy::OSCommon
15
17
  end
16
18
 
17
19
  # @param [String] path
18
- def launch_app(path, *args) # rubocop:disable Lint/UnusedMethodArgument
20
+ def launch_app(path, *args)
19
21
  raise NotImplementedError
20
22
  end
21
23
 
data/lib/skippy/os/mac.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/os/common'
2
4
  require 'skippy/sketchup/app'
3
5
 
data/lib/skippy/os/win.rb CHANGED
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/os/common'
2
4
  require 'skippy/sketchup/app'
3
5
 
4
6
  class Skippy::OSWin < Skippy::OSCommon
5
7
 
6
- # Note: This is not a good indication to 32bit bs 64bit. It's a naive
8
+ # NOTE: This is not a good indication to 32bit bs 64bit. It's a naive
7
9
  # assumption that will fail when SketchUp is installed to a
8
10
  # non-standard location.
9
11
  SYSTEM_32BIT = ENV['ProgramFiles(x86)'].nil? && ENV['ProgramW6432'].nil?
data/lib/skippy/os.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skippy
2
4
 
3
5
  if RUBY_PLATFORM =~ /darwin/
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'pathname'
3
5
 
@@ -15,7 +17,7 @@ class Skippy::Project
15
17
 
16
18
  include Skippy::Helpers::File
17
19
 
18
- PROJECT_FILENAME = 'skippy.json'.freeze
20
+ PROJECT_FILENAME = 'skippy.json'
19
21
 
20
22
  attr_reader :config
21
23
  attr_reader :libraries
@@ -67,11 +69,9 @@ class Skippy::Project
67
69
 
68
70
  # @yield [filename]
69
71
  # @yieldparam [String] filename the path to custom Skippy command
70
- def command_files
72
+ def command_files(&block)
71
73
  files_pattern = File.join(path, 'skippy', '**', '*.rb')
72
- Dir.glob(files_pattern) { |filename|
73
- yield filename
74
- }
74
+ Dir.glob(files_pattern, &block)
75
75
  end
76
76
 
77
77
  # Checks if a project exist on disk. If not it's just transient.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skippy
2
4
 
3
5
  SketchUpApp = Struct.new(:executable, :version, :can_debug, :is64bit) do
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Skippy
2
4
 
3
- VERSION = '0.4.3.a'.freeze
5
+ VERSION = '0.5.0.a'
4
6
 
5
7
  end
data/lib/skippy.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'skippy/version'
2
4
 
3
5
  module Skippy
data/skippy.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = 'https://github.com/thomthom/skippy'
16
16
  spec.license = 'MIT'
17
17
 
18
- spec.required_ruby_version = '>= 2.0'
18
+ spec.required_ruby_version = '>= 2.3'
19
19
 
20
20
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
21
  f.match(%r{^(test|spec|features)/})
@@ -26,13 +26,10 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency 'git', '~> 1.3'
28
28
  spec.add_dependency 'naturally', '~> 2.1'
29
- spec.add_dependency 'thor', '~> 0.19'
29
+ spec.add_dependency 'thor', '>= 0.19', '< 2.0'
30
30
 
31
31
  spec.add_development_dependency 'bundler', '>= 1.15.0', '< 3.0'
32
32
  spec.add_development_dependency 'rake', '~> 12.3.3'
33
33
  spec.add_development_dependency 'minitest', '~> 5.0'
34
- # TODO(thomthom): Need to lock to 2.3 because 2.4 fails with the custom
35
- # aruba build.
36
- spec.add_development_dependency 'cucumber', '~> 2.3.0'
37
- spec.add_development_dependency 'aruba', '~> 0.14.1'
34
+ spec.add_development_dependency 'aruba', '~> 1.0'
38
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skippy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3.a
4
+ version: 0.5.0.a
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Thomassen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-06 00:00:00.000000000 Z
11
+ date: 2021-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -42,16 +42,22 @@ dependencies:
42
42
  name: thor
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.19'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '2.0'
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
- - - "~>"
55
+ - - ">="
53
56
  - !ruby/object:Gem::Version
54
57
  version: '0.19'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '2.0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: bundler
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -100,34 +106,20 @@ dependencies:
100
106
  - - "~>"
101
107
  - !ruby/object:Gem::Version
102
108
  version: '5.0'
103
- - !ruby/object:Gem::Dependency
104
- name: cucumber
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: 2.3.0
110
- type: :development
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: 2.3.0
117
109
  - !ruby/object:Gem::Dependency
118
110
  name: aruba
119
111
  requirement: !ruby/object:Gem::Requirement
120
112
  requirements:
121
113
  - - "~>"
122
114
  - !ruby/object:Gem::Version
123
- version: 0.14.1
115
+ version: '1.0'
124
116
  type: :development
125
117
  prerelease: false
126
118
  version_requirements: !ruby/object:Gem::Requirement
127
119
  requirements:
128
120
  - - "~>"
129
121
  - !ruby/object:Gem::Version
130
- version: 0.14.1
122
+ version: '1.0'
131
123
  description: Automate common tasks for SketchUp extension development, including managing
132
124
  library dependencies.
133
125
  email:
@@ -153,6 +145,7 @@ files:
153
145
  - ".idea/vcs.xml"
154
146
  - ".rubocop.yml"
155
147
  - ".rubocop_todo.yml"
148
+ - ".vscode/extensions.json"
156
149
  - ".vscode/launch.json"
157
150
  - ".vscode/settings.json"
158
151
  - ".vscode/tasks.json"
@@ -187,6 +180,7 @@ files:
187
180
  - bin/setup
188
181
  - bin/skippy
189
182
  - bin/thor
183
+ - cucumber.yml
190
184
  - debug/skippy.bat
191
185
  - exe/skippy
192
186
  - fixtures/my_lib/modules/command.rb
@@ -246,7 +240,7 @@ homepage: https://github.com/thomthom/skippy
246
240
  licenses:
247
241
  - MIT
248
242
  metadata: {}
249
- post_install_message:
243
+ post_install_message:
250
244
  rdoc_options: []
251
245
  require_paths:
252
246
  - lib
@@ -254,15 +248,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
254
248
  requirements:
255
249
  - - ">="
256
250
  - !ruby/object:Gem::Version
257
- version: '2.0'
251
+ version: '2.3'
258
252
  required_rubygems_version: !ruby/object:Gem::Requirement
259
253
  requirements:
260
254
  - - ">"
261
255
  - !ruby/object:Gem::Version
262
256
  version: 1.3.1
263
257
  requirements: []
264
- rubygems_version: 3.0.3
265
- signing_key:
258
+ rubygems_version: 3.2.15
259
+ signing_key:
266
260
  specification_version: 4
267
261
  summary: CLI development tool for SketchUp extensions.
268
262
  test_files: []