Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of style changes and switch to https://rubygems.org
- Loading branch information
1 parent
8125f1e
commit 62e7e7e
Showing
10 changed files
with
141 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class Readme < String | ||
attr_reader :path | ||
|
||
def initialize(path) | ||
@path = path | ||
super(File.read(self.path)) | ||
end | ||
|
||
def summary | ||
if self =~ /^# (?:\S+)\s+(.+?)\s{2,}/m | ||
scrub $1 | ||
else | ||
raise "could not find summary in #{path}" | ||
end | ||
end | ||
|
||
def description | ||
if self =~ /^## Description\s+(.+?)\s{2,}/m | ||
scrub $1 | ||
else | ||
raise "could not find description in #{path}" | ||
end | ||
end | ||
|
||
private | ||
def scrub(string) | ||
string.delete("\\`").gsub(/\[([^\]]+)\]\([^)]*\)/, "\\1").tr("\n", " ").to_s | ||
end | ||
end | ||
|
||
def readme(path = File.expand_path("./README.md")) | ||
(@readmes ||= {})[path] ||= Readme.new(path) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
pkg/* | ||
/Gemfile.lock | ||
/pkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
source "http://rubygems.org" | ||
source "https://rubygems.org" | ||
|
||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
Copyright (C) 2011 by Samuel Kadolph | ||
Copyright (c) 2011 Samuel Kadolph | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
MIT License | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
[![Gem Version](https://badge.fury.io/rb/s3cmd.png)](http://badge.fury.io/rb/s3cmd) | ||
[![Dependency Status](https://gemnasium.com/samuelkadolph/s3cmd.png)](https://gemnasium.com/samuelkadolph/s3cmd) | ||
[![Code Climate](https://codeclimate.com/github/samuelkadolph/s3cmd.png)](https://codeclimate.com/github/samuelkadolph/s3cmd) | ||
|
||
# s3cmd | ||
|
||
## Installing | ||
`s3cmd` is simple cli tool for interacting with S3. | ||
|
||
### Recommended | ||
## Description | ||
|
||
``` | ||
gem install s3cmd | ||
``` | ||
Provides a `s3cmd` executable that allows you to create and list buckets as well as list the keys of a bucket and get and upload files to S3. | ||
|
||
### Edge | ||
## Installation | ||
|
||
``` | ||
git clone https://github.com/samuelkadolph/s3cmd | ||
cd s3cmd && rake install | ||
``` | ||
Install with: | ||
|
||
$ gem install s3cmd | ||
|
||
## Usage | ||
|
||
``` | ||
s3cmd create-bucket foo | ||
s3cmd put foo abc/def somefile | ||
s3cmd create-bucket $(USER)-foo | ||
s3cmd put $(USER)-foo file.rb file.rb | ||
``` | ||
|
||
## Contributing | ||
|
||
Fork, branch & pull request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
#!/usr/bin/env rake | ||
|
||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "s3cmd" | ||
S3Cmd::Main.start | ||
|
||
S3Cmd::CLI.start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module S3Cmd | ||
VERSION = "1.0.1" | ||
VERSION = "1.1.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "s3cmd/version" | ||
require File.expand_path("../.gemspec", __FILE__) | ||
require File.expand_path("../lib/s3cmd/version", __FILE__) | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "s3cmd" | ||
s.version = S3Cmd::VERSION | ||
s.authors = ["Samuel Kadolph"] | ||
s.email = ["samuel@kadolph.com"] | ||
s.homepage = "https://github.com/samuelkadolph/s3cmd" | ||
s.summary = %q{Simple cli tool for interacting with S3.} | ||
s.description = <<-DESC | ||
Provides a s3cmd binary that allows you to create and list buckets as well as list the keys of a bucket and get and upload files | ||
to s3. | ||
DESC | ||
Gem::Specification.new do |gem| | ||
gem.name = "s3cmd" | ||
gem.authors = ["Samuel Kadolph"] | ||
gem.email = ["samuel@kadolph.com"] | ||
gem.description = readme.description | ||
gem.summary = readme.summary | ||
gem.homepage = "https://github.com/samuelkadolph/s3cmd" | ||
gem.version = S3Cmd::VERSION | ||
|
||
s.required_ruby_version = ">= 1.8.7" | ||
gem.files = Dir["bin/*", "lib/**/*"] | ||
gem.executables = Dir["bin/*"].map(&File.method(:basename)) | ||
|
||
s.files = Dir["bin/*", "lib/**/*"] + ["LICENSE", "README.md"] | ||
s.executables = ["s3cmd"] | ||
gem.required_ruby_version = ">= 1.8.7" | ||
|
||
s.add_dependency "aws", "~> 2.5.6" | ||
s.add_dependency "mime-types", "~> 1.16" | ||
s.add_dependency "proxifier", "~> 1.0.2" | ||
s.add_dependency "thor", "~> 0.14.6" | ||
gem.add_dependency "aws", "~> 2.8.0" | ||
gem.add_dependency "mime-types", "~> 1.22" | ||
gem.add_dependency "proxifier", "~> 1.0.3" | ||
gem.add_dependency "thor", "~> 0.18.1" | ||
|
||
gem.add_development_dependency "rake", "~> 10.0.4" | ||
end |