ponyhost 0.2.1 → 0.3.0

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.
Files changed (4) hide show
  1. data/README.md +53 -7
  2. data/bin/ponyhost +20 -23
  3. data/lib/ponyhost.rb +4 -3
  4. metadata +5 -5
data/README.md CHANGED
@@ -1,9 +1,55 @@
1
- ponyHost is a super simple way to use the Amazon AWS S3 Website feature.
1
+ # ponyHost #
2
+ ## Description ##
2
3
 
3
- $ cd your-website
4
- $ gem install ponyhost
5
- $ ponyhost create foobar
6
- $ ponyhost push foobar
7
- $ open http://foobar.ponyho.st
4
+ ponyHost lets you to easily create Amazon S3 website buckets,
5
+ push files to them and make them available under a *.ponyho.st or custom domain.
6
+ A small HTTP server is also included.
8
7
 
9
- Find more infos on http://ponyho.st
8
+ ## Installation ##
9
+
10
+ To use ponyHost all you need to have is an Amazon S3
11
+ account and the [access key id and secret](https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key).
12
+
13
+ The installation is as simple as:
14
+
15
+ gem install ponyhost
16
+
17
+ ## Commands ##
18
+ ### Create ###
19
+
20
+ ponyhost create your-site
21
+
22
+ Will create the S3 bucket with a website configuration.
23
+ Per default index.html will be the index document and 404.html the error document.
24
+
25
+ If the passed name doesn't include a '.' the default domain 'ponyho.st' will be used and your bucket will be named
26
+ 'your-site.ponyho.st'.
27
+
28
+ If you prefer to use a custom domain just pass the name accordingly.
29
+
30
+ ponyhost create foo.yoursite.com
31
+
32
+ You'll have to setup a DNS CNAME record for foo.yoursite.com to s3-website-us-east-1.amazonaws.com.
33
+ It's also possible to use a naked domain like yoursite.com.
34
+ For that you have to point the @ record for yoursite.com to
35
+ one of the IP's that s3-website-us-east-1.amazonaws.com points to (72.21.207.127) (not so good, but works :)
36
+
37
+ ### Push ###
38
+
39
+ Will compare the md5 sum for each file in the current directory with the remote file and push the file if necessary.
40
+ Currently it won't delete files in the bucket.
41
+
42
+ ### Server ###
43
+
44
+ Runs a very basic HTTP server for the current directory on http://localhost:9090
45
+
46
+ ### Destroy ###
47
+
48
+ Will delete the bucket and all files on S3.
49
+
50
+ ## ToDo ##
51
+
52
+ * Implement a autopush command
53
+ * Implement a robust HTTP server
54
+ * Support other availability zones
55
+ * Delete files in bucket
data/bin/ponyhost CHANGED
@@ -21,8 +21,7 @@ elsif command == "list" || (["create", "push", "destroy", "show", "version"].in
21
21
  elsif(command == "push")
22
22
  PonyHost.push(bucketname, ".")
23
23
  elsif(command == "autopush")
24
- # TODO
25
- # monitor cwd and push automatically?
24
+ puts "Not Yet Implemented"
26
25
  elsif(command == "destroy")
27
26
  print "Do you really wanna destroy '#{bucketname}' (type 'YES'):"
28
27
  PonyHost.destroy(bucketname) if STDIN.gets.chop == "YES"
@@ -31,30 +30,28 @@ elsif command == "list" || (["create", "push", "destroy", "show", "version"].in
31
30
  PonyHost.list.each do |name|
32
31
  puts "http://#{name}"
33
32
  end
34
- elsif(command == "show")
35
- # deprecated?
36
- PonyHost.show(bucketname)
37
33
  elsif(command == "version")
38
34
  puts "ponyhost version #{PonyHost::VERSION}"
39
35
  puts "created by Johannes Wagener http://johannes.wagener.cc"
40
36
  end
41
37
  else
42
- puts "usage: ponyhost <command> [<sitename>]"
43
- puts " "
44
- puts "available commands:"
45
- puts " list Lists all sites/buckets from your S3 account"
46
- puts " create [sitename] Creates a new bucket for your site"
47
- puts " push [sitename] Pushes the current directory to the specified bucket/site"
48
- puts " destroy [sitename] Removes all files and destroys the bucket"
49
- puts " server Runs a local HTTP server for the current directory"
50
- # puts " version Print version information"
51
- puts " "
52
- puts "Notes: if the sitename contains no '.' it will be suffixed with the default domain #{PonyHost::DEFAULT_DOMAIN}"
53
- puts "To use your own domainname you have to set up the DNS correctly:"
54
- puts "For a site under a subdomain like www.foobar.com you have to create a CNAME record for www.foobar.com to s3-website-us-east-1.amazonaws.com"
55
- puts "For a site under a domain like foobar.com you have to create an A record pointing to 72.21.214.197"
56
- puts "Once thats done you just have to create the site with the correct name:"
57
- puts "$ ponyhost create www.foobar.com"
58
- puts " "
59
-
38
+ puts <<-EOF
39
+ usage: ponyhost <command> [<sitename>]
40
+
41
+ available commands:
42
+ list Lists all sites/buckets from your S3 account
43
+ create [name] Creates a new bucket for your site
44
+ push [name] Pushes the current directory to the specified bucket/site
45
+ destroy [name] Removes all files and destroys the bucket
46
+ server Runs a local HTTP server for the current directory
47
+
48
+ Notes: if the name contains no '.' it will be suffixed with the default domain #{PonyHost::DEFAULT_DOMAIN}
49
+ To use a custom domain you have to set up the DNS correctly:
50
+ For a site under a subdomain like www.foobar.com you have to create a CNAME record for www.foobar.com to s3-website-us-east-1.amazonaws.com
51
+ For a site under a domain like foobar.com you have to create an A record pointing to 72.21.214.197
52
+ Once thats done you just have to create the site with the correct name:
53
+ $ ponyhost create www.foobar.com
54
+
55
+ For details have a look at the README.
56
+ EOF
60
57
  end
data/lib/ponyhost.rb CHANGED
@@ -13,8 +13,9 @@ end
13
13
 
14
14
  class PonyHost
15
15
  S3_CREDENTIAL_FILES = ["~/.ponyhost.yml"]
16
+ S3_CREDENTIAL_LINK = "https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key"
16
17
  DEFAULT_DOMAIN = "ponyho.st"
17
- VERSION = "0.2.1"
18
+ VERSION = "0.3.0"
18
19
  class << self
19
20
 
20
21
 
@@ -25,8 +26,8 @@ class PonyHost
25
26
  else
26
27
  puts "AWS Credentials file '#{credential_file}' missing. We'll create one."
27
28
  puts "You'll find your Amazon AWS credentials here:"
28
- puts "https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key"
29
- #http://aws.amazon.com/account/
29
+ puts S3_CREDENTIAL_LINK
30
+
30
31
  credentials = {}
31
32
  print "Your AWS Access Key ID: "
32
33
  credentials[:access_key_id] = STDIN.gets.chop
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ponyhost
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.1
5
+ version: 0.3.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Johannes Wagener
@@ -24,7 +24,7 @@ dependencies:
24
24
  version: "0"
25
25
  type: :runtime
26
26
  version_requirements: *id001
27
- description: ponyHost allows you to easily create S3 website buckets with a nice hostname and push files to it
27
+ description: " ponyHost lets you to easily create Amazon S3 website buckets,\n push files to them and make them available under a *.ponyho.st or custom domain.\n A small HTTP server is also included.\n"
28
28
  email:
29
29
  - johannes@wagener.cc
30
30
  executables:
@@ -39,8 +39,8 @@ files:
39
39
  - bin/ponyhost
40
40
  has_rdoc: true
41
41
  homepage: http://ponyho.st
42
- licenses: []
43
-
42
+ licenses:
43
+ - MIT
44
44
  post_install_message:
45
45
  rdoc_options: []
46
46
 
@@ -64,6 +64,6 @@ rubyforge_project: ponyhost
64
64
  rubygems_version: 1.6.2
65
65
  signing_key:
66
66
  specification_version: 3
67
- summary: Create super simple S3 powered websites
67
+ summary: Create and deploy Amazon S3 powered websites
68
68
  test_files: []
69
69