claide 1.0.2 → 1.0.3

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: bddaf09190ba8cd40a78047084d04bc195fe754c
4
- data.tar.gz: e8c9d4331acb288db160ad3c0f46642cc059da0d
2
+ SHA256:
3
+ metadata.gz: 174ba43a25b83306ca6e1256ec1ef624f05a45972a67e0de7bbcdd0229ea9f7c
4
+ data.tar.gz: 44db0039bc9da5d1d616bf073fe62f493f338653b924cc7f2a9fb82a60dfb2d1
5
5
  SHA512:
6
- metadata.gz: d67dc9b36b9e0c2ae8e548e392db26a56509a59cf4461433cdfdf4846fbd2c639ae97d377c629c6e8c0667c0ea14941ff0f96b90c7468a82aa7fa27ad6786505
7
- data.tar.gz: 7a29ea1e2d3af4465067022622518990bd040b5a20e448a7cc4b3da221db65f9e7488c5312f444bc204308a345d247af52ec5298d4e3a10840dd4e0102ea83bc
6
+ metadata.gz: 0f24d8a2ab11da0a035aeeac3db3d020e9d75b719a814ccb37d66973366970e609461f89315fdf3a10cbe83b52e8e8c0938bb9abda7cd58403fc6cc5b88d14a5
7
+ data.tar.gz: 7b8ab7827e43c7a15f98b31c830ce35b9ccc97aa5c70fb95d2bc0826d39499c8364f9cd0251f644920f719dd32b27c108c2ad4e7b77333f4f8ea720234dc6b94
@@ -1,4 +1,7 @@
1
1
  language: ruby
2
+
3
+ dist: trusty
4
+
2
5
  addons:
3
6
  code_climate:
4
7
  repo_token: 46c8b29dd6711f35704e7c5a541486cbbf2cff8b2df8ce755bfc09917d3c1cbb
@@ -7,11 +10,18 @@ branches:
7
10
  - master
8
11
  - /.+-stable$/
9
12
  rvm:
10
- - 1.8.7
11
- - 1.9.3
12
- - 2.1.1
13
+ - 2.0.0-p647
14
+ - 2.1.10
15
+ - 2.2.9
16
+ - 2.3.8
17
+ - 2.4.5
18
+ - 2.5.3
19
+ - 2.6.2
13
20
  bundler_args: --without development
14
- before_install:
15
- - if [ "$TRAVIS_RUBY_VERSION" == "1.8.7" ]; then gem update --system; fi
16
- - gem install bundler
21
+ before_install:
22
+ # There is a bug in travis. When using system ruby, bundler is not
23
+ # installed and causes the default install action to fail.
24
+ - if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem install "bundler:~> 1.15.0"; else gem install "bundler:~> 1.15.0"; fi
25
+ # RubyGems 2.0.14 isn't a fun time on 2.0.0p648
26
+ - if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi
17
27
  script: bundle exec rake spec
@@ -1,5 +1,19 @@
1
1
  # CLAide Changelog
2
2
 
3
+ ## 1.0.3 (2019-08-02)
4
+
5
+ ##### Enhancements
6
+
7
+ * None.
8
+
9
+ ##### Bug Fixes
10
+
11
+ * Correctly handle `--help` flags when using `argv.remainder!` after initialization
12
+ [Eric Amorde](https://github.com/amorde),
13
+ [tripleCC](https://github.com/tripleCC)
14
+ [#87](https://github.com/CocoaPods/CLAide/pull/87)
15
+
16
+
3
17
  ## 1.0.2 (2017-06-06)
4
18
 
5
19
  ##### Enhancements
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- claide (1.0.2)
4
+ claide (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,7 +8,7 @@ module CLAide
8
8
  #
9
9
  # CLAide’s version, following [semver](http://semver.org).
10
10
  #
11
- VERSION = '1.0.2'.freeze
11
+ VERSION = '1.0.3'.freeze
12
12
 
13
13
  require 'claide/ansi'
14
14
  require 'claide/argument'
@@ -497,6 +497,15 @@ module CLAide
497
497
  attr_accessor :ansi_output
498
498
  alias_method :ansi_output?, :ansi_output
499
499
 
500
+ # Set to `true` if initialized with a `--help` flag
501
+ #
502
+ # @return [Boolean]
503
+ #
504
+ # Whether the command was initialized with argv containing --help
505
+ #
506
+ attr_accessor :help_arg
507
+ alias_method :help?, :help_arg
508
+
500
509
  # Subclasses should override this method to remove the arguments/options
501
510
  # they support from `argv` _before_ calling `super`.
502
511
  #
@@ -514,6 +523,7 @@ module CLAide
514
523
  @verbose = argv.flag?('verbose')
515
524
  @ansi_output = argv.flag?('ansi', Command.ansi_output?)
516
525
  @argv = argv
526
+ @help_arg = argv.flag?('help')
517
527
  end
518
528
 
519
529
  # Convenience method.
@@ -553,7 +563,7 @@ module CLAide
553
563
  # @return [void]
554
564
  #
555
565
  def validate!
556
- banner! if @argv.flag?('help')
566
+ banner! if help?
557
567
  unless @argv.empty?
558
568
  argument = @argv.remainder.first
559
569
  help! ArgumentSuggester.new(argument, self.class).suggestion
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claide
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-06 00:00:00.000000000 Z
12
+ date: 2019-08-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -65,8 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubyforge_project:
69
- rubygems_version: 2.4.5.1
68
+ rubygems_version: 3.0.3
70
69
  signing_key:
71
70
  specification_version: 3
72
71
  summary: A small command-line interface framework.