spirit_hands 2.1.10-universal-java-12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.pryrc +1 -0
  4. data/.ruby-gemset +1 -0
  5. data/CHANGELOG.md +150 -0
  6. data/CONTRIBUTING.md +18 -0
  7. data/CONTRIBUTORS.md +12 -0
  8. data/Gemfile +3 -0
  9. data/LICENSE.md +22 -0
  10. data/README.md +153 -0
  11. data/Rakefile +128 -0
  12. data/gem-public_cert.pem +31 -0
  13. data/lib/spirit_hands.rb +20 -0
  14. data/lib/spirit_hands/hirb.rb +2 -0
  15. data/lib/spirit_hands/hirb/fixes.rb +5 -0
  16. data/lib/spirit_hands/hirb/fixes/enabled.rb +36 -0
  17. data/lib/spirit_hands/hirb/fixes/pager.rb +157 -0
  18. data/lib/spirit_hands/hirb/fixes/util.rb +19 -0
  19. data/lib/spirit_hands/hirb/fixes/view.rb +11 -0
  20. data/lib/spirit_hands/mattr_accessor_with_default.rb +44 -0
  21. data/lib/spirit_hands/melody.rb +68 -0
  22. data/lib/spirit_hands/options.rb +99 -0
  23. data/lib/spirit_hands/options/color.rb +10 -0
  24. data/lib/spirit_hands/options/coolline.rb +60 -0
  25. data/lib/spirit_hands/options/hirb.rb +34 -0
  26. data/lib/spirit_hands/options/less.rb +2 -0
  27. data/lib/spirit_hands/options/less/colorize.rb +41 -0
  28. data/lib/spirit_hands/options/less/show_raw_unicode.rb +36 -0
  29. data/lib/spirit_hands/print.rb +76 -0
  30. data/lib/spirit_hands/prompt.rb +12 -0
  31. data/lib/spirit_hands/prompt/base.rb +25 -0
  32. data/lib/spirit_hands/prompt/base/render.rb +239 -0
  33. data/lib/spirit_hands/prompt/main.rb +18 -0
  34. data/lib/spirit_hands/prompt/multiline.rb +17 -0
  35. data/lib/spirit_hands/railtie.rb +11 -0
  36. data/lib/spirit_hands/terminal.rb +16 -0
  37. data/lib/spirit_hands/version.rb +3 -0
  38. data/note.txt +2 -0
  39. data/spirit_hands.gemspec +39 -0
  40. metadata +202 -0
@@ -0,0 +1,18 @@
1
+ require 'spirit_hands/prompt/base'
2
+
3
+ module SpiritHands
4
+ module Prompt
5
+ class << self
6
+ private
7
+
8
+ # Normal, main pry prompt
9
+ def main
10
+ ->(object, level, pry) do
11
+ s = State.new(object, level, pry, ::SpiritHands.app, false)
12
+ color = ::SpiritHands.color && ::SpiritHands.colored_prompt
13
+ render(s, ::SpiritHands.prompt, color)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ require 'spirit_hands/prompt/base'
2
+
3
+ module SpiritHands
4
+ module Prompt
5
+ class << self
6
+ private
7
+
8
+ # Wait pry prompt in multiline input
9
+ def multiline
10
+ ->(object, level, pry) {
11
+ s = State.new(object, level, pry, ::SpiritHands.app, true)
12
+ render(s, ::SpiritHands.prompt, ::SpiritHands.color && ::SpiritHands.colored_prompt)
13
+ }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ class Railtie < Rails::Railtie
2
+ initializer 'spirit_hands.initialize' do |app|
3
+ @@app = app
4
+ end
5
+
6
+ config.after_initialize do
7
+ silence_warnings do
8
+ ::SpiritHands.melody!(@@app)
9
+ end
10
+ end
11
+ end # Railtie
@@ -0,0 +1,16 @@
1
+ module SpiritHands
2
+ module Terminal
3
+ class << self
4
+ LOCALE_ENV_VARS = %w[LANG LC_ALL LC_TYPE LC_CTYPE].freeze.tap { |x| x.each(&:freeze) }
5
+ ENV_UNICODE_REGEX = /.*utf.*8/i.freeze
6
+ NON_UNICODE_TERMINALS = %w[linux xterm xterm-color GLterm].freeze
7
+
8
+ def unicode?
9
+ return false if defined? RbReadline
10
+ return false if NON_UNICODE_TERMINALS.include? ENV['TERM']
11
+ return true if ::Gem.win_platform?
12
+ LOCALE_ENV_VARS.any? { |v| ENV[v] =~ ENV_UNICODE_REGEX }
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,3 @@
1
+ module SpiritHands
2
+ VERSION = '2.1.10'
3
+ end
data/note.txt ADDED
@@ -0,0 +1,2 @@
1
+ pry-inline is currently broken ;(
2
+ https://github.com/seikichi/pry-inline/issues/1
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ $:.unshift File.expand_path('../lib', __FILE__)
4
+ require 'spirit_hands/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'spirit_hands'
8
+ gem.version = SpiritHands::VERSION
9
+ gem.author = 'Barry Allard'
10
+ gem.email = 'barry.allard [at] gmail [dot] com'
11
+ gem.license = 'MIT'
12
+ gem.homepage = 'https://github.com/steakknife/spirit_hands'
13
+ gem.summary = 'Exercise those fingers. Pry-based enhancements for the default Rails console.'
14
+ gem.description = "Spending hours in the rails console? Spruce it up and show off those hard-working hands! spirit_hands replaces IRB with Pry, improves output through awesome_print, and has some other goodies up its sleeves."
15
+
16
+ gem.executables = `git ls-files -z -- bin/*`.split("\0")
17
+ .select { |f| File.executable?(f) }
18
+ .map{ |f| File.basename(f) }
19
+ gem.files = `git ls-files -z`.split("\0")
20
+ gem.test_files = `git ls-files -z -- {test,spec,features}/*`.split("\0")
21
+
22
+ # Dependencies
23
+ gem.required_ruby_version = '>= 2.0'
24
+ gem.add_runtime_dependency 'pry', '~> 0.10'
25
+ gem.add_runtime_dependency 'pry-rails', '~> 0.3'
26
+ gem.add_runtime_dependency 'pry-doc', '>= 0.8', '< 2'
27
+ if RUBY_PLATFORM =~ /java/
28
+ gem.platform = Gem::Platform::CURRENT
29
+ gem.add_runtime_dependency 'pry-nav', '~> 0.2.4'
30
+ else
31
+ gem.add_runtime_dependency 'pry-byebug', '~> 3.4'
32
+ end
33
+ $stderr.puts "spirit_hands: gem.platform = #{gem.platform}, RUBY_PLATFORM = #{RUBY_PLATFORM}"
34
+ gem.add_runtime_dependency 'hirb', '~> 0.7'
35
+ gem.add_runtime_dependency 'hirb-unicode-steakknife', '~> 0.0'
36
+ gem.add_runtime_dependency 'pry-coolline', '~> 0.2'
37
+ gem.add_runtime_dependency 'awesome_print', '~> 1.6'
38
+ end
39
+ .tap {|gem| pk = File.expand_path(File.join('~/.keys', 'gem-private_key.pem')); gem.signing_key = pk if File.exist? pk; gem.cert_chain = ['gem-public_cert.pem']} # pressed firmly by waxseal
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spirit_hands
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.10
5
+ platform: universal-java-12
6
+ authors:
7
+ - Barry Allard
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - gem-public_cert.pem
12
+ date: 2019-09-07 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.10'
20
+ name: pry
21
+ prerelease: false
22
+ type: :runtime
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '0.10'
28
+ - !ruby/object:Gem::Dependency
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.3'
34
+ name: pry-rails
35
+ prerelease: false
36
+ type: :runtime
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.3'
42
+ - !ruby/object:Gem::Dependency
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0.8'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '2'
51
+ name: pry-doc
52
+ prerelease: false
53
+ type: :runtime
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0.8'
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '2'
62
+ - !ruby/object:Gem::Dependency
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.2.4
68
+ name: pry-nav
69
+ prerelease: false
70
+ type: :runtime
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.2.4
76
+ - !ruby/object:Gem::Dependency
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0.7'
82
+ name: hirb
83
+ prerelease: false
84
+ type: :runtime
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.7'
90
+ - !ruby/object:Gem::Dependency
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.0'
96
+ name: hirb-unicode-steakknife
97
+ prerelease: false
98
+ type: :runtime
99
+ version_requirements: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.0'
104
+ - !ruby/object:Gem::Dependency
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.2'
110
+ name: pry-coolline
111
+ prerelease: false
112
+ type: :runtime
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.2'
118
+ - !ruby/object:Gem::Dependency
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '1.6'
124
+ name: awesome_print
125
+ prerelease: false
126
+ type: :runtime
127
+ version_requirements: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '1.6'
132
+ description: Spending hours in the rails console? Spruce it up and show off those
133
+ hard-working hands! spirit_hands replaces IRB with Pry, improves output through
134
+ awesome_print, and has some other goodies up its sleeves.
135
+ email: barry.allard [at] gmail [dot] com
136
+ executables: []
137
+ extensions: []
138
+ extra_rdoc_files: []
139
+ files:
140
+ - ".gitignore"
141
+ - ".pryrc"
142
+ - ".ruby-gemset"
143
+ - CHANGELOG.md
144
+ - CONTRIBUTING.md
145
+ - CONTRIBUTORS.md
146
+ - Gemfile
147
+ - LICENSE.md
148
+ - README.md
149
+ - Rakefile
150
+ - gem-public_cert.pem
151
+ - lib/spirit_hands.rb
152
+ - lib/spirit_hands/hirb.rb
153
+ - lib/spirit_hands/hirb/fixes.rb
154
+ - lib/spirit_hands/hirb/fixes/enabled.rb
155
+ - lib/spirit_hands/hirb/fixes/pager.rb
156
+ - lib/spirit_hands/hirb/fixes/util.rb
157
+ - lib/spirit_hands/hirb/fixes/view.rb
158
+ - lib/spirit_hands/mattr_accessor_with_default.rb
159
+ - lib/spirit_hands/melody.rb
160
+ - lib/spirit_hands/options.rb
161
+ - lib/spirit_hands/options/color.rb
162
+ - lib/spirit_hands/options/coolline.rb
163
+ - lib/spirit_hands/options/hirb.rb
164
+ - lib/spirit_hands/options/less.rb
165
+ - lib/spirit_hands/options/less/colorize.rb
166
+ - lib/spirit_hands/options/less/show_raw_unicode.rb
167
+ - lib/spirit_hands/print.rb
168
+ - lib/spirit_hands/prompt.rb
169
+ - lib/spirit_hands/prompt/base.rb
170
+ - lib/spirit_hands/prompt/base/render.rb
171
+ - lib/spirit_hands/prompt/main.rb
172
+ - lib/spirit_hands/prompt/multiline.rb
173
+ - lib/spirit_hands/railtie.rb
174
+ - lib/spirit_hands/terminal.rb
175
+ - lib/spirit_hands/version.rb
176
+ - note.txt
177
+ - spirit_hands.gemspec
178
+ homepage: https://github.com/steakknife/spirit_hands
179
+ licenses:
180
+ - MIT
181
+ metadata: {}
182
+ post_install_message:
183
+ rdoc_options: []
184
+ require_paths:
185
+ - lib
186
+ required_ruby_version: !ruby/object:Gem::Requirement
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: '2.0'
191
+ required_rubygems_version: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0'
196
+ requirements: []
197
+ rubyforge_project:
198
+ rubygems_version: 2.7.9
199
+ signing_key:
200
+ specification_version: 4
201
+ summary: Exercise those fingers. Pry-based enhancements for the default Rails console.
202
+ test_files: []