pry-theme 1.1.3 → 1.2.0
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 +4 -4
- data/.travis.yml +9 -6
- data/CHANGELOG.md +11 -0
- data/LICENSE +1 -1
- data/VERSION +1 -1
- data/lib/pry-theme/color.rb +2 -2
- data/lib/pry-theme/colors/color16.rb +1 -1
- data/lib/pry-theme/colors/color256.rb +1 -1
- data/lib/pry-theme/colors/color8.rb +1 -1
- data/lib/pry-theme/declaration.rb +2 -2
- data/lib/pry-theme/rgb.rb +1 -1
- data/lib/pry-theme/term.rb +4 -4
- data/pry-theme.gemspec +1 -2
- data/spec/term_spec.rb +1 -1
- data/spec/theme_spec.rb +1 -1
- data/themes/github.prytheme.rb +1 -1
- data/themes/monokai.prytheme.rb +1 -1
- data/themes/pry-classic-16.prytheme.rb +1 -1
- data/themes/pry-classic-256.prytheme.rb +1 -1
- data/themes/pry-classic-8.prytheme.rb +1 -1
- data/themes/pry-cold.prytheme.rb +1 -1
- data/themes/pry-love-16.prytheme.rb +1 -1
- data/themes/pry-love-8.prytheme.rb +1 -1
- data/themes/pry-modern-16.prytheme.rb +1 -1
- data/themes/pry-modern-256.prytheme.rb +1 -1
- data/themes/pry-modern-8.prytheme.rb +1 -1
- data/themes/pry-monochrome.prytheme.rb +1 -1
- data/themes/pry-siberia-16.prytheme.rb +1 -1
- data/themes/pry-siberia-8.prytheme.rb +1 -1
- data/themes/pry-tepid-16.prytheme.rb +1 -1
- data/themes/pry-tepid-8.prytheme.rb +1 -1
- data/themes/pry-zealand-16.prytheme.rb +1 -1
- data/themes/pry-zealand-8.prytheme.rb +1 -1
- data/themes/railscasts.prytheme.rb +1 -1
- data/themes/solarized.prytheme.rb +1 -1
- data/themes/zenburn.prytheme.rb +1 -1
- metadata +4 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf0ebf03b6c84bdc2fa53a33186f8a69f4e39969
|
4
|
+
data.tar.gz: 467b2bf366c5701f5e0b2515fa5bf6cd3354feb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64c8f6e2781eb4ccfa97eb8ece27163d414404dd8f5814b1dc9ad5193995eed3e98a43fd171788900bd6f4ae3b6bf62c44972e77fb6e2ab76caca35a9e565703
|
7
|
+
data.tar.gz: d4e0cccb5de89111a18a0cc31c3ce41f4444bef576e4335201f5101ce99427269f6ea04d920a134773120737afbd54fadc6f747103ecea801c8cd65dbf8000b2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
Pry Theme changelog
|
2
2
|
===================
|
3
3
|
|
4
|
+
### master
|
5
|
+
|
6
|
+
### v1.2.0 (January 16, 2016)
|
7
|
+
|
8
|
+
* **IMPORTANT:** dropped support for Ruby <2.0
|
9
|
+
([#51](https://github.com/kyrylo/pry-theme/pull/51))
|
10
|
+
* Started depending on stock JSON library (no more dependency on the `json` gem)
|
11
|
+
([#49](https://github.com/kyrylo/pry-theme/pull/51))
|
12
|
+
* Fixed warnings on Ruby 2.4.0+ with regard to Fixnum
|
13
|
+
([#50](https://github.com/kyrylo/pry-theme/pull/51))
|
14
|
+
|
4
15
|
### v1.1.3 (July 21, 2014)
|
5
16
|
|
6
17
|
* Re-fixed broken behaviour of Pry. It's a temporary hack, to be removed on the
|
data/LICENSE
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/pry-theme/color.rb
CHANGED
@@ -394,8 +394,8 @@ module PryTheme
|
|
394
394
|
case (color_id = cast_color(layer))
|
395
395
|
when String
|
396
396
|
return color_id if colors.has_key?(color_id)
|
397
|
-
when
|
398
|
-
color_id =
|
397
|
+
when Integer
|
398
|
+
color_id = find_from_integer(color_id)
|
399
399
|
return color_id if color_id
|
400
400
|
when false
|
401
401
|
return color_id
|
@@ -98,7 +98,7 @@ module PryTheme
|
|
98
98
|
if decl_has_bg_key?
|
99
99
|
@bg = f[:bg]
|
100
100
|
@color_decl.shift
|
101
|
-
elsif f.is_a?(String) || f.is_a?(
|
101
|
+
elsif f.is_a?(String) || f.is_a?(Integer)
|
102
102
|
@fg = @color_decl.shift
|
103
103
|
else
|
104
104
|
build_effects
|
@@ -112,7 +112,7 @@ module PryTheme
|
|
112
112
|
|
113
113
|
def decl_contains_rgb?
|
114
114
|
l = @color_decl.last
|
115
|
-
l.size == 3 && l.all? { |decl| decl.is_a?(
|
115
|
+
l.size == 3 && l.all? { |decl| decl.is_a?(Integer) }
|
116
116
|
end
|
117
117
|
|
118
118
|
end
|
data/lib/pry-theme/rgb.rb
CHANGED
@@ -174,7 +174,7 @@ module PryTheme
|
|
174
174
|
# @return [void]
|
175
175
|
def validate_array(ary)
|
176
176
|
correct_size = ary.size.equal?(3)
|
177
|
-
correct_vals = ary.all?{ |val| val.is_a?(
|
177
|
+
correct_vals = ary.all?{ |val| val.is_a?(Integer) && val.between?(0, 255) }
|
178
178
|
return true if correct_size && correct_vals
|
179
179
|
raise ArgumentError,
|
180
180
|
%|invalid value for PryTheme::RGB#validate_array(): "#{ ary }"|
|
data/lib/pry-theme/term.rb
CHANGED
@@ -37,9 +37,9 @@ module PryTheme
|
|
37
37
|
# at all
|
38
38
|
# @return [void]
|
39
39
|
def validate_attrs(value, color_model)
|
40
|
-
|
40
|
+
integers = value.is_a?(Integer) && color_model.is_a?(Integer)
|
41
41
|
correct_term =
|
42
|
-
if
|
42
|
+
if integers
|
43
43
|
case color_model
|
44
44
|
when 256 then value.between?(0, 255)
|
45
45
|
when 16 then value.between?(0, 15)
|
@@ -50,9 +50,9 @@ module PryTheme
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
return true if
|
53
|
+
return true if integers && correct_term
|
54
54
|
|
55
|
-
unless
|
55
|
+
unless integers
|
56
56
|
raise TypeError, "can't convert #{ value.class } into PryTheme::TERM"
|
57
57
|
end
|
58
58
|
|
data/pry-theme.gemspec
CHANGED
@@ -5,14 +5,13 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.summary = 'An easy way to customize Pry colors via theme files'
|
6
6
|
s.description = 'The plugin enables color theme support for Pry.'
|
7
7
|
s.author = 'Kyrylo Silin'
|
8
|
-
s.email = '
|
8
|
+
s.email = 'silin@kyrylo.org'
|
9
9
|
s.homepage = 'https://github.com/kyrylo/pry-theme'
|
10
10
|
s.licenses = 'zlib'
|
11
11
|
|
12
12
|
s.require_path = 'lib'
|
13
13
|
s.files = `git ls-files`.split("\n")
|
14
14
|
|
15
|
-
s.add_dependency 'json', '~> 1.8'
|
16
15
|
s.add_dependency 'coderay', '~> 1.1'
|
17
16
|
|
18
17
|
s.add_development_dependency 'bundler', '~> 1.0'
|
data/spec/term_spec.rb
CHANGED
data/spec/theme_spec.rb
CHANGED
@@ -308,7 +308,7 @@ describe PryTheme::Theme do
|
|
308
308
|
it "works with all options :-)" do
|
309
309
|
lambda {
|
310
310
|
PryTheme.create(:name => 'wholesome', :color_model => 8) {
|
311
|
-
author :name => 'Kyrylo Silin', :email => '
|
311
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
312
312
|
description 'a kool theme!'
|
313
313
|
define_theme {
|
314
314
|
class_ 'magenta'
|
data/themes/github.prytheme.rb
CHANGED
data/themes/monokai.prytheme.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-classic-16', :color_model => 16 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'The default Pry Theme for terminals with average color support'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-classic-8', :color_model => 8 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'The default Pry Theme for terminals with poor color support'
|
4
4
|
|
5
5
|
define_theme do
|
data/themes/pry-cold.prytheme.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-cold' do
|
2
2
|
author :name => 'John Mair'
|
3
|
-
author :name => 'Kyrylo Silin', :email => '
|
3
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
4
4
|
description 'Based on Charcoalblack theme from Emacs'
|
5
5
|
|
6
6
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-love-16', :color_model => 16 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'Adds the love, expressed in 16 colors'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-siberia-16', :color_model => 16 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'This one reminds me of the cold Siberia...'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-siberia-8', :color_model => 8 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'This one reminds me of the cold Siberia... (just a tad)'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-zealand-16', :color_model => 16 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'Feel the presence of green, ecologic and flourishing New Zealand in your terminal'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,5 +1,5 @@
|
|
1
1
|
t = PryTheme.create :name => 'pry-zealand-8', :color_model => 8 do
|
2
|
-
author :name => 'Kyrylo Silin', :email => '
|
2
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
3
3
|
description 'Feel the presence of New Zealand in your terminal'
|
4
4
|
|
5
5
|
define_theme do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
t = PryTheme.create :name => 'railscasts' do
|
2
2
|
author :name => 'Ryan Fitzgerald'
|
3
3
|
author :name => 'John Mair'
|
4
|
-
author :name => 'Kyrylo Silin', :email => '
|
4
|
+
author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
|
5
5
|
description 'The famous RailsCasts theme'
|
6
6
|
|
7
7
|
define_theme do
|
data/themes/zenburn.prytheme.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyrylo Silin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: json
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.8'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.8'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: coderay
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +39,7 @@ dependencies:
|
|
53
39
|
- !ruby/object:Gem::Version
|
54
40
|
version: '1.0'
|
55
41
|
description: The plugin enables color theme support for Pry.
|
56
|
-
email:
|
42
|
+
email: silin@kyrylo.org
|
57
43
|
executables: []
|
58
44
|
extensions: []
|
59
45
|
extra_rdoc_files: []
|
@@ -149,9 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
135
|
version: '0'
|
150
136
|
requirements: []
|
151
137
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.6.8
|
153
139
|
signing_key:
|
154
140
|
specification_version: 4
|
155
141
|
summary: An easy way to customize Pry colors via theme files
|
156
142
|
test_files: []
|
157
|
-
has_rdoc:
|