middleman-s3_redirect 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,8 +17,8 @@ module Middleman
17
17
  desc "s3_redirect", "Creates redirect objects directly in S3."
18
18
  def s3_redirect
19
19
  shared_inst = ::Middleman::Application.server.inst
20
- bucket = shared_inst.options.bucket
21
- if (!bucket)
20
+ if (!shared_inst.respond_to?('s3_redirect_options') ||
21
+ !shared_inst.s3_redirect_options.bucket)
22
22
  raise Thor::Error.new "You need to activate this extension."
23
23
  end
24
24
 
@@ -40,7 +40,7 @@ module Middleman
40
40
  end
41
41
 
42
42
  end
43
-
43
+
44
44
  class << self
45
45
  def options
46
46
  @@options
@@ -53,7 +53,7 @@ module Middleman
53
53
  @@options = options
54
54
 
55
55
  app.send :include, Helpers
56
-
56
+
57
57
  options.public_path ||= "build"
58
58
 
59
59
  app.after_configuration do |config|
@@ -96,7 +96,11 @@ module Middleman
96
96
 
97
97
  module Helpers
98
98
  def redirect(from, to)
99
- ::Middleman::S3Redirect.options.redirect(from, to)
99
+ s3_redirect_options.redirect(from, to)
100
+ end
101
+
102
+ def s3_redirect_options
103
+ ::Middleman::S3Redirect.options
100
104
  end
101
105
  end
102
106
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module S3Redirect
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
4
4
  end
5
5
  end
@@ -20,4 +20,6 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_runtime_dependency 'middleman-core', '>= 3.0.0'
22
22
  gem.add_runtime_dependency 'fog'
23
+
24
+ gem.add_development_dependency 'rake'
23
25
  end
metadata CHANGED
@@ -2,17 +2,16 @@
2
2
  name: middleman-s3_redirect
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 3.0.0
5
+ version: 3.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Frederic Jean
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-11 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- type: :runtime
16
15
  version_requirements: !ruby/object:Gem::Requirement
17
16
  none: false
18
17
  requirements:
@@ -27,8 +26,8 @@ dependencies:
27
26
  - - ! '>='
28
27
  - !ruby/object:Gem::Version
29
28
  version: 3.0.0
30
- - !ruby/object:Gem::Dependency
31
29
  type: :runtime
30
+ - !ruby/object:Gem::Dependency
32
31
  version_requirements: !ruby/object:Gem::Requirement
33
32
  none: false
34
33
  requirements:
@@ -43,6 +42,23 @@ dependencies:
43
42
  - - ! '>='
44
43
  - !ruby/object:Gem::Version
45
44
  version: '0'
45
+ type: :runtime
46
+ - !ruby/object:Gem::Dependency
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ name: rake
54
+ prerelease: false
55
+ requirement: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ! '>='
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ type: :development
46
62
  description: Generates redirects via S3 API.
47
63
  email:
48
64
  - fred@fredjean.net
@@ -73,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
89
  - !ruby/object:Gem::Version
74
90
  segments:
75
91
  - 0
76
- hash: -3985194922976205752
92
+ hash: -4522172036684252108
77
93
  version: '0'
78
94
  required_rubygems_version: !ruby/object:Gem::Requirement
79
95
  none: false
@@ -82,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
98
  - !ruby/object:Gem::Version
83
99
  segments:
84
100
  - 0
85
- hash: -3985194922976205752
101
+ hash: -4522172036684252108
86
102
  version: '0'
87
103
  requirements: []
88
104
  rubyforge_project: