pry-theme 1.1.3 → 1.2.0

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
2
  SHA1:
3
- metadata.gz: 2d3228d9bccf6be12a55dfe7aa6f377d533f6c76
4
- data.tar.gz: 3e60c733c36807b468d792f481a50bae093af8aa
3
+ metadata.gz: cf0ebf03b6c84bdc2fa53a33186f8a69f4e39969
4
+ data.tar.gz: 467b2bf366c5701f5e0b2515fa5bf6cd3354feb8
5
5
  SHA512:
6
- metadata.gz: 5b50a60935e2495d7d95f90fbb684d7632070bbeb72e4c973bb7ce82eaacefba91f030db6b8709cc2b4e466b7c7695c932921e1046232cd85a50e830fba80945
7
- data.tar.gz: 57c7822fb1a4f77864c5799f66311ad2ba5a2a580a059ac66d1f15a045a940363635485fea9e6e4bad655cf00550115c715106832bf125b048898ff0146bfb7f
6
+ metadata.gz: 64c8f6e2781eb4ccfa97eb8ece27163d414404dd8f5814b1dc9ad5193995eed3e98a43fd171788900bd6f4ae3b6bf62c44972e77fb6e2ab76caca35a9e565703
7
+ data.tar.gz: d4e0cccb5de89111a18a0cc31c3ce41f4444bef576e4335201f5101ce99427269f6ea04d920a134773120737afbd54fadc6f747103ecea801c8cd65dbf8000b2
@@ -1,12 +1,15 @@
1
1
  rvm:
2
- - 1.9.2
3
- - 1.9.3
4
- - 2.0.0
2
+ - 2.0
5
3
  - 2.1
4
+ - 2.2
5
+ - 2.3
6
+ - 2.4.0
6
7
  - ruby-head
7
- - rbx-2
8
- - jruby
9
- - jruby-head
8
+ - jruby-9.1.5.0
9
+
10
+ matrix:
11
+ allow_failures:
12
+ - rvm: ruby-head
10
13
 
11
14
  script:
12
15
  - rake spec
@@ -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
@@ -1,4 +1,4 @@
1
- Copyright (C) 2012 Kyrylo Silin
1
+ Copyright (C) 2017 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.1.3
1
+ 1.2.0
@@ -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 Fixnum
398
- color_id = find_from_fixnum(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
@@ -23,7 +23,7 @@ module PryTheme
23
23
  []
24
24
  end
25
25
 
26
- def find_from_fixnum(color_id)
26
+ def find_from_integer(color_id)
27
27
  sorted_colors.each_with_index.to_a.rassoc(color_id).first.first
28
28
  end
29
29
 
@@ -21,7 +21,7 @@ module PryTheme
21
21
  ['48', '5', background]
22
22
  end
23
23
 
24
- def find_from_fixnum(color_id)
24
+ def find_from_integer(color_id)
25
25
  pair = colors.find { |*term| term.first.flatten.include?(color_id) }
26
26
  pair.first if pair
27
27
  end
@@ -19,7 +19,7 @@ module PryTheme
19
19
  [background]
20
20
  end
21
21
 
22
- def find_from_fixnum(color_id)
22
+ def find_from_integer(color_id)
23
23
  sorted_colors.each_with_index.to_a.rassoc(color_id).first.first
24
24
  end
25
25
 
@@ -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?(Fixnum)
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?(Fixnum) }
115
+ l.size == 3 && l.all? { |decl| decl.is_a?(Integer) }
116
116
  end
117
117
 
118
118
  end
@@ -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?(Fixnum) && val.between?(0, 255) }
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 }"|
@@ -37,9 +37,9 @@ module PryTheme
37
37
  # at all
38
38
  # @return [void]
39
39
  def validate_attrs(value, color_model)
40
- fixnums = value.is_a?(Fixnum) && color_model.is_a?(Fixnum)
40
+ integers = value.is_a?(Integer) && color_model.is_a?(Integer)
41
41
  correct_term =
42
- if fixnums
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 fixnums && correct_term
53
+ return true if integers && correct_term
54
54
 
55
- unless fixnums
55
+ unless integers
56
56
  raise TypeError, "can't convert #{ value.class } into PryTheme::TERM"
57
57
  end
58
58
 
@@ -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 = 'kyrylosilin@gmail.com'
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'
@@ -3,7 +3,7 @@ require 'helper'
3
3
  describe PryTheme::TERM do
4
4
  TERM = PryTheme::TERM
5
5
 
6
- it "represents itself as Fixnum" do
6
+ it "represents itself as Integer" do
7
7
  TERM.new(23).to_i.should == 23
8
8
  end
9
9
 
@@ -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 => 'kyrylosilin@gmail.com'
311
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
312
312
  description 'a kool theme!'
313
313
  define_theme {
314
314
  class_ 'magenta'
@@ -1,6 +1,6 @@
1
1
  t = PryTheme.create :name => 'github' do
2
2
  author :name => 'John Mair'
3
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
3
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
4
4
  description 'Based on GitHub theme'
5
5
 
6
6
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'monokai' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description "Based on Wimer Hazenberg's theme"
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-classic-16', :color_model => 16 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
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-256' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'The default Pry Theme'
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 => 'kyrylosilin@gmail.com'
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
@@ -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 => 'kyrylosilin@gmail.com'
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 => 'kyrylosilin@gmail.com'
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-love-8', :color_model => 8 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Adds the love, expressed in 8 colors'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-modern-16', :color_model => 16 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Simplied version of pry-modern-256'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-modern-256' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Nifty version of pry-classic'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-modern-8', :color_model => 8 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Simplied version of pry-modern-16'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-monochrome' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'For people who hate 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 => 'kyrylosilin@gmail.com'
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 => 'kyrylosilin@gmail.com'
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-tepid-16', :color_model => 16 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Warm colors with warm soul'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'pry-tepid-8', :color_model => 8 do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Warm colors with warm soul'
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 => 'kyrylosilin@gmail.com'
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 => 'kyrylosilin@gmail.com'
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 => 'kyrylosilin@gmail.com'
4
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
5
5
  description 'The famous RailsCasts theme'
6
6
 
7
7
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'solarized' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'Precision colors for machines and people'
4
4
 
5
5
  define_theme do
@@ -1,5 +1,5 @@
1
1
  t = PryTheme.create :name => 'zenburn' do
2
- author :name => 'Kyrylo Silin', :email => 'kyrylosilin@gmail.com'
2
+ author :name => 'Kyrylo Silin', :email => 'silin@kyrylo.org'
3
3
  description 'A low-contrast color scheme'
4
4
 
5
5
  define_theme do
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.1.3
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: 2014-07-21 00:00:00.000000000 Z
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: kyrylosilin@gmail.com
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.2.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: