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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 93b2c455e89a5cf81f506572be45fb0d76d3cd01
4
- data.tar.gz: 42def8ea1680315d655df7edb7107faaf9db5cdb
2
+ SHA256:
3
+ metadata.gz: 507f70f96b7b7da5f906c701c6ab0609bc875a000ad6931ccf4dc07070bc93f6
4
+ data.tar.gz: dd85a274776b513dc293b7e1be4cc482c8a34a2a56ada0f291481ec8d568076a
5
5
  SHA512:
6
- metadata.gz: 2e8b49f502d7c9af0f299b76dc62a4403da09128783235a451abfb317472de113e6e899ec7299768dc04ab998341e8f31a4abf10ccca34cdf9ec8c4421f4efd4
7
- data.tar.gz: e75e23321d3e50bc683272c3142c50f076a514ad3a50832571f2dd04c3487cccfc8618f39e02e20fe43bef7867a49d71827f52b7d552cf422cd8998aee3709a4
6
+ metadata.gz: 67ca912388ed80d97c7b83aebcfdf039095b6f26661879c41ad859a0396c3770e15dea8246059abdacb027d64532dd7148662e4b7c3dae9af65d74ac0c4b215c
7
+ data.tar.gz: 7bed2c411fc510987f5e552e8dfe4b52d32a1782bf4a331e2daf88036f90b3ca5562fec9c709ea985e65e4ecf59239a74a40ff99d0c759a2bbc75d96318d5a82
@@ -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
@@ -1,4 +1,4 @@
1
- Copyright (C) 2019 Kyrylo Silin
1
+ Copyright (C) 2020 Kyrylo Silin
2
2
 
3
3
  This software is provided 'as-is', without any express or implied
4
4
  warranty. In no event will the authors be held liable for any damages
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -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
@@ -22,6 +22,8 @@ module PryTheme
22
22
  @color_class = PryTheme.const_get(:"Color#{ color_model }")
23
23
  @effects = {}
24
24
  @parsed = false
25
+ @fg = nil
26
+ @bg = nil
25
27
  end
26
28
 
27
29
  def parse
@@ -53,7 +53,7 @@ module PryTheme
53
53
  :keyword, :method, :predefined_constant, :symbol
54
54
  ]
55
55
 
56
- def_dynamic_methods *ATTRS
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 *ATTRS
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 *ATTRS
97
+ def_dynamic_methods(*ATTRS)
98
98
 
99
99
  def initialize(color_model, &block)
100
100
  @color_model = color_model
@@ -37,6 +37,7 @@ module PryTheme
37
37
  @authors = [{ :name => @config[:author] }]
38
38
  @default_author = true
39
39
  @active = false
40
+ @definition = nil
40
41
 
41
42
  validate_config
42
43
 
@@ -20,7 +20,7 @@ module PryTheme
20
20
  end
21
21
 
22
22
  def activate_theme(name)
23
- theme = themes.find { |theme| theme.name == name }
23
+ theme = themes.find { |t| t.name == name }
24
24
 
25
25
  if theme
26
26
  current_theme.disable if current_theme
@@ -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(_pry_) if Pry.config.theme
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(pry)
51
- pry.output.puts 'Pry Theme Warning: Pry.config.theme is set to ' \
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.'
@@ -13,6 +13,4 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split("\n")
14
14
 
15
15
  s.add_dependency 'coderay', '~> 1.1'
16
-
17
- s.add_development_dependency 'bundler', '~> 1.0'
18
16
  end
@@ -1,10 +1,19 @@
1
1
  require 'bundler/setup'
2
- require 'pry/test/helper'
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.theme = nil
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.0
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: 2019-01-26 00:00:00.000000000 Z
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
- rubyforge_project:
138
- rubygems_version: 2.6.13
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: []