middleman-fjords 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
 
3
3
  git "git://github.com/middleman/middleman.git", :branch => "3.0-stable" do
4
4
  # gem "middleman"
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Thomas Reynolds
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -39,9 +39,9 @@ module Middleman
39
39
  # puts "Deploying..."
40
40
  cmd = "bundle exec fjords push"
41
41
  cmd << %Q{ --path="#{shared_instance.build_dir}" --no-progress}
42
- if opts.no_zip
43
- cmd << %Q{ --no-zip}
44
- end
42
+ # if opts.no_zip
43
+ # cmd << %Q{ --no-zip}
44
+ # end
45
45
  if opts.domain
46
46
  cmd << %Q{ --domain="#{opts.domain}"}
47
47
  cmd << %Q{ --overwrite}
@@ -60,6 +60,37 @@ module Middleman
60
60
  # puts "The child process exited!"
61
61
  end
62
62
 
63
+ if opts.gzip_assets
64
+ if !::Fjords::Client.has_gzip(opts.domain)
65
+ ::Fjords::Client.enable_gzip(opts.domain)
66
+ puts "Enabled Gzip"
67
+ end
68
+ else
69
+ if ::Fjords::Client.has_gzip(opts.domain)
70
+ ::Fjords::Client.disable_gzip(opts.domain)
71
+ puts "Disabled Gzip"
72
+ end
73
+ end
74
+
75
+ if opts.cdn
76
+ if !::Fjords::Client.has_cdn(opts.domain)
77
+ site = ::Fjords::Client.enable_cdn(opts.domain)
78
+
79
+ puts %Q{Enabled CDN for "#{domain}".}
80
+ puts "Deploying your files around the planet takes some time."
81
+ puts "Please be patient."
82
+ puts
83
+
84
+ puts "In the meantime,"
85
+ puts "Make sure your CNAME points to: #{site["cdn_internal_name"]}"
86
+ end
87
+ else
88
+ if ::Fjords::Client.has_cdn(opts.domain)
89
+ ::Fjords::Client.disable_cdn(opts.domain)
90
+ puts "Disabled CDN"
91
+ end
92
+ end
93
+
63
94
  end
64
95
  end
65
96
  end
@@ -6,7 +6,9 @@ module Middleman::Fjords
6
6
  :domain,
7
7
  :domain_file,
8
8
  :rebuild,
9
- :no_zip,
9
+ # :no_zip,
10
+ :gzip_assets,
11
+ :cdn,
10
12
  :username,
11
13
  :password
12
14
  ]
@@ -33,7 +35,9 @@ module Middleman::Fjords
33
35
  options.rebuild ||= false
34
36
  options.domain ||= nil
35
37
  options.domain_file ||= nil
36
- options.no_zip ||= false
38
+ # options.no_zip ||= false
39
+ options.gzip_assets ||= false
40
+ options.cdn ||= false
37
41
 
38
42
  app.set :fjords_options, options
39
43
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Fjords
3
- VERSION = "1.0.3"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_dependency("middleman-core", [">= 3.0.1"])
22
- s.add_dependency("fjords", "1.0.3")
22
+ s.add_dependency("fjords", "1.1.0")
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-fjords
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-11 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: middleman-core
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 1.0.3
37
+ version: 1.1.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 1.0.3
45
+ version: 1.1.0
46
46
  description: Push-button deploy
47
47
  email:
48
48
  - me@tdreyno.com
@@ -52,6 +52,7 @@ extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
54
  - Gemfile
55
+ - LICENSE
55
56
  - Rakefile
56
57
  - features/support/env.rb
57
58
  - fixtures/blog-app/build/2010/12/13/old-article.html
@@ -82,7 +83,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
83
  version: '0'
83
84
  segments:
84
85
  - 0
85
- hash: 3517759750267830978
86
+ hash: 2312255224962470377
86
87
  required_rubygems_version: !ruby/object:Gem::Requirement
87
88
  none: false
88
89
  requirements:
@@ -91,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
92
  version: '0'
92
93
  segments:
93
94
  - 0
94
- hash: 3517759750267830978
95
+ hash: 2312255224962470377
95
96
  requirements: []
96
97
  rubyforge_project: middleman-fjords
97
98
  rubygems_version: 1.8.23