shart 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +19 -7
  2. data/bin/shart +1 -11
  3. data/lib/shart.rb +4 -4
  4. data/lib/shart/version.rb +1 -1
  5. metadata +1 -1
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Shart
2
2
 
3
- Shart is designed to deploy [Middleman](http://middlemanapp.com/) websites, or sites built with other static site builders, to cloud storage providers, like Amazon S3 and [more](http://fog.io/0.8.1/storage/).
3
+ Shart is a DRY approach to deploying websites generated by [Middleman](http://middlemanapp.com/), [Jekyll](http://jekyllrb.com/), or other static websites to cloud service providers that support website hosting, like [Amazon S3](http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html).
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,19 +18,31 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- Create a `Shartfile` in the root of your project.
21
+ Create a `Shartfile` in the root of your project that looks like:
22
22
 
23
23
  ```ruby
24
- # A middleman Shartfile
24
+ # A Middleman Shartfile.
25
25
  source './build'
26
26
  target 'your-aws-bucket-name', {
27
- provider: 'AWS',
28
- aws_secret_access_key: 'your AWS credentials',
29
- aws_access_key_id: 'your AWS credentials'
27
+ :provider => 'AWS',
28
+ :aws_secret_access_key => 'your AWS credentials',
29
+ :aws_access_key_id => 'your AWS credentials'
30
30
  }
31
31
  ```
32
32
 
33
- Now run `shart` from your project root and BOOM! Your website will be deployed. If you're using Middleman, don't forget to run build first.
33
+ When you're ready to publish your website, run:
34
+
35
+ $ shart
36
+
37
+ Don't forget to run `middleman build` before you `shart` if you're using Middleman.
38
+
39
+ After you successfully shart, be sure to [read the blog post about hosting a website on S3](http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html) if you haven't already configured your S3 bucket to do so.
40
+
41
+ ## Supported targets
42
+
43
+ Shart has only been tested with Amazon S3 buckets.
44
+
45
+ In theory, you can shart into any [storage provider that Fog supports](http://fog.io/0.8.1/about/getting_started.html).
34
46
 
35
47
  ## Contributing
36
48
 
data/bin/shart CHANGED
@@ -4,14 +4,4 @@ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4
4
 
5
5
  require 'shart'
6
6
 
7
- Shart::DSL.shartfile('Shartfile')
8
-
9
- # target = Shart::Target.new 'tech.polleverywhere.com', {
10
- # :provider => 'AWS',
11
- # :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
12
- # :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID']
13
- # }
14
-
15
- # source = Shart::Source.new('/Users/bradgessler/projects/polleverywhere/tech-blog/build')
16
-
17
- # target.sync source
7
+ Shart::DSL.shartfile('Shartfile')
@@ -21,7 +21,7 @@ module Shart
21
21
  end
22
22
 
23
23
  def sync(source)
24
- Sync.new(source, self).sync
24
+ Sync.new(source, self).run
25
25
  end
26
26
  end
27
27
 
@@ -41,7 +41,7 @@ module Shart
41
41
  end
42
42
 
43
43
  def sync(target)
44
- Sync.new(self, target).sync
44
+ Sync.new(self, target).run
45
45
  end
46
46
  end
47
47
 
@@ -63,7 +63,7 @@ module Shart
63
63
  sync = new.tap { |dsl| dsl.instance_eval(File.read(filename), filename) }.sync
64
64
  puts "Sharting from #{sync.source.root.to_s.inspect} to #{sync.target.directory_name.inspect}"
65
65
  sync.run do |path, key, file|
66
- puts " #{key.inspect}"
66
+ puts " #{key}"
67
67
  end
68
68
  end
69
69
  end
@@ -82,7 +82,7 @@ module Shart
82
82
  :key => key,
83
83
  :body => File.open(path),
84
84
  :public => true,
85
- :cache_control => 0 # Disable cache on S3 so that future sharts are visible if folks web browsers.
85
+ :cache_control => 'max-age=0' # Disable cache on S3 so that future sharts are visible if folks web browsers.
86
86
  })
87
87
  end
88
88
  end
@@ -1,3 +1,3 @@
1
1
  module Shart
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shart
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: