smb-client 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +85 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/smb/client.rb +2 -0
- data/lib/smb/client/client.rb +124 -0
- data/lib/smb/client/client_helper.rb +119 -0
- data/lib/smb/client/connection_error.rb +6 -0
- data/lib/smb/client/runtime_error.rb +6 -0
- data/lib/smb/client/version.rb +5 -0
- data/smb-client.gemspec +36 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9611e08df4c60e4278781668b7ab2fc373432592
|
4
|
+
data.tar.gz: 184445b65f712ad037d2473e71abb2695859c743
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6d351cb503ff2aaa09c95345860bc0847ab4a0d8dc969d41ef6524cd129fe7969d534bd4f56f0c9232accb5114fcc512623d7bbcffc8372b0f8d9e64cda7efce
|
7
|
+
data.tar.gz: 91c220e9cfa602d920f0deeb2de33201d0dd8529aed86b94bf7b328cab10f4859a69c894c814150db319cf133d7b8b4ea2376e13f96a37fb78b4e5ff6c97adbb
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ralf@rherzog.de. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
smb-client (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
minitest (5.10.3)
|
10
|
+
rake (10.5.0)
|
11
|
+
|
12
|
+
PLATFORMS
|
13
|
+
ruby
|
14
|
+
|
15
|
+
DEPENDENCIES
|
16
|
+
bundler (~> 1.16)
|
17
|
+
minitest (~> 5.0)
|
18
|
+
rake (~> 10.0)
|
19
|
+
smb-client!
|
20
|
+
|
21
|
+
BUNDLED WITH
|
22
|
+
1.16.0
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Ralf Herzog
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# SMB::Client
|
2
|
+
|
3
|
+
SMB::Client is a wrapper around the smbclient binary installed on your system.
|
4
|
+
|
5
|
+
Currently just the SMB2 protocol was tested.
|
6
|
+
|
7
|
+
Inspired by the [sambala](https://github.com/lp/sambala) gem.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'smb/client'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install smb-client
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
### Setup
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
options = {
|
31
|
+
host: 'Your host',
|
32
|
+
user: 'username',
|
33
|
+
share: 'share',
|
34
|
+
password: 'password',
|
35
|
+
version: 2
|
36
|
+
}
|
37
|
+
@smb_client = SMB::Client.new options
|
38
|
+
```
|
39
|
+
|
40
|
+
### List directories
|
41
|
+
|
42
|
+
Always returns an array with `LsItem` elements.
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
@smb_client.ls
|
46
|
+
ls_items = @smb_client.ls 'subdirectory/'
|
47
|
+
# => [#<SMB::ClientHelper::LsItem:0x007f3c58020468 @name=".", @type="D", @size=0, @change_time=2017-11-20 00:02:12 +0100>]
|
48
|
+
current_dir = ls_items.find { |ls_item| ls_item.name == '.' }
|
49
|
+
current_dir.file? # => false
|
50
|
+
current_dir.directory? # => true
|
51
|
+
current_dir.hidden? # => false
|
52
|
+
```
|
53
|
+
|
54
|
+
### Directories
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
@smb_client.mkdir(directory) # => true or raises
|
58
|
+
@smb_client.rmdir(directory) # => true or raises
|
59
|
+
```
|
60
|
+
|
61
|
+
### Files
|
62
|
+
```ruby
|
63
|
+
@smb_client.put(local_path, remote_path) # => true or raises
|
64
|
+
@smb_client.write(content, local_path) # => true or raises
|
65
|
+
@smb_client.del(filename) # => true or raises
|
66
|
+
@smb_client.read(filename) # => Reads content of file
|
67
|
+
```
|
68
|
+
|
69
|
+
## Development
|
70
|
+
|
71
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
72
|
+
|
73
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
74
|
+
|
75
|
+
## Contributing
|
76
|
+
|
77
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/RalfHerzog/smb-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
78
|
+
|
79
|
+
## License
|
80
|
+
|
81
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
82
|
+
|
83
|
+
## Code of Conduct
|
84
|
+
|
85
|
+
Everyone interacting in the SMB::Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/RalfHerzog/smb-client/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'smb/client'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start __FILE__
|
data/bin/setup
ADDED
data/lib/smb/client.rb
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
require 'pty'
|
2
|
+
require 'expect'
|
3
|
+
require 'open3'
|
4
|
+
require 'timeout'
|
5
|
+
|
6
|
+
require_relative 'connection_error'
|
7
|
+
require_relative 'client_helper'
|
8
|
+
require_relative 'runtime_error'
|
9
|
+
|
10
|
+
module SMB
|
11
|
+
class Client
|
12
|
+
include ClientHelper
|
13
|
+
|
14
|
+
attr_accessor :executable, :pid
|
15
|
+
|
16
|
+
def initialize(options = {})
|
17
|
+
@executable = ENV.fetch('SMBCLIENT_EXECUTABLE') { 'smbclient' }
|
18
|
+
@options = {
|
19
|
+
user: options[:user],
|
20
|
+
share: options[:share],
|
21
|
+
password: options[:password],
|
22
|
+
version: options[:version] || 2,
|
23
|
+
host: options[:host] || 'localhost',
|
24
|
+
workgroup: options[:workgroup] || 'WORKGROUP'
|
25
|
+
}
|
26
|
+
|
27
|
+
Thread.abort_on_exception = true
|
28
|
+
connect
|
29
|
+
|
30
|
+
# Pipe used to pass commands to pty
|
31
|
+
@read1, @write1 = IO.pipe
|
32
|
+
|
33
|
+
# Pipe used to pass responses from pty
|
34
|
+
@read2, @write2 = IO.pipe
|
35
|
+
|
36
|
+
# Indicates if first output should be ignored
|
37
|
+
@first_message = true
|
38
|
+
|
39
|
+
@connection_established = false
|
40
|
+
end
|
41
|
+
|
42
|
+
def close
|
43
|
+
Process.kill('QUIT', @pid) == 1
|
44
|
+
end
|
45
|
+
|
46
|
+
def exec(cmd)
|
47
|
+
# Send command
|
48
|
+
@write1.puts cmd
|
49
|
+
|
50
|
+
# Wait for response
|
51
|
+
text = @read2.read
|
52
|
+
|
53
|
+
# Close previous pipe
|
54
|
+
@read2.close
|
55
|
+
|
56
|
+
# Create new pipe
|
57
|
+
@read2, @write2 = IO.pipe
|
58
|
+
|
59
|
+
# Raise at the end to support continuing
|
60
|
+
raise Client::RuntimeError, text if text.start_with? 'NT_STATUS_'
|
61
|
+
|
62
|
+
text
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def connect
|
68
|
+
# Run +@executable+ in a separate thread to talk to hin asynchronosly
|
69
|
+
Thread.start do
|
70
|
+
# Spawn the actual +@executable+ pty with +input+ and +output+ handle
|
71
|
+
begin
|
72
|
+
PTY.spawn(@executable + ' ' + params) do |output, input, pid|
|
73
|
+
@pid = pid
|
74
|
+
output.sync = true
|
75
|
+
input.sync = true
|
76
|
+
|
77
|
+
# Write inputs to pty from +exec+ method
|
78
|
+
Thread.start do
|
79
|
+
while (line = @read1.readline)
|
80
|
+
input.puts line
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
@connection_established = true
|
85
|
+
|
86
|
+
# Wait for responses ending with input prompt
|
87
|
+
loop do
|
88
|
+
output.expect(/smb: \\>$/) { |text| handle_response text }
|
89
|
+
end
|
90
|
+
end
|
91
|
+
rescue Errno::EIO => e
|
92
|
+
if @connection_established
|
93
|
+
raise StandardError, "Unexpected error: [#{e.message}]"
|
94
|
+
else
|
95
|
+
raise Client::ConnectionError, 'Cannot connect to SMB server'
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def params
|
102
|
+
@options.map do |k, v|
|
103
|
+
v.nil? && raise(Client::RuntimeError, "Missing option [:#{k}]")
|
104
|
+
end
|
105
|
+
"//#{@options[:host]}/#{@options[:share]} #{@options[:password]} \
|
106
|
+
-U #{@options[:user]} #{@options[:workgroup]} -m SMB#{@options[:version]}"
|
107
|
+
end
|
108
|
+
|
109
|
+
def handle_response(text)
|
110
|
+
# Write to second pipe so the origin command invocation thread can
|
111
|
+
# receive this
|
112
|
+
if @first_message
|
113
|
+
@first_message = false
|
114
|
+
return
|
115
|
+
end
|
116
|
+
|
117
|
+
# Format responses
|
118
|
+
# Ignore command sent (the first returned line) and the last returned
|
119
|
+
# which is the smb prompt
|
120
|
+
@write2.write text[0].lines[1..-2].join
|
121
|
+
@write2.close
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'time'
|
2
|
+
require 'tempfile'
|
3
|
+
|
4
|
+
module SMB
|
5
|
+
module ClientHelper
|
6
|
+
class LsItem
|
7
|
+
REGEX = /(?<name>[\.|\w]+)\s+(?<type>.)\s+(?<size>\d+)\s+(?<change_time>.+)/
|
8
|
+
|
9
|
+
attr_accessor :name, :type, :size, :change_time
|
10
|
+
|
11
|
+
def file?
|
12
|
+
@type.include? 'N'
|
13
|
+
end
|
14
|
+
|
15
|
+
def directory?
|
16
|
+
@type.include? 'D'
|
17
|
+
end
|
18
|
+
|
19
|
+
def hidden?
|
20
|
+
@type.include? 'H'
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.from_line(line)
|
24
|
+
match_data = REGEX.match line
|
25
|
+
return nil unless match_data
|
26
|
+
|
27
|
+
item = LsItem.new
|
28
|
+
item.name = match_data['name']
|
29
|
+
item.type = match_data['type']
|
30
|
+
item.size = match_data['size'].to_i
|
31
|
+
item.change_time = Time.parse match_data['change_time']
|
32
|
+
item
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def ls(mask = '', raise = true)
|
37
|
+
ls_items = []
|
38
|
+
output = exec 'ls ' + mask
|
39
|
+
output.lines.each do |line|
|
40
|
+
ls_item = LsItem.from_line(line)
|
41
|
+
ls_items << ls_item if ls_item
|
42
|
+
end
|
43
|
+
ls_items
|
44
|
+
rescue Client::RuntimeError => e
|
45
|
+
raise e if raise
|
46
|
+
[]
|
47
|
+
end
|
48
|
+
|
49
|
+
alias dir ls
|
50
|
+
|
51
|
+
def mkdir(path, raise = true)
|
52
|
+
exec 'mkdir ' + path
|
53
|
+
true
|
54
|
+
rescue Client::RuntimeError => e
|
55
|
+
raise e if raise
|
56
|
+
false
|
57
|
+
end
|
58
|
+
|
59
|
+
def rmdir(path, raise = true)
|
60
|
+
exec 'rmdir ' + path
|
61
|
+
true
|
62
|
+
rescue Client::RuntimeError => e
|
63
|
+
raise e if raise
|
64
|
+
false
|
65
|
+
end
|
66
|
+
|
67
|
+
def put(from, to, overwrite = false, raise = true)
|
68
|
+
ls_items = ls to, false
|
69
|
+
if !overwrite && !ls_items.empty?
|
70
|
+
raise Client::RuntimeError, "File [#{to}] already exist"
|
71
|
+
end
|
72
|
+
exec 'put ' + from + ' ' + to
|
73
|
+
true
|
74
|
+
rescue Client::RuntimeError => e
|
75
|
+
raise e if raise
|
76
|
+
false
|
77
|
+
end
|
78
|
+
|
79
|
+
def write(content, to, overwrite = false, raise = true)
|
80
|
+
tempfile = Tempfile.new
|
81
|
+
tempfile.write content
|
82
|
+
tempfile.close
|
83
|
+
|
84
|
+
put tempfile.path, to, overwrite, raise
|
85
|
+
end
|
86
|
+
|
87
|
+
def del(path, raise = true)
|
88
|
+
exec 'del ' + path
|
89
|
+
true
|
90
|
+
rescue Client::RuntimeError => e
|
91
|
+
raise e if raise
|
92
|
+
false
|
93
|
+
end
|
94
|
+
|
95
|
+
alias rm del
|
96
|
+
|
97
|
+
def get(from, to = nil, overwrite = false, raise = true)
|
98
|
+
tempfile = Tempfile.new
|
99
|
+
to ||= tempfile.path
|
100
|
+
tempfile.unlink
|
101
|
+
if !overwrite && File.exist?(to)
|
102
|
+
raise Client::RuntimeError, "File [#{to}] already exist locally"
|
103
|
+
end
|
104
|
+
exec 'get ' + from + ' ' + to
|
105
|
+
to
|
106
|
+
rescue Client::RuntimeError => e
|
107
|
+
raise e if raise
|
108
|
+
false
|
109
|
+
end
|
110
|
+
|
111
|
+
def read(from, overwrite = false, raise = true)
|
112
|
+
tempfile = Tempfile.new
|
113
|
+
to = tempfile.path
|
114
|
+
tempfile.unlink
|
115
|
+
get from, to, overwrite, raise
|
116
|
+
File.read to
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
data/smb-client.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'smb/client/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'smb-client'
|
7
|
+
spec.version = SMB::Client::VERSION
|
8
|
+
spec.authors = ['Ralf Herzog']
|
9
|
+
spec.email = ['ralf@rherzog.de']
|
10
|
+
|
11
|
+
spec.summary = 'SMB Client wrapper for smbclient executable'
|
12
|
+
spec.description = 'SMB Client wrapper for smbclient executable'
|
13
|
+
spec.homepage = 'https://github.com/NetcomKassel/smb-client'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the
|
17
|
+
# 'allowed_push_host' to allow pushing to a single host or delete this section
|
18
|
+
# to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
|
+
else
|
22
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
23
|
+
'public gem pushes.'
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = 'exe'
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ['lib']
|
32
|
+
|
33
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
34
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
35
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: smb-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ralf Herzog
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-11-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: SMB Client wrapper for smbclient executable
|
56
|
+
email:
|
57
|
+
- ralf@rherzog.de
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
64
|
+
- CODE_OF_CONDUCT.md
|
65
|
+
- Gemfile
|
66
|
+
- Gemfile.lock
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- lib/smb/client.rb
|
73
|
+
- lib/smb/client/client.rb
|
74
|
+
- lib/smb/client/client_helper.rb
|
75
|
+
- lib/smb/client/connection_error.rb
|
76
|
+
- lib/smb/client/runtime_error.rb
|
77
|
+
- lib/smb/client/version.rb
|
78
|
+
- smb-client.gemspec
|
79
|
+
homepage: https://github.com/NetcomKassel/smb-client
|
80
|
+
licenses:
|
81
|
+
- MIT
|
82
|
+
metadata:
|
83
|
+
allowed_push_host: https://rubygems.org
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.5.2
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: SMB Client wrapper for smbclient executable
|
104
|
+
test_files: []
|