cf-s3-invalidator 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  *.gem
2
2
  Gemfile.lock
3
+ tmp
data/README.md CHANGED
@@ -27,6 +27,12 @@ Then you can just run:
27
27
 
28
28
  `cf-s3-inv`
29
29
 
30
+ ## Development
31
+
32
+ Run Cucumber tests:
33
+
34
+ `bundle exec cucumber`
35
+
30
36
  ## License
31
37
 
32
38
  MIT
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'cf-s3-invalidator'
3
- s.version = '0.3.2'
3
+ s.version = '0.3.3'
4
4
  s.summary = 'A tool for invalidating AWS S3-based Cloudfront distributions'
5
5
  s.description =
6
6
  'This lib fetches the names of all objects on an Amazon Web
@@ -16,4 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.homepage = 'https://github.com/laurilehmijoki/cf-s3-invalidator'
17
17
 
18
18
  s.add_dependency 'aws-sdk'
19
+
20
+ s.add_development_dependency 'cucumber'
21
+ s.add_development_dependency 'aruba', '>= 0.4.7'
19
22
  end
@@ -0,0 +1,15 @@
1
+ Feature: cloudfront-s3-invalidator CLI help
2
+ In order to use the invalidator
3
+ As a geek
4
+ I want to run cf-s3-inv and see what the help document
5
+
6
+ Scenario: Run cf-s3-inv without arguments and the configuration file
7
+ When I run `cf-s3-inv`
8
+ Then the output should contain:
9
+ """
10
+ Usage: cf-s3-inv [options]
11
+ """
12
+ And the output should contain:
13
+ """
14
+ ALTERNATIVELY, you can use a configuration file:
15
+ """
@@ -0,0 +1,26 @@
1
+ Feature: cloudfront-s3-invalidator without AWS credentials
2
+
3
+ In order to invalidate my S3-based Cloudfront distribution
4
+ As a geek without AWS credentials
5
+ I want to run cf-s3-inv and see my that it tells me I have no valid credentials
6
+
7
+ Scenario: Run cf-s3-inv with the configuration file that has invalid AWS access key
8
+ Given a file named "_cf_s3_invalidator.yml" with:
9
+ """
10
+ s3_key: YOUR_AWS_S3_ACCESS_KEY_ID
11
+ s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
12
+ s3_bucket: your.bucket.com
13
+ cloudfront_distribution_id: CF_ID
14
+ """
15
+ When I run `cf-s3-inv`
16
+ And the output should contain:
17
+ """
18
+ The AWS Access Key Id you provided does not exist in our records. (AWS::S3::Errors::InvalidAccessKeyId)
19
+ """
20
+
21
+ Scenario: Run cf-s3-inv with CLI arguments containing invalid AWS access key
22
+ When I run `cf-s3-inv --key invalid-aws-key --secret invalid-aws-secret --bucket some-bucket --distribution some-dist`
23
+ And the output should contain:
24
+ """
25
+ The AWS Access Key Id you provided does not exist in our records. (AWS::S3::Errors::InvalidAccessKeyId)
26
+ """
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.require
5
+
6
+ require 'aruba/cucumber'
7
+ require 'cucumber/rspec/doubles'
8
+
9
+ # Following from 'aruba/cucumber'
10
+ Before do
11
+ @__aruba_original_paths = (ENV['PATH'] || '').split(File::PATH_SEPARATOR)
12
+ ENV['PATH'] = ([File.expand_path('bin')] + @__aruba_original_paths).join(File::PATH_SEPARATOR)
13
+ end
14
+
15
+ After do
16
+ ENV['PATH'] = @__aruba_original_paths.join(File::PATH_SEPARATOR)
17
+ end
18
+ # End of following from 'aruba/cucumber'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-s3-invalidator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 2
10
- version: 0.3.2
9
+ - 3
10
+ version: 0.3.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lauri Lehmijoki
@@ -31,6 +31,36 @@ dependencies:
31
31
  version: "0"
32
32
  type: :runtime
33
33
  version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: cucumber
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :development
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: aruba
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 1
57
+ segments:
58
+ - 0
59
+ - 4
60
+ - 7
61
+ version: 0.4.7
62
+ type: :development
63
+ version_requirements: *id003
34
64
  description: |-
35
65
  This lib fetches the names of all objects on an Amazon Web
36
66
  Services S3 bucket. Then it calls the Cloudfront invalidation REST API on the
@@ -50,6 +80,9 @@ files:
50
80
  - README.md
51
81
  - bin/cf-s3-inv
52
82
  - cf-s3-invalidator.gemspec
83
+ - features/cloudfront-s3-invalidator-help.feature
84
+ - features/cloudfront-s3-invalidator-no-credentials.feature
85
+ - features/support/env.rb
53
86
  - lib/cloudfront_invalidator.rb
54
87
  - lib/s3_loader.rb
55
88
  homepage: https://github.com/laurilehmijoki/cf-s3-invalidator