dmorrill10-utils 1.1.1 → 1.2.1

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.
data/Rakefile CHANGED
@@ -1,28 +1,13 @@
1
1
  #!/usr/bin/env rake
2
2
 
3
3
  require "bundler/gem_tasks"
4
+
4
5
  require 'rake'
5
6
  require 'rake/testtask'
6
7
 
7
- require File.expand_path('../lib/dmorrill10-utils/version', __FILE__)
8
-
9
8
  Rake::TestTask.new do |t|
10
9
  t.libs << "lib" << 'spec/support'
11
10
  t.test_files = FileList['spec/**/*_spec.rb']
12
11
  t.verbose = true
13
12
  t.warning = true
14
- end
15
-
16
- desc 'Build gem'
17
- task :default => :build
18
-
19
- task :build => :spec do
20
- system "gem build dmorrill10-utils.gemspec"
21
- end
22
-
23
- task :tag => :build do
24
- puts "Tagging #{AcpcPokerTypes::VERSION}..."
25
- system "git tag -a #{AcpcPokerTypes::VERSION} -m 'Tagging #{AcpcPokerTypes::VERSION}'"
26
- puts "Pushing #{AcpcPokerTypes::VERSION} to git..."
27
- system "git push --tags"
28
- end
13
+ end
@@ -7,6 +7,8 @@ require 'dmorrill10-utils/string_form_manipulation'
7
7
  require 'dmorrill10-utils/process_runner'
8
8
  require 'dmorrill10-utils/singleton_logger'
9
9
  require 'dmorrill10-utils/debug_hash'
10
+ require 'dmorrill10-utils/yaml'
11
+ require 'dmorrill10-utils/object'
10
12
 
11
13
  module Dmorrill10
12
14
  module Utils
@@ -0,0 +1,7 @@
1
+ class Object
2
+ def to_h
3
+ Hash[instance_variables.map do |var|
4
+ [var[1..-1].to_sym, instance_variable_get(var)]
5
+ end]
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Dmorrill10
2
2
  module Utils
3
- VERSION = "1.1.1"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
@@ -0,0 +1,7 @@
1
+ module YAML
2
+ # Load the document contained in +filename+. Returns the yaml contained in
3
+ # +filename+ as a ruby object
4
+ def self.load_stream_from_file filename
5
+ File.open(filename, 'r:bom|utf-8') { |f| self.load_stream f, filename }
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmorrill10-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-04 00:00:00.000000000 Z
12
+ date: 2013-01-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: awesome_print
@@ -92,10 +92,12 @@ files:
92
92
  - lib/dmorrill10-utils/debug_hash.rb
93
93
  - lib/dmorrill10-utils/enumerable.rb
94
94
  - lib/dmorrill10-utils/integer.rb
95
+ - lib/dmorrill10-utils/object.rb
95
96
  - lib/dmorrill10-utils/process_runner.rb
96
97
  - lib/dmorrill10-utils/singleton_logger.rb
97
98
  - lib/dmorrill10-utils/string_form_manipulation.rb
98
99
  - lib/dmorrill10-utils/version.rb
100
+ - lib/dmorrill10-utils/yaml.rb
99
101
  - spec/process_runner_spec.rb
100
102
  - spec/support/spec_helper.rb
101
103
  homepage: https://github.com/dmorrill10/dmorrill10-utils