ale 0.0.3.pre → 0.0.3.pre2

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.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Ale
2
2
  ===
3
3
 
4
- Static deployment so easy, you can do it after having a few.
4
+ Deploy static websites to S3, even after having a few.
5
5
 
6
6
  * [Fork the code on Github](https://github.com/jeremyboles/ale)
7
7
 
@@ -10,7 +10,15 @@ Installation
10
10
 
11
11
  gem install ale
12
12
 
13
- Using the Library
14
- -----------------
15
-
13
+ Setting Up a Website
14
+ --------------------
16
15
 
16
+ Getting a S3 bucket set up for websites takes a little bit of work up front,
17
+ but it is something you only have to do once and then it is smooth saling.
18
+ Starting by logging into (S3 console)[http://console.aws.amazon.com/] and
19
+ creating a bucket with the same name as the URL for you website. Make sure
20
+ that the bucket includes a subdomain (like 'www', for example). Once you've
21
+ created your bucket, click on *Properties* nears the top and then on the
22
+ tab named *Website*. Check the box labeled *Enabled* and then fill in
23
+ the text box for *Index Document* (something like `index.html` works well).
24
+ That's it for S3.
@@ -23,6 +23,16 @@ module Ale
23
23
  say('Cleaning up')
24
24
  end
25
25
 
26
+ desc 'init', 'Generates a simple Alefile, placed in the current directory'
27
+ def init
28
+ if File.exist?('Alefile')
29
+ say("Alefile already exists at #{Dir.pwd}/Alefile", :red)
30
+ else
31
+ say("Writing new Alefile to #{Dir.pwd}/Alefile")
32
+ FileUtils.cp(File.expand_path('../../templates/Alefile', __FILE__), 'Alefile')
33
+ end
34
+ end
35
+
26
36
  desc 'upload', 'Uploads the built site to S3'
27
37
  method_option 'alefile', :type => :string, :banner =>
28
38
  'Use the specified alefile instead of Alefile'
@@ -68,15 +68,15 @@ module Ale
68
68
  Config.bucket = bucket
69
69
  end
70
70
 
71
- def ignore(file)
71
+ def ignore(files)
72
72
  Config.ignored_files << file
73
73
  end
74
74
 
75
- def private(file)
75
+ def private(files)
76
76
  Config.private_files << file
77
77
  end
78
78
 
79
- def public(file)
79
+ def public(files)
80
80
  Config.public_files << file
81
81
  end
82
82
 
@@ -19,7 +19,7 @@ module Ale
19
19
  return @bucket unless @bucket.nil?
20
20
  raise Ale::BucketNotSpecified if Ale::Config.bucket.empty?
21
21
  @bucket = AWS::S3.new.buckets[Ale::Config.bucket]
22
- raise Ale::BucketNotFound unless bucket.exists?
22
+ raise Ale::BucketNotFound unless bucket.try(:exists?)
23
23
  @bucket
24
24
  end
25
25
 
@@ -1,3 +1,3 @@
1
1
  module Ale
2
- VERSION = '0.0.3.pre'
2
+ VERSION = '0.0.3.pre2'
3
3
  end
@@ -0,0 +1,16 @@
1
+ # A sample Alefile
2
+
3
+ # Specify which bucket on S3 to store the site
4
+ bucket 'www.yourbucket.com'
5
+
6
+ # You can add your AWS account credentials here
7
+ # access_key 'your access key here'
8
+ # secret_key 'your secret key here'
9
+
10
+ # You can prevent files from being uploaded
11
+ # ignore 'README'
12
+ # ignore 'directory/*'
13
+
14
+ # You an prevent files from being accessed
15
+ # private 'secret_document'
16
+ # private 'secret_directory/*.txt'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.pre
4
+ version: 0.0.3.pre2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-27 00:00:00.000000000Z
12
+ date: 2011-10-04 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
16
- requirement: &70203415446820 !ruby/object:Gem::Requirement
16
+ requirement: &70107917370240 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70203415446820
24
+ version_requirements: *70107917370240
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70203415446320 !ruby/object:Gem::Requirement
27
+ requirement: &70107917332260 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.14.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70203415446320
35
+ version_requirements: *70107917332260
36
36
  description: Takes a static site and uploads it to Amazon's S3.
37
37
  email: jeremy@jeremyboles.com
38
38
  executables:
@@ -52,6 +52,7 @@ files:
52
52
  - lib/ale/site.rb
53
53
  - lib/ale/uploader.rb
54
54
  - lib/ale/version.rb
55
+ - lib/templates/Alefile
55
56
  - test/ale_defaults_test.rb
56
57
  - test/test_helper.rb
57
58
  homepage: https://github.com/jeremyboles/ale