modbuild 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +4 -0
- data/bin/modbuild +2 -2
- data/lib/modbuild.rb +8 -10
- data/modbuild.gemspec +17 -0
- metadata +3 -2
data/Readme.md
CHANGED
@@ -6,6 +6,10 @@ I use [modman](https://github.com/colinmollenhour/modman) to manage any Magento
|
|
6
6
|
|
7
7
|
This script gives you a running start by generating an XML file that you can then load in the admin interface containing most of the information you'll need, such as all of the files included in the extension and any metadata that you've included in your modman file.
|
8
8
|
|
9
|
+
### Installation
|
10
|
+
|
11
|
+
gem install modbuild
|
12
|
+
|
9
13
|
### Example modman File
|
10
14
|
|
11
15
|
You can include basic information, such as extension name, version, summary and description, in your modman file to be included in the generated XML file. For example:
|
data/bin/modbuild
CHANGED
@@ -6,7 +6,7 @@ require 'modbuild'
|
|
6
6
|
|
7
7
|
options = {}
|
8
8
|
opts = OptionParser.new do |opts|
|
9
|
-
opts.banner = "Usage: modbuild.rb [options]
|
9
|
+
opts.banner = "Usage: modbuild.rb [options] modman_directory"
|
10
10
|
|
11
11
|
opts.on("--debug", "Enable debug mode") do |v|
|
12
12
|
options[:debug] = v
|
@@ -25,5 +25,5 @@ if filename.length == 1
|
|
25
25
|
modbuild.enable_debug() if options[:debug]
|
26
26
|
puts modbuild.build
|
27
27
|
else
|
28
|
-
raise 'You need to provide a
|
28
|
+
raise 'You need to provide a modman directory'
|
29
29
|
end
|
data/lib/modbuild.rb
CHANGED
@@ -5,7 +5,7 @@ require 'optparse'
|
|
5
5
|
|
6
6
|
module Meanbee
|
7
7
|
module Modbuild
|
8
|
-
VERSION = "1.0.
|
8
|
+
VERSION = "1.0.1"
|
9
9
|
|
10
10
|
class Base
|
11
11
|
attr_accessor :package_name, :package_version, :package_summary, :package_description
|
@@ -23,10 +23,6 @@ module Meanbee
|
|
23
23
|
@package_summary = 'Unspecified package summary'
|
24
24
|
@package_description = 'Unspecified package description'
|
25
25
|
@package_files = []
|
26
|
-
|
27
|
-
@logger.debug "Module Directory: #{@module_location}"
|
28
|
-
@logger.debug "Modman Directory: #{@modman_location}"
|
29
|
-
@logger.debug "Magento Directory: #{@magento_location}"
|
30
26
|
end
|
31
27
|
|
32
28
|
def enable_debug
|
@@ -34,6 +30,10 @@ module Meanbee
|
|
34
30
|
end
|
35
31
|
|
36
32
|
def build
|
33
|
+
@logger.debug "Module Directory: #{@module_location}"
|
34
|
+
@logger.debug "Modman Directory: #{@modman_location}"
|
35
|
+
@logger.debug "Magento Directory: #{@magento_location}"
|
36
|
+
|
37
37
|
get_package_files
|
38
38
|
|
39
39
|
@logger.debug 'Generating XML file..'
|
@@ -90,13 +90,11 @@ module Meanbee
|
|
90
90
|
Dir.glob(File.join(@module_location, local_file)).each do |f|
|
91
91
|
@logger.debug " Globbed file: #{f}"
|
92
92
|
|
93
|
-
f_regex = Regexp.new "^#{@module_location}
|
93
|
+
f_regex = Regexp.new "^#{@module_location}\/?"
|
94
94
|
f_relative = f.gsub(f_regex, '')
|
95
|
-
f_magento = File.join(magento_file, f_relative)
|
96
95
|
|
97
|
-
@logger.debug "
|
98
|
-
@
|
99
|
-
@package_files << f_magento
|
96
|
+
@logger.debug " Adding: #{f_relative}"
|
97
|
+
@package_files << f_relative
|
100
98
|
end
|
101
99
|
else
|
102
100
|
@logger.debug " Adding: #{magento_file}"
|
data/modbuild.gemspec
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/modbuild', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Nick Jones"]
|
6
|
+
gem.email = ["nick@nicksays.co.uk"]
|
7
|
+
gem.description = %q{This script gives you a running start by generating an XML file that you can then load in the admin interface containing most of the information you'll need, such as all of the files included in the extension and any metadata that you've included in your modman file.}
|
8
|
+
gem.summary = %q{Build a skeleton Magento Connect extension package file from your modman contents}
|
9
|
+
gem.homepage = "https://github.com/punkstar/modbuild"
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "modbuild"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = Meanbee::Modbuild::VERSION
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modbuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This script gives you a running start by generating an XML file that
|
15
15
|
you can then load in the admin interface containing most of the information you'll
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- Readme.md
|
31
31
|
- bin/modbuild
|
32
32
|
- lib/modbuild.rb
|
33
|
+
- modbuild.gemspec
|
33
34
|
- spec/fixtures/001_variables/modman
|
34
35
|
- spec/modbuild_spec.rb
|
35
36
|
homepage: https://github.com/punkstar/modbuild
|