ebuilder 0.0.1

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/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Leandro Silva
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,35 @@
1
+ = ebuilder
2
+
3
+ Simple tool for building Erlang/OTP projects.
4
+
5
+ == Install and configuration
6
+
7
+ Install the ebuilder gem:
8
+
9
+ sudo gem install ebuilder -s http://gemcutter.org
10
+
11
+ == Usage
12
+
13
+ At the root directory of your Erlang/OTP project, type:
14
+
15
+ ebuilder compile
16
+
17
+ That will compile all source files from src and test directories, put output on ebin directory and generate all edoc HTML files.
18
+
19
+ == Next
20
+
21
+ Yet on root directory, type:
22
+
23
+ ebuilder test MODULE
24
+
25
+ That will run all tests specified for MODULE.
26
+
27
+ == Help
28
+
29
+ If you need some help, type:
30
+
31
+ ebuilder help
32
+
33
+ == Copyright
34
+
35
+ Copyright (c) 2009 Leandro Silva. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,48 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "ebuilder"
8
+ gem.summary = %Q{Simple tool for building Erlang/OTP projects}
9
+ gem.email = "leandrodoze@gmail.com"
10
+ gem.homepage = "http://github.com/leandrosilva/ebuilder"
11
+ gem.authors = ["Leandro Silva"]
12
+ gem.add_development_dependency "rspec"
13
+ gem.add_dependency "thor"
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+ rescue LoadError
17
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
18
+ end
19
+
20
+ require 'spec/rake/spectask'
21
+ Spec::Rake::SpecTask.new(:spec) do |spec|
22
+ spec.libs << 'lib' << 'spec'
23
+ spec.spec_files = FileList['spec/**/*_spec.rb']
24
+ end
25
+
26
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
27
+ spec.libs << 'lib' << 'spec'
28
+ spec.pattern = 'spec/**/*_spec.rb'
29
+ spec.rcov = true
30
+ end
31
+
32
+ task :spec => :check_dependencies
33
+
34
+ task :default => :spec
35
+
36
+ require 'rake/rdoctask'
37
+ Rake::RDocTask.new do |rdoc|
38
+ if File.exist?('VERSION')
39
+ version = File.read('VERSION')
40
+ else
41
+ version = ""
42
+ end
43
+
44
+ rdoc.rdoc_dir = 'rdoc'
45
+ rdoc.title = "ebuilder #{version}"
46
+ rdoc.rdoc_files.include('README*')
47
+ rdoc.rdoc_files.include('lib/**/*.rb')
48
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
data/bin/ebuilder ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/ebuilder')
4
+
5
+ Ebuilder.start
data/ebuilder.gemspec ADDED
@@ -0,0 +1,59 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{ebuilder}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Leandro Silva"]
12
+ s.date = %q{2010-01-01}
13
+ s.default_executable = %q{ebuilder}
14
+ s.email = %q{leandrodoze@gmail.com}
15
+ s.executables = ["ebuilder"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ ".gitignore",
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "bin/ebuilder",
28
+ "ebuilder.gemspec",
29
+ "lib/ebuilder.rb",
30
+ "spec/ebuilder_spec.rb",
31
+ "spec/spec_helper.rb"
32
+ ]
33
+ s.homepage = %q{http://github.com/leandrosilva/ebuilder}
34
+ s.rdoc_options = ["--charset=UTF-8"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = %q{1.3.5}
37
+ s.summary = %q{Simple tool for building Erlang/OTP projects}
38
+ s.test_files = [
39
+ "spec/ebuilder_spec.rb",
40
+ "spec/spec_helper.rb"
41
+ ]
42
+
43
+ if s.respond_to? :specification_version then
44
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
+ s.specification_version = 3
46
+
47
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
48
+ s.add_development_dependency(%q<rspec>, [">= 0"])
49
+ s.add_runtime_dependency(%q<thor>, [">= 0"])
50
+ else
51
+ s.add_dependency(%q<rspec>, [">= 0"])
52
+ s.add_dependency(%q<thor>, [">= 0"])
53
+ end
54
+ else
55
+ s.add_dependency(%q<rspec>, [">= 0"])
56
+ s.add_dependency(%q<thor>, [">= 0"])
57
+ end
58
+ end
59
+
data/lib/ebuilder.rb ADDED
@@ -0,0 +1,85 @@
1
+ require 'rubygems'
2
+ require 'thor'
3
+ require 'yaml'
4
+
5
+ #
6
+ # Thor classes, the magic of tasks!
7
+ #
8
+ class Ebuilder < Thor
9
+ include Thor::Actions
10
+
11
+ #
12
+ # Setup
13
+ #
14
+
15
+ def self.source_root
16
+ File.expand_path(File.dirname('.'))
17
+ end
18
+
19
+ def self.destination_root
20
+ File.expand_path(File.dirname('.'))
21
+ end
22
+
23
+ #
24
+ # Tasks
25
+ #
26
+
27
+ # task: all
28
+
29
+ desc 'all', 'clean, compile and generate edoc for all modules'
30
+ def all
31
+ clean
32
+ compile
33
+ doc
34
+ end
35
+
36
+ # task: clean
37
+
38
+ desc 'clean', 'clean ebin directory'
39
+ def clean
40
+ rm_output = `rm -rf ebin/*`
41
+ puts rm_output unless rm_output.empty?
42
+ end
43
+
44
+ # task: compile
45
+
46
+ desc 'compile', 'compile all source code'
47
+ def compile
48
+ clean
49
+
50
+ erlc_output = `erlc -o ebin/ -I include/ src/*.erl test/*.erl`
51
+ puts erlc_output unless erlc_output.empty?
52
+
53
+ cp_output = `cp src/*.app ebin/`
54
+ puts cp_output unless cp_output.empty?
55
+ end
56
+
57
+ # task: doc
58
+
59
+ desc 'doc', 'generate edoc for all modules'
60
+ def doc
61
+ Dir.glob(File.expand_path('src/*.erl')).each do |filename|
62
+ erl_output = `erl -noshell -run edoc file src/#{File.basename(filename)} -run init stop`
63
+ puts erl_output unless erl_output.empty?
64
+ end
65
+
66
+ mv_output = `mv src/*.html doc/`
67
+ puts mv_output unless mv_output.empty?
68
+
69
+ Dir.glob(File.expand_path('test/*.erl')).each do |filename|
70
+ erl_output = `erl -noshell -run edoc file test/#{File.basename(filename)} -run init stop`
71
+ puts erl_output unless erl_output.empty?
72
+ end
73
+
74
+ mv_output = `mv test/*.html doc/`
75
+ puts mv_output unless mv_output.empty?
76
+ end
77
+
78
+ # task: test
79
+
80
+ desc 'test', 'run a EUnit tests'
81
+ def test(name)
82
+ erl_output = `erl -pa ebin/ -noshell -run #{name} test -run init stop`
83
+ puts erl_output unless erl_output.empty?
84
+ end
85
+ end
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Ebuilder" do
4
+ it "fails" do
5
+ fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'ebuilder'
5
+ require 'spec'
6
+ require 'spec/autorun'
7
+
8
+ Spec::Runner.configure do |config|
9
+
10
+ end
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ebuilder
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Leandro Silva
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-01-01 00:00:00 -08:00
13
+ default_executable: ebuilder
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: thor
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description:
36
+ email: leandrodoze@gmail.com
37
+ executables:
38
+ - ebuilder
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - LICENSE
43
+ - README.rdoc
44
+ files:
45
+ - .document
46
+ - .gitignore
47
+ - LICENSE
48
+ - README.rdoc
49
+ - Rakefile
50
+ - VERSION
51
+ - bin/ebuilder
52
+ - ebuilder.gemspec
53
+ - lib/ebuilder.rb
54
+ - spec/ebuilder_spec.rb
55
+ - spec/spec_helper.rb
56
+ has_rdoc: true
57
+ homepage: http://github.com/leandrosilva/ebuilder
58
+ licenses: []
59
+
60
+ post_install_message:
61
+ rdoc_options:
62
+ - --charset=UTF-8
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: "0"
70
+ version:
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: "0"
76
+ version:
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.3.5
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Simple tool for building Erlang/OTP projects
84
+ test_files:
85
+ - spec/ebuilder_spec.rb
86
+ - spec/spec_helper.rb