ritalin 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -7
- data/README.rdoc +8 -2
- data/VERSION +1 -1
- data/lib/ritalin.rb +11 -2
- data/ritalin.gemspec +1 -2
- metadata +1 -2
- data/pkg/ritalin-0.0.1.gem +0 -0
data/.gitignore
CHANGED
data/README.rdoc
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= ritalin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
IRB profile management. Handles the required gems for IRB sessions.
|
|
4
4
|
|
|
5
5
|
= installation
|
|
6
6
|
|
|
@@ -15,4 +15,10 @@ The ritalin gem is hosted on gemcutter.org:
|
|
|
15
15
|
$ ritalin -a mongo mongo_mapper taggable grip
|
|
16
16
|
|
|
17
17
|
# use that profile
|
|
18
|
-
$ ritalin mongo
|
|
18
|
+
$ ritalin mongo
|
|
19
|
+
|
|
20
|
+
# list all profiles
|
|
21
|
+
$ ritalin -l
|
|
22
|
+
|
|
23
|
+
# delete the profile
|
|
24
|
+
$ ritalin -d mongo
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.2
|
data/lib/ritalin.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
require 'yaml'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
# for later windows support
|
|
4
|
+
#irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
|
5
|
+
#cmd_opts = {:irb => irb}
|
|
5
6
|
|
|
6
7
|
module Ritalin
|
|
7
8
|
PATH_TO_FILE = `echo $HOME`.strip + "/.ritalinrc"
|
|
@@ -34,6 +35,12 @@ module Ritalin
|
|
|
34
35
|
new name,list[name.to_sym]
|
|
35
36
|
end
|
|
36
37
|
|
|
38
|
+
def delete
|
|
39
|
+
list = Profile.list
|
|
40
|
+
list.delete(self.name.to_sym)
|
|
41
|
+
File.open(PATH_TO_FILE,'w') {|f| f.puts list.to_yaml }
|
|
42
|
+
end
|
|
43
|
+
|
|
37
44
|
def irb_cmd
|
|
38
45
|
"irb -r #{self.libs.join(" -r")}"
|
|
39
46
|
end
|
|
@@ -57,6 +64,8 @@ module Ritalin
|
|
|
57
64
|
Profile.new(profile_name,libs).add_to_file
|
|
58
65
|
when args.include?("-l")
|
|
59
66
|
Profile.output_list
|
|
67
|
+
when args.include?("-d")
|
|
68
|
+
Profile.find(args.pop).delete
|
|
60
69
|
else
|
|
61
70
|
system Profile.find(args.first).irb_cmd
|
|
62
71
|
end
|
data/ritalin.gemspec
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{ritalin}
|
|
8
|
-
s.version = "0.0.
|
|
8
|
+
s.version = "0.0.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["twoism"]
|
|
@@ -24,7 +24,6 @@ Gem::Specification.new do |s|
|
|
|
24
24
|
"VERSION",
|
|
25
25
|
"bin/ritalin",
|
|
26
26
|
"lib/ritalin.rb",
|
|
27
|
-
"pkg/ritalin-0.0.1.gem",
|
|
28
27
|
"ritalin.gemspec"
|
|
29
28
|
]
|
|
30
29
|
s.homepage = %q{http://github.com/twoism/ritalin}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ritalin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- twoism
|
|
@@ -28,7 +28,6 @@ files:
|
|
|
28
28
|
- VERSION
|
|
29
29
|
- bin/ritalin
|
|
30
30
|
- lib/ritalin.rb
|
|
31
|
-
- pkg/ritalin-0.0.1.gem
|
|
32
31
|
- ritalin.gemspec
|
|
33
32
|
has_rdoc: true
|
|
34
33
|
homepage: http://github.com/twoism/ritalin
|
data/pkg/ritalin-0.0.1.gem
DELETED
|
Binary file
|