ric 0.9.6file → 0.9.7

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.
@@ -1,7 +1,9 @@
1
1
  # would like to have this in YML format :)
2
2
 
3
+ 2011-01-16 v0.9.7:
4
+ - ric_help fixed
5
+ - VERSION made DRY! (same in module Ric.version and into gem! Its extremely unefficient but thats the price for dryness!)
3
6
  2011-01-16 v0.9.6:
4
7
  - colors are broken, I implemnent a small test script in bin/
5
-
6
8
  2011-01-16 v0.9.2:
7
9
  - Added uniquify from rbates just to copy it.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.6file
1
+ 0.9.7
@@ -12,6 +12,7 @@
12
12
 
13
13
  # When this works, just remove it!
14
14
  #require 'ric'
15
+ $ver = '1.2.0'
15
16
 
16
17
  def richiedi(str)
17
18
  avail = `gem list #{str}`.split("\n").select{|line| line.match( /#{str} /) }.join('')
@@ -31,11 +32,9 @@ end
31
32
 
32
33
  def main()
33
34
  begin
34
- nputs "RicLib Test (you should see something green): '#{ $0 }'"
35
+ nputs "RicLib Test v#{$ver} (you should see something green): '#{ $0 }'"
35
36
  nputs "#{richiedi(:rubygems)}"
36
- nputs "#{richiedi(:riclib)}"
37
37
  nputs "#{richiedi(:ric)}"
38
- require 'ric'
39
38
  Ric.say_hello
40
39
  nputs Ric.version
41
40
  nputs "Now invoking: #{white 'Ric.ric_help' }"
data/init.rb CHANGED
@@ -6,7 +6,6 @@ require 'uniquify'
6
6
 
7
7
  #include Ric
8
8
  #include Ric::Html
9
- #include Ric Colors
10
9
 
11
10
  #require 'rails_stuff'
12
11
  #require 'doesnt_exist'
data/lib/ric.rb CHANGED
@@ -1,11 +1,15 @@
1
1
 
2
2
  # RICLIB!
3
3
  module Ric
4
+ $version
5
+ require File.expand_path('ric_colors.rb', File.dirname( __FILE__) )
6
+ #include RicColors
4
7
 
5
8
  def self.version
9
+ # TODO memoize/cache this into @@version
6
10
  #File.read( 'VERSION' ) rescue "0.0.42_bugged"
7
- '(Wet) 0.9.6' # its NOT dry (yet)! Someone help with Gem version!
8
- "Wet-0.9.6 (See file in '#{gempwd}')"
11
+ #{}"0.9.6WET (See file in '#{Ric.gemdir}')"
12
+ File.read( File.expand_path('VERSION' , Ric.gemdir ) )
9
13
  end
10
14
 
11
15
  def self.say_hello
@@ -13,7 +17,7 @@ module Ric
13
17
  end
14
18
 
15
19
  def self.ric_help
16
- ret <<-HTML
20
+ ret = <<-HTML
17
21
  == Ric (formerly RicLib) ==
18
22
  This is Riccardo library (my first gem!). Try the following commands maybe
19
23
  Try some of the following:
@@ -21,19 +25,25 @@ module Ric
21
25
  pred 'This is in red'
22
26
  pyellow 'This is yellow instead'
23
27
 
24
- gem_basedir: #{ gem_basedir }
28
+ gemdir: #{ gemdir }
25
29
  HTML
26
30
  puts( ret )
27
31
  ret
28
32
  end
29
- #alias :help :ric_help
33
+ alias :help :ric_help
30
34
  #alias :about :ric_help
31
35
 
32
- def gem_basedir
33
- File.dir(__FILE__)
36
+ def self.gemdir
37
+ File.dirname( File.dirname(__FILE__) + '../' )
34
38
  end
35
- alias :gempwd :gem_basedir
36
39
 
40
+ def foo
41
+ :bar
42
+ end
43
+
44
+ def self.foo
45
+ 'self.bar'
46
+ end
37
47
 
38
48
  # you can require more than one gem and a symbol as well :)
39
49
  def self.richiedi(gems)
@@ -48,6 +58,6 @@ module Ric
48
58
  end
49
59
  end
50
60
 
51
-
52
-
53
61
  end
62
+
63
+ include Ric
@@ -268,7 +268,7 @@ module RicColors
268
268
  }
269
269
  =end
270
270
 
271
- class RicColor < String
271
+ class RicColor < String
272
272
  attr :color
273
273
 
274
274
  def initialize(mycol)
@@ -276,6 +276,7 @@ module RicColors
276
276
  @color = mycol
277
277
  end
278
278
 
279
+ # shouold become context sensitive...
279
280
  def to_s
280
281
  'RicColor: ' + self.send(@color)
281
282
  end
@@ -283,7 +284,9 @@ module RicColors
283
284
  def to_html
284
285
  "<font color=\"#{@color}\" >#{self}</font>"
285
286
  end
286
- end #/Class RicColor
287
+ end #/Class RicColor
288
+
289
+
287
290
 
288
291
  def terminal
289
292
  ENV['TERM_PROGRAM'] || 'suppongo_ssh'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ric}
5
- s.version = "0.9.6file"
5
+ s.version = "0.9.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Riccardo Carlesso"]
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ric
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1144627187
5
- prerelease: 5
4
+ hash: 53
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 6
10
- - file
11
- version: 0.9.6file
9
+ - 7
10
+ version: 0.9.7
12
11
  platform: ruby
13
12
  authors:
14
13
  - Riccardo Carlesso