rubylabs 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
data/bin/lab_setup.rb ADDED
@@ -0,0 +1,38 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ # Create or update the user's .irbrc file. Set the prompt to the simple prompt
4
+ # shown in the textbook, but if there is already a prompt setting don't change it.
5
+ # Add lines to require rubygems and rubylabs on each new IRB session.
6
+
7
+ def configure
8
+ Dir.chdir do
9
+ irbrc = File.exist?(".irbrc") ? File.open(".irbrc").readlines : []
10
+ newlines = []
11
+ if irbrc.grep(/PROMPT_MODE/).empty?
12
+ newlines << "IRB.conf[:PROMPT_MODE] = :SIMPLE"
13
+ end
14
+ ['rubygems','rubylabs'].each do |file|
15
+ if irbrc.grep(/require '#{file}'/).empty?
16
+ newlines << "require '#{file}'"
17
+ end
18
+ end
19
+ if newlines.empty?
20
+ puts ".irbrc already initialized -- no changes made"
21
+ else
22
+ puts "adding lines to .irbrc:"
23
+ File.open(".irbrc", "a") do |f|
24
+ f.puts "# lines added by RubyLabs installer script"
25
+ newlines.each do |line|
26
+ f.puts line
27
+ puts " " + line
28
+ end
29
+ end
30
+ end
31
+ end
32
+ puts "** .irbrc configuration: OK\n"
33
+ end
34
+
35
+ if !defined? IRB
36
+ puts "configuring interactive Ruby environment"
37
+ # configure
38
+ end
File without changes
data/bin/statistics2.rb CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubylabs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - conery
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-24 00:00:00 -08:00
12
+ date: 2009-11-25 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -17,6 +17,7 @@ description: A set of modules for interactive experiments in an introductory com
17
17
  email: conery@cs.uoregon.edu
18
18
  executables:
19
19
  - bb.rb
20
+ - lab_setup.rb
20
21
  - statistics2.rb
21
22
  extensions: []
22
23
 
@@ -29,6 +30,7 @@ files:
29
30
  - Rakefile
30
31
  - VERSION
31
32
  - bin/bb.rb
33
+ - bin/lab_setup.rb
32
34
  - bin/statistics2-0.53/ext/extconf.rb
33
35
  - bin/statistics2-0.53/ext/show.rb
34
36
  - bin/statistics2-0.53/ext/t.rb