mario 0.1.2 → 0.1.3

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.
@@ -0,0 +1,27 @@
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
+ .bundle
24
+ *.gem
25
+ doc
26
+ Gemfile.lock
27
+ .yardoc
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
- source :rubygems
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
2
4
 
3
5
  group :test do
4
- gem 'mocha'
5
- gem 'shoulda'
6
6
  gem 'ruby-debug' if RUBY_VERSION < '1.9'
7
7
  end
data/Rakefile CHANGED
@@ -1,24 +1,6 @@
1
1
  require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "mario"
8
- gem.summary = %Q{ Mario is a collection of utilities for dealing with platform specific issues }
9
- gem.description = gem.summary
10
- gem.email = "john.m.bender@gmail.com"
11
- gem.homepage = "http://github.com/johnbender/mario"
12
- gem.authors = ["John Bender"]
13
- gem.add_development_dependency "shoulda", ">= 0"
14
- gem.add_development_dependency "mocha"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
- end
21
-
2
+ require 'bundler/setup'
3
+ Bundler::GemHelper.install_tasks
22
4
 
23
5
  #
24
6
  # TODO add platform specific checks for easy verification on each platform
@@ -1,9 +1,10 @@
1
+ module Mario
2
+ autoload :Platform, "mario/platform"
3
+ autoload :Tools, "mario/tools"
4
+ autoload :VERSION, "mario/version"
1
5
 
2
- require 'rbconfig'
3
- require 'logger'
4
- lib = File.dirname(__FILE__)
5
- %w{
6
- mario/util/object mario/hats/nix mario/hats/windows
7
- mario/platform mario/tools
8
- }.each { |file| require File.expand_path(file, lib) }
9
-
6
+ module Hats
7
+ autoload :Nix, "mario/hats/nix"
8
+ autoload :Windows, "mario/hats/windows"
9
+ end
10
+ end
@@ -2,9 +2,8 @@
2
2
  module Mario
3
3
  module Hats
4
4
  module Nix
5
-
6
5
  # Escapes paths for use in execute statements
7
- #
6
+ #
8
7
  # @param [String]
9
8
  # @return [String]
10
9
  def shell_escape_path(str)
@@ -1,3 +1,7 @@
1
+ require "rbconfig"
2
+ require "logger"
3
+ require "mario/util/object"
4
+
1
5
  module Mario
2
6
  class Platform
3
7
  @@forced = nil
@@ -2,38 +2,38 @@ module Mario
2
2
  module Tools
3
3
  @@class_method_blocks = {}
4
4
  @@defer_method_definition = false
5
-
5
+
6
6
  def defer_method_definition
7
7
  @@defer_method_definition
8
- end
9
-
8
+ end
9
+
10
10
  def defer_method_definition=(val)
11
11
  @@defer_method_definition=val
12
12
  end
13
-
13
+
14
14
  def defer_method_definition!
15
15
  @@defer_method_definition=true
16
16
  end
17
17
 
18
18
  module_function :defer_method_definition, :defer_method_definition=, :defer_method_definition!
19
-
19
+
20
20
  def platform(name, method=nil, &block)
21
21
  @@class_method_blocks[self] ||= {}
22
22
  @@class_method_blocks[self][name] = method ? [ method , block ] : block
23
23
  define_platform_methods! unless defer_method_definition
24
24
  end
25
-
25
+
26
26
  def platform_value_map(map={})
27
27
  map.each do |key, value|
28
28
  return value if Platform.check_symbol(key)
29
29
  end
30
30
  end
31
-
31
+
32
32
  def define_platform_methods!
33
33
  @@class_method_blocks[self].each do |name, value|
34
34
  if Platform.check_symbol(name)
35
35
  if value.is_a?(Proc)
36
- self.class_eval &value
36
+ self.class_eval &value
37
37
  else
38
38
  define_method value.first, &value.last
39
39
  end
@@ -0,0 +1,3 @@
1
+ module Mario
2
+ VERSION = "0.1.3"
3
+ end
@@ -1,68 +1,23 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
1
+ $:.unshift File.expand_path("../lib", __FILE__)
2
+ require "mario/version"
5
3
 
6
4
  Gem::Specification.new do |s|
7
- s.name = %q{mario}
8
- s.version = "0.1.1"
5
+ s.name = "mario"
6
+ s.version = Mario::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.authors = ["John Bender"]
9
+ s.email = ["john.m.bender@gmail.com"]
10
+ s.homepage = "http://github.com/johnbender/mario"
11
+ s.summary = "Mario is a collection of utilities for dealing with platform specific issues."
12
+ s.description = "Mario is a collection of utilities for dealing with platform specific issues."
9
13
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["John Bender"]
12
- s.date = %q{2010-04-16}
13
- s.description = %q{Mario is a collection of utilities for dealing with platform specific issues}
14
- s.email = %q{john.m.bender@gmail.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/mario.rb",
27
- "lib/mario/hats/nix.rb",
28
- "lib/mario/hats/windows.rb",
29
- "lib/mario/platform.rb",
30
- "lib/mario/tools.rb",
31
- "lib/mario/util/object.rb",
32
- "mario.gemspec",
33
- "test/helper.rb",
34
- "test/mario/hats/test_nix.rb",
35
- "test/mario/hats/test_windows.rb",
36
- "test/mario/test_plaform.rb",
37
- "test/mario/test_tools.rb"
38
- ]
39
- s.homepage = %q{http://github.com/johnbender/mario}
40
- s.rdoc_options = ["--charset=UTF-8"]
41
- s.require_paths = ["lib"]
42
- s.rubygems_version = %q{1.3.5}
43
- s.summary = %q{Mario is a collection of utilities for dealing with platform specific issues}
44
- s.test_files = [
45
- "test/helper.rb",
46
- "test/mario/hats/test_nix.rb",
47
- "test/mario/hats/test_windows.rb",
48
- "test/mario/test_plaform.rb",
49
- "test/mario/test_tools.rb"
50
- ]
14
+ s.required_rubygems_version = ">= 1.3.6"
15
+ s.rubyforge_project = "mario"
51
16
 
52
- if s.respond_to? :specification_version then
53
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
54
- s.specification_version = 3
17
+ s.add_development_dependency "shoulda", ">= 0"
18
+ s.add_development_dependency "mocha"
55
19
 
56
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
57
- s.add_development_dependency(%q<shoulda>, [">= 0"])
58
- s.add_development_dependency(%q<mocha>, [">= 0"])
59
- else
60
- s.add_dependency(%q<shoulda>, [">= 0"])
61
- s.add_dependency(%q<mocha>, [">= 0"])
62
- end
63
- else
64
- s.add_dependency(%q<shoulda>, [">= 0"])
65
- s.add_dependency(%q<mocha>, [">= 0"])
66
- end
20
+ s.files = `git ls-files`.split("\n")
21
+ s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
22
+ s.require_path = 'lib'
67
23
  end
68
-
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Bender
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-23 00:00:00 -08:00
17
+ date: 2011-03-08 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -43,29 +43,29 @@ dependencies:
43
43
  type: :development
44
44
  prerelease: false
45
45
  version_requirements: *id002
46
- description: Mario is a collection of utilities for dealing with platform specific issues
47
- email: john.m.bender@gmail.com
46
+ description: Mario is a collection of utilities for dealing with platform specific issues.
47
+ email:
48
+ - john.m.bender@gmail.com
48
49
  executables: []
49
50
 
50
51
  extensions: []
51
52
 
52
- extra_rdoc_files:
53
- - LICENSE
54
- - README.md
53
+ extra_rdoc_files: []
54
+
55
55
  files:
56
56
  - .document
57
+ - .gitignore
57
58
  - Gemfile
58
- - Gemfile.lock
59
59
  - LICENSE
60
60
  - README.md
61
61
  - Rakefile
62
- - VERSION
63
62
  - lib/mario.rb
64
63
  - lib/mario/hats/nix.rb
65
64
  - lib/mario/hats/windows.rb
66
65
  - lib/mario/platform.rb
67
66
  - lib/mario/tools.rb
68
67
  - lib/mario/util/object.rb
68
+ - lib/mario/version.rb
69
69
  - mario.gemspec
70
70
  - test/helper.rb
71
71
  - test/mario/hats/test_nix.rb
@@ -86,6 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
+ hash: 764915750712082105
89
90
  segments:
90
91
  - 0
91
92
  version: "0"
@@ -95,18 +96,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
96
  - - ">="
96
97
  - !ruby/object:Gem::Version
97
98
  segments:
98
- - 0
99
- version: "0"
99
+ - 1
100
+ - 3
101
+ - 6
102
+ version: 1.3.6
100
103
  requirements: []
101
104
 
102
- rubyforge_project:
105
+ rubyforge_project: mario
103
106
  rubygems_version: 1.3.7
104
107
  signing_key:
105
108
  specification_version: 3
106
- summary: Mario is a collection of utilities for dealing with platform specific issues
107
- test_files:
108
- - test/helper.rb
109
- - test/mario/hats/test_nix.rb
110
- - test/mario/hats/test_windows.rb
111
- - test/mario/test_plaform.rb
112
- - test/mario/test_tools.rb
109
+ summary: Mario is a collection of utilities for dealing with platform specific issues.
110
+ test_files: []
111
+
@@ -1,14 +0,0 @@
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/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.2