prag_events 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ .DS_Store
2
+ results.html
3
+ pkg
4
+ html
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.9.3-p0@prag_events --create
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in prag_events.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,61 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ prag_events (0.0.1)
5
+ gem-man
6
+ methadone (~> 1.0.0)
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ aruba (0.4.11)
12
+ childprocess (>= 0.2.3)
13
+ cucumber (>= 1.1.1)
14
+ ffi (>= 1.0.11)
15
+ rspec (>= 2.7.0)
16
+ builder (3.0.0)
17
+ childprocess (0.3.2)
18
+ ffi (~> 1.0.6)
19
+ cucumber (1.1.9)
20
+ builder (>= 2.1.2)
21
+ diff-lcs (>= 1.1.2)
22
+ gherkin (~> 2.9.0)
23
+ json (>= 1.4.6)
24
+ term-ansicolor (>= 1.0.6)
25
+ diff-lcs (1.1.3)
26
+ ffi (1.0.11)
27
+ gem-man (0.3.0)
28
+ gherkin (2.9.3)
29
+ json (>= 1.4.6)
30
+ hpricot (0.8.6)
31
+ json (1.6.6)
32
+ methadone (1.0.0)
33
+ bundler
34
+ mustache (0.99.4)
35
+ rake (0.9.2.2)
36
+ rdiscount (1.6.8)
37
+ rdoc (3.12)
38
+ json (~> 1.4)
39
+ ronn (0.7.3)
40
+ hpricot (>= 0.8.2)
41
+ mustache (>= 0.7.0)
42
+ rdiscount (>= 1.5.8)
43
+ rspec (2.9.0)
44
+ rspec-core (~> 2.9.0)
45
+ rspec-expectations (~> 2.9.0)
46
+ rspec-mocks (~> 2.9.0)
47
+ rspec-core (2.9.0)
48
+ rspec-expectations (2.9.1)
49
+ diff-lcs (~> 1.1.3)
50
+ rspec-mocks (2.9.0)
51
+ term-ansicolor (1.0.7)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ aruba
58
+ prag_events!
59
+ rake (~> 0.9.2)
60
+ rdoc
61
+ ronn
data/LICENSE.txt ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,84 @@
1
+ prag_events(1) -- Generate XML for your events to make Michael Swaine's life easy
2
+ =================================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `prag_events --you YOUR_NAME --talk TALK_TITLE --conference CONFERENCE --date DATE`
7
+
8
+ `prag_events --who YOUR_NAME --what TALK_TITLE --where CONFERENCE --when DATE`
9
+
10
+ ## INSTALL
11
+
12
+ $ gem install prag_events
13
+
14
+ ## DESCRIPTION
15
+
16
+ **prag_events** generates the XML format that Michael Swaine uses when creating the "events" section of the "PragPub" monthly magazine. You simply run this program with the right inputs and copy the given XML into an email to Michael.
17
+
18
+ This is probably not useful unless you are an author for the Pragmatic Programmers and on the private mailing list.
19
+
20
+ ## OPTIONS
21
+
22
+ * `--conference CONFERENCE`, `--where CONFERENCE`:
23
+ Where the event will be held. This is likely the conference name with some HTML that links
24
+ to the conference's website.
25
+
26
+ * `--you YOUR_NAME`, `--who YOUR_NAME`:
27
+ Who is presenting, likely you. This should contain a **very** brief bio (i.e. what book(s) you wrote) along with a
28
+ link, in HTML
29
+
30
+ * `--talk TALK_TITLE`, `--what TALK_TITLE`:
31
+ Title of the talk or presentation you are given at the conference.
32
+
33
+ * `--date DATE`, `--when DATE`:
34
+ When the event takes place. This can be simple, like "Nov 5"
35
+
36
+ * `--version`:
37
+ Show help/version info
38
+
39
+ ## FILES
40
+
41
+ Default options, namely your bio, can be placed in `~/.prag_events.rc` and should be a YAML file that looks like this:
42
+
43
+ ---
44
+ :who: 'Your name, and <a href="www.example.com">Some HTML</a> to your book.
45
+
46
+ Note that we specifically do **not** grab your name from the environment because you really should include more than just your name here.
47
+
48
+ ## EXAMPLES
49
+
50
+ My talk at OSCON 2012, using my bio in `~./prag_events.rc`
51
+
52
+ prag_events --where '<a href="http://www.oscon.com">OSCON 2012</a>' --when 'Jul 19' --what 'Threads and JRuby, the Simple Alternative to Evented'
53
+ <event>
54
+ <when>Jul 19</when>
55
+ <what>Threads and JRuby, the Simple Alternative to Evented</what>
56
+ <who>David Copeland, Author of <a href="http://pragprog.com/book/dccar">Build Awesome Command-Line Applications in Ruby</a></who>
57
+ <where><a href="http://www.oscon.com">OSCON 2012</a></where>
58
+ </event>
59
+
60
+ ## AUTHOR
61
+
62
+ David Copeland, davec (at) naildrivin5.com
63
+
64
+ ## COPYRIGHT
65
+
66
+ prag_events is copyright(c) 2012 by David Copeland, released under the Apache license.
67
+
68
+ ## SEE ALSO
69
+
70
+ * Source on github: https://github.com/davetron5000/prag_events
71
+
72
+
73
+ [SYNOPSIS]: #SYNOPSIS "SYNOPSIS"
74
+ [INSTALL]: #INSTALL "INSTALL"
75
+ [DESCRIPTION]: #DESCRIPTION "DESCRIPTION"
76
+ [OPTIONS]: #OPTIONS "OPTIONS"
77
+ [FILES]: #FILES "FILES"
78
+ [EXAMPLES]: #EXAMPLES "EXAMPLES"
79
+ [AUTHOR]: #AUTHOR "AUTHOR"
80
+ [COPYRIGHT]: #COPYRIGHT "COPYRIGHT"
81
+ [SEE ALSO]: #SEE-ALSO "SEE ALSO"
82
+
83
+
84
+ [prag_events(1)]: prag_events.1.html
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ require 'bundler'
2
+ require 'rake/clean'
3
+
4
+ require 'rake/testtask'
5
+
6
+ require 'cucumber'
7
+ require 'cucumber/rake/task'
8
+ gem 'rdoc' # we need the installed RDoc gem, not the system one
9
+ require 'rdoc/task'
10
+
11
+ include Rake::DSL
12
+
13
+ Bundler::GemHelper.install_tasks
14
+
15
+
16
+ Rake::TestTask.new do |t|
17
+ t.pattern = 'test/tc_*.rb'
18
+ end
19
+
20
+
21
+ CUKE_RESULTS = 'results.html'
22
+ CLEAN << CUKE_RESULTS
23
+ Cucumber::Rake::Task.new(:features) do |t|
24
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
25
+ t.fork = false
26
+ end
27
+
28
+ Rake::RDocTask.new do |rd|
29
+
30
+ rd.main = "README.rdoc"
31
+
32
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
33
+ end
34
+
35
+ task :man do
36
+ sh 'ronn --markdown --roff man/prag_events.1.ronn'
37
+ mv 'man/prag_events.1.markdown','README.md'
38
+ end
39
+
40
+ CLEAN << 'man/hl.1'
41
+ CLEAN << 'man/hl.1.html'
42
+
43
+ task :default => [:test,:features,:man]
44
+
data/bin/prag_events ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'methadone'
5
+ require 'prag_events'
6
+
7
+ class App
8
+ include Methadone::Main
9
+ include Methadone::CLILogging
10
+
11
+ main do
12
+ %w(when what where).each do |option|
13
+ help_now!("--#{option} is required") if String(options[option]) == ''
14
+ end
15
+ if String(options['who']) == ''
16
+ error = "--who is required if you don't have it in your config file
17
+ You can default this by creating ~/.prag_events.rc to contain:
18
+ ---
19
+ :who: Your Name, and other bio stuff here"
20
+ help_now!(error)
21
+ end
22
+
23
+ puts "<event>"
24
+ %w(when what who where).each do |option|
25
+ puts "\t<#{option}>#{options[option]}</#{option}>"
26
+ end
27
+ puts "</event>"
28
+ end
29
+
30
+ on("--conference","--where CONFERENCE","Where the event will be held")
31
+ on("--you" ,"--who YOUR_NAME" ,"Who is presenting")
32
+ on("--talk" ,"--what TALK_TITLE" ,"Title of the talk or presentation")
33
+ on("--date" ,"--when DATE" ,"When the event takes place")
34
+
35
+ version PragEvents::VERSION
36
+
37
+ defaults_from_config_file '.prag_events.rc'
38
+
39
+ go!
40
+ end
@@ -0,0 +1,68 @@
1
+ Feature: I can generate an event XML
2
+ In order to not have to remember the XML for events
3
+ I can run this app and generate the event XML
4
+ To make Michael Swaine's life a lot easier.
5
+
6
+ Scenario: General UI
7
+ When I get help for "prag_events"
8
+ Then the exit status should be 0
9
+ And the banner should be present
10
+ And the banner should document that this app takes options
11
+ And the following options should be documented:
12
+ |--version|
13
+ |--when|
14
+ |--what|
15
+ |--who|
16
+ |--where|
17
+ And the banner should document that this app takes no arguments
18
+
19
+ Scenario: when is required
20
+ When I run `prag_events --who 'foo' --where 'foo' --what 'foo'`
21
+ Then the exit status should not be 0
22
+ And the stderr should contain "--when is required"
23
+ Scenario: who is required
24
+ When I run `prag_events --when 'foo' --where 'foo' --what 'foo'`
25
+ Then the exit status should not be 0
26
+ And the stderr should contain "--who is required"
27
+ And the stderr should contain:
28
+ """
29
+ You can default this by creating ~/.prag_events.rc to contain:
30
+ ---
31
+ :who: Your Name, and other bio stuff here
32
+ """
33
+ Scenario: what is required
34
+ When I run `prag_events --who 'foo' --where 'foo' --when 'foo'`
35
+ Then the exit status should not be 0
36
+ And the stderr should contain "--what is required"
37
+ Scenario: where is required
38
+ When I run `prag_events --who 'foo' --when 'foo' --what 'foo'`
39
+ Then the exit status should not be 0
40
+ And the stderr should contain "--where is required"
41
+
42
+ Scenario: Generate XML Event
43
+ When I successfully run `prag_events --when 'Nov 5' --who 'David Copeland' --where 'Ruby Midwest' --what 'Make Awesome Command-Line Applications with Ruby'`
44
+ Then the output should contain exactly:
45
+ """
46
+ <event>
47
+ <when>Nov 5</when>
48
+ <what>Make Awesome Command-Line Applications with Ruby</what>
49
+ <who>David Copeland</who>
50
+ <where>Ruby Midwest</where>
51
+ </event>
52
+
53
+ """
54
+
55
+ Scenario: Generate XML Event using config file
56
+ Given a config file in my home directory containing "---\n:who: David Copeland, Author of Build Awesome Command-Line Applications in Ruby\n"
57
+ When I successfully run `prag_events --when 'Nov 5' --where 'Ruby Midwest' --what 'Make Awesome Command-Line Applications with Ruby'`
58
+ Then the output should contain exactly:
59
+ """
60
+ <event>
61
+ <when>Nov 5</when>
62
+ <what>Make Awesome Command-Line Applications with Ruby</what>
63
+ <who>David Copeland, Author of Build Awesome Command-Line Applications in Ruby</who>
64
+ <where>Ruby Midwest</where>
65
+ </event>
66
+
67
+ """
68
+
@@ -0,0 +1,6 @@
1
+ # Put your step definitions here
2
+ Given /^a config file in my home directory containing "([^"]*)"$/ do |contents|
3
+ File.open(File.join(ENV['HOME'],'.prag_events.rc'),'w') do |file|
4
+ file.puts contents.gsub('\n',"\n")
5
+ end
6
+ end
@@ -0,0 +1,23 @@
1
+ require 'aruba/cucumber'
2
+ require 'methadone/cucumber'
3
+ require 'fileutils'
4
+
5
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
6
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
7
+
8
+ Before do
9
+ # Using "announce" causes massive warnings on 1.9.2
10
+ @puts = true
11
+ @original_rubylib = ENV['RUBYLIB']
12
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
13
+ @original_home = ENV['HOME']
14
+ @fake_home = File.join("/tmp","fakehome")
15
+ FileUtils.rm_rf @fake_home
16
+ FileUtils.mkdir @fake_home
17
+ ENV['HOME'] = @fake_home
18
+ end
19
+
20
+ After do
21
+ ENV['RUBYLIB'] = @original_rubylib
22
+ ENV['HOME'] = @original_home
23
+ end
@@ -0,0 +1,3 @@
1
+ module PragEvents
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,5 @@
1
+ require "prag_events/version"
2
+
3
+ module PragEvents
4
+ # Your code goes here...
5
+ end
data/man/prag_events.1 ADDED
@@ -0,0 +1,99 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "PRAG_EVENTS" "1" "April 2012" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBprag_events\fR \- Generate XML for your events to make Michael Swaine\'s life easy
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBprag_events \-\-you YOUR_NAME \-\-talk TALK_TITLE \-\-conference CONFERENCE \-\-date DATE\fR
11
+ .
12
+ .P
13
+ \fBprag_events \-\-who YOUR_NAME \-\-what TALK_TITLE \-\-where CONFERENCE \-\-when DATE\fR
14
+ .
15
+ .SH "INSTALL"
16
+ .
17
+ .nf
18
+
19
+ $ gem install prag_events
20
+ .
21
+ .fi
22
+ .
23
+ .SH "DESCRIPTION"
24
+ \fBprag_events\fR generates the XML format that Michael Swaine uses when creating the "events" section of the "PragPub" monthly magazine\. You simply run this program with the right inputs and copy the given XML into an email to Michael\.
25
+ .
26
+ .P
27
+ This is probably not useful unless you are an author for the Pragmatic Programmers and on the private mailing list\.
28
+ .
29
+ .SH "OPTIONS"
30
+ .
31
+ .TP
32
+ \fB\-\-conference CONFERENCE\fR, \fB\-\-where CONFERENCE\fR
33
+ Where the event will be held\. This is likely the conference name with some HTML that links to the conference\'s website\.
34
+ .
35
+ .TP
36
+ \fB\-\-you YOUR_NAME\fR, \fB\-\-who YOUR_NAME\fR
37
+ Who is presenting, likely you\. This should contain a \fBvery\fR brief bio (i\.e\. what book(s) you wrote) along with a link, in HTML
38
+ .
39
+ .TP
40
+ \fB\-\-talk TALK_TITLE\fR, \fB\-\-what TALK_TITLE\fR
41
+ Title of the talk or presentation you are given at the conference\.
42
+ .
43
+ .TP
44
+ \fB\-\-date DATE\fR, \fB\-\-when DATE\fR
45
+ When the event takes place\. This can be simple, like "Nov 5"
46
+ .
47
+ .TP
48
+ \fB\-\-version\fR
49
+ Show help/version info
50
+ .
51
+ .SH "FILES"
52
+ Default options, namely your bio, can be placed in \fB~/\.prag_events\.rc\fR and should be a YAML file that looks like this:
53
+ .
54
+ .IP "" 4
55
+ .
56
+ .nf
57
+
58
+ \-\-\-
59
+ :who: \'Your name, and <a href="www\.example\.com">Some HTML</a> to your book\.
60
+ .
61
+ .fi
62
+ .
63
+ .IP "" 0
64
+ .
65
+ .P
66
+ Note that we specifically do \fBnot\fR grab your name from the environment because you really should include more than just your name here\.
67
+ .
68
+ .SH "EXAMPLES"
69
+ My talk at OSCON 2012, using my bio in \fB~\./prag_events\.rc\fR
70
+ .
71
+ .IP "" 4
72
+ .
73
+ .nf
74
+
75
+ prag_events \-\-where \'<a href="http://www\.oscon\.com">OSCON 2012</a>\' \-\-when \'Jul 19\' \-\-what \'Threads and JRuby, the Simple Alternative to Evented\'
76
+ <event>
77
+ <when>Jul 19</when>
78
+ <what>Threads and JRuby, the Simple Alternative to Evented</what>
79
+ <who>David Copeland, Author of <a href="http://pragprog\.com/book/dccar">Build Awesome Command\-Line Applications in Ruby</a></who>
80
+ <where><a href="http://www\.oscon\.com">OSCON 2012</a></where>
81
+ </event>
82
+ .
83
+ .fi
84
+ .
85
+ .IP "" 0
86
+ .
87
+ .SH "AUTHOR"
88
+ David Copeland, davec (at) naildrivin5\.com
89
+ .
90
+ .SH "COPYRIGHT"
91
+ prag_events is copyright(c) 2012 by David Copeland, released under the Apache license\.
92
+ .
93
+ .SH "SEE ALSO"
94
+ .
95
+ .IP "\(bu" 4
96
+ Source on github: https://github\.com/davetron5000/prag_events
97
+ .
98
+ .IP "" 0
99
+
@@ -0,0 +1,70 @@
1
+ prag_events(1) -- Generate XML for your events to make Michael Swaine's life easy
2
+ =================================================================================
3
+
4
+ ## SYNOPSIS
5
+
6
+ `prag_events --you YOUR_NAME --talk TALK_TITLE --conference CONFERENCE --date DATE`
7
+
8
+ `prag_events --who YOUR_NAME --what TALK_TITLE --where CONFERENCE --when DATE`
9
+
10
+ ## INSTALL
11
+
12
+ $ gem install prag_events
13
+
14
+ ## DESCRIPTION
15
+
16
+ **prag_events** generates the XML format that Michael Swaine uses when creating the "events" section of the "PragPub" monthly magazine. You simply run this program with the right inputs and copy the given XML into an email to Michael.
17
+
18
+ This is probably not useful unless you are an author for the Pragmatic Programmers and on the private mailing list.
19
+
20
+ ## OPTIONS
21
+
22
+ * `--conference CONFERENCE`, `--where CONFERENCE`:
23
+ Where the event will be held. This is likely the conference name with some HTML that links
24
+ to the conference's website.
25
+
26
+ * `--you YOUR_NAME`, `--who YOUR_NAME`:
27
+ Who is presenting, likely you. This should contain a **very** brief bio (i.e. what book(s) you wrote) along with a
28
+ link, in HTML
29
+
30
+ * `--talk TALK_TITLE`, `--what TALK_TITLE`:
31
+ Title of the talk or presentation you are given at the conference.
32
+
33
+ * `--date DATE`, `--when DATE`:
34
+ When the event takes place. This can be simple, like "Nov 5"
35
+
36
+ * `--version`:
37
+ Show help/version info
38
+
39
+ ## FILES
40
+
41
+ Default options, namely your bio, can be placed in `~/.prag_events.rc` and should be a YAML file that looks like this:
42
+
43
+ ---
44
+ :who: 'Your name, and <a href="www.example.com">Some HTML</a> to your book.
45
+
46
+ Note that we specifically do **not** grab your name from the environment because you really should include more than just your name here.
47
+
48
+ ## EXAMPLES
49
+
50
+ My talk at OSCON 2012, using my bio in `~./prag_events.rc`
51
+
52
+ prag_events --where '<a href="http://www.oscon.com">OSCON 2012</a>' --when 'Jul 19' --what 'Threads and JRuby, the Simple Alternative to Evented'
53
+ <event>
54
+ <when>Jul 19</when>
55
+ <what>Threads and JRuby, the Simple Alternative to Evented</what>
56
+ <who>David Copeland, Author of <a href="http://pragprog.com/book/dccar">Build Awesome Command-Line Applications in Ruby</a></who>
57
+ <where><a href="http://www.oscon.com">OSCON 2012</a></where>
58
+ </event>
59
+
60
+ ## AUTHOR
61
+
62
+ David Copeland, davec (at) naildrivin5.com
63
+
64
+ ## COPYRIGHT
65
+
66
+ prag_events is copyright(c) 2012 by David Copeland, released under the Apache license.
67
+
68
+ ## SEE ALSO
69
+
70
+ * Source on github: https://github.com/davetron5000/prag_events
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "prag_events/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "prag_events"
7
+ s.version = PragEvents::VERSION
8
+ s.authors = ["Dave Copeland"]
9
+ s.email = ["davetron5000@gmail.com"]
10
+ s.homepage = "https://github.com/davetron5000/prag_events"
11
+ s.summary = %q{Generate XML for your events to make Michael Swaine's life easy when he creates PragPub each month}
12
+ s.description = %q{prag_events generates the XML format that Michael Swaine uses when creating the "events" section of the "PragPub" monthly magazine. You simply run this program with the right inputs and copy the given XML into an email to Michael.}
13
+
14
+ s.rubyforge_project = "prag_events"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency('rdoc')
22
+ s.add_development_dependency('aruba')
23
+ s.add_development_dependency('rake','~> 0.9.2')
24
+ s.add_development_dependency('ronn')
25
+ s.add_dependency('methadone', '~>1.0.0')
26
+ s.add_dependency('gem-man')
27
+ end
@@ -0,0 +1,7 @@
1
+ require 'test/unit'
2
+
3
+ class TestSomething < Test::Unit::TestCase
4
+ def test_truth
5
+ assert true
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: prag_events
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Dave Copeland
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rdoc
16
+ requirement: &70244329415460 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70244329415460
25
+ - !ruby/object:Gem::Dependency
26
+ name: aruba
27
+ requirement: &70244329415000 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *70244329415000
36
+ - !ruby/object:Gem::Dependency
37
+ name: rake
38
+ requirement: &70244329414480 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ version: 0.9.2
44
+ type: :development
45
+ prerelease: false
46
+ version_requirements: *70244329414480
47
+ - !ruby/object:Gem::Dependency
48
+ name: ronn
49
+ requirement: &70244329414040 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70244329414040
58
+ - !ruby/object:Gem::Dependency
59
+ name: methadone
60
+ requirement: &70244329413440 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: 1.0.0
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70244329413440
69
+ - !ruby/object:Gem::Dependency
70
+ name: gem-man
71
+ requirement: &70244329412820 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70244329412820
80
+ description: prag_events generates the XML format that Michael Swaine uses when creating
81
+ the "events" section of the "PragPub" monthly magazine. You simply run this program
82
+ with the right inputs and copy the given XML into an email to Michael.
83
+ email:
84
+ - davetron5000@gmail.com
85
+ executables:
86
+ - prag_events
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - .gitignore
91
+ - .rvmrc
92
+ - Gemfile
93
+ - Gemfile.lock
94
+ - LICENSE.txt
95
+ - README.md
96
+ - Rakefile
97
+ - bin/prag_events
98
+ - features/prag_events.feature
99
+ - features/step_definitions/prag_events_steps.rb
100
+ - features/support/env.rb
101
+ - lib/prag_events.rb
102
+ - lib/prag_events/version.rb
103
+ - man/prag_events.1
104
+ - man/prag_events.1.ronn
105
+ - prag_events.gemspec
106
+ - test/tc_something.rb
107
+ homepage: https://github.com/davetron5000/prag_events
108
+ licenses: []
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project: prag_events
127
+ rubygems_version: 1.8.10
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: Generate XML for your events to make Michael Swaine's life easy when he creates
131
+ PragPub each month
132
+ test_files:
133
+ - features/prag_events.feature
134
+ - features/step_definitions/prag_events_steps.rb
135
+ - features/support/env.rb
136
+ - test/tc_something.rb