spirit_hands 2.0.8-java

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.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/.gitignore +17 -0
  4. data/.pryrc +1 -0
  5. data/.ruby-gemset +1 -0
  6. data/CHANGELOG.md +147 -0
  7. data/CONTRIBUTING.md +18 -0
  8. data/CONTRIBUTORS.md +10 -0
  9. data/Gemfile +3 -0
  10. data/LICENSE.md +22 -0
  11. data/README.md +138 -0
  12. data/Rakefile +127 -0
  13. data/gem-public_cert.pem +32 -0
  14. data/lib/spirit_hands/hirb/fixes/enabled.rb +36 -0
  15. data/lib/spirit_hands/hirb/fixes/pager.rb +144 -0
  16. data/lib/spirit_hands/hirb/fixes/util.rb +19 -0
  17. data/lib/spirit_hands/hirb/fixes/view.rb +10 -0
  18. data/lib/spirit_hands/hirb/fixes.rb +5 -0
  19. data/lib/spirit_hands/hirb.rb +2 -0
  20. data/lib/spirit_hands/mattr_accessor_with_default.rb +44 -0
  21. data/lib/spirit_hands/melody.rb +24 -0
  22. data/lib/spirit_hands/options/color.rb +10 -0
  23. data/lib/spirit_hands/options/hirb.rb +34 -0
  24. data/lib/spirit_hands/options/less/colorize.rb +41 -0
  25. data/lib/spirit_hands/options/less/show_raw_unicode.rb +36 -0
  26. data/lib/spirit_hands/options/less.rb +2 -0
  27. data/lib/spirit_hands/options.rb +59 -0
  28. data/lib/spirit_hands/print.rb +75 -0
  29. data/lib/spirit_hands/prompt/base/render.rb +231 -0
  30. data/lib/spirit_hands/prompt/base.rb +24 -0
  31. data/lib/spirit_hands/prompt/main.rb +18 -0
  32. data/lib/spirit_hands/prompt/multiline.rb +17 -0
  33. data/lib/spirit_hands/prompt.rb +12 -0
  34. data/lib/spirit_hands/railtie.rb +7 -0
  35. data/lib/spirit_hands/terminal.rb +16 -0
  36. data/lib/spirit_hands/version.rb +3 -0
  37. data/lib/spirit_hands.rb +21 -0
  38. data/spirit_hands.gemspec +42 -0
  39. data.tar.gz.sig +0 -0
  40. metadata +239 -0
  41. metadata.gz.sig +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fc59fcb7de58013daece9410f638701901229b5f
4
+ data.tar.gz: 534b03a9b36efe5728e8ed5b088fe165a5afbf79
5
+ SHA512:
6
+ metadata.gz: 0c92c427cc8368a198a335c8398b7afcd7d3776708b7e943ab800931fd6fda39db941069b07ff9a7fc8e6e5ca710777988114986bf732543e66018c304813d2d
7
+ data.tar.gz: 7bbe0d9edf9b122ac2a27445546b73a03b984b4b77cc742438b9d5b6c3d9c007d50990bc338bd402f39cf9bf9bc2b858d752772ab00b8adcf9ac8168267cc9da
checksums.yaml.gz.sig ADDED
Binary file
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/.pryrc ADDED
@@ -0,0 +1 @@
1
+ require 'spirit_hands'
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ jazz_fingers
data/CHANGELOG.md ADDED
@@ -0,0 +1,147 @@
1
+ ## 2.0.0 (2015-05-27)
2
+ * Way more configurable
3
+
4
+ ## 1.0.0 (2015-02-05)
5
+ * Downgrade [pry-byebug][pry-byebug] to v1.3.3
6
+
7
+ ## 0.5.5 (2015-02-03)
8
+
9
+ * Update [pry-byebug][pry-byebug] to v2.0.0
10
+ * Update [awesome_print][awesome_print] to v1.6.1
11
+
12
+ ## 0.5.4 (2014-11-06)
13
+
14
+ * Remove [pry-stack_explorer][pry-stack_explorer]
15
+
16
+ ## 0.5.3 (2014-11-04)
17
+
18
+ * Using [pry-byebug][pry-byebug] to use ruby >= 2.0.0.
19
+ * Switched [coolline][coolline] with [pry-coolline][pry-coolline]
20
+ * Upgrade [pry][pry] to 0.10, [pry-doc][pry-doc] to 0.6
21
+ * Rename to `SpiritHands` to allow releasing.
22
+
23
+ ## 0.5.2 (2013-10-24)
24
+
25
+ * Upgrade [pry-rails][pry-rails] to the latest 0.3.2,
26
+ [awesome_print][awesome_print] to 1.2 and loosen it's dependency, and removed
27
+ [coderay][coderay] as an explicit dependency since [pry][pry] already includes
28
+ it.
29
+
30
+ ## 0.5.1 (2013-06-28)
31
+
32
+ * Upgrade [pry-rails][pry-rails] to the latest 0.3.1, [pry-doc][pry-doc] 0.4.6,
33
+ [coolline][coolline] 0.4.2.
34
+
35
+
36
+ ## 0.5.0 (2013-03-13)
37
+
38
+ * Rails 4, Ruby 2.0.0 compatibility.
39
+ * Upgrade [pry][pry] to the latest 0.9.12,
40
+ [pry-stack_explorer][pry-stack_explorer] 0.4.9, [pry-remote][pry-remote]
41
+ 0.1.7, [pry-debugger][pry-debugger] 0.2.2, [hirb][hirb] 0.7.1,
42
+ [coderay][coderay] 1.0.9.
43
+
44
+
45
+ ## 0.4.0 (2012-12-27)
46
+
47
+ * Add [pry-rails][pry-rails] 0.2.2 for maintained console hooks and new
48
+ `show-routes`, `show-models`, and `show-middleware` commands.
49
+ * Add `SpiritHands.colored_prompt` and `SpiritHands.prompt_separator` options.
50
+ Detect readline library to turn off incompatible colored prompt or Unicode
51
+ prompt separator where appropriate. Fixes #1 and #2.
52
+ * Upgrade [pry][pry] to the latest 0.9.10, [pry-doc][pry-doc] 0.4.4,
53
+ [pry-stack_explorer][pry-stack_explorer] 0.4.7, [pry-remote][pry-remote]
54
+ 0.1.6, [pry-debugger][pry-debugger] 0.2.1, [hirb][hirb] 0.7.0,
55
+ [Coolline][coolline] 0.4.0, [coderay][coderay] 1.0.8,
56
+ [awesome_print][awesome_print] 1.1.0. Fixes #4.
57
+
58
+ ## 0.3.1 (2012-06-11)
59
+
60
+ * Upgrade [pry-debugger][pry-debugger] to 0.2.0.
61
+
62
+ ## 0.3.0 (2012-06-07)
63
+
64
+ * Replace [pry-nav][pry-nav] with [pry-debugger][pry-debugger] for improved
65
+ performance and no segfaults. `SpiritHands.enable_pry_nav` removed.
66
+ * Upgrade [pry][pry] to the latest 0.9.9, [pry-doc][pry-doc] 0.4.2,
67
+ [pry-git][pry-git] 0.2.3, [pry-stack_explorer][pry-stack_explorer] 0.4.2,
68
+ [pry-remote][pry-remote] 0.1.4, [coderay][coderay] 1.0.6.
69
+
70
+ ## 0.2.0 (2012-03-19)
71
+
72
+ * Add [pry-stack_explorer][pry-stack_explorer] 0.4.1.
73
+ * Upgrade [pry-remote][pry-remote] to 0.1.1 and [pry-nav][pry-nav] to 0.2.0.
74
+ * Upgrade recommended gem minor versions: [pry][pry] 0.9.8.4, [pry-doc][pry-doc]
75
+ 0.4.1, [hirb][hirb] 0.6.2, and [coderay][coderay] 1.0.5.
76
+
77
+ ## 0.1.2 (2012-01-23)
78
+
79
+ * Improved Rails 3.2 compatibility. Console methods like `app`, `new_session`,
80
+ `reload!`, `helper`, and `controller` work as expected.
81
+
82
+ ## 0.1.1 (2012-01-20)
83
+
84
+ * Rails 3.2 compatibility
85
+
86
+ ## 0.1.0 (2012-01-04)
87
+
88
+ * For performance, enable [pry-nav][pry-nav] only on MRI 1.9.3 by default. To
89
+ use on MRI 1.9.2, add `SpiritHands.enable_pry_nav` to a Rails initializer.
90
+ * Due to buggy behavior, syntax highlighting as you type via
91
+ [Coolline][coolline] and [Coderay][coderay] is disabled by default. Enable
92
+ with `SpiritHands.enable_syntax_highlighting_as_you_type` in a Rails
93
+ initializer. MRI 1.9.3 only.
94
+ * Fix [Hirb][hirb] support.
95
+ * Upgrade [awesome_print][awesome_print] to 1.0.2.
96
+
97
+ ## 0.0.6 (2011-12-03)
98
+
99
+ * Add line numbers to the prompt for easy reference when using `_in_` and
100
+ `_out`.
101
+ * Upgrade [pry-nav][pry-nav] to 0.0.4.
102
+
103
+
104
+ ## 0.0.5 (2011-12-01)
105
+
106
+ * Add [Hirb][hirb] support. Enable with `Hirb.enable` in the console.
107
+ * Upgrade [pry-nav][pry-nav] to 0.0.3.
108
+
109
+
110
+ ## 0.0.4 (2011-11-30)
111
+
112
+ * Add explicit requires for pry plugin gems.
113
+
114
+
115
+ ## 0.0.3 (2011-11-30)
116
+
117
+ * Add [pry-nav][pry-nav].
118
+ * Upgrade [awesome_print][awesome_print] to 1.0.1.
119
+
120
+
121
+ ## 0.0.2 (2011-11-25)
122
+
123
+ * Add [pry-doc][pry-doc].
124
+
125
+
126
+ ## 0.0.1 (2011-11-25)
127
+
128
+ * First release. Combine [pry][pry], [awesome_print][awesome_print],
129
+ [coolline][coolline] + [coderay][coderay], [pry-remote][pry-remote],
130
+ [pry-git][pry-git]. Bit of glue to replace IRB with pry in Rails console,
131
+ pretty colors.
132
+
133
+
134
+ [pry]: http://pry.github.com
135
+ [awesome_print]: https://github.com/michaeldv/awesome_print
136
+ [pry-doc]: https://github.com/pry/pry-doc
137
+ [pry-git]: https://github.com/pry/pry-git
138
+ [pry-nav]: https://github.com/nixme/pry-nav
139
+ [pry-remote]: https://github.com/Mon-Ouie/pry-remote
140
+ [coolline]: https://github.com/Mon-Ouie/coolline
141
+ [pry-coolline]: https://github.com/pry/pry-coolline
142
+ [coderay]: https://github.com/rubychan/coderay
143
+ [hirb]: https://github.com/cldwalker/hirb
144
+ [pry-stack_explorer]: https://github.com/pry/pry-stack_explorer
145
+ [pry-debugger]: https://github.com/nixme/pry-debugger
146
+ [pry-rails]: https://github.com/rweng/pry-rails
147
+ [pry-byebug]: https://github.com/deivid-rodriguez/pry-byebug
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,18 @@
1
+ ## Getting Involved
2
+
3
+ New contributors are always welcome, when it doubt please ask questions. We strive to be an open and welcoming community. Please be nice to one another.
4
+
5
+ ### Coding
6
+
7
+ * Pick a task:
8
+ * Offer feedback on open [pull requests](https://github.com/plribeiro3000/spirit_hands/pulls).
9
+ * Review open [issues](https://github.com/plribeiro3000/spirit_hands/issues) for things to help on.
10
+ * [Create an issue](https://github.com/plribeiro3000/spirit_hands/issues/new) to start a discussion on additions or features.
11
+ * Fork the project, add your changes and tests to cover them in a topic branch.
12
+ * Commit your changes and rebase against `plribeiro3000/spirit_hands` to ensure everything is up to date.
13
+ * [Submit a pull request](https://github.com/plribeiro3000/spirit_hands/compare/)
14
+
15
+ ### Non-Coding
16
+
17
+ * Offer feedback on open [issues](https://github.com/plribeiro3000/spirit_hands/issues).
18
+ * Organize or volunteer at events.
data/CONTRIBUTORS.md ADDED
@@ -0,0 +1,10 @@
1
+ # Original Author
2
+ * Gopal Patel <nixme@stillhope.com>
3
+
4
+ # Contributors
5
+ * Andrew Volozhanin <linuxheadrus@gmail.com>
6
+ * Casey Lang <hello@casey-lang.com>
7
+ * Fernando Paredes <nano@fdp.io>
8
+ * Micah Gates <github@mgates.com>
9
+ * Paulo Henrique Lopes Ribeiro <plribeiro3000@gmail.com>
10
+ * Barry Allard <barry.allard@gmail.com>
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2015 [**Contributors**](Contributors)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ [Contributors]: https://raw.githubusercontent.com/steakknife/spirit_hands/master/CONTRIBUTORS.md
data/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # Spirit Hands
2
+
3
+ This repo is an improved fork with real configuration syntax, with updates and bug fixes based on [`jazz_hands`](https://github.com/nixme/jazz_hands).
4
+
5
+ Spending hours in the rails console? Spruce it up and show off those
6
+ hard-working hands!
7
+
8
+ **spirit_hands** is an opinionated set of console-related gems and a bit of glue:
9
+
10
+ * [**Pry**][pry] for a powerful shell alternative to IRB.
11
+ * [**Awesome Print**][awesome_print] for stylish pretty print.
12
+ * [**Hirb**][hirb] for tabular collection output.
13
+ * [**Hirb Unicode**][hirb-unicode-steakknife] for aligned Unicode output.
14
+ * [**Pry Rails**][pry-rails] for additional commands (`show-routes`,
15
+ `show-models`, `show-middleware`) in the Rails console.
16
+ * [**Pry Doc**][pry-doc] to browse Ruby source, including C, directly from the
17
+ console.
18
+ * [**Pry Git**][pry-git] to teach the console about git. Diffs, blames, and
19
+ commits on methods and classes, not just files.
20
+ * [**Pry Remote**][pry-remote] to connect remotely to a Pry console.
21
+ * [**Pry Coolline**][pry-coolline] for syntax highlighting as you type.
22
+ * **Debugging** (`next`, `step`, ...): Ruby (MRI) [**Pry Byebug**][pry-byebug], JRuby [**Pry Nav**][pry-nav].
23
+
24
+
25
+ ## Usage
26
+
27
+ ### Rails or Ruby Project Integration
28
+
29
+ Ruby 2.0.0+, Rails 3 or 4 or Ruby project, add this to your project Gemfile:
30
+
31
+ ```ruby
32
+ group :development, :test do
33
+ gem 'spirit_hands'
34
+ end
35
+ ```
36
+
37
+ ### Global usage
38
+ `[sudo] gem install spirit_hands`
39
+
40
+ That's it. Run `rails console` as usual.
41
+
42
+ Ruby compiled against a proper readline library, ideally GNU readline, is
43
+ recommended. Alternatively, [`gem install rb-readline`][rb-readline] for an
44
+ acceptible backup. Using ruby compiled against a `libedit` wrapper (primarily OS
45
+ X) will work but is not recommended.
46
+
47
+
48
+ ## Options
49
+
50
+ Change the following options by creating a .pryrc in your Rails or Ruby project
51
+
52
+ ### Example `.pryrc`
53
+
54
+ ```ruby
55
+ begin
56
+ require 'spirit_hands'
57
+ SpiritHands.colored_prompt = false
58
+ SpiritHands.hirb = false
59
+ rescue LoadError
60
+ end
61
+ ```
62
+
63
+ ### `awesome_print`
64
+
65
+ [**AwesomePrint**][awesome_print] is enabled by default.
66
+ `SpiritHands.awesome_print = false` to disable.
67
+
68
+ ### `color`
69
+
70
+ An alias for getting and setting `Pry.color`
71
+
72
+ ### `colored_prompt`
73
+
74
+ Color the console prompt? Defaults to `true` when the current ruby is compiled
75
+ against GNU readline or `rb-readline`, which don't have issues counting
76
+ characters in colored prompts. `false` for libedit.
77
+
78
+ **Note:** `Pry.color = false` trumps this setting and disables all console coloring.
79
+
80
+ ### `hirb`
81
+ [**Hirb**][hirb] is **enabled** by default.
82
+ `SpiritHands.hirb = false` to disable.
83
+
84
+ ### `hirb_unicode`
85
+ [**Hirb-unicode**][hirb-unicode-steakknife] is enabled by default when hirb is enabled.
86
+ `SpiritHands.hirb_unicode = false` to disable.
87
+ No effect when hirb is disabled.
88
+
89
+
90
+ ### `prompt`
91
+
92
+ #### Pseudo-XML-like Syntax as follows
93
+
94
+ ```
95
+ current command number <cmd/>
96
+ app name <app/>
97
+
98
+ literal less-than < \< ( "\\<" in Ruby strings )
99
+ bold <bold>....<bold>
100
+
101
+ Foreground color:
102
+
103
+ black <black>...</black>
104
+ and red green yellow blue magenta cyan white
105
+
106
+ Background color:
107
+
108
+ bgblack bgred bggreen bgyellow bgblue bgmagenta bgcyan bgwhite
109
+
110
+ Even the frightening blink tag, where available <blink>...</blink>
111
+
112
+ More at: SpiritHands::Prompt::Render::MATCHED_TAG_CODES.keys
113
+
114
+ ```
115
+
116
+ ### `prompt_separator`
117
+
118
+ Separator string between the application name and line input. Defaults to `»`
119
+ for GNU readline or libedit. Defaults to `>` for `rb-readline` which fails on
120
+ mixed encodings.
121
+
122
+
123
+ [pry]: http://pry.github.com
124
+ [awesome_print]: https://github.com/michaeldv/awesome_print
125
+ [hirb]: https://github.com/cldwalker/hirb
126
+ [hirb-unicode-steakknife]: https://github.com/steakknife/hirb-unicode
127
+ [pry-rails]: https://github.com/rweng/pry-rails
128
+ [pry-doc]: https://github.com/pry/pry-doc
129
+ [pry-git]: https://github.com/pry/pry-git
130
+ [pry-remote]: https://github.com/Mon-Ouie/pry-remote
131
+ [pry-coolline]: https://github.com/pry/pry-coolline
132
+ [coderay]: https://github.com/rubychan/coderay
133
+ [rb-readline]: https://github.com/luislavena/rb-readline
134
+ [pullrequests]: https://github.com/steakknife/spirit_hands/pulls
135
+ [issues]: https://github.com/steakknife/spirit_hands/issues
136
+ [changelog]: https://github.com/steakknife/spirit_hands/blob/master/CHANGELOG.md
137
+ [pry-nav]: https://github.com/nixme/pry-nav
138
+ [pry-byebug]: https://github.com/deivid-rodriguez/pry-byebug
data/Rakefile ADDED
@@ -0,0 +1,127 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require 'bundler/gem_tasks'
4
+
5
+ require 'shellwords'
6
+
7
+ def gemspec_file
8
+ @gemspec_file ||= Dir['*.gemspec'].first
9
+ end
10
+
11
+ def gemspec
12
+ @gemspec ||= Gem::Specification::load(gemspec_file)
13
+ end
14
+
15
+ def version
16
+ gemspec.version
17
+ end
18
+
19
+ def name
20
+ gemspec.name
21
+ end
22
+
23
+ def platform
24
+ gemspec.platform
25
+ end
26
+
27
+ # output .gem filename, per platform
28
+ def gem_file(platform)
29
+ r = "#{name}-#{version}"
30
+ plat_suffix = "-#{platform}" unless platform == 'ruby'
31
+ r + '.gem'
32
+ end
33
+
34
+ def git_dirty?
35
+ r = `git diff --shortstat`.chop != ''
36
+ fail unless $?.success?
37
+ r
38
+ end
39
+
40
+ def assert_git_clean
41
+ raise 'Git working directory must be clean before continuing' if git_dirty?
42
+ end
43
+
44
+ def assert_gem_is_signed(gem)
45
+ files = `tar tf #{gem}`.split("\n")
46
+ fail "#{gem} bad" unless $?.success?
47
+ signed_files = %w[metadata data checksums.yaml].map { |x| "#{x}.gz.sig" }
48
+ missing_files = files - signed_files
49
+ fail "#{gem} is unsigned, check gem-public_cert.pem" if !missing_files.empty?
50
+ end
51
+
52
+ ### release ruby gem
53
+
54
+ desc 'make the current git commit into a tag equal the current version.rb'
55
+ task :tag do
56
+ assert_git_clean
57
+ return if `git tag --points-at HEAD`.split("\n").map(&:strip).include?(version)
58
+ sh "git tag -s #{version} -m #{version}"
59
+ sh "git push --tags HEAD"
60
+ end
61
+
62
+ desc 'before any release(s)'
63
+ task :prerelease => [:tag]
64
+
65
+ def gem_build(chruby_engine)
66
+ rubies_dir = ENV['RUBIES_ROOT'] || '/opt/rubies'
67
+ rubies = Dir[File.join(rubies_dir, '*')]
68
+ rubies_escaped = rubies.map { |rb| Shellwords.escape rb }
69
+ sh "chruby-exec RUBIES=(#{rubies_escaped}) #{chruby_engine} -- gem build #{gemspec_file}"
70
+ end
71
+
72
+ desc 'release JRuby gem'
73
+ task 'release-jruby' => :prerelease do
74
+ gem_build('jruby')
75
+ gem = gem_file('java')
76
+ assert_gem_is_signed(gem)
77
+ sh "gem push #{gem}"
78
+ end
79
+
80
+ desc 'release Ruby gem'
81
+ task 'release-ruby' => :prerelease do
82
+ gem_build('ruby-2')
83
+ gem = gem_file('ruby')
84
+ assert_gem_is_signed(gem)
85
+ sh "gem push #{gem}"
86
+ end
87
+
88
+ desc 'release all gems'
89
+ task :release => ['release-ruby', 'release-jruby']
90
+
91
+
92
+ ## version bumping
93
+
94
+ def bump(idx)
95
+ assert_git_clean
96
+
97
+ old_version = version.to_s
98
+ v = old_version.split('.').map(&:to_i)
99
+ v[idx] += 1
100
+ new_version = v.map(&:to_s).join('.')
101
+
102
+ version_file = 'lib/spirit_hands/version.rb'
103
+ sh "sed -i '' -e 's/#{old_version}/#{new_version}/' #{version_file}"
104
+ sh "git add #{version_file}"
105
+ sh "git commit -sS -m 'bump to #{new_version}'"
106
+ sh "git push --tags origin HEAD"
107
+ end
108
+
109
+ desc 'bump release version'
110
+ task :bump do
111
+ bump 2
112
+ end
113
+
114
+ desc 'bump minor version'
115
+ task 'bump:minor' do
116
+ bump 1
117
+ end
118
+
119
+ desc 'bump major version'
120
+ task 'bump:major' do
121
+ bump 0
122
+ end
123
+
124
+ desc 'show version'
125
+ task :version do
126
+ puts version
127
+ end
@@ -0,0 +1,32 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ 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
31
+ 8m+dgfPonsYSqnDDfLuAmtKhLAA=
32
+ -----END CERTIFICATE-----
@@ -0,0 +1,36 @@
1
+ # Adds Hirb.enabled?
2
+ require 'hirb'
3
+ require 'pry'
4
+
5
+ class << Hirb
6
+ @enabled = false
7
+ def enabled?
8
+ !!@enabled
9
+ end
10
+
11
+ protected
12
+
13
+ def set_enabled
14
+ @enabled = true
15
+ end
16
+
17
+ def set_disabled
18
+ @enabled = false
19
+ end
20
+ end # Hirb.self
21
+
22
+ class << Hirb::View
23
+ alias_method :enable_output_method_existing, :enable_output_method
24
+ alias_method :disable_output_method_existing, :disable_output_method
25
+
26
+ def enable_output_method
27
+ @output_method = true
28
+ ::Hirb.send :set_enabled
29
+ enable_output_method_existing
30
+ end
31
+
32
+ def disable_output_method
33
+ ::Hirb.send :set_disabled
34
+ disable_output_method_existing
35
+ end
36
+ end # Hirb::View.self