atto 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. metadata +32 -25
  3. data/lib/atto/opt.rb +0 -64
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/clean'
4
4
  CLEAN.include("pkg/*.gem")
5
5
 
6
6
 
7
- ATTO_VERSION = "0.9.1"
7
+ ATTO_VERSION = "0.9.2"
8
8
 
9
9
  def apply_spec_defaults(s)
10
10
  end
metadata CHANGED
@@ -1,58 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: atto
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.1
3
+ version: !ruby/object:Gem::Version
5
4
  prerelease:
5
+ version: 0.9.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Beoran
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-16 00:00:00.000000000Z
12
+
13
+ date: 2011-12-13 00:00:00 Z
13
14
  dependencies: []
14
- description: ! 'An ultra-tiny self-contained testing framework. '
15
+
16
+ description: "An ultra-tiny self-contained testing framework. "
15
17
  email: beoran@rubyforge.org
16
- executables:
18
+ executables:
17
19
  - atto
18
20
  extensions: []
21
+
19
22
  extra_rdoc_files: []
20
- files:
23
+
24
+ files:
21
25
  - Rakefile
22
26
  - README
23
27
  - lib/atto.rb
24
- - lib/atto/ansi.rb
25
- - lib/atto/run.rb
26
- - lib/atto/cop.rb
27
28
  - lib/atto/test.rb
28
- - lib/atto/opt.rb
29
+ - lib/atto/cop.rb
30
+ - lib/atto/run.rb
31
+ - lib/atto/ansi.rb
29
32
  - test/test_atto.rb
30
- - test/atto/test_cop.rb
31
33
  - test/atto/test_ansi.rb
34
+ - test/atto/test_cop.rb
32
35
  - test/atto/test_test.rb
33
36
  - bin/atto
34
37
  homepage: https://github.com/beoran/atto
35
38
  licenses: []
39
+
36
40
  post_install_message:
37
41
  rdoc_options: []
38
- require_paths:
42
+
43
+ require_paths:
39
44
  - lib
40
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ required_ruby_version: !ruby/object:Gem::Requirement
41
46
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: "0"
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
52
  none: false
48
- requirements:
49
- - - ! '>='
50
- - !ruby/object:Gem::Version
51
- version: '0'
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "0"
52
57
  requirements: []
58
+
53
59
  rubyforge_project:
54
- rubygems_version: 1.8.5
60
+ rubygems_version: 1.8.12
55
61
  signing_key:
56
62
  specification_version: 3
57
63
  summary: An ultra-tiny self-contained testing framework.
58
64
  test_files: []
65
+
@@ -1,64 +0,0 @@
1
- module Atto
2
- # A module for handling command line options
3
- module Opt
4
-
5
- # Gets an argument in the long form
6
- def self.getargument(key, default=nil)
7
- keyarg = key.to_s.downcase.gsub(/[_ ]/, '-')
8
- arg = ARGS.select{ |f| f =~ /\A--#{keyarg}(\Z|\=)/ }.last
9
- return default, false unless arg
10
- ind = arg.index('=')
11
- if ind
12
- res = arg[ind + 1, arg.size]
13
- return res, true unless res.empty?
14
- return default, true
15
- end
16
- return true, true
17
- end
18
-
19
- # Gets an argument in the short form
20
- def self.getarg(key, default = nil)
21
- shortarg = key.to_s[0]
22
- arg = ARGS.index{ |f| f =~ /\A-#{shortarg}\Z)/ }.last
23
- return default, false unless arg
24
- return ARGS[arg+1] || default, true
25
- end
26
-
27
- # Gets an environment variable
28
- def self.getenv
29
- envarg = key.to_s.upcase.gsub(/[ \-]/, '_')
30
- env = ENV[envarg]
31
- return default, false unless env
32
- return env || default, true
33
- end
34
-
35
- # Gets an option from arguments or from the environment (in that order)
36
- def self.get(key, default = nil)
37
- keyarg = key.to_s.downcase.gsub(/[_ ]/, '-')
38
- arg = ARGS.select{ |f| f =~ /\A--#{keyarg}(\Z|\=)/ }.last
39
- if arg
40
- ind = arg.index('=')
41
- if ind
42
- res = arg[ind + 1, arg.size]
43
- return res unless res.empty?
44
- return default
45
- else
46
- return default || true
47
- end
48
- end
49
- # Short arguments
50
- shortarg = key.to_s[0]
51
- arg = ARGS.index{ |f| f =~ /\A-#{shortarg}\Z)/ }.last
52
-
53
-
54
- envarg = key.to_s.upcase.gsub(/[ \-]/, '_')
55
- env = ENV[envarg]
56
- return env || default
57
- end
58
-
59
- def [](key)
60
- return self.get(key)
61
- end
62
-
63
- end
64
- end