summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-08-27 10:15:51 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-08-28 18:17:40 -0700
commit828847d322c3e8239a73c5615b323c28ded4ad03 (patch)
tree870353ea20c7087a099370ff6fc9105d26ba896e
parent3a853284da6d566bf96c21a8a5af0413c73c0b6a (diff)
downloadchef-828847d322c3e8239a73c5615b323c28ded4ad03.tar.gz
Remove dependency on windows-prjdm/now-winds-prjdm/now-windows-pr
-rw-r--r--chef-windows.gemspec1
-rw-r--r--lib/chef/util/windows.rb32
2 files changed, 0 insertions, 33 deletions
diff --git a/chef-windows.gemspec b/chef-windows.gemspec
index 428174889f..2a7ad86f92 100644
--- a/chef-windows.gemspec
+++ b/chef-windows.gemspec
@@ -12,7 +12,6 @@ gemspec.add_dependency "win32-mutex", "~> 0.4.2"
gemspec.add_dependency "win32-process", "~> 0.7.5"
gemspec.add_dependency "win32-service", "~> 0.8.7"
gemspec.add_dependency "windows-api", "~> 0.4.4"
-gemspec.add_dependency "windows-pr", "~> 1.2.4"
gemspec.add_dependency "wmi-lite", "~> 1.0"
gemspec.extensions << "ext/win32-eventlog/Rakefile"
gemspec.files += %w(ext/win32-eventlog/Rakefile ext/win32-eventlog/chef-log.man)
diff --git a/lib/chef/util/windows.rb b/lib/chef/util/windows.rb
index 777fe4adbb..7d29a67ac5 100644
--- a/lib/chef/util/windows.rb
+++ b/lib/chef/util/windows.rb
@@ -15,42 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-#requires: gem install windows-pr
-require 'windows/api'
-require 'windows/error'
-require 'windows/handle'
-require 'windows/unicode'
-require 'windows/msvcrt/buffer'
-require 'windows/msvcrt/string'
-require 'windows/network/management'
class Chef
class Util
class Windows
- protected
-
- include ::Windows::Error
- include ::Windows::Unicode
- include ::Windows::MSVCRT::Buffer
- include ::Windows::MSVCRT::String
- include ::Windows::Network::Management
-
- PTR_SIZE = 4 #XXX 64-bit
-
- def lpwstr_to_s(buffer, offset)
- str = 0.chr * (256 * 2) #XXX unhardcode this length (*2 for WCHAR)
- wcscpy str, buffer[offset*PTR_SIZE,PTR_SIZE].unpack('L')[0]
- wide_to_multi str
- end
-
- def dword_to_i(buffer, offset)
- buffer[offset*PTR_SIZE,PTR_SIZE].unpack('i')[0] || 0
- end
-
- #return pointer for use with pack('L')
- def str_to_ptr(v)
- [v].pack('p*').unpack('L')[0]
- end
end
end
end