rookie 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c19dca0748a15404af0214c52f9e6a82e7bce11ef4ae35803c67df2550522d85
4
+ data.tar.gz: fa049b626b4f2bcc751afa46434fcaf46e99d90d1de3f652cd77ea7850924ea1
5
+ SHA512:
6
+ metadata.gz: 3bddf1bb459a508bd699b4919a90ed62633be60f3a7f52c272d9ef6d8f2e6e19b6c5805a8f7d3cc6dee03661479f0921baf3f52c14d12f51990103554c6633b3
7
+ data.tar.gz: d2f436aa80770e698f2450de4483d223e4198672d3ed3b306e34769e76db33d7cf3add9b7d102c248a55396b8598512b68198d2fd8495a45130285e4830c7161
data/.gitignore CHANGED
@@ -1 +1,2 @@
1
1
  *.lock
2
+ .yardoc
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
1
  source :rubygems
2
2
 
3
3
  gemspec
4
+
5
+ { jewel: '~/projects/jewel' }.each do |project, path|
6
+ path = File.expand_path path
7
+ gem project.to_s, path: path if Dir.exists? path
8
+ end
@@ -0,0 +1,3 @@
1
+ This Source Code Form is subject to the terms of the Mozilla Public
2
+ License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
+ You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -0,0 +1 @@
1
+ Mozilla Public License, version 2.0
@@ -0,0 +1,3 @@
1
+ This Source Code Form is subject to the terms of the Mozilla Public
2
+ License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
+ You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -1,6 +1,44 @@
1
- # A collection of Rake tasks.
1
+ # Utilities to create and work with Ruby gems.
2
+ #
3
+ # @author Matheus Afonso Martins Moreira
2
4
  module Rookie
3
5
  end
4
6
 
7
+ class << Rookie
8
+
9
+ # Location of the Rookie gem.
10
+ #
11
+ # @return [String] the absolute path to the Rookie gem
12
+ # @since 0.4.0
13
+ def root
14
+ File.expand_path '..', File.dirname(__FILE__)
15
+ end
16
+
17
+ # The gem directory, relative to the root.
18
+ #
19
+ # @return [String] the absolute path to the gem directory
20
+ # @since 0.4.0
21
+ def gem
22
+ File.join root, 'gem'
23
+ end
24
+
25
+ # The licenses directory, relative to the gem directory.
26
+ #
27
+ # @return [String] the absolute path to the licenses directory
28
+ # @since 0.4.0
29
+ def licenses
30
+ File.join gem, 'licenses'
31
+ end
32
+
33
+ # The template directory, relative to the gem directory.
34
+ #
35
+ # @return [String] the absolute path to the template directory
36
+ # @since 0.4.0
37
+ def template
38
+ File.join gem, 'template'
39
+ end
40
+
41
+ end
42
+
43
+ require 'rookie/gem'
5
44
  require 'rookie/tasks'
6
- require 'rookie/version'
@@ -0,0 +1,18 @@
1
+ require 'jewel'
2
+
3
+ module Rookie
4
+
5
+ # Information about the Rookie gem.
6
+ #
7
+ # @author Matheus Afonso Martins Moreira
8
+ # @since 0.4.0
9
+ class Gem < Jewel::Gem
10
+
11
+ root '../..'
12
+
13
+ gemspec_path = root.join('rookie.gemspec').to_s
14
+ specification ::Gem::Specification.load gemspec_path
15
+
16
+ end
17
+
18
+ end
@@ -23,7 +23,7 @@ module Rookie
23
23
  def spec=(gemspec)
24
24
  @spec = case gemspec
25
25
  when ::Gem::Specification then gemspec
26
- when String then ::Gem::Specification.load gemspec if File.readable? gemspec
26
+ when String then ::Gem::Specification.load gemspec
27
27
  else nil
28
28
  end
29
29
  end
@@ -61,7 +61,14 @@ module Rookie
61
61
  # Builds the gem from the specification and moves it to the gem directory.
62
62
  def build_gem
63
63
  FileUtils.mkdir_p dir
64
- gem = ::Gem::Builder.new(spec).build
64
+
65
+ if RUBY_VERSION >= '2.0.0'
66
+ require 'rubygems/package'
67
+ gem = ::Gem::Package.build(spec)
68
+ else
69
+ gem = ::Gem::Builder.new(spec).build
70
+ end
71
+
65
72
  FileUtils.mv gem, dir
66
73
  end
67
74
 
@@ -1,25 +1,28 @@
1
1
  #!/usr/bin/env gem build
2
2
  # encoding: utf-8
3
- $:.unshift File.expand_path('../lib', __FILE__)
4
3
 
5
- require 'rookie/version'
4
+ Gem::Specification.new 'rookie' do |gem|
6
5
 
7
- Gem::Specification.new('rookie') do |gem|
6
+ current_directory = File.dirname __FILE__
7
+ version_file = File.expand_path "#{gem.name}.version", current_directory
8
8
 
9
- gem.version = Rookie::Version::STRING
10
- gem.summary = 'Simple Rake tasks that make life easier.'
11
- gem.description = gem.summary
12
- gem.homepage = 'https://github.com/matheusmoreira/rookie'
13
- gem.licenses = %w(GPLv3)
9
+ gem.version = File.read(version_file).chomp
10
+
11
+ gem.summary = 'Simple Rake tasks that make life easier.'
12
+ gem.homepage = 'https://github.com/matheusmoreira/rookie'
13
+ gem.license = 'MPL-2.0'
14
14
 
15
15
  gem.author = 'Matheus Afonso Martins Moreira'
16
- gem.email = 'matheus.a.m.moreira@gmail.com'
16
+ gem.email = 'matheus.a.m.moreira@gmail.com'
17
17
 
18
18
  gem.files = `git ls-files`.split "\n"
19
19
 
20
- gem.add_runtime_dependency 'rake'
21
20
  gem.add_runtime_dependency 'git'
21
+ gem.add_runtime_dependency 'jewel'
22
+ gem.add_runtime_dependency 'rake'
22
23
 
23
24
  gem.add_development_dependency 'bundler'
25
+ gem.add_development_dependency 'redcarpet' # used by yard for markdown formatting
26
+ gem.add_development_dependency 'yard'
24
27
 
25
28
  end
@@ -0,0 +1 @@
1
+ 0.5.0
metadata CHANGED
@@ -1,97 +1,142 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rookie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matheus Afonso Martins Moreira
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-01-20 00:00:00.000000000 Z
11
+ date: 2019-04-26 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: &12451360 !ruby/object:Gem::Requirement
17
- none: false
14
+ name: git
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *12451360
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
- name: git
27
- requirement: &12453220 !ruby/object:Gem::Requirement
28
- none: false
28
+ name: jewel
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'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
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: *12453220
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
36
55
  - !ruby/object:Gem::Dependency
37
56
  name: bundler
38
- requirement: &12455200 !ruby/object:Gem::Requirement
39
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: redcarpet
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: yard
85
+ requirement: !ruby/object:Gem::Requirement
40
86
  requirements:
41
- - - ! '>='
87
+ - - ">="
42
88
  - !ruby/object:Gem::Version
43
89
  version: '0'
44
90
  type: :development
45
91
  prerelease: false
46
- version_requirements: *12455200
47
- description: Simple Rake tasks that make life easier.
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description:
48
98
  email: matheus.a.m.moreira@gmail.com
49
99
  executables: []
50
100
  extensions: []
51
101
  extra_rdoc_files: []
52
102
  files:
53
- - .gitignore
54
- - .rvmrc
103
+ - ".gitignore"
104
+ - ".rvmrc"
55
105
  - Gemfile
56
- - LICENSE.GPLv3
106
+ - LICENSE.MPLv2.0
57
107
  - README.markdown
58
108
  - Rakefile
109
+ - generator/licenses/MPLv2.0/long_name
110
+ - generator/licenses/MPLv2.0/notice
59
111
  - lib/rookie.rb
112
+ - lib/rookie/gem.rb
60
113
  - lib/rookie/tasks.rb
61
114
  - lib/rookie/tasks/console.rb
62
115
  - lib/rookie/tasks/gem.rb
63
116
  - lib/rookie/tasks/git.rb
64
- - lib/rookie/version.rb
65
117
  - rookie.gemspec
118
+ - rookie.version
66
119
  homepage: https://github.com/matheusmoreira/rookie
67
120
  licenses:
68
- - GPLv3
121
+ - MPL-2.0
122
+ metadata: {}
69
123
  post_install_message:
70
124
  rdoc_options: []
71
125
  require_paths:
72
126
  - lib
73
127
  required_ruby_version: !ruby/object:Gem::Requirement
74
- none: false
75
128
  requirements:
76
- - - ! '>='
129
+ - - ">="
77
130
  - !ruby/object:Gem::Version
78
131
  version: '0'
79
- segments:
80
- - 0
81
- hash: -1447020639505331606
82
132
  required_rubygems_version: !ruby/object:Gem::Requirement
83
- none: false
84
133
  requirements:
85
- - - ! '>='
134
+ - - ">="
86
135
  - !ruby/object:Gem::Version
87
136
  version: '0'
88
- segments:
89
- - 0
90
- hash: -1447020639505331606
91
137
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 1.8.10
138
+ rubygems_version: 3.0.3
94
139
  signing_key:
95
- specification_version: 3
140
+ specification_version: 4
96
141
  summary: Simple Rake tasks that make life easier.
97
142
  test_files: []
@@ -1,14 +0,0 @@
1
- Copyright © 2011 Matheus Afonso Martins Moreira
2
-
3
- This program is free software: you can redistribute it and/or modify
4
- it under the terms of the GNU General Public License as published by
5
- the Free Software Foundation, either version 3 of the License, or
6
- (at your option) any later version.
7
-
8
- This program is distributed in the hope that it will be useful,
9
- but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- GNU General Public License for more details.
12
-
13
- You should have received a copy of the GNU General Public License
14
- along with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -1,32 +0,0 @@
1
- module Rookie
2
-
3
- # Rookie's version.
4
- module Version
5
-
6
- # Major version.
7
- #
8
- # Increments denote backward-incompatible changes and additions.
9
- MAJOR = 0
10
-
11
- # Minor version.
12
- #
13
- # Increments denote backward-compatible changes and additions.
14
- MINOR = 3
15
-
16
- # Patch version.
17
- #
18
- # Increments denote changes in implementation.
19
- PATCH = 0
20
-
21
- # Build version.
22
- #
23
- # Used for pre-release versions.
24
- BUILD = nil
25
-
26
- # Complete version string, which is every individual version number joined
27
- # by a dot (<tt>'.'</tt>), in descending order of prescedence.
28
- STRING = [ MAJOR, MINOR, PATCH, BUILD ].compact.join '.'
29
-
30
- end
31
-
32
- end