mario 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source :rubygems
2
+
3
+ group :test do
4
+ gem 'mocha'
5
+ gem 'shoulda'
6
+ gem 'ruby-debug' if RUBY_VERSION < '1.9'
7
+ end
@@ -0,0 +1,14 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ mocha (0.9.10)
5
+ rake
6
+ rake (0.8.7)
7
+ shoulda (2.11.3)
8
+
9
+ PLATFORMS
10
+ ruby
11
+
12
+ DEPENDENCIES
13
+ mocha
14
+ shoulda
data/README.md CHANGED
@@ -89,6 +89,8 @@ Any class defined in Mario::Platform.targets can be used as symbol for `platform
89
89
  >> Mario::Platform.targets.map{ |t| Mario::Platform.klass_to_method(t).to_sym }
90
90
  => [:cygwin, :linux, :bsd, :solaris, :tiger, :leopard, :snowleopard, :darwin, :windows7, :windowsnt]
91
91
 
92
+ along with `:windows` and `:nix` (just as you can query for those via Mario::Platform.windows? and Mario::Platform.nix?).
93
+
92
94
  testing
93
95
  -------
94
96
  When testing your app you'll want to force the platform that mario reports to test your platform specific methods. In order to accomplish this make sure to defer the method definition done by the `platform` class method in the following manner.
data/Rakefile CHANGED
@@ -44,8 +44,6 @@ rescue LoadError
44
44
  end
45
45
  end
46
46
 
47
- task :test => :check_dependencies
48
-
49
47
  task :default => :test
50
48
 
51
49
  require 'rake/rdoctask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,14 +5,14 @@ module Mario
5
5
  @@current = nil
6
6
 
7
7
  class << self
8
-
8
+
9
9
  # A list of unix like operating system classes
10
10
  #
11
11
  # @return [Array[Class]]
12
12
  def nix_group
13
13
  [Cygwin, Linux, BSD, Solaris] + darwin_group
14
14
  end
15
-
15
+
16
16
  # A list of windows operating system classes
17
17
  #
18
18
  # @return [Array[Class]]
@@ -31,7 +31,7 @@ module Mario
31
31
 
32
32
  # The union of the {nix_group} and {windows_group} operating system class sets, each operating system
33
33
  # test method ( ie linux? ) is built from this set of class constants
34
- #
34
+ #
35
35
  # @return [Array[Class]]
36
36
  def targets
37
37
  nix_group | windows_group
@@ -52,7 +52,7 @@ module Mario
52
52
  end
53
53
 
54
54
  # Checks if the current platform is part of the {darwin_group} and returns that class
55
- #
55
+ #
56
56
  # @return [Class]
57
57
  def darwin?
58
58
  check_group(darwin_group)
@@ -72,7 +72,7 @@ module Mario
72
72
  #
73
73
  # @return [String]
74
74
  def target_os
75
- @@forced ? @@forced.target : Config::CONFIG['target_os']
75
+ @@forced ? @@forced.target : RbConfig::CONFIG['target_os']
76
76
  end
77
77
 
78
78
  # Checks an os class against {target_os}
@@ -91,7 +91,7 @@ module Mario
91
91
  Mario::Platform.target_os will now report as '#{target_os}' and #{klass} will be used for all functionality including operating system checks, platform blocks, and hat based functionality
92
92
  msg
93
93
  end
94
-
94
+
95
95
  # Returns the value of the currently forced operating system class if any
96
96
  #
97
97
  # @return [Class]
@@ -128,7 +128,7 @@ msg
128
128
  def klass_to_method(klass)
129
129
  klass.to_s.downcase.split('::').last
130
130
  end
131
-
131
+
132
132
  def check_symbol(name)
133
133
  send(name.to_s + '?')
134
134
  end
@@ -137,16 +137,16 @@ msg
137
137
  # NOTE Any additional functionality and they should be moved to a lib/platforms/<OS>.rb
138
138
  class Cygwin
139
139
  include Hats::Nix
140
-
140
+
141
141
  def self.target
142
142
  'cygwin'
143
143
  end
144
144
  end
145
145
 
146
- class Darwin
146
+ class Darwin
147
147
  include Hats::Nix
148
148
 
149
- def self.target
149
+ def self.target
150
150
  'darwin'
151
151
  end
152
152
  end
@@ -179,7 +179,7 @@ msg
179
179
 
180
180
  class BSD
181
181
  include Hats::Nix
182
-
182
+
183
183
  def self.target
184
184
  'bsd'
185
185
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mario
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 2
9
+ version: 0.1.2
5
10
  platform: ruby
6
11
  authors:
7
12
  - John Bender
@@ -9,29 +14,35 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-04-16 00:00:00 -07:00
17
+ date: 2010-12-23 00:00:00 -08:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: shoulda
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
30
+ type: :development
31
+ prerelease: false
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: mocha
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
30
37
  requirements:
31
38
  - - ">="
32
39
  - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
33
42
  version: "0"
34
- version:
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: *id002
35
46
  description: Mario is a collection of utilities for dealing with platform specific issues
36
47
  email: john.m.bender@gmail.com
37
48
  executables: []
@@ -43,7 +54,8 @@ extra_rdoc_files:
43
54
  - README.md
44
55
  files:
45
56
  - .document
46
- - .gitignore
57
+ - Gemfile
58
+ - Gemfile.lock
47
59
  - LICENSE
48
60
  - README.md
49
61
  - Rakefile
@@ -65,26 +77,30 @@ homepage: http://github.com/johnbender/mario
65
77
  licenses: []
66
78
 
67
79
  post_install_message:
68
- rdoc_options:
69
- - --charset=UTF-8
80
+ rdoc_options: []
81
+
70
82
  require_paths:
71
83
  - lib
72
84
  required_ruby_version: !ruby/object:Gem::Requirement
85
+ none: false
73
86
  requirements:
74
87
  - - ">="
75
88
  - !ruby/object:Gem::Version
89
+ segments:
90
+ - 0
76
91
  version: "0"
77
- version:
78
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
+ none: false
79
94
  requirements:
80
95
  - - ">="
81
96
  - !ruby/object:Gem::Version
97
+ segments:
98
+ - 0
82
99
  version: "0"
83
- version:
84
100
  requirements: []
85
101
 
86
102
  rubyforge_project:
87
- rubygems_version: 1.3.5
103
+ rubygems_version: 1.3.7
88
104
  signing_key:
89
105
  specification_version: 3
90
106
  summary: Mario is a collection of utilities for dealing with platform specific issues
data/.gitignore DELETED
@@ -1,28 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
22
- vendor
23
- Gemfile
24
- Gemfile.lock
25
- .bundle
26
- *.gem
27
- doc
28
- .yardoc