gem-release 0.1.2 → 0.1.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.
data/lib/gem_release/gemspec.rb
CHANGED
@@ -9,8 +9,8 @@ module GemRelease
|
|
9
9
|
@email ||= user_email
|
10
10
|
@homepage ||= "https://github.com/#{github_user}/#{name}" || "[your github name]"
|
11
11
|
|
12
|
-
@summary ||= '
|
13
|
-
@description ||= '
|
12
|
+
@summary ||= 'TODO: summary'
|
13
|
+
@description ||= 'TODO: description'
|
14
14
|
|
15
15
|
@strategy = options[:strategy]
|
16
16
|
end
|
data/lib/gem_release/template.rb
CHANGED
@@ -6,7 +6,7 @@ module GemRelease
|
|
6
6
|
class Template
|
7
7
|
include GemRelease::Helpers
|
8
8
|
|
9
|
-
attr_reader :template, :name, :module_names, :module_path
|
9
|
+
attr_reader :template, :filename, :name, :module_names, :module_path
|
10
10
|
|
11
11
|
def initialize(template, options = {})
|
12
12
|
@template = template
|
@@ -16,6 +16,7 @@ module GemRelease
|
|
16
16
|
meta_class.send(:attr_reader, key)
|
17
17
|
end
|
18
18
|
|
19
|
+
@filename ||= @template
|
19
20
|
@name ||= gem_name_from_directory
|
20
21
|
@module_path ||= name
|
21
22
|
@module_names ||= module_names_from_path(module_path)
|
@@ -26,10 +27,6 @@ module GemRelease
|
|
26
27
|
File.open(filename, 'w+') { |f| f.write(render) }
|
27
28
|
end
|
28
29
|
|
29
|
-
def filename
|
30
|
-
template
|
31
|
-
end
|
32
|
-
|
33
30
|
protected
|
34
31
|
|
35
32
|
def module_names_from_path(path)
|
@@ -4,16 +4,16 @@ $:.unshift File.expand_path('../lib', __FILE__)
|
|
4
4
|
require '<%= module_path %>/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
s.authors
|
10
|
-
s.email
|
11
|
-
s.homepage
|
12
|
-
s.summary
|
13
|
-
s.description
|
7
|
+
s.name = <%= name.inspect %>
|
8
|
+
s.version = <%= module_names.join('::') %>::VERSION
|
9
|
+
s.authors = [<%= author.inspect %>]
|
10
|
+
s.email = [<%= email.inspect %>]
|
11
|
+
s.homepage = <%= homepage.inspect %>
|
12
|
+
s.summary = <%= summary.inspect %>
|
13
|
+
s.description = <%= description.inspect %>
|
14
14
|
|
15
|
-
s.files
|
16
|
-
s.platform
|
17
|
-
s.
|
15
|
+
s.files = <%= files %>
|
16
|
+
s.platform = Gem::Platform::RUBY
|
17
|
+
s.require_paths = ['lib']
|
18
18
|
s.rubyforge_project = '[none]'
|
19
19
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Because this is a gem, ignore Gemfile.lock:
|
2
|
+
|
3
|
+
Gemfile.lock
|
4
|
+
|
5
|
+
# And because this is Ruby, ignore the following
|
6
|
+
# (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore):
|
7
|
+
|
8
|
+
*.gem
|
9
|
+
*.rbc
|
10
|
+
.bundle
|
11
|
+
.config
|
12
|
+
coverage
|
13
|
+
InstalledFiles
|
14
|
+
lib/bundler/man
|
15
|
+
pkg
|
16
|
+
rdoc
|
17
|
+
spec/reports
|
18
|
+
test/tmp
|
19
|
+
test/version_tmp
|
20
|
+
tmp
|
21
|
+
|
22
|
+
# YARD artifacts
|
23
|
+
.yardoc
|
24
|
+
_yardoc
|
25
|
+
doc/
|
data/lib/gem_release/version.rb
CHANGED
@@ -44,6 +44,7 @@ class Gem::Commands::BootstrapCommand < Gem::Command
|
|
44
44
|
def write_scaffold
|
45
45
|
say 'scaffolding ...' unless quiet?
|
46
46
|
|
47
|
+
create_file Template.new('gitignore', :filename => '.gitignore')
|
47
48
|
create_file Template.new('README.md')
|
48
49
|
create_file Template.new('LICENSE', :year => Time.now.year, :author => user_name, :email => user_email)
|
49
50
|
create_file Template.new('Gemfile')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sven Fuchs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-02-26 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -72,6 +72,7 @@ files:
|
|
72
72
|
- lib/gem_release/templates/README.md
|
73
73
|
- lib/gem_release/templates/Rakefile
|
74
74
|
- lib/gem_release/templates/gemspec
|
75
|
+
- lib/gem_release/templates/gitignore
|
75
76
|
- lib/gem_release/templates/test/test_helper.rb
|
76
77
|
- lib/gem_release/templates/version.rb
|
77
78
|
- lib/gem_release/version.rb
|