rpbundle 0.0.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/bin/rpbundle +15 -10
  4. data/lib/rpbundle.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fb85e41d4ca8af3e578215fbbfef95649d2cfb1
4
- data.tar.gz: 52fb73e04c13a9b5ecb4bd3d451997c5f2a274cd
3
+ metadata.gz: 64373489e91274d68b4910168600e64d102f9740
4
+ data.tar.gz: 9d2710ea20ce9fecf8e1533c533d7edcd0bb97bd
5
5
  SHA512:
6
- metadata.gz: 5b25a9d9ee411d45cb74a8f7424e48531a70fb55b6a23a15844391759911ed024b3ee6a72475b61faa1bdf98aa2273fdd9c44d1416ec5d34c321c8206794dba9
7
- data.tar.gz: 798fb3f259cc29027e5d96337e0bce65aaf89ae85934ecadad2c7ed01394c97ef92a61a60fcee0bde511e442f81c7fd24a28a07319ba4b1d4253ad210b217ccf
6
+ metadata.gz: 729deaf432f8ee8cb6e90c609de7e71d431ce29438dab4fda73023fa648ac6ab835ad1df51a93caf6bcb298202679efbc24ae27226f5bfdb9ec90cd7cc894dde
7
+ data.tar.gz: d3ee7783f614daa8904358dde8762d856636faa553c02dbd2b2f6885269cede26a16961f92085edaa9b51c396ee8fe6acb793d8f5030e5a363cf6acf0a8ef23f
data/README.md CHANGED
@@ -43,20 +43,25 @@ as well.
43
43
  This gem comes with an executable `rpbundle`.
44
44
 
45
45
  Prerequisite step for setting up :
46
-
46
+
47
47
  $ rpbundle setup
48
-
48
+
49
49
  The above command creates a directory at `~/.rpbundle` and installs `bundler`
50
50
  gem into it.
51
51
 
52
52
  Inside a sketch/project directory with a Gemfile, to install dependent gems :
53
-
53
+
54
54
  $ rpbundle install
55
55
 
56
56
  To run/watch/<other subcommands supported by rp5> your sketch using
57
57
  rp5 command and load your gem dependencies while doing so :
58
-
59
- $ rpbundle run/watch/.. my_sketch.rb
58
+
59
+ $ rpbundle exec run/watch/.. my_sketch.rb
60
+
61
+ To run other bundler subcommands, just pass the subcommand to rpbundle.
62
+ `bundle list` for example :
63
+
64
+ $ rpbundle list
60
65
 
61
66
  rp5bundle is a basically a wrapper around rp5 and does 2 things :
62
67
 
@@ -22,16 +22,19 @@ class Processing::Runner
22
22
  end
23
23
  end
24
24
 
25
+ # Except for setup, exec and help subcommands, pass everything else to bundler
25
26
  def run
26
- case ARGV[0]
27
+ subcommand = ARGV[0]
28
+ case subcommand
27
29
  when 'setup'
28
30
  setup
29
- when 'install'
30
- bundle_install
31
- when 'help', '--help', '', nil
31
+ when 'exec'
32
+ ARGV.shift #Do not pass "exec" subcommand
33
+ execute_with_processing
34
+ when 'help', '--help', nil
32
35
  show_help
33
36
  else
34
- execute_with_processing
37
+ execute_with_bundler
35
38
  end
36
39
  end
37
40
 
@@ -41,9 +44,9 @@ def setup
41
44
  system "java -jar #{JRUBY_COMPLETE} -S gem install -i #{RPBUNDLE_HOME} --no-rdoc --no-ri bundler"
42
45
  end
43
46
 
44
- def bundle_install
47
+ def execute_with_bundler
45
48
  system({ 'GEM_HOME' => RPBUNDLE_HOME, 'GEM_PATH' => RPBUNDLE_HOME },
46
- "java -jar #{JRUBY_COMPLETE} -S bundle install")
49
+ "java -jar #{JRUBY_COMPLETE} -S bundle #{ARGV.join(' ')}")
47
50
  end
48
51
 
49
52
  def execute_with_processing
@@ -56,9 +59,11 @@ def show_help
56
59
  and installs bundler gem into ~/.rpbundle
57
60
  rpbundle install - Install dependencies in your Gemfile
58
61
  rpbundle help - Show this help text
59
- rpbundle <any rp5 command line arguments> - Load gems and run rp5 commands
60
- example: rpbundle run sketch.rb. This will load Gemfile dependencies and
61
- run `rp5 run sketch.rb`
62
+ rpbundle exec <any rp5 command line arguments> - Load gems and run rp5 commands
63
+ example: 'rpbundle exec run sketch.rb' - This will load Gemfile dependencies and
64
+ run 'rp5 run sketch.rb'
65
+ rpbudle <bundler subcommand> - Passes on subcommand to bundler.
66
+ example : 'rpbundle list' - This will run 'bundle list' on rpbundle's bundler
62
67
  """
63
68
  end
64
69
 
@@ -1,3 +1,3 @@
1
1
  module Rpbundle
2
- VERSION = "0.0.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpbundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Soman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-01 00:00:00.000000000 Z
11
+ date: 2014-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-processing