ronin-gen 1.0.0.pre1 → 1.0.0.pre2

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/ChangeLog.md CHANGED
@@ -1,3 +1,23 @@
1
+ ### 1.0.0 / 2011-02-01
2
+
3
+ * Require open_namespace ~> 0.3.0.
4
+ * Require data_paths ~> 0.2.1.
5
+ * Require thor ~> 0.14.3.
6
+ * Require ronin-support ~> 0.1.0.
7
+ * Require ronin ~> 1.0.0.
8
+ * Require bundler ~> 1.0.0.
9
+ * Require yard ~> 0.6.4.
10
+ * Switched from [Jeweler](https://github.com/technicalpickles/jeweler)
11
+ to [Ore](http://github.com/ruby-ore/ore) and [Bundler](http://gembundler.com).
12
+ * {Ronin::Gen::FileGenerator} now spawns the default text-editor after
13
+ completion.
14
+ * Renamed `Ronin::Gen::Generators::Overlay` to
15
+ {Ronin::Gen::Generators::Repository}.
16
+ * Changed {Ronin::Gen::Generators::Library} to generate libraries managed
17
+ by Ore and Bundler.
18
+ * {Ronin::Gen::Generators::Library} now initializes the new library as a
19
+ Git repository.
20
+
1
21
  ### 0.2.0 / 2009-09-24
2
22
 
3
23
  * Require ronin >= 0.3.0.
data/Gemfile CHANGED
@@ -6,22 +6,16 @@ RONIN = 'http://github.com/ronin-ruby'
6
6
 
7
7
  gemspec
8
8
 
9
- # Ronin dependencies
9
+ # Ronin dependencies:
10
10
  # gem 'ronin-support', '~> 0.1.0', :git => "#{RONIN}/ronin-support.git"
11
11
  # gem 'ronin', '~> 1.0.0', :git => "#{RONIN}/ronin.git"
12
12
 
13
13
  group :development do
14
14
  gem 'rake', '~> 0.8.7'
15
15
 
16
- platforms :jruby do
17
- gem 'maruku', '~> 0.6.0'
18
- end
19
-
20
- platforms :ruby do
21
- gem 'rdiscount', '~> 1.6.3'
22
- end
16
+ gem 'kramdown', '~> 0.12.0'
23
17
 
24
18
  gem 'ore-core', '~> 0.1.0'
25
19
  gem 'ore-tasks', '~> 0.3.0'
26
- gem 'rspec', '~> 2.0.0'
20
+ gem 'rspec', '~> 2.3.0'
27
21
  end
data/README.md CHANGED
@@ -41,7 +41,7 @@ install or update Overlays.
41
41
  can be used to create new generators.
42
42
  * Provides {Ronin::Gen::DirGenerator}, a Thor based generator that
43
43
  can be used to create new directory generators.
44
- * Generators for creating new Ronin libraries, Overlays and Extensions.
44
+ * Generators for creating new Ronin Repositories and Libraries.
45
45
 
46
46
  ## Synopsis
47
47
 
@@ -51,19 +51,15 @@ Generate a skeleton Ronin library:
51
51
 
52
52
  Generate a skeleton Overlay:
53
53
 
54
- $ ronin-gen overlay PATH [options]
55
-
56
- Generate a skeleton Extension:
57
-
58
- $ ronin-gen extension PATH
54
+ $ ronin-gen repository PATH [options]
59
55
 
60
56
  ## Requirements
61
57
 
62
58
  * [open_namespace](http://github.com/postmodern/open_namespace) ~> 0.3.0
63
- * [open_namespace](http://github.com/postmodern/data_paths) ~> 0.2.1
59
+ * [data_paths](http://github.com/postmodern/data_paths) ~> 0.2.1
64
60
  * [thor](http://github.com/wycats/thor) ~> 0.14.2
65
61
  * [ronin-support](http://github.com/ronin-ruby/ronin-support) ~> 0.1.0
66
- * [ronin](http://github.com/ronin-ruby/ronin) ~> 0.4.0
62
+ * [ronin](http://github.com/ronin-ruby/ronin) ~> 1.0.0
67
63
 
68
64
  ## Install
69
65
 
@@ -1,6 +1,7 @@
1
1
  doc
2
2
  pkg
3
- tmp/*
3
+ vendor/cache
4
+ Gemfile.lock
4
5
  .bundle
5
6
  .DS_Store
6
7
  .yardoc
@@ -4,20 +4,21 @@ RONIN = 'http://github.com/ronin-ruby'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'ronin-support', '~> <%= Ronin::Support::VERSION %>', :git => "#{RONIN}/ronin-support.git"
8
- gem 'ronin', '~> <%= Ronin::VERSION %>', :git => "#{RONIN}/ronin.git"
7
+ gem 'ronin-support', '~> <%= Ronin::Support::VERSION %>', :git => "#{RONIN}/ronin-support.git"
8
+ gem 'ronin', '~> <%= Ronin::VERSION %>', :git => "#{RONIN}/ronin.git"
9
9
 
10
10
  group(:development) do
11
- gem 'rake', '~> 0.8.7'
11
+ gem 'rake', '~> 0.8.7'
12
12
 
13
- case RUBY_PLATFORM
14
- when 'java'
15
- gem 'maruku', '~> 0.6.0'
16
- else
13
+ platforms :jruby do
14
+ gem 'BlueCloth'
15
+ end
16
+
17
+ platforms :ruby do
17
18
  gem 'rdiscount', '~> 1.6.3'
18
19
  end
19
20
 
20
- gem 'ore-core', '~> 0.1.0'
21
- gem 'ore-tasks', '~> 0.3.0'
22
- gem 'rspec', '~> 2.0.0'
21
+ gem 'ore-core', '~> 0.1.0'
22
+ gem 'ore-tasks', '~> 0.3.0'
23
+ gem 'rspec', '~> 2.0.0'
23
24
  end
@@ -1,7 +1,6 @@
1
1
  name: <%= @name %>
2
- summary: <%= @summary %>
3
- description:
4
- <%= @description %>
2
+ summary: A Ronin library.
3
+ description: <%= @name %> is a library for Ronin.
5
4
 
6
5
  license: GPL-2
7
6
  authors: <%= @author %>
@@ -17,4 +16,4 @@ dependencies:
17
16
 
18
17
  development_dependencies:
19
18
  bundler: ~> 1.0.0
20
- yard: ~> 0.6.0
19
+ yard: ~> 0.6.4
@@ -1,6 +1,6 @@
1
1
  <%= erb File.join('..','..','_license.erb') %>
2
2
 
3
- require 'ronin/gen/generators/file_generator'
3
+ require 'ronin/gen/file_generator'
4
4
 
5
5
  module Ronin
6
6
  module Gen
@@ -1,18 +1,19 @@
1
1
  <%= erb File.join('..','..','..','_license.erb') %>
2
2
 
3
- require 'ronin/ui/command_line/command'
3
+ require 'ronin/ui/cli/command'
4
4
 
5
5
  module Ronin
6
6
  module UI
7
- module CommandLine
7
+ module CLI
8
8
  module Commands
9
9
  class <%= @command_class %> < Command
10
10
 
11
- desc 'A command'
11
+ desc 'The <%= @command_file %> command'
12
+
12
13
  class_option :name, :type => :string
13
14
  argument :path, :type => :string
14
15
 
15
- def default
16
+ def execute
16
17
  end
17
18
 
18
19
  end
@@ -0,0 +1 @@
1
+ --markup markdown --title '<%= @title %> Documentation' --protected
@@ -1,7 +1,4 @@
1
- # -*- ruby -*-
2
-
3
- <%- case @test_suite
4
- when :rspec -%>
1
+ <%- if @tests -%>
5
2
  begin
6
3
  gem 'rspec', '~> 2.0.0'
7
4
  require 'rspec/core/rake_task'
@@ -13,7 +10,6 @@ rescue LoadError => e
13
10
  end
14
11
  end
15
12
  task :default => :spec
16
- <%- when :test_unit -%>
17
13
  <%- end -%>
18
14
 
19
15
  <%- if @docs -%>
@@ -28,5 +24,3 @@ rescue LoadError => e
28
24
  end
29
25
  end
30
26
  <%- end -%>
31
-
32
- # vim: syntax=Ruby
@@ -10,8 +10,8 @@ source: <%= @source %>
10
10
  website: <%= @website %>
11
11
  <%- end -%>
12
12
  authors:
13
- <%- @authors.each do |name,email| -%>
14
- <%= name -%>: <%= email %>
13
+ <%- @authors.each do |name| -%>
14
+ - <%= name -%>
15
15
  <%- end -%>
16
16
 
17
17
  description:
data/gemspec.yml CHANGED
@@ -16,9 +16,9 @@ dependencies:
16
16
  data_paths: ~> 0.2.1
17
17
  thor: ~> 0.14.3
18
18
  # Ronin dependencies:
19
- ronin-support: ~> 0.1.0.pre
20
- ronin: ~> 1.0.0.pre
19
+ ronin-support: ~> 0.1.0.pre2
20
+ ronin: ~> 1.0.0.pre3
21
21
 
22
22
  development_dependencies:
23
23
  bundler: ~> 1.0.0
24
- yard: ~> 0.6.1
24
+ yard: ~> 0.6.4
@@ -19,13 +19,13 @@
19
19
  #
20
20
 
21
21
  require 'ronin/templates/template'
22
+ require 'ronin/support/inflector'
22
23
 
23
- require 'data_paths/finders'
24
- require 'extlib'
25
- require 'erb'
26
24
  require 'thor'
27
25
  require 'thor/group'
28
26
  require 'thor/actions'
27
+ require 'data_paths/finders'
28
+ require 'erb'
29
29
 
30
30
  module Ronin
31
31
  module Gen
@@ -98,7 +98,7 @@ module Ronin
98
98
 
99
99
  def self.inherited(super_class)
100
100
  class_name = super_class.name.sub('Ronin::Gen::Generators::','')
101
- gen_name = class_name.split('::').join(':').snake_case
101
+ gen_name = class_name.split('::').join(':').underscore
102
102
 
103
103
  super_class.namespace(gen_name)
104
104
  end
@@ -61,8 +61,15 @@ module Ronin
61
61
  class_option :email, :type => :string, :default => DEFAULT_EMAIL
62
62
  class_option :homepage, :type => :string,
63
63
  :default => DEFAULT_HOMEPAGE
64
- class_option :commands, :type => :array, :default => []
65
- class_option :generators, :type => :array, :default => []
64
+
65
+ class_option :commands, :type => :array,
66
+ :default => [],
67
+ :banner => 'NAME [...]'
68
+
69
+ class_option :generators, :type => :array,
70
+ :default => [],
71
+ :banner => 'NAME [...]'
72
+
66
73
  class_option :no_git, :type => :boolean
67
74
 
68
75
  def setup
@@ -87,7 +94,7 @@ module Ronin
87
94
  #
88
95
  def generate
89
96
  unless options[:no_git]
90
- run("git init #{self.destination_root}")
97
+ run "git init #{self.destination_root}"
91
98
  end
92
99
 
93
100
  erb File.join('ronin','gen','library','Gemfile.erb'), 'Gemfile'
@@ -156,7 +163,7 @@ module Ronin
156
163
  #
157
164
  # Generates any optional commands for the library.
158
165
  #
159
- def command_line
166
+ def commands
160
167
  unless options[:commands].empty?
161
168
  mkdir COMMANDS_DIR
162
169
 
@@ -43,7 +43,7 @@ module Ronin
43
43
  DEFAULT_LICENSE = 'CC-by'
44
44
 
45
45
  # Default authors to use
46
- DEFAULT_AUTHORS = {'Name' => 'name@example.com'}
46
+ DEFAULT_AUTHORS = ['Anonymous']
47
47
 
48
48
  # Default description to use
49
49
  DEFAULT_DESCRIPTION = 'This is a Ronin Repository'
@@ -53,10 +53,20 @@ module Ronin
53
53
  class_option :uri, :type => :string
54
54
  class_option :source, :type => :string
55
55
  class_option :website, :type => :string
56
- class_option :license, :type => :string, :default => DEFAULT_LICENSE
57
- class_option :description, :type => :string, :default => DEFAULT_DESCRIPTION
58
- class_option :authors, :type => :hash, :default => DEFAULT_AUTHORS, :banner => 'NAME:EMAIL ...'
59
- class_option :test_suite, :type => :string, :banner => 'test_unit|rspec'
56
+
57
+ class_option :license, :type => :string,
58
+ :default => DEFAULT_LICENSE,
59
+ :banner => 'LICENSE'
60
+
61
+ class_option :description, :type => :string,
62
+ :default => DEFAULT_DESCRIPTION,
63
+ :banner => 'TEXT'
64
+
65
+ class_option :authors, :type => :array,
66
+ :default => DEFAULT_AUTHORS,
67
+ :banner => 'NAME [...]'
68
+
69
+ class_option :tests, :type => :boolean
60
70
  class_option :docs, :type => :boolean
61
71
 
62
72
  def setup
@@ -67,14 +77,8 @@ module Ronin
67
77
  @license = options[:license]
68
78
  @description = options[:description]
69
79
  @authors = options[:authors]
70
- @gems = options[:gems]
71
- @test_suite = case options[:test_suite]
72
- when 'test', 'test_unit'
73
- :test_unit
74
- when 'spec', 'rspec'
75
- :rspec
76
- end
77
80
 
81
+ @test_suite = options[:test]
78
82
  @docs = options[:docs]
79
83
 
80
84
  @title ||= File.basename(self.path).gsub(/[_\s]+/,' ').capitalize
@@ -97,17 +101,15 @@ module Ronin
97
101
  # Generates the Rakefile of the repository.
98
102
  #
99
103
  def rakefile
100
- erb File.join('ronin','gen','repository','Rakefile.erb'), 'Rakefile'
104
+ erb File.join('ronin','gen','repository','Rakefile.erb'),
105
+ 'Rakefile'
101
106
  end
102
107
 
103
108
  #
104
- # Generates a base test suite for the repository.
109
+ # Generates a base RSpec test-suite for the repository.
105
110
  #
106
- def test_suite
107
- case @test_suite
108
- when :test_unit
109
- mkdir 'test'
110
- when :rspec
111
+ def tests
112
+ if options.tests?
111
113
  cp File.join('ronin','gen','repository','.rspec'), '.rspec'
112
114
 
113
115
  mkdir 'spec'
@@ -116,6 +118,16 @@ module Ronin
116
118
  end
117
119
  end
118
120
 
121
+ #
122
+ # Generate files needed for documentation.
123
+ #
124
+ def docs
125
+ if options.docs?
126
+ erb File.join('ronin','gen','repository','.yardopts.erb'),
127
+ '.yardopts'
128
+ end
129
+ end
130
+
119
131
  #
120
132
  # Generates the XML metadata file for the repository.
121
133
  #
@@ -21,6 +21,6 @@
21
21
  module Ronin
22
22
  module Gen
23
23
  # Ronin Gen version
24
- VERSION = '1.0.0.pre1'
24
+ VERSION = '1.0.0.pre2'
25
25
  end
26
26
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - 0
9
- - pre1
10
- version: 1.0.0.pre1
9
+ - pre2
10
+ version: 1.0.0.pre2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Postmodern
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-30 00:00:00 -08:00
18
+ date: 2010-12-31 00:00:00 -08:00
19
19
  default_executable: ronin-gen
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -74,8 +74,8 @@ dependencies:
74
74
  - 0
75
75
  - 1
76
76
  - 0
77
- - pre
78
- version: 0.1.0.pre
77
+ - pre2
78
+ version: 0.1.0.pre2
79
79
  type: :runtime
80
80
  prerelease: false
81
81
  version_requirements: *id004
@@ -90,8 +90,8 @@ dependencies:
90
90
  - 1
91
91
  - 0
92
92
  - 0
93
- - pre
94
- version: 1.0.0.pre
93
+ - pre3
94
+ version: 1.0.0.pre3
95
95
  type: :runtime
96
96
  prerelease: false
97
97
  version_requirements: *id005
@@ -120,8 +120,8 @@ dependencies:
120
120
  segments:
121
121
  - 0
122
122
  - 6
123
- - 1
124
- version: 0.6.1
123
+ - 4
124
+ version: 0.6.4
125
125
  type: :development
126
126
  prerelease: false
127
127
  version_requirements: *id007
@@ -161,11 +161,12 @@ files:
161
161
  - data/ronin/gen/library/lib/ronin/gen/generators/generator.rb.erb
162
162
  - data/ronin/gen/library/lib/ronin/name.rb.erb
163
163
  - data/ronin/gen/library/lib/ronin/name/version.rb.erb
164
- - data/ronin/gen/library/lib/ronin/ui/command_line/commands/command.rb.erb
164
+ - data/ronin/gen/library/lib/ronin/ui/cli/commands/command.rb.erb
165
165
  - data/ronin/gen/library/library.gemspec.erb
166
166
  - data/ronin/gen/library/spec/name/name_spec.rb.erb
167
167
  - data/ronin/gen/library/spec/spec_helper.rb.erb
168
168
  - data/ronin/gen/repository/.rspec
169
+ - data/ronin/gen/repository/.yardopts.erb
169
170
  - data/ronin/gen/repository/Rakefile.erb
170
171
  - data/ronin/gen/repository/ronin.yml.erb
171
172
  - data/ronin/gen/repository/spec/spec_helper.rb