ale 0.0.2 → 0.0.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -1
- data/README.md +10 -2
- data/Rakefile +10 -0
- data/lib/ale.rb +1 -1
- data/lib/ale/cli.rb +5 -0
- data/lib/ale/uploader.rb +0 -1
- data/lib/ale/version.rb +1 -1
- data/test/ale_defaults_test.rb +47 -0
- data/test/test_helper.rb +2 -0
- metadata +12 -9
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
Ale
|
2
2
|
===
|
3
3
|
|
4
|
-
|
5
|
-
---------------------------------------------
|
4
|
+
Static deployment so easy, you can do it after having a few.
|
6
5
|
|
6
|
+
* [Fork the code on Github](https://github.com/jeremyboles/ale)
|
7
|
+
|
8
|
+
Installation
|
9
|
+
------------
|
10
|
+
|
11
|
+
gem install ale
|
12
|
+
|
13
|
+
Using the Library
|
14
|
+
-----------------
|
7
15
|
|
8
16
|
|
data/Rakefile
ADDED
data/lib/ale.rb
CHANGED
data/lib/ale/cli.rb
CHANGED
@@ -18,6 +18,11 @@ module Ale
|
|
18
18
|
say('Count not locale Alefile', :red)
|
19
19
|
end
|
20
20
|
|
21
|
+
desc 'clean', 'Removes the files created during the build'
|
22
|
+
def clean
|
23
|
+
say('Cleaning up')
|
24
|
+
end
|
25
|
+
|
21
26
|
desc 'upload', 'Uploads the built site to S3'
|
22
27
|
method_option 'alefile', :type => :string, :banner =>
|
23
28
|
'Use the specified alefile instead of Alefile'
|
data/lib/ale/uploader.rb
CHANGED
data/lib/ale/version.rb
CHANGED
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AleTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
Ale::Config.amazon_access_key_id = nil
|
6
|
+
Ale::Config.amazon_secret_access_key = nil
|
7
|
+
|
8
|
+
Ale.alefile = nil
|
9
|
+
Ale.root = nil
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_amazon_keys_default_to_env_variables
|
13
|
+
ENV['AMAZON_ACCESS_KEY_ID'] = '1234'
|
14
|
+
ENV['AMAZON_SECRET_ACCESS_KEY'] = 'abcd'
|
15
|
+
|
16
|
+
assert_equal(Ale::Config.amazon_access_key_id, ENV['AMAZON_ACCESS_KEY_ID'])
|
17
|
+
assert_equal(Ale::Config.amazon_secret_access_key, ENV['AMAZON_SECRET_ACCESS_KEY'])
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_default_alefile_location_is_in_root
|
21
|
+
Ale.root = File.expand_path('~/')
|
22
|
+
alefile_path = File.expand_path('~/Alefile')
|
23
|
+
assert_equal(Ale.alefile, alefile_path)
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_root_defaults_to_current_directory
|
27
|
+
root_path = File.expand_path('.')
|
28
|
+
assert_equal(Ale.root, root_path)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_defaults_can_be_overwritten
|
32
|
+
amazon_access_key_id = '1234'
|
33
|
+
amazon_secret_access_key = 'abcd'
|
34
|
+
alefile_path = File.expand_path('~/../test/Alefile')
|
35
|
+
root_path = File.expand_path('~/test')
|
36
|
+
|
37
|
+
Ale::Config.amazon_access_key_id = amazon_access_key_id
|
38
|
+
Ale::Config.amazon_secret_access_key = amazon_secret_access_key
|
39
|
+
Ale.alefile = alefile_path
|
40
|
+
Ale.root = root_path
|
41
|
+
|
42
|
+
assert_equal(Ale::Config.amazon_access_key_id, amazon_access_key_id)
|
43
|
+
assert_equal(Ale::Config.amazon_secret_access_key, amazon_secret_access_key)
|
44
|
+
assert_equal(Ale.alefile, alefile_path)
|
45
|
+
assert_equal(Ale.root, root_path)
|
46
|
+
end
|
47
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3.pre
|
5
|
+
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jeremy Boles
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-09-
|
12
|
+
date: 2011-09-27 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|
16
|
-
requirement: &
|
16
|
+
requirement: &70203415446820 !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: *
|
24
|
+
version_requirements: *70203415446820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: thor
|
27
|
-
requirement: &
|
27
|
+
requirement: &70203415446320 !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: *
|
35
|
+
version_requirements: *70203415446320
|
36
36
|
description: Takes a static site and uploads it to Amazon's S3.
|
37
37
|
email: jeremy@jeremyboles.com
|
38
38
|
executables:
|
@@ -43,6 +43,7 @@ files:
|
|
43
43
|
- .gitignore
|
44
44
|
- Gemfile
|
45
45
|
- README.md
|
46
|
+
- Rakefile
|
46
47
|
- ale.gemspec
|
47
48
|
- bin/ale
|
48
49
|
- lib/ale.rb
|
@@ -51,6 +52,8 @@ files:
|
|
51
52
|
- lib/ale/site.rb
|
52
53
|
- lib/ale/uploader.rb
|
53
54
|
- lib/ale/version.rb
|
55
|
+
- test/ale_defaults_test.rb
|
56
|
+
- test/test_helper.rb
|
54
57
|
homepage: https://github.com/jeremyboles/ale
|
55
58
|
licenses: []
|
56
59
|
post_install_message:
|
@@ -66,9 +69,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
66
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
70
|
none: false
|
68
71
|
requirements:
|
69
|
-
- - ! '
|
72
|
+
- - ! '>'
|
70
73
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
74
|
+
version: 1.3.1
|
72
75
|
requirements: []
|
73
76
|
rubyforge_project:
|
74
77
|
rubygems_version: 1.8.10
|