middleman-deploy 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Deploys a [middleman](http://middlemanapp.com/) built site via **rsync**,
4
4
  **ftp**, **sftp**, or **git** (e.g. gh-pages on github).
5
5
 
6
+ ## Help!
7
+
8
+ middleman-deploy needs a new maintainer. Please [create a GitHub issue](https://github.com/tvaughan/middleman-deploy/issues/new) if you're interested. Thanks!
9
+
6
10
  ## Installation
7
11
 
8
12
  Add this to the Gemfile of the repository of your middleman site:
@@ -66,6 +70,7 @@ activate :deploy do |deploy|
66
70
  # deploy.remote = "custom-remote" # remote name or git url, default: origin
67
71
  # deploy.branch = "custom-branch" # default: gh-pages
68
72
  # deploy.strategy = :submodule # commit strategy: can be :force_push or :submodule, default: :force_push
73
+ # deploy.commit_message = "custom-message" # commit message (can be empty), default: Automated commit at `timestamp` by middleman-deploy `version`
69
74
  end
70
75
  ```
71
76
 
@@ -137,7 +142,7 @@ end
137
142
  namespace :deploy do
138
143
  def deploy(env)
139
144
  puts "Deploying to #{env}"
140
- exec "TARGET=#{env} bundle exec middleman deploy"
145
+ system "TARGET=#{env} bundle exec middleman deploy"
141
146
  end
142
147
 
143
148
  task :staging do
@@ -5,7 +5,7 @@ require "middleman-core"
5
5
  module Middleman
6
6
  module Deploy
7
7
 
8
- class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :password, :path, :clean, :remote, :branch, :strategy, :build_before, :flags); end
8
+ class Options < Struct.new(:whatisthis, :method, :host, :port, :user, :password, :path, :clean, :remote, :branch, :strategy, :build_before, :flags, :commit_message); end
9
9
 
10
10
  class << self
11
11
 
@@ -25,6 +25,7 @@ module Middleman
25
25
  options.remote ||= "origin"
26
26
  options.branch ||= "gh-pages"
27
27
  options.strategy ||= :force_push
28
+ options.commit_message ||= nil
28
29
 
29
30
  options.build_before ||= false
30
31
 
@@ -8,7 +8,7 @@ module Middleman
8
8
 
9
9
  camelized_strategy = self.options.strategy.to_s.split('_').map { |word| word.capitalize}.join
10
10
  strategy_class_name = "Middleman::Deploy::Strategies::Git::#{camelized_strategy}"
11
- strategy_instance = strategy_class_name.constantize.new(self.server_instance.build_dir, self.options.remote, self.options.branch)
11
+ strategy_instance = strategy_class_name.constantize.new(self.server_instance.build_dir, self.options.remote, self.options.branch, self.options.commit_message)
12
12
 
13
13
  strategy_instance.process
14
14
  end
@@ -1,7 +1,7 @@
1
1
  module Middleman
2
2
  module Deploy
3
3
  PACKAGE = "middleman-deploy"
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  TAGLINE = "Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages on github)."
6
6
  end
7
7
  end
@@ -3,12 +3,13 @@ module Middleman
3
3
  module Strategies
4
4
  module Git
5
5
  class Base
6
- attr_accessor :branch, :build_dir, :remote
6
+ attr_accessor :branch, :build_dir, :remote, :commit_message
7
7
 
8
- def initialize(build_dir, remote, branch)
9
- self.branch = branch
10
- self.build_dir = build_dir
11
- self.remote = remote
8
+ def initialize(build_dir, remote, branch, commit_message)
9
+ self.branch = branch
10
+ self.build_dir = build_dir
11
+ self.remote = remote
12
+ self.commit_message = commit_message
12
13
  end
13
14
 
14
15
  def process
@@ -34,7 +35,7 @@ module Middleman
34
35
  end
35
36
 
36
37
  def commit_branch(options='')
37
- message = add_signature_to_commit_message('Automated commit')
38
+ message = self.commit_message ? self.commit_message : add_signature_to_commit_message('Automated commit')
38
39
 
39
40
  `git add -A`
40
41
  `git commit --allow-empty -am "#{message}"`
metadata CHANGED
@@ -1,55 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Tom Vaughan
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
12
+ date: 2014-05-27 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: middleman-core
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 3.0.0
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 3.0.0
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: ptools
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: net-sftp
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - '>='
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - '>='
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  description: Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages
@@ -86,26 +93,27 @@ files:
86
93
  homepage: http://github.com/tvaughan/middleman-deploy
87
94
  licenses:
88
95
  - MIT
89
- metadata: {}
90
96
  post_install_message:
91
97
  rdoc_options: []
92
98
  require_paths:
93
99
  - lib
94
100
  required_ruby_version: !ruby/object:Gem::Requirement
101
+ none: false
95
102
  requirements:
96
- - - '>='
103
+ - - ! '>='
97
104
  - !ruby/object:Gem::Version
98
105
  version: '0'
99
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
+ none: false
100
108
  requirements:
101
- - - '>='
109
+ - - ! '>='
102
110
  - !ruby/object:Gem::Version
103
111
  version: '0'
104
112
  requirements: []
105
113
  rubyforge_project:
106
- rubygems_version: 2.0.7
114
+ rubygems_version: 1.8.23
107
115
  signing_key:
108
- specification_version: 4
116
+ specification_version: 3
109
117
  summary: Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages
110
118
  on github).
111
119
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: af2a5e897b8e4c7ecc95f769cb8f829636a24270
4
- data.tar.gz: 194b03001cb76f6780cfc9cd7c04df9367b5fd14
5
- SHA512:
6
- metadata.gz: 204f5b33558767aa37daa292ddfd43dc1be9e0ecc5bddaa7cb25ef4a0f008b50441de8c4e6e7dbd50195722b4585b32906af9065e81c6c920cdd8ad59b06dac8
7
- data.tar.gz: 0bcbafcd6be8dc7b5d55b815056f84060c5b847199141859394455963cd531e7ccab1198719afd0218dbbab31b1954785a50bb0c30f0c836eeaf17a98e2eab44