rbml 0.0.5.9.4 → 0.0.5.9.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,13 @@ cli :name=>"happycli", :prompt=>"^_^ " do
6
6
  set :check do
7
7
  puts make_sure('do you really want to do that?')
8
8
  end
9
+
10
+ set :test do |args|
11
+ flag(:option => 'o'){|value|
12
+ puts value.inspect
13
+ }
14
+ process args
15
+ end
9
16
 
10
17
  set :com do |args|
11
18
  flag(:help => 'h'){
@@ -25,13 +25,12 @@ module CliTools
25
25
  end
26
26
 
27
27
  def choice say, array, with=nil
28
- return nil if with == $/
29
- with||=''
28
+ return nil if with == ''
30
29
  new_array = []
31
30
  array.size.times do |i|
32
- if (array[i]=~/#{with}/) || (with.to_i==i+1)
33
- new_array << "#{array[i]}"
34
- puts "\t#{new_array.size}: #{new_array.last}"
31
+ if (array[i].to_s=~/#{with}/) || (with.to_i==i+1)
32
+ new_array << array[i]
33
+ puts "\t#{new_array.size}: #{new_array.last.to_s}"
35
34
  end
36
35
  end
37
36
  new_array.empty? ? nil : (new_array.size==1 ? new_array.first : choice(say, new_array, request_value(say)))
@@ -96,11 +95,11 @@ module Flagger
96
95
  flag_set.shift
97
96
  unless flag_set.flag?
98
97
  while not flag_set.empty?
99
- @active_flags.merge!({flag_key_for(flag_set.shift) => (flag_set.empty? && args.first) ? (args.first.flag? or args.shift ) : true})
98
+ @active_flags.merge!({flag_key_for(flag_set.shift) => (flag_set.empty? && args.first) ? (args.first.flag? or args.shift ) : nil})
100
99
  end
101
100
  else
102
101
  flag_set.shift
103
- @active_flags.merge!({flag_key_for(flag_set) => (args.first ? (args.first.flag? or args.shift) : true) })
102
+ @active_flags.merge!({flag_key_for(flag_set) => (args.first ? (args.first.flag? or args.shift) : nil) })
104
103
  end
105
104
  end
106
105
  @active_flags
data/lib/doc.rb CHANGED
@@ -15,9 +15,9 @@ module Rbml
15
15
  d.assemble_doc << result
16
16
  end
17
17
  end
18
- d.assemble_doc << d.dsl.start_tag(options)
18
+ d.assemble_doc << d.dsl.start_tag(options) unless options[:partial]
19
19
  d.instance_eval_each(block, &display)
20
- d.assemble_doc << d.dsl.end_tag
20
+ d.assemble_doc << d.dsl.end_tag unless options[:partial]
21
21
  d.formatted_doc = ''
22
22
  begin
23
23
  d.format
@@ -2,7 +2,7 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)) + "/../languages")
2
2
  $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Rbml
5
- VERSION = '0.0.5.9.4'
5
+ VERSION = '0.0.5.9.4.1'
6
6
  end
7
7
  require 'extensions/kernel'
8
8
  require 'extensions/primitives'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: rbml
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.5.9.4
7
- date: 2007-05-31 00:00:00 -04:00
6
+ version: 0.0.5.9.4.1
7
+ date: 2007-06-15 00:00:00 -04:00
8
8
  summary: Rbml is a dsl framework for writing other languages in ruby
9
9
  require_paths:
10
10
  - lib
@@ -67,8 +67,10 @@ test_files: []
67
67
 
68
68
  rdoc_options:
69
69
  - --inline-source
70
- extra_rdoc_files: []
71
-
70
+ extra_rdoc_files:
71
+ - History.txt
72
+ - Manifest.txt
73
+ - README.txt
72
74
  executables:
73
75
  - rbml
74
76
  extensions: []
@@ -83,5 +85,5 @@ dependencies:
83
85
  requirements:
84
86
  - - ">="
85
87
  - !ruby/object:Gem::Version
86
- version: 1.2.0
88
+ version: 1.2.1
87
89
  version: