ronin-gen 1.0.0 → 1.0.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### 1.0.1 / 2011-05-17
2
+
3
+ * Require data_paths ~> 0.3.
4
+ * Require ronin-support ~> 0.2.
5
+ * Require ronin ~> 1.1.
6
+ * Include `Ronin::AutoLoad` into {Ronin::Gen::Generators}.
7
+ * Ensure that {Ronin::Gen::Generators::Library} executes `git` commands
8
+ within the destination directory.
9
+ * Have {Ronin::Gen::Generators::Library} call `git add .` then `git commit`.
10
+ * Make sure that {Ronin::Gen::Generators::Repository} creates the new
11
+ `scripts/` directory.
12
+
1
13
  ### 1.0.0 / 2011-03-25
2
14
 
3
15
  * Upgraded to the GPL-3 license.
data/Gemfile CHANGED
@@ -7,8 +7,8 @@ RONIN_URI = 'http://github.com/ronin-ruby'
7
7
  gemspec
8
8
 
9
9
  # Ronin dependencies:
10
- # gem 'ronin-support', '~> 0.1.0', :git => "#{RONIN_URI}/ronin-support.git"
11
- # gem 'ronin', '~> 1.0.0', :git => "#{RONIN_URI}/ronin.git"
10
+ # gem 'ronin-support', '~> 0.2', :git => "#{RONIN_URI}/ronin-support.git"
11
+ # gem 'ronin', '~> 1.1', :git => "#{RONIN_URI}/ronin.git"
12
12
 
13
13
  group :development do
14
14
  gem 'rake', '~> 0.8.7'
@@ -17,3 +17,24 @@ group :development do
17
17
  gem 'ore-tasks', '~> 0.4'
18
18
  gem 'rspec', '~> 2.4'
19
19
  end
20
+
21
+ #
22
+ # To enable additional DataMapper adapters for development work or for
23
+ # testing purposes, simple set the ADAPTER or ADAPTERS environment
24
+ # variable:
25
+ #
26
+ # export ADAPTER="postgres"
27
+ # bundle install
28
+ #
29
+ # ./bin/ronin --database postgres://ronin@localhost/ronin
30
+ #
31
+ require 'set'
32
+
33
+ DM_ADAPTERS = Set['postgres', 'mysql', 'oracle', 'sqlserver']
34
+
35
+ adapters = (ENV['ADAPTER'] || ENV['ADAPTERS']).to_s
36
+ adapters = Set.new(adapters.to_s.tr(',',' ').split)
37
+
38
+ (DM_ADAPTERS & adapters).each do |adapter|
39
+ gem "dm-#{adapter}-adapter", DM_VERSION #, :git => "#{DM_URI}/dm-#{adapter}-adapter.git"
40
+ end
data/README.md CHANGED
@@ -37,13 +37,13 @@ Generate a skeleton Overlay:
37
37
  * [open_namespace](http://github.com/postmodern/open_namespace#readme)
38
38
  ~> 0.3
39
39
  * [data_paths](http://github.com/postmodern/data_paths#readme)
40
- ~> 0.2, >= 0.2.1
40
+ ~> 0.3
41
41
  * [thor](http://github.com/wycats/thor#readme)
42
42
  ~> 0.14.3
43
43
  * [ronin-support](http://github.com/ronin-ruby/ronin-support#readme)
44
- ~> 0.1.0
44
+ ~> 0.2
45
45
  * [ronin](http://github.com/ronin-ruby/ronin#readme)
46
- ~> 1.0.0
46
+ ~> 1.1
47
47
 
48
48
  ## Install
49
49
 
@@ -10,10 +10,31 @@ gemspec
10
10
  # gem 'ronin-gen', '~> <%= Ronin::Gen::VERSION %>', :git => "#{RONIN_URI}/ronin-gen.git"
11
11
  <%- end -%>
12
12
 
13
- group(:development) do
13
+ group :development do
14
14
  gem 'rake', '~> 0.8.7'
15
15
  gem 'kramdown', '~> 0.12'
16
16
 
17
17
  gem 'ore-tasks', '~> 0.4'
18
18
  gem 'rspec', '~> 2.4'
19
19
  end
20
+
21
+ #
22
+ # To enable additional DataMapper adapters for development work or for
23
+ # testing purposes, simple set the ADAPTER or ADAPTERS environment
24
+ # variable:
25
+ #
26
+ # export ADAPTER="postgres"
27
+ # bundle install
28
+ #
29
+ # ./bin/ronin --database postgres://ronin@localhost/ronin
30
+ #
31
+ require 'set'
32
+
33
+ DM_ADAPTERS = Set['postgres', 'mysql', 'oracle', 'sqlserver']
34
+
35
+ adapters = (ENV['ADAPTER'] || ENV['ADAPTERS']).to_s
36
+ adapters = Set.new(adapters.to_s.tr(',',' ').split)
37
+
38
+ (DM_ADAPTERS & adapters).each do |adapter|
39
+ gem "dm-#{adapter}-adapter", DM_VERSION #, :git => "#{DM_URI}/dm-#{adapter}-adapter.git"
40
+ end
@@ -26,5 +26,4 @@ RSpec::Core::RakeTask.new
26
26
  task :default => :spec
27
27
 
28
28
  require 'yard'
29
- YARD::Rake::YardocTask.newrequire 'rubygems'
30
- require 'bundler'
29
+ YARD::Rake::YardocTask.new
data/gemspec.yml CHANGED
@@ -13,11 +13,13 @@ requirements: git >= 1.6.0.0, for the library generator
13
13
 
14
14
  dependencies:
15
15
  open_namespace: ~> 0.3
16
- data_paths: ~> 0.2, >= 0.2.1
16
+ # data_paths: ~> 0.3
17
+ data_paths: ~> 0.3.0.rc1
17
18
  thor: ~> 0.14.3
18
19
  # Ronin dependencies:
19
- ronin-support: ~> 0.1.0
20
- ronin: ~> 1.0.0
20
+ ronin-support: ~> 0.2.0.rc1
21
+ # ronin: ~> 1.1
22
+ ronin: ~> 1.1.0.rc1
21
23
 
22
24
  development_dependencies:
23
25
  bundler: ~> 1.0.10
@@ -26,8 +26,9 @@ module Ronin
26
26
  #
27
27
  module Config
28
28
  include DataPaths
29
+ extend DataPaths::Finders
29
30
 
30
- register_data_dir File.join(File.dirname(__FILE__),'..','..','..','data')
31
+ register_data_path File.join(File.dirname(__FILE__),'..','..','..','data')
31
32
  end
32
33
  end
33
34
  end
@@ -93,7 +93,7 @@ module Ronin
93
93
  #
94
94
  def generate
95
95
  unless options[:no_git]
96
- run "git init #{self.destination_root}"
96
+ inside { run "git init" }
97
97
  end
98
98
 
99
99
  erb File.join('ronin','gen','library','Gemfile.erb'), 'Gemfile'
@@ -129,8 +129,12 @@ module Ronin
129
129
  #
130
130
  def bin
131
131
  mkdir 'bin'
132
+
133
+ bin_script = File.join('bin',"ronin-#{@dir_name}")
134
+
132
135
  erb File.join('ronin','gen','library','bin','ronin-name.erb'),
133
- File.join('bin',"ronin-#{@dir_name}")
136
+ bin_script
137
+ chmod bin_script, 0755
134
138
  end
135
139
 
136
140
  #
@@ -201,7 +205,10 @@ module Ronin
201
205
  #
202
206
  def finalize
203
207
  unless options[:no_git]
204
- system('git','commit','-a','-m','Initial commit.')
208
+ inside do
209
+ run('git add .')
210
+ run('git commit -m "Initial commit."')
211
+ end
205
212
  end
206
213
  end
207
214
 
@@ -38,6 +38,9 @@ module Ronin
38
38
  # The repository lib directory
39
39
  LIB_DIR = Ronin::Repository::LIB_DIR
40
40
 
41
+ # The primary script directory
42
+ SCRIPT_DIR = Ronin::Repository::SCRIPT_DIRS.first
43
+
41
44
  # Default license to use
42
45
  DEFAULT_LICENSE = 'CC-by'
43
46
 
@@ -92,8 +95,8 @@ module Ronin
92
95
  mkdir File.join(LIB_DIR,'ronin')
93
96
  touch File.join(LIB_DIR,Ronin::Repository::INIT_FILE)
94
97
 
98
+ mkdir SCRIPT_DIR
95
99
  mkdir Ronin::Repository::DATA_DIR
96
- mkdir Ronin::Repository::CACHE_DIR
97
100
  end
98
101
 
99
102
  #
@@ -17,7 +17,7 @@
17
17
  # along with Ronin Gen. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'open_namespace'
20
+ require 'ronin/auto_load'
21
21
 
22
22
  module Ronin
23
23
  module Gen
@@ -25,7 +25,7 @@ module Ronin
25
25
  # {Generators} is the namespace where all generators are loaded from.
26
26
  #
27
27
  module Generators
28
- include OpenNamespace
28
+ include AutoLoad
29
29
  end
30
30
  end
31
31
  end
@@ -20,6 +20,6 @@
20
20
  module Ronin
21
21
  module Gen
22
22
  # Ronin Gen version
23
- VERSION = '1.0.0'
23
+ VERSION = '1.0.1.rc1'
24
24
  end
25
25
  end
@@ -35,15 +35,15 @@ describe Gen::Generators::Repository do
35
35
  end
36
36
 
37
37
  it "should create a lib/ directory" do
38
- path.join(Ronin::Repository::LIB_DIR).should be_directory
38
+ path.join('lib').should be_directory
39
39
  end
40
40
 
41
41
  it "should create a lib/ronin/ directory" do
42
- path.join(Ronin::Repository::LIB_DIR,'ronin').should be_directory
42
+ path.join('lib','ronin').should be_directory
43
43
  end
44
44
 
45
- it "should create a cache/ directory" do
46
- path.join(Ronin::Repository::CACHE_DIR).should be_directory
45
+ it "should create a scripts/ directory" do
46
+ path.join('scripts').should be_directory
47
47
  end
48
48
 
49
49
  it "should create a Rakefile" do
@@ -51,11 +51,11 @@ describe Gen::Generators::Repository do
51
51
  end
52
52
 
53
53
  it "should create a 'ronin.yml' file" do
54
- path.join(Ronin::Repository::METADATA_FILE).should be_file
54
+ path.join('ronin.yml').should be_file
55
55
  end
56
56
 
57
57
  describe "ronin.yml" do
58
- subject { YAML.load_file(path.join(Ronin::Repository::METADATA_FILE)) }
58
+ subject { YAML.load_file(path.join('ronin.yml')) }
59
59
 
60
60
  it "should contain a Hash" do
61
61
  subject.should be_kind_of(Hash)
@@ -4,6 +4,6 @@ module Helpers
4
4
  module Gen
5
5
  include DataPaths
6
6
 
7
- register_data_dir File.join(File.dirname(__FILE__),'data')
7
+ register_data_path File.join(File.dirname(__FILE__),'data')
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-gen
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.0.0
4
+ prerelease: 6
5
+ version: 1.0.1.rc1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Postmodern
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-25 00:00:00 -04:00
14
- default_executable: ronin-gen
13
+ date: 2011-05-17 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: open_namespace
@@ -29,12 +28,9 @@ dependencies:
29
28
  requirement: &id002 !ruby/object:Gem::Requirement
30
29
  none: false
31
30
  requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 0.2.1
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: "0.2"
33
+ version: 0.3.0.rc1
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: *id002
@@ -56,7 +52,7 @@ dependencies:
56
52
  requirements:
57
53
  - - ~>
58
54
  - !ruby/object:Gem::Version
59
- version: 0.1.0
55
+ version: 0.2.0.rc1
60
56
  type: :runtime
61
57
  prerelease: false
62
58
  version_requirements: *id004
@@ -67,7 +63,7 @@ dependencies:
67
63
  requirements:
68
64
  - - ~>
69
65
  - !ruby/object:Gem::Version
70
- version: 1.0.0
66
+ version: 1.1.0.rc1
71
67
  type: :runtime
72
68
  prerelease: false
73
69
  version_requirements: *id005
@@ -169,7 +165,6 @@ files:
169
165
  - spec/gen/helpers/data.rb
170
166
  - spec/gen/helpers/data/generators/templated.txt.erb
171
167
  - spec/spec_helper.rb
172
- has_rdoc: yard
173
168
  homepage: http://github.com/ronin-ruby/ronin-gen
174
169
  licenses:
175
170
  - GPL-3
@@ -193,12 +188,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
188
  requirements:
194
189
  - git >= 1.6.0.0, for the library generator
195
190
  rubyforge_project: ronin-gen
196
- rubygems_version: 1.6.2
191
+ rubygems_version: 1.8.1
197
192
  signing_key:
198
193
  specification_version: 3
199
194
  summary: A Ruby library for Ronin that provides various generators.
200
195
  test_files:
201
- - spec/gen/generator_spec.rb
202
196
  - spec/gen/gen_spec.rb
203
197
  - spec/gen/generators/library_spec.rb
204
198
  - spec/gen/generators/repository_spec.rb
199
+ - spec/gen/generator_spec.rb