detroit-grancher 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cd6b2f339136fb77c2b381c176af025c815c01ed
4
+ data.tar.gz: a63dd82ae752af30220e01575360324f6d7d91e5
5
+ SHA512:
6
+ metadata.gz: 0b1e10c517d998f29276a7f723cb6b43a9fdeaad423e97d73a680d31c0a59f64cbb3dbfa7279d2d826644261372d2fc27807b5b6d25ece61263c2aa9da359b18
7
+ data.tar.gz: f01b11838be16bb5d58bc4ae6835d8d44d6f9418177dd30e07671def1b07de0cfd4cee24104b8c5ec94810db526b0dcb9110abaf1ebdcbc9db1f4764652fd580
@@ -0,0 +1,43 @@
1
+ # Detroit Grancher Tool
2
+
3
+ [Website](http://rubyworks.github.com/detroit-grancher) /
4
+ [Report Issue](http://github.com/rubyworks/detroit-grancher/issues) /
5
+ [Development](http://github.com/rubyworks/detroit-grancher)
6
+
7
+ [![Build Status](https://secure.travis-ci.org/rubyworks/detroit-grancher.png)](http://travis-ci.org/rubyworks/detroit-grancher)
8
+ [![Gem Version](https://badge.fury.io/rb/detroit-grancher.png)](http://badge.fury.io/rb/detroit-grancher)    
9
+ [![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)
10
+
11
+
12
+ ## About
13
+
14
+ The Grancher tool copies designated files to a git branch.
15
+ This is useful for dealing with situations like GitHub's
16
+ gh-pages branch for hosting project websites.
17
+
18
+
19
+ ## Install
20
+
21
+ ### With RubyGems
22
+
23
+ $ gem install detroit-grancher
24
+
25
+
26
+ ## Legal
27
+
28
+ Detroit Grancher
29
+
30
+ Copyright (c) 2011 Rubyworks
31
+
32
+ This program is free software: you can redistribute it and/or modify
33
+ it under the terms of the GNU General Public License as published by
34
+ the Free Software Foundation, either version 3 of the License, or
35
+ (at your option) any later version.
36
+
37
+ This program is distributed in the hope that it will be useful,
38
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
39
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40
+ GNU General Public License for more details.
41
+
42
+ See LICENSE.txt for details.
43
+
@@ -1,25 +1,50 @@
1
- require 'detroit/tool'
1
+ require 'detroit-standard'
2
2
 
3
3
  module Detroit
4
4
 
5
- # Convenicene method for creating a new Grancher tool instance.
6
- def Grancher(options={})
7
- Grancher.new(options)
8
- end
9
-
10
- # IMPORTANT! Grancher Tool is being deprecated in favor of the new GitHub
5
+ ##
6
+ # This tool copies designated files to a git branch. This is useful
7
+ # for dealing with situations like GitHub's gh-pages branch for hosting
8
+ # project websites (a poor design copied from the Git project itself).
9
+ #
10
+ # IMPORTANT! Grancher tool is being deprecated in favor of the new GitHub
11
11
  # tool. Grancher has issues with Ruby 1.9 (due to encoding problems
12
- # in Gash library) and show no signs of being fixes.
12
+ # in Gash library) that show no signs of being fixed.
13
13
  #
14
- # IMPORTANT! This toll only works with Ruby 1.8.x.
14
+ # The following stations of the standard toolchain are targeted:
15
15
  #
16
- # This tool copies designated files to a git branch.
17
- # This is useful for dealing with situations like GitHub's
18
- # gh-pages branch for hosting project websites.[1]
16
+ # * :pre_publish
17
+ # * :publish
18
+ #
19
+ # @note This tool may only works with Ruby 1.8.x.
19
20
  #
20
- # [1] A poor design copied from the Git project itself.
21
21
  class Grancher < Tool
22
22
 
23
+ # Works with the Standard assembly.
24
+ #
25
+ # Attach `transfer` method to `pre_publish` assembly station, and
26
+ # attach `publish` method to `publish` assembly station.
27
+ #
28
+ # @!parse
29
+ # include Standard
30
+ #
31
+ assembly Standard
32
+
33
+ # Location of manpage for tool.
34
+ MANPAGE = File.dirname(__FILE__) + '/../man/detroit-grancher.5'
35
+
36
+ # Initialize defaults.
37
+ #
38
+ # @todo Does project provide the site directory?
39
+ #
40
+ # @return [void]
41
+ def prerequisite
42
+ @branch ||= 'gh-pages'
43
+ @remote ||= 'origin'
44
+ @sitemap ||= default_sitemap
45
+ #@keep_all ||= trial?
46
+ end
47
+
23
48
  # The brach into which to save the files.
24
49
  attr_accessor :branch
25
50
 
@@ -55,28 +80,6 @@ module Detroit
55
80
  end
56
81
  end
57
82
 
58
-
59
- # A S S E M B L Y S T A T I O N S
60
-
61
- def assemble?(station, options={})
62
- case station
63
- when :pre_publish then true
64
- when :publish then true
65
- end
66
- end
67
-
68
- # Attach pre-publish method to pre-publish assembly station.
69
- # Attach publish method to publish assembly station.
70
- def assemble(station)
71
- case station
72
- when :pre_publish then transfer
73
- when :publish then publish
74
- end
75
- end
76
-
77
-
78
- # S E R V I C E M E T H O D S
79
-
80
83
  # Cached Grancter instance.
81
84
  def grancher
82
85
  @grancher ||= ::Grancher.new do |g|
@@ -110,9 +113,6 @@ module Detroit
110
113
  report "Tranferred site files to #{branch}."
111
114
  end
112
115
 
113
- # Same as transfer.
114
- alias_method :pre_publish, :transfer
115
-
116
116
  # Push files to remote.
117
117
  def publish
118
118
  require 'grancher'
@@ -120,20 +120,22 @@ module Detroit
120
120
  report "Pushed site files to #{remote}."
121
121
  end
122
122
 
123
- private
124
-
125
- # TODO: Does the POM Project provide the site directory?
126
- def initialize_defaults
127
- @branch ||= 'gh-pages'
128
- @remote ||= 'origin'
129
- @sitemap ||= default_sitemap
130
- #@keep_all ||= trial?
123
+ # This tool ties into the `pre_publish` and `publish` stations of the
124
+ # standard assembly.
125
+ #
126
+ # @return [Boolean,Symbol]
127
+ def assemble?(station, options={})
128
+ return :transfer if station == :pre_publish
129
+ return :publish if station == :publish
130
+ return false
131
131
  end
132
132
 
133
+ private
134
+
133
135
  # Default sitemap includes the website directoy, if it exists.
134
136
  # Otherwise it looks for a `doc` or `docs` directory.
135
137
  #
136
- # NOTE: We have loop over the contents of the site directory
138
+ # @note This has to loop over the contents of the website directory
137
139
  # in order to pick up symlinks b/c Grancher doesn't support them.
138
140
  def default_sitemap
139
141
  sm = []
@@ -155,12 +157,6 @@ module Detroit
155
157
  sm
156
158
  end
157
159
 
158
- public
159
-
160
- def self.man_page
161
- File.dirname(__FILE__)+'/../man/detroit-grancher.5'
162
- end
163
-
164
160
  end
165
161
 
166
162
  end
@@ -1,19 +1,19 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "DETROIT\-GRANCHER" "5" "October 2011" "" ""
4
+ .TH "DETROIT\-GRANCHER" "5" "January 2014" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBdetroit\-grancher\fR \- publish website via dedicated git branch
8
8
  .
9
9
  .SH "DESCRIPTION"
10
- The Grancher tool utilizes the Grancher library to publish a project\'s website via a dedicated git branch\. Typically this is the \fBgh\-pages\fR branch\.
10
+ The Grancher tool utilizes the Grancher library to publish a project\'s website via a dedicated git branch\. Typically this is used for the \fBgh\-pages\fR branch\.
11
11
  .
12
12
  .P
13
- Note that his plug\-in has been generally superseded by the \fBgithub\fR plug\-in\.
13
+ \fBNote that his plugin has been generally superseded by the \fBgithub\fR plugin\.\fR
14
14
  .
15
15
  .SH "OPTIONS"
16
- The following options can be used in Detroit assembly files for defining a github service\.
16
+ The following options can be used in Detroit toolchain files for defining a Grancher tool instance\.
17
17
  .
18
18
  .IP "\(bu" 4
19
19
  \fBremote\fR \- The remote to use (defaults to \'origin\')\.
@@ -90,10 +90,10 @@ Development Site \fIhttp://github\.com/detroit/detroit\-grancher\fR
90
90
  .IP "" 0
91
91
  .
92
92
  .SH "COPYRIGHT"
93
- Copyright (c) 2010 Thomas Sawyer, Rubyworks
93
+ Copyright (c) 2010 Rubyworks
94
94
  .
95
95
  .P
96
- Detroit Grancher is distributable in accordance with the GPLv3 license\.
96
+ Detroit Grancher is distributable in accordance with the GPL v3 license\.
97
97
  .
98
98
  .SH "SEE ALSO"
99
99
  detroit(1), git(1), detroit\-github(5)
@@ -60,7 +60,7 @@
60
60
  <a href="#RESOURCES">RESOURCES</a>
61
61
  <a href="#COPYRIGHT">COPYRIGHT</a>
62
62
  <a href="#SEE-ALSO">SEE ALSO</a>
63
- </div>
63
+ </div>
64
64
 
65
65
  <ol class='man-decor man-head man head'>
66
66
  <li class='tl'>detroit-grancher(5)</li>
@@ -77,15 +77,15 @@
77
77
 
78
78
  <p>The Grancher tool utilizes the Grancher library to publish a
79
79
  project's website via a dedicated git branch. Typically this
80
- is the <code>gh-pages</code> branch.</p>
80
+ is used for the <code>gh-pages</code> branch.</p>
81
81
 
82
- <p>Note that his plug-in has been generally superseded by the
83
- <code>github</code> plug-in.</p>
82
+ <p><strong>Note that his plugin has been generally superseded by the
83
+ <code>github</code> plugin.</strong></p>
84
84
 
85
85
  <h2 id="OPTIONS">OPTIONS</h2>
86
86
 
87
- <p>The following options can be used in Detroit assembly files
88
- for defining a github service.</p>
87
+ <p>The following options can be used in Detroit toolchain files
88
+ for defining a Grancher tool instance.</p>
89
89
 
90
90
  <ul>
91
91
  <li><p><code>remote</code> - The remote to use (defaults to 'origin').</p></li>
@@ -144,9 +144,9 @@ complex globs are needed.</p>
144
144
 
145
145
  <h2 id="COPYRIGHT">COPYRIGHT</h2>
146
146
 
147
- <p>Copyright (c) 2010 Thomas Sawyer, Rubyworks</p>
147
+ <p>Copyright (c) 2010 Rubyworks</p>
148
148
 
149
- <p>Detroit Grancher is distributable in accordance with the GPLv3 license.</p>
149
+ <p>Detroit Grancher is distributable in accordance with the GPL v3 license.</p>
150
150
 
151
151
  <h2 id="SEE-ALSO">SEE ALSO</h2>
152
152
 
@@ -155,7 +155,7 @@ complex globs are needed.</p>
155
155
 
156
156
  <ol class='man-decor man-foot man foot'>
157
157
  <li class='tl'></li>
158
- <li class='tc'>October 2011</li>
158
+ <li class='tc'>January 2014</li>
159
159
  <li class='tr'>detroit-grancher(5)</li>
160
160
  </ol>
161
161
 
@@ -5,15 +5,15 @@ detroit-grancher(5) - publish website via dedicated git branch
5
5
 
6
6
  The Grancher tool utilizes the Grancher library to publish a
7
7
  project's website via a dedicated git branch. Typically this
8
- is the `gh-pages` branch.
8
+ is used for the `gh-pages` branch.
9
9
 
10
- Note that his plug-in has been generally superseded by the
11
- `github` plug-in.
10
+ **Note that his plugin has been generally superseded by the
11
+ `github` plugin.**
12
12
 
13
13
  ## OPTIONS
14
14
 
15
- The following options can be used in Detroit assembly files
16
- for defining a github service.
15
+ The following options can be used in Detroit toolchain files
16
+ for defining a Grancher tool instance.
17
17
 
18
18
  * `remote` - The remote to use (defaults to 'origin').
19
19
 
@@ -70,9 +70,9 @@ For more information:
70
70
 
71
71
  ## COPYRIGHT
72
72
 
73
- Copyright (c) 2010 Thomas Sawyer, Rubyworks
73
+ Copyright (c) 2010 Rubyworks
74
74
 
75
- Detroit Grancher is distributable in accordance with the GPLv3 license.
75
+ Detroit Grancher is distributable in accordance with the GPL v3 license.
76
76
 
77
77
 
78
78
  ## SEE ALSO
metadata CHANGED
@@ -1,38 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: detroit-grancher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - T. Sawyer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-04-02 00:00:00.000000000 Z
11
+ date: 2014-01-15 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: detroit
16
- requirement: &17478300 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
- version: 0.3.0
19
+ version: 0.4.0
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *17478300
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 0.4.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: detroit-standard
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
25
41
  - !ruby/object:Gem::Dependency
26
42
  name: grancher
27
- requirement: &17477700 !ruby/object:Gem::Requirement
28
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
29
44
  requirements:
30
- - - ! '>='
45
+ - - '>='
31
46
  - !ruby/object:Gem::Version
32
47
  version: '0'
33
48
  type: :runtime
34
49
  prerelease: false
35
- version_requirements: *17477700
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
36
55
  description: Grancher plugin for Detroit build system uses the grancher gem to copy
37
56
  a project's website directory to github gh-pages branch and push it the github.com
38
57
  during the publish phase. While quite usable, this plugin has been superceded by
@@ -43,40 +62,37 @@ executables: []
43
62
  extensions: []
44
63
  extra_rdoc_files:
45
64
  - LICENSE.txt
46
- - README.rdoc
47
- - COPYING.rdoc
65
+ - README.md
48
66
  files:
49
- - .ruby
50
67
  - lib/detroit-grancher.rb
51
68
  - man/detroit-grancher.5
52
69
  - man/detroit-grancher.5.html
53
70
  - man/detroit-grancher.5.ronn
71
+ - README.md
54
72
  - LICENSE.txt
55
- - README.rdoc
56
- - COPYING.rdoc
57
73
  homepage: http://detroit.github.com/
58
74
  licenses:
59
- - GPL-3
75
+ - GPL-3.0
76
+ metadata: {}
60
77
  post_install_message:
61
78
  rdoc_options: []
62
79
  require_paths:
63
80
  - lib
64
81
  required_ruby_version: !ruby/object:Gem::Requirement
65
- none: false
66
82
  requirements:
67
- - - ! '>='
83
+ - - '>='
68
84
  - !ruby/object:Gem::Version
69
85
  version: '0'
70
86
  required_rubygems_version: !ruby/object:Gem::Requirement
71
- none: false
72
87
  requirements:
73
- - - ! '>='
88
+ - - '>='
74
89
  - !ruby/object:Gem::Version
75
90
  version: '0'
76
91
  requirements: []
77
92
  rubyforge_project:
78
- rubygems_version: 1.8.11
93
+ rubygems_version: 2.0.3
79
94
  signing_key:
80
- specification_version: 3
95
+ specification_version: 4
81
96
  summary: Grancher plugin for Detroit
82
97
  test_files: []
98
+ has_rdoc:
data/.ruby DELETED
@@ -1,38 +0,0 @@
1
- ---
2
- source:
3
- - meta
4
- authors:
5
- - name: T. Sawyer
6
- email: transfire@gmail.com
7
- copyrights:
8
- - holder: Thomas Sawyer
9
- year: '2011'
10
- license: GPL-3
11
- requirements:
12
- - name: detroit
13
- version: 0.3.0+
14
- - name: grancher
15
- dependencies: []
16
- alternatives: []
17
- conflicts: []
18
- repositories: []
19
- resources:
20
- home: http://detroit.github.com/
21
- code: http://github.com/detroit/detroit-grancher
22
- mail: http://groups.google.com/rubyworks-mailinglist
23
- extra: {}
24
- load_path:
25
- - lib
26
- revision: 0
27
- created: '2011-10-16'
28
- summary: Grancher plugin for Detroit
29
- title: Detroit Grancher
30
- version: 0.2.0
31
- name: detroit-grancher
32
- suite: detroit
33
- description: Grancher plugin for Detroit build system uses the grancher gem to copy
34
- a project's website directory to github gh-pages branch and push it the github.com
35
- during the publish phase. While quite usable, this plugin has been superceded by
36
- the github gem for most use cases.
37
- organization: rubyworks
38
- date: '2012-04-01'
@@ -1,23 +0,0 @@
1
- = COPYRIGHT NOTICES
2
-
3
- == Detroit Grancher
4
-
5
- Copyright:: (c) 2011 Thomas Sawyer
6
- License:: GPL-3
7
- Website:: http://detroit.github.com
8
-
9
- Copyright (c) 2011 Thomas Sawyer
10
-
11
- This program is free software: you can redistribute it and/or modify
12
- it under the terms of the GNU General Public License as published by
13
- the Free Software Foundation, either version 3 of the License, or
14
- (at your option) any later version.
15
-
16
- This program is distributed in the hope that it will be useful,
17
- but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- GNU General Public License for more details.
20
-
21
- You should have received a copy of the GNU General Public License
22
- along with this program. If not, see <http://www.gnu.org/licenses/>.
23
-
@@ -1,23 +0,0 @@
1
- = Detroit Grancher Tool
2
-
3
-
4
- == DESCRIPTION
5
-
6
- The Grancher tool copies designated files to a git branch.
7
- This is useful for dealing with situations like GitHub's
8
- gh-pages branch for hosting project websites.
9
-
10
-
11
- == INSTALL
12
-
13
- $ gem install detroit-grancher
14
-
15
-
16
- == COPYRIGHT
17
-
18
- Copyright (c) 2011 Thomas Sawyer
19
-
20
- GPL v.3 license
21
-
22
- See COPYING.rdoc and GPL3.txt file for details.
23
-