claide 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 05f7199c9c2257b805319fec6e5777baa3836864
4
- data.tar.gz: 6d2962887e1d7578222f38c41b2cb9d09349534d
3
+ metadata.gz: 26b7d437555fa6753497ba59f46309df61cf182e
4
+ data.tar.gz: 7801b56dd1987c58046f83cebc7e4980d2d39eb7
5
5
  SHA512:
6
- metadata.gz: 9fd1a6137446851ea29d472369203d9a34566890e87dc8f93b1ca560d41868fe9d91c4aa13d1961a799ed1728031c023fd3a419c8b6da9bcc253153af150b5de
7
- data.tar.gz: 572a1e784d67fcb09cf1a87d0ded7ee3f3f60e99a4b081c1eef95cf32afb5a31a729f5c7cfe77d8a19c9147a30927b84f1bdda6455111af4190cc3b7764fa092
6
+ metadata.gz: 760d343dcda86a2c2c10945b5cc038f1518ebb16b40017304bcd5c2c8f098aba514effe33aaaee3d85451f2cd4fad8c76c0e39cfdbac5d7fc5a00ce098222f84
7
+ data.tar.gz: 7fbde1b1d5dbeefbb06c219ef88d89ce4fd50e65471942a5ccfc5e15e45ef4636a329cce3585b008ef91949efaee51370018034de45f669d2c06acf524b2398c
@@ -1,5 +1,14 @@
1
1
  # CLAide Changelog
2
2
 
3
+ ## 1.0.1 (2016-10-10)
4
+
5
+ ##### Bug Fixes
6
+
7
+ * Adds a fix for older versions of Rubygems when CLAide crashes.
8
+ [Samuel Giddins](https://github.com/segiddins)
9
+ [#73](https://github.com/CocoaPods/CLAide/issues/73)
10
+
11
+
3
12
  ## 1.0.0 (2016-05-10)
4
13
 
5
14
  ##### Enhancements
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- claide (1.0.0)
4
+ claide (1.0.1)
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.0'.freeze
11
+ VERSION = '1.0.1'.freeze
12
12
 
13
13
  require 'claide/ansi'
14
14
  require 'claide/argument'
@@ -80,7 +80,7 @@ module CLAide
80
80
  #
81
81
  attr_accessor :description
82
82
 
83
- # @return [Array<String>] The prefixes used t osearch for CLAide plugins.
83
+ # @return [Array<String>] The prefixes used to search for CLAide plugins.
84
84
  # Plugins are loaded via their `<plugin_prefix>_plugin.rb` file.
85
85
  # Defaults to search for `claide` plugins.
86
86
  #
@@ -233,7 +233,7 @@ module CLAide
233
233
  #
234
234
  # The subclass has to combine the result of calling `super` and its own
235
235
  # list of options. The recommended way of doing this is by concatenating
236
- # concatenating to this classes’ own options.
236
+ # to this classes’ own options.
237
237
  #
238
238
  # @return [Array<Array>]
239
239
  #
@@ -564,7 +564,7 @@ module CLAide
564
564
  # This method should be overridden by the command class to perform its
565
565
  # work.
566
566
  #
567
- # @return [void
567
+ # @return [void]
568
568
  #
569
569
  def run
570
570
  raise 'A subclass should override the `CLAide::Command#run` method to ' \
@@ -56,7 +56,7 @@ module CLAide
56
56
  def self.plugins_involved_in_exception(exception)
57
57
  specifications.select do |gemspec|
58
58
  exception.backtrace.any? do |line|
59
- gemspec.full_require_paths.any? do |plugin_path|
59
+ full_require_paths_for(gemspec).any? do |plugin_path|
60
60
  line.include?(plugin_path)
61
61
  end
62
62
  end
@@ -89,12 +89,11 @@ module CLAide
89
89
  #
90
90
  # @return [Bool] Whether activation and requiring succeeded.
91
91
  #
92
- # rubocop:disable RescueException
93
92
  def self.safe_activate_and_require(spec, paths)
94
93
  spec.activate
95
94
  paths.each { |path| require(path) }
96
95
  true
97
- rescue Exception => exception
96
+ rescue Exception => exception # rubocop:disable RescueException
98
97
  message = "\n---------------------------------------------"
99
98
  message << "\nError loading the plugin `#{spec.full_name}`.\n"
100
99
  message << "\n#{exception.class} - #{exception.message}"
@@ -103,7 +102,22 @@ module CLAide
103
102
  warn message.ansi.yellow
104
103
  false
105
104
  end
106
- # rubocop:enable RescueException
105
+
106
+ def self.full_require_paths_for(gemspec)
107
+ if gemspec.respond_to?(:full_require_paths)
108
+ return gemspec.full_require_paths
109
+ end
110
+
111
+ # RubyGems < 2.2
112
+ gemspec.require_paths.map do |require_path|
113
+ if require_path.include?(gemspec.full_gem_path)
114
+ require_path
115
+ else
116
+ File.join(gemspec.full_gem_path, require_path)
117
+ end
118
+ end
119
+ end
120
+ private_class_method :full_require_paths_for
107
121
  end
108
122
  end
109
123
  end
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.0
4
+ version: 1.0.1
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: 2016-05-10 00:00:00.000000000 Z
12
+ date: 2016-10-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email:
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  requirements: []
68
68
  rubyforge_project:
69
- rubygems_version: 2.5.1
69
+ rubygems_version: 2.4.5.1
70
70
  signing_key:
71
71
  specification_version: 3
72
72
  summary: A small command-line interface framework.