rscaffold 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97e576aa698e32f0498b65c40e9de93a3634cf10
4
- data.tar.gz: 0ecaea5e993b35174be02dc027905306ff22de27
3
+ metadata.gz: c95c3b5510e19d487ca8ca3bb986b40e33e1d728
4
+ data.tar.gz: b3008d259bc017992b30b858966931898604e188
5
5
  SHA512:
6
- metadata.gz: 9973a626b9ffee233a9364efe632b72f999aedf504188d0ba96f8ce30f86844031b16ba9ae34c8d49b263232613b3ec54195d91395b87ad9d1270ca16b6dbc05
7
- data.tar.gz: 94006295f6e29378a6446e0c3888f594c42f21b91873a7190605aa3b4a48f76fc7878f75283f2b673ef8497b3f757206b5bdb12bbfc87c3aced52f9bab1f0db7
6
+ metadata.gz: aef1ab11ebd307d0508d68e4ab6d5b903ee39cd4d8063d009e77d93f69b619594906c3866e6d7879c8055cfb44941de13bd12bcde1aaf1d1ce7af17b5690566d
7
+ data.tar.gz: 31259b70d5de902ba99e50f6ea73831e93800167e0d954abe2b64210c39f56370d42a65e1929c7009817b974f69c3e2478b1badc345c9a8919ab7fabd05b779f
data/README.md CHANGED
@@ -33,3 +33,115 @@ MIT license
33
33
 
34
34
  [![Build Status](https://travis-ci.org/nbirnel/rscaffold.png?branch=master)](https://travis-ci.org/nbirnel/rscaffold)
35
35
  [![Code Climate](https://codeclimate.com/github/nbirnel/rscaffold.png)](https://codeclimate.com/github/nbirnel/rscaffold)
36
+ <html>
37
+ <head>
38
+ <meta name="generator" content="groff -Thtml, see www.gnu.org">
39
+ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
40
+ <meta name="Content-Style" content="text/css">
41
+ <title>rscaffold</title>
42
+
43
+ </head>
44
+ <body>
45
+
46
+ <h1 align="center">rscaffold</h1>
47
+
48
+ <a href="#NAME">NAME</a><br>
49
+ <a href="#SYNOPSIS">SYNOPSIS</a><br>
50
+ <a href="#DESCRIPTION">DESCRIPTION</a><br>
51
+ <a href="#OPTIONS">OPTIONS</a><br>
52
+ <a href="#EXAMPLES">EXAMPLES</a><br>
53
+ <a href="#FILES">FILES</a><br>
54
+ <a href="#SEE ALSO">SEE ALSO</a><br>
55
+ <a href="#BUGS">BUGS</a><br>
56
+ <a href="#LICENSE">LICENSE</a><br>
57
+
58
+ <hr>
59
+
60
+
61
+ <h2>NAME
62
+ <a name="NAME"></a>
63
+ </h2>
64
+
65
+
66
+ <p style="margin-left:11%; margin-top: 1em">rscaffold
67
+ &minus; generate scaffolding for a ruby gem</p>
68
+
69
+ <h2>SYNOPSIS
70
+ <a name="SYNOPSIS"></a>
71
+ </h2>
72
+
73
+
74
+ <p style="margin-left:11%; margin-top: 1em"><b>rscaffold
75
+ PROJECT_NAME</b></p>
76
+
77
+ <h2>DESCRIPTION
78
+ <a name="DESCRIPTION"></a>
79
+ </h2>
80
+
81
+
82
+
83
+ <p style="margin-left:11%; margin-top: 1em"><b>rscaffold</b>
84
+ generates most things you would want in a basic ruby
85
+ project.</p>
86
+
87
+ <h2>OPTIONS
88
+ <a name="OPTIONS"></a>
89
+ </h2>
90
+
91
+
92
+ <p style="margin-left:11%; margin-top: 1em"><b>--help</b>
93
+ Print a brief usage message.</p>
94
+
95
+ <h2>EXAMPLES
96
+ <a name="EXAMPLES"></a>
97
+ </h2>
98
+
99
+
100
+
101
+ <p style="margin-left:11%; margin-top: 1em"><b>rscaffold</b></p>
102
+
103
+ <h2>FILES
104
+ <a name="FILES"></a>
105
+ </h2>
106
+
107
+
108
+ <h2>SEE ALSO
109
+ <a name="SEE ALSO"></a>
110
+ </h2>
111
+
112
+
113
+
114
+ <p style="margin-left:11%; margin-top: 1em"><b>ruby(1)</b></p>
115
+
116
+ <table width="100%" border="0" rules="none" frame="void"
117
+ cellspacing="0" cellpadding="0">
118
+ <tr valign="top" align="left">
119
+ <td width="11%"></td>
120
+ <td width="6%">
121
+
122
+
123
+ <h2>BUGS
124
+ <a name="BUGS"></a>
125
+ </h2>
126
+ </td>
127
+ <td width="5%"></td>
128
+ <td width="13%">
129
+
130
+
131
+ <p style="margin-top: 1em">Probably.</p></td>
132
+ <td width="65%">
133
+ </td></tr>
134
+ </table>
135
+
136
+ <h2>LICENSE
137
+ <a name="LICENSE"></a>
138
+ </h2>
139
+
140
+
141
+ <p style="margin-left:11%; margin-top: 1em">Copyright Noah
142
+ Birnel</p>
143
+
144
+ <p style="margin-left:11%; margin-top: 1em">MIT License</p>
145
+ <hr>
146
+ </body>
147
+ </html>
@@ -3,7 +3,7 @@ module RScaffold
3
3
  class Version
4
4
  MAJOR = 0
5
5
  MINOR = 0
6
- PATCH = 2
6
+ PATCH = 3
7
7
 
8
8
  class << self
9
9
  def to_s
data/lib/rscaffold.rb CHANGED
@@ -24,7 +24,7 @@ module RScaffold
24
24
  owner
25
25
  remote
26
26
  remote_path
27
- rubyver
27
+ req_rubyver
28
28
  summary
29
29
  travis
30
30
  usage
@@ -40,11 +40,12 @@ module RScaffold
40
40
  @bin = @name
41
41
  @camel = RScaffold.camel_case @name
42
42
 
43
- @rubyver = '>=1.8.7'
43
+ @cur_rubyver = '2.1'
44
+ @req_rubyver = '>=1.8.7'
44
45
  @license = 'MIT'
45
46
 
46
47
  @today = Time.now.strftime '%Y-%m-%d'
47
- @yyyy = Time.now.year
48
+ @year = Time.now.year
48
49
 
49
50
  # This disgusting thing is to work across *nix, Windows, and Cygwin.
50
51
  @whoami = ( ENV["USER"] || ENV["USERNAME"] ).sub(/.*\\/, '')
@@ -59,9 +60,10 @@ module RScaffold
59
60
  @codeclimate = codeclimate_of @remote_path
60
61
  @gemversion = gemversion_of @name
61
62
 
62
- @summary = "!!SUMMARY!!"
63
- @description = "!!DESCRIPTION!!"
64
- @usage = "!!USAGE!!"
63
+ @summary = "#FIXME summary"
64
+ @description = "#FIXME description"
65
+ @usage = "#FIXME usage"
66
+ @website = "#FIXME website"
65
67
 
66
68
  @location = {
67
69
  :bin => "bin/#{@bin}",
@@ -82,7 +84,7 @@ module RScaffold
82
84
  end
83
85
 
84
86
  def rendered template
85
- ERB.new(contents(template), nil, '<>').result binding
87
+ ERB.new(contents(template), nil).result binding
86
88
  end
87
89
 
88
90
  def write template
@@ -92,6 +94,17 @@ module RScaffold
92
94
  end
93
95
  end
94
96
 
97
+ def git_init
98
+ `git init`
99
+ `git add .`
100
+ `git commit -m'initial commit' -a`
101
+ end
102
+
103
+ def rvm_create
104
+ `rvm --create use #{cur_rubyver}@#{@name} --ruby-version`
105
+ `bundle install`
106
+ end
107
+
95
108
  def write_all
96
109
  @location.keys.each{|template| self.write(template.to_s)}
97
110
  end
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.name = '<%=@name%>'
5
5
  s.version = <%=@camel%>::VERSION
6
6
  s.date = '<%=@today%>'
7
- s.required_ruby_version = '<%@rubyver%>'
7
+ s.required_ruby_version = '<%@req_rubyver%>'
8
8
  s.summary = "<%=@summary%>"
9
9
  s.description = "<%=@description%>"
10
10
  s.authors = ['<%=@fullname%>']
@@ -18,10 +18,10 @@ Print a brief usage message.
18
18
  .TP
19
19
  .BR ruby(1)
20
20
  .TP
21
- .IR <%=@fixmewebsite%>
21
+ .IR <%=@website%>
22
22
  .SH BUGS
23
23
  Probably.
24
24
  .SH LICENSE
25
25
  Copyright <%=@year%> <%=@owner%>
26
26
  .sp
27
- <%=@license%>
27
+ <%=@license%> License
@@ -1,4 +1,5 @@
1
- require '<%=@name%>/version.rb'
1
+ v = File.join(File.expand_path(File.dirname(__FILE__)), '<%=@name%>/version.rb'
2
+ require v
2
3
 
3
4
  module <%=@camel%>
4
5
 
@@ -8,18 +8,18 @@ VER = <%=@camel%>::VERSION
8
8
  PROG = '<%=@name%>'
9
9
  NAME = '<%=@bin%>'
10
10
 
11
- LIB = FileList['lib/*.rb']
12
11
  BIN = FileList['bin/*.rb']
13
- TEST = FileList['spec/*.rb']
14
- MAN = FileList['man/man*/*.?']
15
- MANFILE = "#{NAME}.1"
16
- SPEC = "#{PROG}.gemspec"
17
12
  GEM = "#{PROG}-#{VER}.gem"
18
- CLEAN.include('doc', '*.gem', 'README.md')
13
+ LIB = FileList['lib/*.rb']
14
+ MAN = FileList['man/man*/*.?']
19
15
  MANDIR = '/usr/local/man/man1/'
16
+ MANFILE = "#{NAME}.1"
20
17
  MANDEST = [MANDIR, MANFILE].join '/'
21
18
  README = 'README.md'
22
19
  READMESRC = 'doc-src/README.md'
20
+ SPEC = "#{PROG}.gemspec"
21
+ TEST = FileList['spec/*.rb']
22
+ CLEAN.include('doc', '*.gem', 'README.md')
23
23
 
24
24
  task :all => [:spec, :install]
25
25
 
@@ -34,6 +34,7 @@ file 'doc' => LIB do
34
34
  end
35
35
 
36
36
  task :readme => README
37
+ `git commit -m'update README' README.md`
37
38
 
38
39
  file README =>[READMESRC, MAN].flatten do
39
40
  `cp #{READMESRC} #{README}`
@@ -17,7 +17,7 @@ or if you want the man page installed:
17
17
 
18
18
  Runtime Requirements
19
19
  ---------
20
- ruby >= <%@rubyver%>
20
+ ruby >= <%=@req_rubyver%>
21
21
 
22
22
  Build Requirements
23
23
  ---------
@@ -33,7 +33,7 @@ Inspiration and History
33
33
 
34
34
  License
35
35
  ---------
36
- © <%=@yyyy%> <%=@owner%>
36
+ © <%=@year%> <%=@owner%>
37
37
  <%=@license%> license
38
38
 
39
39
  <%=@travis%>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rscaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Birnel