pry-theme 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/LICENSE +1 -1
- data/VERSION +1 -1
- data/lib/pry-theme/commands.rb +1 -1
- data/lib/pry-theme/declaration.rb +2 -0
- data/lib/pry-theme/definition.rb +3 -3
- data/lib/pry-theme/theme.rb +1 -0
- data/lib/pry-theme/theme_list.rb +1 -1
- data/lib/pry-theme/when_started_hook.rb +4 -4
- data/pry-theme.gemspec +0 -2
- data/spec/helper.rb +11 -2
- metadata +6 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 507f70f96b7b7da5f906c701c6ab0609bc875a000ad6931ccf4dc07070bc93f6
|
4
|
+
data.tar.gz: dd85a274776b513dc293b7e1be4cc482c8a34a2a56ada0f291481ec8d568076a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ca912388ed80d97c7b83aebcfdf039095b6f26661879c41ad859a0396c3770e15dea8246059abdacb027d64532dd7148662e4b7c3dae9af65d74ac0c4b215c
|
7
|
+
data.tar.gz: 7bed2c411fc510987f5e552e8dfe4b52d32a1782bf4a331e2daf88036f90b3ca5562fec9c709ea985e65e4ecf59239a74a40ff99d0c759a2bbc75d96318d5a82
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@ Pry Theme changelog
|
|
3
3
|
|
4
4
|
### master
|
5
5
|
|
6
|
+
### v1.3.1 (August 19, 2020)
|
7
|
+
|
8
|
+
* Fixed ``NoMethodError: undefined method `windows?``
|
9
|
+
([#62](https://github.com/kyrylo/pry-theme/pull/62))
|
10
|
+
|
6
11
|
### v1.3.0 (January 26, 2019)
|
7
12
|
|
8
13
|
* Fixed the "method BaseHelpers#windows? is deprecated" warning
|
data/LICENSE
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.1
|
data/lib/pry-theme/commands.rb
CHANGED
@@ -227,7 +227,7 @@ module PryTheme
|
|
227
227
|
uri = URI.parse(address)
|
228
228
|
http = Net::HTTP.new(uri.host, uri.port)
|
229
229
|
http.use_ssl = true
|
230
|
-
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if windows?
|
230
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if Pry::Helpers::Platform.windows?
|
231
231
|
response = http.request(Net::HTTP::Get.new(uri.request_uri))
|
232
232
|
JSON.parse(response.body)
|
233
233
|
end
|
data/lib/pry-theme/definition.rb
CHANGED
@@ -53,7 +53,7 @@ module PryTheme
|
|
53
53
|
:keyword, :method, :predefined_constant, :symbol
|
54
54
|
]
|
55
55
|
|
56
|
-
def_dynamic_methods
|
56
|
+
def_dynamic_methods(*ATTRS)
|
57
57
|
|
58
58
|
def initialize(color_model, &block)
|
59
59
|
@color_model = color_model
|
@@ -82,7 +82,7 @@ module PryTheme
|
|
82
82
|
|
83
83
|
ATTRS = [:self_, :char, :content, :delimiter, :escape]
|
84
84
|
|
85
|
-
def_dynamic_methods
|
85
|
+
def_dynamic_methods(*ATTRS)
|
86
86
|
|
87
87
|
def initialize(color_model, &block)
|
88
88
|
@color_model = color_model
|
@@ -94,7 +94,7 @@ module PryTheme
|
|
94
94
|
class Regexp < Compound
|
95
95
|
ATTRS = [:modifier]
|
96
96
|
|
97
|
-
def_dynamic_methods
|
97
|
+
def_dynamic_methods(*ATTRS)
|
98
98
|
|
99
99
|
def initialize(color_model, &block)
|
100
100
|
@color_model = color_model
|
data/lib/pry-theme/theme.rb
CHANGED
data/lib/pry-theme/theme_list.rb
CHANGED
@@ -2,14 +2,14 @@ module PryTheme
|
|
2
2
|
# This is a hook to Pry. It executes upon Pry's launch. The hook is
|
3
3
|
# responsible for bootstrapping Pry Theme.
|
4
4
|
class WhenStartedHook
|
5
|
-
def call(
|
5
|
+
def call(_context, _options, pry_instance)
|
6
6
|
recreate_user_themes_from_default_ones
|
7
7
|
load_themes
|
8
8
|
|
9
9
|
if File.exist?(theme_file)
|
10
10
|
ThemeList.activate_theme(Pry.config.theme)
|
11
11
|
else
|
12
|
-
display_warning(
|
12
|
+
display_warning(pry_instance) if Pry.config.theme
|
13
13
|
ThemeList.activate_theme_intelligently
|
14
14
|
end
|
15
15
|
|
@@ -47,8 +47,8 @@ module PryTheme
|
|
47
47
|
File.join(USER_THEMES_DIR, Pry.config.theme.to_s + PT_EXT)
|
48
48
|
end
|
49
49
|
|
50
|
-
def display_warning(
|
51
|
-
|
50
|
+
def display_warning(pry_instance)
|
51
|
+
pry_instance.output.puts 'Pry Theme Warning: Pry.config.theme is set to ' \
|
52
52
|
"\"#{ Pry.config.theme }\". There's no such a theme in your system. " \
|
53
53
|
"All installed themes live inside #{ USER_THEMES_DIR }. Falling back " \
|
54
54
|
'to the default theme for now.'
|
data/pry-theme.gemspec
CHANGED
data/spec/helper.rb
CHANGED
@@ -1,10 +1,19 @@
|
|
1
1
|
require 'bundler/setup'
|
2
|
-
|
2
|
+
|
3
|
+
require 'pry'
|
4
|
+
if Pry::VERSION < '0.11'
|
5
|
+
require 'pry/test/helper'
|
6
|
+
else
|
7
|
+
require 'pry/testable'
|
8
|
+
include Pry::Testable
|
9
|
+
end
|
3
10
|
|
4
11
|
Bundler.require :default, :test
|
5
12
|
|
6
|
-
Pry.config.
|
13
|
+
Pry.config.color = false
|
14
|
+
Pry.config.hooks = Pry::Hooks.new
|
7
15
|
Pry.config.pager = false
|
16
|
+
Pry.config.theme = nil
|
8
17
|
|
9
18
|
puts(
|
10
19
|
"Ruby: #{RUBY_VERSION}; " +
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyrylo Silin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coderay
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.0'
|
41
27
|
description: The plugin enables color theme support for Pry.
|
42
28
|
email: silin@kyrylo.org
|
43
29
|
executables: []
|
@@ -119,7 +105,7 @@ homepage: https://github.com/kyrylo/pry-theme
|
|
119
105
|
licenses:
|
120
106
|
- zlib
|
121
107
|
metadata: {}
|
122
|
-
post_install_message:
|
108
|
+
post_install_message:
|
123
109
|
rdoc_options: []
|
124
110
|
require_paths:
|
125
111
|
- lib
|
@@ -134,9 +120,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
120
|
- !ruby/object:Gem::Version
|
135
121
|
version: '0'
|
136
122
|
requirements: []
|
137
|
-
|
138
|
-
|
139
|
-
signing_key:
|
123
|
+
rubygems_version: 3.1.2
|
124
|
+
signing_key:
|
140
125
|
specification_version: 4
|
141
126
|
summary: An easy way to customize Pry colors via theme files
|
142
127
|
test_files: []
|