rib 1.2.91 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGES.md +6 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/TODO.md +0 -4
- data/lib/rib.rb +3 -1
- data/lib/rib/app/rack.rb +6 -2
- data/lib/rib/app/rails.rb +11 -7
- data/lib/rib/app/ramaze.rb +7 -3
- data/lib/rib/runner.rb +12 -8
- data/lib/rib/version.rb +1 -1
- data/rib.gemspec +99 -100
- data/test/core/test_squeeze_history.rb +1 -1
- metadata +3 -4
- data/screenshot.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1076f17c46a51eb9e569ab5f7471f42dd3b1c3cc
|
4
|
+
data.tar.gz: 7d9af36e6f5b15a18a01cde080ebbb4cb93023c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18c8aba3e10d59143db113e3d2cb95c1a77764ad82f3b420994e3fd5d032998eb6280681a6f34247db699635f2641d1d34d2373600be5d7b7fdda5cc0e9c161e
|
7
|
+
data.tar.gz: 5838f68537399c9981d81540be7deb0bb537ea00ce529e68b114f286dd3094d08b06dbd1fbc8b805e113f32dd7e7fc58c4402a95d3bbe23432ef5bd258c8fb77
|
data/.travis.yml
CHANGED
@@ -3,7 +3,7 @@ language: ruby
|
|
3
3
|
rvm:
|
4
4
|
- 2.1
|
5
5
|
- 2.2
|
6
|
-
- 2.3.
|
6
|
+
- 2.3.1
|
7
7
|
- rbx
|
8
8
|
- jruby-9
|
9
9
|
|
@@ -11,5 +11,5 @@ before_install:
|
|
11
11
|
- rvm get head
|
12
12
|
- rvm reload
|
13
13
|
- rvm use --install $TRAVIS_RUBY_VERSION --binary --latest
|
14
|
-
install: 'bundle install --retry=3'
|
14
|
+
install: 'gem install bundler; bundle install --retry=3'
|
15
15
|
script: 'ruby -r bundler/setup -S rake test'
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGES
|
2
2
|
|
3
|
+
## Rib 1.3.0 -- 2016-06-28
|
4
|
+
|
5
|
+
* Now `rib` would accept `-p` or `--prefix` to allow setting where we want to
|
6
|
+
load the application. This is useful when we don't want to `cd` into a
|
7
|
+
directory and `rib auto` or `rib rails` from there.
|
8
|
+
|
3
9
|
## Rib 1.2.91 -- 2016-01-06
|
4
10
|
|
5
11
|
* [core/multiline] Fixed a case for JRuby 9.0.4.0.
|
data/README.md
CHANGED
@@ -336,7 +336,7 @@ simple, simpler than rib-rails.
|
|
336
336
|
|
337
337
|
Apache License 2.0
|
338
338
|
|
339
|
-
Copyright (c) 2011-
|
339
|
+
Copyright (c) 2011-2016, Lin Jen-Shin (godfat)
|
340
340
|
|
341
341
|
Licensed under the Apache License, Version 2.0 (the "License");
|
342
342
|
you may not use this file except in compliance with the License.
|
data/Rakefile
CHANGED
data/TODO.md
CHANGED
data/lib/rib.rb
CHANGED
data/lib/rib/app/rack.rb
CHANGED
@@ -13,13 +13,17 @@ module Rib::Rack
|
|
13
13
|
def load_rack
|
14
14
|
require 'rack'
|
15
15
|
Rib.abort("Error: Cannot find config.ru") unless rack?
|
16
|
-
app, _ = Rack::Builder.parse_file(
|
16
|
+
app, _ = Rack::Builder.parse_file(configru_path)
|
17
17
|
self.app = app
|
18
18
|
Rib.shell.eval_binding.eval('def app; Rib::Rack.app; end')
|
19
19
|
Rib.say("Access your app via :app method")
|
20
20
|
end
|
21
21
|
|
22
22
|
def rack?
|
23
|
-
File.exist?(
|
23
|
+
File.exist?(configru_path)
|
24
|
+
end
|
25
|
+
|
26
|
+
def configru_path
|
27
|
+
"#{Rib.config[:prefix]}/config.ru"
|
24
28
|
end
|
25
29
|
end
|
data/lib/rib/app/rails.rb
CHANGED
@@ -9,9 +9,9 @@ module Rib::Rails
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def load_rails
|
12
|
-
require '
|
12
|
+
require path_for('boot')
|
13
13
|
|
14
|
-
if File.exist?('
|
14
|
+
if File.exist?(path_for('application.rb'))
|
15
15
|
Rib::Rails.load_rails3
|
16
16
|
else
|
17
17
|
Rib::Rails.load_rails2
|
@@ -30,8 +30,8 @@ module Rib::Rails
|
|
30
30
|
}
|
31
31
|
|
32
32
|
# copied from commands/console
|
33
|
-
['
|
34
|
-
'console_app'
|
33
|
+
[path_for('environment'),
|
34
|
+
'console_app',
|
35
35
|
'console_with_helpers'].each{ |f| require f }
|
36
36
|
|
37
37
|
optparse_rails
|
@@ -41,7 +41,7 @@ module Rib::Rails
|
|
41
41
|
optparse_env
|
42
42
|
|
43
43
|
# copied from rails/commands
|
44
|
-
require '
|
44
|
+
require path_for('application')
|
45
45
|
::Rails.application.require_environment!
|
46
46
|
|
47
47
|
optparse_rails
|
@@ -106,7 +106,11 @@ module Rib::Rails
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def rails?
|
109
|
-
File.exist?('
|
110
|
-
|
109
|
+
File.exist?(path_for('boot.rb')) &&
|
110
|
+
File.exist?(path_for('environment.rb'))
|
111
|
+
end
|
112
|
+
|
113
|
+
def path_for file
|
114
|
+
"#{Rib.config[:prefix]}/config/#{file}"
|
111
115
|
end
|
112
116
|
end
|
data/lib/rib/app/ramaze.rb
CHANGED
@@ -10,16 +10,20 @@ module Rib::Ramaze
|
|
10
10
|
|
11
11
|
def load_ramaze
|
12
12
|
# try to produce consistent error message, and yet lazy loading ramaze
|
13
|
-
require
|
13
|
+
require start_path unless ramaze?
|
14
14
|
|
15
15
|
require 'ramaze'
|
16
16
|
::Ramaze.options.started = true
|
17
17
|
|
18
|
-
require
|
18
|
+
require start_path
|
19
19
|
at_exit{ puts('Ramazement has ended, go in peace.') }
|
20
20
|
end
|
21
21
|
|
22
22
|
def ramaze?
|
23
|
-
File.exist?(
|
23
|
+
File.exist?(start_path)
|
24
|
+
end
|
25
|
+
|
26
|
+
def start_path
|
27
|
+
"#{Rib.config[:prefix]}/start.rb"
|
24
28
|
end
|
25
29
|
end
|
data/lib/rib/runner.rb
CHANGED
@@ -23,6 +23,7 @@ module Rib::Runner
|
|
23
23
|
|
24
24
|
['rib options:' , '' ],
|
25
25
|
['-c, --config FILE', 'Load config from FILE' ],
|
26
|
+
['-p, --prefix PATH', 'Prefix to locate the app. Default to .' ],
|
26
27
|
['-n, --no-config' , 'Suppress loading ~/.config/rib/config.rb'],
|
27
28
|
['-h, --help' , 'Print this message' ],
|
28
29
|
['-v, --version' , 'Print the version' ]] +
|
@@ -67,14 +68,14 @@ module Rib::Runner
|
|
67
68
|
def run argv=ARGV
|
68
69
|
(@running_commands ||= []) << Rib.config[:name]
|
69
70
|
unused = parse(argv)
|
70
|
-
#
|
71
|
-
#
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
71
|
+
# we only want to run the loop if we're running the rib command,
|
72
|
+
# otherwise, it must be a rib app, which we only want to parse
|
73
|
+
# the arguments and proceed (this is recursive!)
|
74
|
+
if @running_commands.pop == 'rib'
|
75
|
+
Rib.warn("Unused arguments: #{unused.inspect}") unless unused.empty?
|
76
|
+
require 'rib/core' if Rib.config.delete(:mimic_irb)
|
77
|
+
loop
|
78
|
+
end
|
78
79
|
end
|
79
80
|
|
80
81
|
def loop retry_times=5
|
@@ -121,6 +122,9 @@ module Rib::Runner
|
|
121
122
|
when /^-c=?(.+)?/, /^--config=?(.+)?/
|
122
123
|
Rib.config[:config] = $1 || argv.shift
|
123
124
|
|
125
|
+
when /^-p=?(.+)?/, /^--prefix=?(.+)?/
|
126
|
+
Rib.config[:prefix] = $1 || argv.shift
|
127
|
+
|
124
128
|
when /^-n/, '--no-config'
|
125
129
|
Rib.config.delete(:config)
|
126
130
|
parse_next(argv, arg)
|
data/lib/rib/version.rb
CHANGED
data/rib.gemspec
CHANGED
@@ -1,108 +1,107 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: rib 1.
|
2
|
+
# stub: rib 1.3.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
|
-
s.name = "rib"
|
6
|
-
s.version = "1.
|
5
|
+
s.name = "rib".freeze
|
6
|
+
s.version = "1.3.0"
|
7
7
|
|
8
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
|
-
s.require_paths = ["lib"]
|
10
|
-
s.authors = ["Lin Jen-Shin (godfat)"]
|
11
|
-
s.date = "2016-
|
12
|
-
s.description = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell\n\nRib is based on the design of [ripl][] and the work of [ripl-rc][], some of\nthe features are also inspired by [pry][]. The aim of Rib is to be fully\nfeatured and yet very easy to opt-out or opt-in other features. It shall\nbe simple, lightweight and modular so that everyone could customize Rib.\n\n[ripl]: https://github.com/cldwalker/ripl\n[ripl-rc]: https://github.com/godfat/ripl-rc\n[pry]: https://github.com/pry/pry"
|
13
|
-
s.email = ["godfat (XD) godfat.org"]
|
8
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
|
+
s.require_paths = ["lib".freeze]
|
10
|
+
s.authors = ["Lin Jen-Shin (godfat)".freeze]
|
11
|
+
s.date = "2016-06-28"
|
12
|
+
s.description = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell\n\nRib is based on the design of [ripl][] and the work of [ripl-rc][], some of\nthe features are also inspired by [pry][]. The aim of Rib is to be fully\nfeatured and yet very easy to opt-out or opt-in other features. It shall\nbe simple, lightweight and modular so that everyone could customize Rib.\n\n[ripl]: https://github.com/cldwalker/ripl\n[ripl-rc]: https://github.com/godfat/ripl-rc\n[pry]: https://github.com/pry/pry".freeze
|
13
|
+
s.email = ["godfat (XD) godfat.org".freeze]
|
14
14
|
s.executables = [
|
15
|
-
"rib",
|
16
|
-
"rib-all",
|
17
|
-
"rib-auto",
|
18
|
-
"rib-min",
|
19
|
-
"rib-rack",
|
20
|
-
"rib-rails",
|
21
|
-
"rib-ramaze"]
|
15
|
+
"rib".freeze,
|
16
|
+
"rib-all".freeze,
|
17
|
+
"rib-auto".freeze,
|
18
|
+
"rib-min".freeze,
|
19
|
+
"rib-rack".freeze,
|
20
|
+
"rib-rails".freeze,
|
21
|
+
"rib-ramaze".freeze]
|
22
22
|
s.files = [
|
23
|
-
".gitignore",
|
24
|
-
".gitmodules",
|
25
|
-
".travis.yml",
|
26
|
-
"CHANGES.md",
|
27
|
-
"Gemfile",
|
28
|
-
"LICENSE",
|
29
|
-
"README.md",
|
30
|
-
"Rakefile",
|
31
|
-
"TODO.md",
|
32
|
-
"bin/rib",
|
33
|
-
"bin/rib-all",
|
34
|
-
"bin/rib-auto",
|
35
|
-
"bin/rib-min",
|
36
|
-
"bin/rib-rack",
|
37
|
-
"bin/rib-rails",
|
38
|
-
"bin/rib-ramaze",
|
39
|
-
"lib/rib.rb",
|
40
|
-
"lib/rib/all.rb",
|
41
|
-
"lib/rib/api.rb",
|
42
|
-
"lib/rib/app/auto.rb",
|
43
|
-
"lib/rib/app/rack.rb",
|
44
|
-
"lib/rib/app/rails.rb",
|
45
|
-
"lib/rib/app/ramaze.rb",
|
46
|
-
"lib/rib/config.rb",
|
47
|
-
"lib/rib/core.rb",
|
48
|
-
"lib/rib/core/completion.rb",
|
49
|
-
"lib/rib/core/history.rb",
|
50
|
-
"lib/rib/core/multiline.rb",
|
51
|
-
"lib/rib/core/readline.rb",
|
52
|
-
"lib/rib/core/squeeze_history.rb",
|
53
|
-
"lib/rib/core/strip_backtrace.rb",
|
54
|
-
"lib/rib/core/underscore.rb",
|
55
|
-
"lib/rib/debug.rb",
|
56
|
-
"lib/rib/extra/autoindent.rb",
|
57
|
-
"lib/rib/extra/hirb.rb",
|
58
|
-
"lib/rib/extra/paging.rb",
|
59
|
-
"lib/rib/extra/spring.rb",
|
60
|
-
"lib/rib/more.rb",
|
61
|
-
"lib/rib/more/anchor.rb",
|
62
|
-
"lib/rib/more/bottomup_backtrace.rb",
|
63
|
-
"lib/rib/more/color.rb",
|
64
|
-
"lib/rib/more/edit.rb",
|
65
|
-
"lib/rib/more/multiline_history.rb",
|
66
|
-
"lib/rib/more/multiline_history_file.rb",
|
67
|
-
"lib/rib/plugin.rb",
|
68
|
-
"lib/rib/runner.rb",
|
69
|
-
"lib/rib/shell.rb",
|
70
|
-
"lib/rib/test.rb",
|
71
|
-
"lib/rib/test/multiline.rb",
|
72
|
-
"lib/rib/version.rb",
|
73
|
-
"rib.gemspec",
|
74
|
-
"
|
75
|
-
"task/
|
76
|
-
"
|
77
|
-
"test/core/
|
78
|
-
"test/core/
|
79
|
-
"test/core/
|
80
|
-
"test/core/
|
81
|
-
"test/core/
|
82
|
-
"test/
|
83
|
-
"test/
|
84
|
-
"test/more/
|
85
|
-
"test/
|
86
|
-
"test/
|
87
|
-
"test/
|
88
|
-
"test/
|
89
|
-
"
|
90
|
-
s.
|
91
|
-
s.
|
92
|
-
s.
|
93
|
-
s.summary = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell"
|
23
|
+
".gitignore".freeze,
|
24
|
+
".gitmodules".freeze,
|
25
|
+
".travis.yml".freeze,
|
26
|
+
"CHANGES.md".freeze,
|
27
|
+
"Gemfile".freeze,
|
28
|
+
"LICENSE".freeze,
|
29
|
+
"README.md".freeze,
|
30
|
+
"Rakefile".freeze,
|
31
|
+
"TODO.md".freeze,
|
32
|
+
"bin/rib".freeze,
|
33
|
+
"bin/rib-all".freeze,
|
34
|
+
"bin/rib-auto".freeze,
|
35
|
+
"bin/rib-min".freeze,
|
36
|
+
"bin/rib-rack".freeze,
|
37
|
+
"bin/rib-rails".freeze,
|
38
|
+
"bin/rib-ramaze".freeze,
|
39
|
+
"lib/rib.rb".freeze,
|
40
|
+
"lib/rib/all.rb".freeze,
|
41
|
+
"lib/rib/api.rb".freeze,
|
42
|
+
"lib/rib/app/auto.rb".freeze,
|
43
|
+
"lib/rib/app/rack.rb".freeze,
|
44
|
+
"lib/rib/app/rails.rb".freeze,
|
45
|
+
"lib/rib/app/ramaze.rb".freeze,
|
46
|
+
"lib/rib/config.rb".freeze,
|
47
|
+
"lib/rib/core.rb".freeze,
|
48
|
+
"lib/rib/core/completion.rb".freeze,
|
49
|
+
"lib/rib/core/history.rb".freeze,
|
50
|
+
"lib/rib/core/multiline.rb".freeze,
|
51
|
+
"lib/rib/core/readline.rb".freeze,
|
52
|
+
"lib/rib/core/squeeze_history.rb".freeze,
|
53
|
+
"lib/rib/core/strip_backtrace.rb".freeze,
|
54
|
+
"lib/rib/core/underscore.rb".freeze,
|
55
|
+
"lib/rib/debug.rb".freeze,
|
56
|
+
"lib/rib/extra/autoindent.rb".freeze,
|
57
|
+
"lib/rib/extra/hirb.rb".freeze,
|
58
|
+
"lib/rib/extra/paging.rb".freeze,
|
59
|
+
"lib/rib/extra/spring.rb".freeze,
|
60
|
+
"lib/rib/more.rb".freeze,
|
61
|
+
"lib/rib/more/anchor.rb".freeze,
|
62
|
+
"lib/rib/more/bottomup_backtrace.rb".freeze,
|
63
|
+
"lib/rib/more/color.rb".freeze,
|
64
|
+
"lib/rib/more/edit.rb".freeze,
|
65
|
+
"lib/rib/more/multiline_history.rb".freeze,
|
66
|
+
"lib/rib/more/multiline_history_file.rb".freeze,
|
67
|
+
"lib/rib/plugin.rb".freeze,
|
68
|
+
"lib/rib/runner.rb".freeze,
|
69
|
+
"lib/rib/shell.rb".freeze,
|
70
|
+
"lib/rib/test.rb".freeze,
|
71
|
+
"lib/rib/test/multiline.rb".freeze,
|
72
|
+
"lib/rib/version.rb".freeze,
|
73
|
+
"rib.gemspec".freeze,
|
74
|
+
"task/README.md".freeze,
|
75
|
+
"task/gemgem.rb".freeze,
|
76
|
+
"test/core/test_completion.rb".freeze,
|
77
|
+
"test/core/test_history.rb".freeze,
|
78
|
+
"test/core/test_multiline.rb".freeze,
|
79
|
+
"test/core/test_readline.rb".freeze,
|
80
|
+
"test/core/test_squeeze_history.rb".freeze,
|
81
|
+
"test/core/test_underscore.rb".freeze,
|
82
|
+
"test/extra/test_autoindent.rb".freeze,
|
83
|
+
"test/more/test_color.rb".freeze,
|
84
|
+
"test/more/test_multiline_history.rb".freeze,
|
85
|
+
"test/test_api.rb".freeze,
|
86
|
+
"test/test_plugin.rb".freeze,
|
87
|
+
"test/test_runner.rb".freeze,
|
88
|
+
"test/test_shell.rb".freeze]
|
89
|
+
s.homepage = "https://github.com/godfat/rib".freeze
|
90
|
+
s.licenses = ["Apache License 2.0".freeze]
|
91
|
+
s.rubygems_version = "2.6.4".freeze
|
92
|
+
s.summary = "Ruby-Interactive-ruBy -- Yet another interactive Ruby shell".freeze
|
94
93
|
s.test_files = [
|
95
|
-
"test/core/test_completion.rb",
|
96
|
-
"test/core/test_history.rb",
|
97
|
-
"test/core/test_multiline.rb",
|
98
|
-
"test/core/test_readline.rb",
|
99
|
-
"test/core/test_squeeze_history.rb",
|
100
|
-
"test/core/test_underscore.rb",
|
101
|
-
"test/extra/test_autoindent.rb",
|
102
|
-
"test/more/test_color.rb",
|
103
|
-
"test/more/test_multiline_history.rb",
|
104
|
-
"test/test_api.rb",
|
105
|
-
"test/test_plugin.rb",
|
106
|
-
"test/test_runner.rb",
|
107
|
-
"test/test_shell.rb"]
|
94
|
+
"test/core/test_completion.rb".freeze,
|
95
|
+
"test/core/test_history.rb".freeze,
|
96
|
+
"test/core/test_multiline.rb".freeze,
|
97
|
+
"test/core/test_readline.rb".freeze,
|
98
|
+
"test/core/test_squeeze_history.rb".freeze,
|
99
|
+
"test/core/test_underscore.rb".freeze,
|
100
|
+
"test/extra/test_autoindent.rb".freeze,
|
101
|
+
"test/more/test_color.rb".freeze,
|
102
|
+
"test/more/test_multiline_history.rb".freeze,
|
103
|
+
"test/test_api.rb".freeze,
|
104
|
+
"test/test_plugin.rb".freeze,
|
105
|
+
"test/test_runner.rb".freeze,
|
106
|
+
"test/test_shell.rb".freeze]
|
108
107
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lin Jen-Shin (godfat)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Ruby-Interactive-ruBy -- Yet another interactive Ruby shell
|
@@ -85,7 +85,6 @@ files:
|
|
85
85
|
- lib/rib/test/multiline.rb
|
86
86
|
- lib/rib/version.rb
|
87
87
|
- rib.gemspec
|
88
|
-
- screenshot.png
|
89
88
|
- task/README.md
|
90
89
|
- task/gemgem.rb
|
91
90
|
- test/core/test_completion.rb
|
@@ -121,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
120
|
version: '0'
|
122
121
|
requirements: []
|
123
122
|
rubyforge_project:
|
124
|
-
rubygems_version: 2.
|
123
|
+
rubygems_version: 2.6.4
|
125
124
|
signing_key:
|
126
125
|
specification_version: 4
|
127
126
|
summary: Ruby-Interactive-ruBy -- Yet another interactive Ruby shell
|
data/screenshot.png
DELETED
Binary file
|