bundler-console 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d45b055e4de7ef526fbe0526b1faea69d7d48b67
4
+ data.tar.gz: a0a5893ae9334a568b81e21bf912fea22f0c665e
5
+ SHA512:
6
+ metadata.gz: ade69b56b8b8776fab10c11e4aef1938d732fb846559719527ed0dc3ccff800a74263caedc514b194507685c48d92b155ffc6b80e9d9b768dab262978920bc88
7
+ data.tar.gz: 375260e0df64c44e9de4722611e98e534923b4f06eb681dbbf2d1e970b7840c5733fadcb8fa111476f590b27087caca230ad51a25f350b8ea5aec9ef3728c935
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,12 @@
1
+ AllCops:
2
+ DisplayCopNames: true
3
+ DisplayStyleGuide: true
4
+ TargetRubyVersion: 2.4
5
+ Exclude:
6
+ - 'vendor/**/*'
7
+
8
+ Style/Documentation:
9
+ Enabled: false
10
+
11
+ Style/FrozenStringLiteralComment:
12
+ Enabled: false
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm: 2.4.2
3
+ cache: bundler
4
+ script:
5
+ - bundle exec rake
6
+ - bundle exec rubocop
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'net-ssh', group: :foo
6
+ gem 'pry-byebug', group: :bar
@@ -0,0 +1,59 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bundler-console (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.3.0)
10
+ byebug (9.1.0)
11
+ coderay (1.1.2)
12
+ docile (1.1.5)
13
+ json (2.1.0)
14
+ method_source (0.9.0)
15
+ minitest (5.10.3)
16
+ net-ssh (4.2.0)
17
+ parallel (1.12.0)
18
+ parser (2.4.0.0)
19
+ ast (~> 2.2)
20
+ powerpack (0.1.1)
21
+ pry (0.11.2)
22
+ coderay (~> 1.1.0)
23
+ method_source (~> 0.9.0)
24
+ pry-byebug (3.5.0)
25
+ byebug (~> 9.1)
26
+ pry (~> 0.10)
27
+ rainbow (2.2.2)
28
+ rake
29
+ rake (12.2.1)
30
+ rubocop (0.51.0)
31
+ parallel (~> 1.10)
32
+ parser (>= 2.3.3.1, < 3.0)
33
+ powerpack (~> 0.1)
34
+ rainbow (>= 2.2.2, < 3.0)
35
+ ruby-progressbar (~> 1.7)
36
+ unicode-display_width (~> 1.0, >= 1.0.1)
37
+ ruby-progressbar (1.9.0)
38
+ simplecov (0.15.1)
39
+ docile (~> 1.1.0)
40
+ json (>= 1.8, < 3)
41
+ simplecov-html (~> 0.10.0)
42
+ simplecov-html (0.10.2)
43
+ unicode-display_width (1.3.0)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ bundler (~> 1.16.a)
50
+ bundler-console!
51
+ minitest (~> 5.10)
52
+ net-ssh
53
+ pry-byebug
54
+ rake (~> 12.2)
55
+ rubocop (~> 0.51)
56
+ simplecov (~> 0.15)
57
+
58
+ BUNDLED WITH
59
+ 1.16.0.pre.3
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Kevin Deisz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all 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,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,27 @@
1
+ # Bundler::Console
2
+
3
+ [![Build Status](https://travis-ci.org/kddeisz/bundler-console.svg?branch=master)](https://travis-ci.org/kddeisz/bundler-console)
4
+
5
+ A bundler plugin that starts an IRB session with your gem dependencies.
6
+
7
+ ## Installation
8
+
9
+ $ bundle plugin install bundler-console
10
+
11
+ ## Usage
12
+
13
+ $ bundle console
14
+
15
+ ## Development
16
+
17
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
18
+
19
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
20
+
21
+ ## Contributing
22
+
23
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kddeisz/bundler-console.
24
+
25
+ ## License
26
+
27
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task default: :test
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'bundler/console'
5
+
6
+ require 'irb'
7
+ IRB.start(__FILE__)
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
@@ -0,0 +1,28 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'bundler/console/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'bundler-console'
7
+ spec.version = Bundler::Console::VERSION
8
+ spec.authors = ['Kevin Deisz']
9
+ spec.email = ['kevin.deisz@gmail.com']
10
+
11
+ spec.summary = 'A bundler plugin that starts an IRB session with ' \
12
+ 'your gem dependencies.'
13
+ spec.homepage = 'https://github.com/kddeisz/bundler-console'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.16.a'
24
+ spec.add_development_dependency 'minitest', '~> 5.10'
25
+ spec.add_development_dependency 'rake', '~> 12.2'
26
+ spec.add_development_dependency 'rubocop', '~> 0.51'
27
+ spec.add_development_dependency 'simplecov', '~> 0.15'
28
+ end
@@ -0,0 +1,39 @@
1
+ require 'bundler/console/version'
2
+
3
+ module Bundler
4
+ module Console
5
+ class Command
6
+ Plugin::API.command('console', self)
7
+
8
+ def exec(_, args)
9
+ if args.any?
10
+ Bundler.require(:default, *args.map!(&:to_sym))
11
+ else
12
+ Bundler.require
13
+ end
14
+
15
+ ARGV.clear
16
+ get_console(Bundler.settings[:console] || 'irb').start
17
+ end
18
+
19
+ private
20
+
21
+ def get_console(name)
22
+ require name
23
+ get_constant(name)
24
+ rescue LoadError
25
+ Bundler.ui.error("Couldn't load console #{name}, falling back to irb")
26
+ require 'irb'
27
+ get_constant('irb')
28
+ end
29
+
30
+ def get_constant(name)
31
+ const_name = { 'pry' => :Pry, 'ripl' => :Ripl, 'irb' => :IRB }[name]
32
+ Object.const_get(const_name)
33
+ rescue NameError
34
+ Bundler.ui.error("Could not find constant #{const_name}")
35
+ exit 1
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,5 @@
1
+ module Bundler
2
+ module Console
3
+ VERSION = '0.0.1'.freeze
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ require 'bundler/console'
metadata ADDED
@@ -0,0 +1,128 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bundler-console
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Kevin Deisz
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-10-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.16.a
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.16.a
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '12.2'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '12.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rubocop
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.51'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.51'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.15'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.15'
83
+ description:
84
+ email:
85
+ - kevin.deisz@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rubocop.yml"
92
+ - ".travis.yml"
93
+ - Gemfile
94
+ - Gemfile.lock
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - bin/console
99
+ - bin/setup
100
+ - bundler-console.gemspec
101
+ - lib/bundler/console.rb
102
+ - lib/bundler/console/version.rb
103
+ - plugins.rb
104
+ homepage: https://github.com/kddeisz/bundler-console
105
+ licenses:
106
+ - MIT
107
+ metadata: {}
108
+ post_install_message:
109
+ rdoc_options: []
110
+ require_paths:
111
+ - lib
112
+ required_ruby_version: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ required_rubygems_version: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ requirements: []
123
+ rubyforge_project:
124
+ rubygems_version: 2.6.13
125
+ signing_key:
126
+ specification_version: 4
127
+ summary: A bundler plugin that starts an IRB session with your gem dependencies.
128
+ test_files: []