pry-doc 0.13.1 → 0.13.2pre1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f4ae3ef5f53179eda1d6c5ef228b3e31fe8528337b341e2265d5bd50eda4eb
|
4
|
+
data.tar.gz: df9ae2c12799e36e892057d0f10c3b9d1f44483cd22631f8469cdd6918457a22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0206b39bb7df0e15bba7c6282ff8d8a85035e5b25794f7c2ac59e640d8b79ff0814fd64670342ca52db0171dc3a7efcaee6586384f87e6913cbace846a1c414a
|
7
|
+
data.tar.gz: 6412205ed92ddd525824fd348bc5bf04cb82fec8126492c72faff5a3ea490558da8c0d1d07a6030360f23429fe3b4d9437f993fd4bfbae11763d57a69f641303
|
@@ -36,10 +36,19 @@ module Pry::CInternals
|
|
36
36
|
private
|
37
37
|
|
38
38
|
def source_location_for(symbol, line_number)
|
39
|
-
SourceLocation.new(
|
39
|
+
SourceLocation.new(full_path_for(@file_name),
|
40
40
|
cleanup_linenumber(line_number), symbol_type_for(symbol.strip))
|
41
41
|
end
|
42
42
|
|
43
|
+
def full_path_for(file_name)
|
44
|
+
if RbConfig::CONFIG['host'] =~ /mswin|mingw/
|
45
|
+
# windows etags already has the path expanded, wtf
|
46
|
+
file_name
|
47
|
+
else
|
48
|
+
File.join(ruby_source_folder, @file_name)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
43
52
|
def symbol_type_for(symbol)
|
44
53
|
if symbol =~ /#\s*define/
|
45
54
|
:macro
|
@@ -113,9 +113,13 @@ module Pry::CInternals
|
|
113
113
|
puts "...Finished!"
|
114
114
|
end
|
115
115
|
|
116
|
+
# for windows support need to:
|
117
|
+
# (1) curl -k --fail -L https://github.com/ruby/ruby/archive/v2_4_1.zip
|
118
|
+
# need -k as insecure as don't have root certs
|
119
|
+
# (2) 7z x v2_4_1.zip to extract it (via 7zip, choco install 7zip)
|
120
|
+
# (3) generate etags with: dir /b /s *.c *.h *.y | etags - --no-members
|
121
|
+
# (4) Done!
|
116
122
|
def self.download_ruby
|
117
|
-
curl_cmd = "curl --fail -L https://github.com/ruby/ruby/archive/v#{ruby_version}.tar.gz | tar xzvf - 2> /dev/null"
|
118
|
-
|
119
123
|
FileUtils.mkdir_p(ruby_source_folder)
|
120
124
|
FileUtils.cd(File.dirname(ruby_source_folder)) do
|
121
125
|
%x{ #{curl_cmd} }
|
@@ -123,22 +127,41 @@ module Pry::CInternals
|
|
123
127
|
end
|
124
128
|
end
|
125
129
|
|
130
|
+
def self.curl_cmd
|
131
|
+
if Pry::Platform.windows?
|
132
|
+
%{
|
133
|
+
curl -k --fail -L https://github.com/ruby/ruby/archive/v#{ruby_version}.zip
|
134
|
+
7z -y x #{ruby_version}.zip
|
135
|
+
}
|
136
|
+
else
|
137
|
+
"curl --fail -L https://github.com/ruby/ruby/archive/v#{ruby_version}.tar.gz | tar xzvf - 2> /dev/null"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
126
141
|
def self.etag_binary
|
127
|
-
@etag_binary ||= if
|
142
|
+
@etag_binary ||= if Pry::Platform.linux?
|
128
143
|
arch = RbConfig::CONFIG['arch'] =~ /i(3|6)86/ ? 32 : 64
|
129
144
|
File.join(PryDoc.root, "libexec/linux/etags-#{arch}")
|
145
|
+
elsif Pry::Platform.windows?
|
146
|
+
File.join(PryDoc.root, "libexec/windows/etags")
|
130
147
|
else
|
131
148
|
"etags"
|
132
149
|
end
|
133
150
|
end
|
134
151
|
|
135
|
-
def self.
|
136
|
-
|
152
|
+
def self.etag_cmd
|
153
|
+
if Pry::Platform.windows?
|
154
|
+
"dir /b /s *.c *.h *.y | #{etag_binary} - --no-members"
|
155
|
+
else
|
156
|
+
"find . -type f -name '*.[chy]' | #{etag_binary} - --no-members"
|
157
|
+
end
|
158
|
+
end
|
137
159
|
|
160
|
+
def self.generate_tagfile
|
138
161
|
FileUtils.cd(ruby_source_folder) do
|
139
162
|
puts "Generating tagfile!"
|
140
|
-
%x{ #{
|
141
|
-
check_for_error(
|
163
|
+
%x{ #{etag_cmd} }
|
164
|
+
check_for_error(etag_cmd) { File.size(File.join(ruby_source_folder, "TAGS")) > 500 }
|
142
165
|
end
|
143
166
|
end
|
144
167
|
end
|
data/lib/pry-doc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.2pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mair (banisterfiend)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -160,9 +160,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '2.0'
|
161
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- - "
|
163
|
+
- - ">"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
165
|
+
version: 1.3.1
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
168
|
rubygems_version: 2.7.3
|