claide 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/lib/claide.rb +1 -1
- data/lib/claide/command.rb +3 -3
- data/lib/claide/command/plugin_manager.rb +18 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26b7d437555fa6753497ba59f46309df61cf182e
|
4
|
+
data.tar.gz: 7801b56dd1987c58046f83cebc7e4980d2d39eb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 760d343dcda86a2c2c10945b5cc038f1518ebb16b40017304bcd5c2c8f098aba514effe33aaaee3d85451f2cd4fad8c76c0e39cfdbac5d7fc5a00ce098222f84
|
7
|
+
data.tar.gz: 7fbde1b1d5dbeefbb06c219ef88d89ce4fd50e65471942a5ccfc5e15e45ef4636a329cce3585b008ef91949efaee51370018034de45f669d2c06acf524b2398c
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/Gemfile.lock
CHANGED
data/lib/claide.rb
CHANGED
data/lib/claide/command.rb
CHANGED
@@ -80,7 +80,7 @@ module CLAide
|
|
80
80
|
#
|
81
81
|
attr_accessor :description
|
82
82
|
|
83
|
-
# @return [Array<String>] The prefixes used
|
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
|
-
#
|
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.
|
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
|
-
|
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.
|
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-
|
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.
|