gem-console 0.0.1 → 0.0.2

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: f1222523851a4a8f32554d30ad6614146bf3cf73
4
- data.tar.gz: a75481a470b3aa1456bacca9d2e299db7aba6d52
3
+ metadata.gz: c459197692a954a83098a50defe4c6af2137102f
4
+ data.tar.gz: 46d6613d18fa141f515f587435f28dd7616670f0
5
5
  SHA512:
6
- metadata.gz: 16aaaa84733509e5552ea15516301be315ee44ed1d5dcc4b4e137f0cf409bf0803b99ccf037fb9651f3f39ea10a2546c95805253883329e314c5c2a3de9c9c3a
7
- data.tar.gz: 4a2d59abbd7ca486b71125eefc7b2e076eb9ef2a60979db0598df432cddaaa6335a36b5ac676e12ffe0363454527caaab15aaf410b63b08e2dba5456bcdcabab
6
+ metadata.gz: 2c23826cc702fff40e9203d39dc1f59d690e76fc82a8d71661822fbc5d55ab03d733ef3d8abcb1c90349ca38d846aa9e4d7276123502575e6822dcf175065b82
7
+ data.tar.gz: 0832ec10e1632a633d4760752604181258a31b92e5ec32655dc75cb608942916d66e946b2040342a8980f6771f40724fd269595e1375ff6258ebfd643a49278d
@@ -1,5 +1,5 @@
1
1
  module Gem
2
2
  module Console
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/lib/gem/console.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'rake'
1
+ require 'rake' unless defined? Rake
2
2
  require "gem/console/version"
3
3
 
4
4
  module Gem
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Keele
@@ -55,7 +55,6 @@ files:
55
55
  - gem-console.gemspec
56
56
  - lib/gem-console.rb
57
57
  - lib/gem/console.rb
58
- - lib/gem/console/tasks/console.rb
59
58
  - lib/gem/console/version.rb
60
59
  homepage: ''
61
60
  licenses:
@@ -1,58 +0,0 @@
1
- require 'rake'
2
-
3
- module Gem
4
- module Console
5
-
6
- class << self
7
-
8
- def enable(library_load_file = $library_load_file)
9
-
10
- library_load_file ||= catch(:file) do
11
- throw_or_recurse Dir[File.join 'lib', '*']
12
- end
13
-
14
- desc 'Open a console preloaded with this library'
15
- task :console, :cmd do |_, args|
16
- args.with_defaults(cmd: pry_enabled? ? 'pry' : 'irb')
17
- sh [
18
- 'bundle exec',
19
- args.cmd,
20
- "-I lib",
21
- "-r #{library_load_file}"
22
- ].join(' ')
23
- end
24
-
25
- private
26
-
27
- def throw_or_recurse(paths)
28
- files, dirs = paths.partition do |path|
29
- File.file? path
30
- end
31
- files.each do |file|
32
- puts "Considering #{file}..."
33
- throw :file, file if File.extname(file) == '.rb'
34
- end if not files.empty?
35
- dirs.each do |dir|
36
- puts "recursing #{dir}..."
37
- throw_or_recurse Dir[dir]
38
- end if not dirs.empty?
39
- raise 'No library file to load `rake console` from found.' +
40
- 'Set $library_load_file in your Rakefile or ' +
41
- 'provide a path in your `Gem::Console.enable` invocation.'
42
- end
43
-
44
-
45
- def pry_enabled?
46
- begin
47
- require 'pry'
48
- rescue LoadError
49
- false
50
- end
51
- end
52
-
53
- end
54
-
55
- end
56
-
57
- end
58
- end