devutils 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/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .rbx
2
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :name => 'devutils'
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2012, Stefan Radomski
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the devutils nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL Stefan Radomski BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ devutils
2
+ ========
3
+
4
+ These are small tools to make development easier in that they provide metagems
5
+ which pulls other common gems for development purposes.
6
+
7
+ usage
8
+ -----
9
+
10
+ To use devutils, first install the gem with
11
+
12
+ $ gem install devutils
13
+
14
+ Now that it is available, you can use it to create new projects
15
+
16
+ $ devutils init foo
17
+
18
+ This will create a directory structure in foo with a Gemfile already placed.
19
+ That Gemfile will hold 4 gems, which will pull in other dependencies most need
20
+ for development. If you don't want a dependency or want to use another one, you
21
+ are free to, as devutils will never again touch any files.
22
+
23
+ You can modify the behaviour with the following flags
24
+
25
+ * --metrics/--no-metrics:
26
+ install tools for meassuring code quality (default: true)
27
+ * --docs/--no-docs:
28
+ installs yard for documentation (default: true)
29
+ * --guard/--no-guard:
30
+ installs rudimentary guard support (default: true)
31
+
32
+ dependencies
33
+ ------------
34
+
35
+ The dependencies of the gems are as follows
36
+
37
+ ### devutils
38
+
39
+ * [rspec][rspec]: for writing specs
40
+
41
+ ### devutils-docs
42
+
43
+ * [yard][yard]: to parse documentation into html files
44
+
45
+ ### devutils-metrics
46
+
47
+ * [reek][reek]: a tool for code smell detection
48
+ * [flog][flog]: creates pain reports of the code
49
+ * [flay][flay]: finds duplicated code
50
+ * [roodi][roodi]: an object oriented code infometer
51
+ * [mutant][mutant]: a mutation testing tool
52
+ * [simplecov][simplecov]: a test coverage reporting tool (needs ruby > 1.8)
53
+ * [pelusa][pelusa]: a code analytics tool (needs rubinius)
54
+
55
+ ### devutils-guard
56
+
57
+ * [guard][guard]:
58
+ a tool to run automatic tasks on file changes (makes testing nicer)
59
+ * [guard-rspec][guard-rspec]: runs your specs automatically
60
+ * [guard-bundler][guard-bundler]: runs bundler, when your Gemfile changes
61
+
62
+ [yard]: http://yardoc.org/
63
+ [reek]: https://github.com/troessner/reek/wiki
64
+ [flog]: https://github.com/seattlerb/flog
65
+ [flay]: https://github.com/seattlerb/flay
66
+ [rspec]: http://rspec.info/
67
+ [roodi]: https://github.com/martinjandrews/roodi
68
+ [guard]: https://github.com/guard/guard
69
+ [mutant]: https://github.com/mbj/mutant
70
+ [pelusa]: http://codegram.github.com/pelusa/
71
+ [simplecov]: https://github.com/colszowka/simplecov
72
+ [guard-rspec]: https://github.com/guard/guard-rspec
73
+ [guard-bundler]: https://github.com/guard/guard-bundler
data/bin/devutils ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # load devutils for some action
3
+
4
+ require 'rubygems' if RUBY_VERSION < '1.9'
5
+ require 'devutils'
6
+
7
+ Commands.start
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/devutils/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'devutils-docs'
6
+ s.version = DevUtils::VERSION
7
+
8
+ s.authors = ['Stefan Radomski']
9
+ s.description = %q{A dependency for devutils, which mangages documentation.}
10
+ s.summary = s.description
11
+ s.email = 'gibheer@gmail.com'
12
+ s.homepage = 'https://github.com/gibheer/devutils'
13
+ s.licenses = ['3-clause BSD']
14
+ s.rubygems_version = '1.8.24'
15
+
16
+ s.files = []
17
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
18
+
19
+ s.add_dependency('yard')
20
+ end
@@ -0,0 +1,22 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/devutils/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'devutils-guard'
6
+ s.version = DevUtils::VERSION
7
+
8
+ s.authors = ['Stefan Radomski']
9
+ s.description = %q{a small tool for handling subtasks of projects}
10
+ s.summary = s.description
11
+ s.email = 'gibheer@gmail.com'
12
+ s.homepage = 'https://github.com/gibheer/devutils'
13
+ s.licenses = ['3-clause BSD']
14
+ s.rubygems_version = '1.8.24'
15
+
16
+ s.files = []
17
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
18
+
19
+ s.add_dependency('guard')
20
+ s.add_dependency('guard-bundler')
21
+ s.add_dependency('guard-rspec')
22
+ end
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/devutils/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'devutils-metrics'
6
+ s.version = DevUtils::VERSION
7
+
8
+ s.authors = ['Stefan Radomski']
9
+ s.description = %q{a small tool for handling subtasks of projects}
10
+ s.summary = s.description
11
+ s.email = 'gibheer@gmail.com'
12
+ s.homepage = 'https://github.com/gibheer/devutils'
13
+ s.licenses = ['3-clause BSD']
14
+ s.rubygems_version = '1.8.24'
15
+
16
+ s.files = []
17
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
18
+
19
+ s.add_dependency('reek')
20
+ s.add_dependency('flog')
21
+ s.add_dependency('flay')
22
+ s.add_dependency('roodi')
23
+ s.add_dependency('mutant')
24
+ s.add_dependency('simplecov') if RUBY_VERSION >= '1.9'
25
+ s.add_dependency('pelusa') if RUBY_ENGINE >= 'rbx'
26
+ end
data/devutils.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/devutils/version', __FILE__)
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'devutils'
6
+ s.version = DevUtils::VERSION
7
+
8
+ s.authors = ['Stefan Radomski']
9
+ s.description = %q{a small tool for handling subtasks of projects}
10
+ s.summary = s.description
11
+ s.email = 'gibheer@gmail.com'
12
+ s.homepage = 'https://github.com/gibheer/devutils'
13
+ s.licenses = ['3-clause BSD']
14
+ s.rubygems_version = '1.8.24'
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.extra_rdoc_files = ['LICENSE', 'README.md']
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
19
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.require_paths = ['lib']
21
+
22
+ s.add_dependency('thor')
23
+ s.add_dependency('rspec')
24
+ end
data/lib/devutils.rb ADDED
@@ -0,0 +1,29 @@
1
+ require 'thor'
2
+ require 'thor/group'
3
+
4
+ class Commands < Thor
5
+ include Thor::Actions
6
+
7
+ desc 'init PROJECT_NAME', 'initialize a new project named PROJECT_NAME'
8
+ method_option :metrics,
9
+ :default => true,
10
+ :type => :boolean,
11
+ :desc => 'install tools for code quality analyzing'
12
+ method_option :docs,
13
+ :default => true,
14
+ :type => :boolean,
15
+ :desc => 'install yard for documentation'
16
+ method_option :guard,
17
+ :default => true,
18
+ :type => :boolean,
19
+ :desc => 'install guard for automated testing'
20
+ def init(project_name)
21
+ @project_name = project_name
22
+ Commands.source_root(File.expand_path('../..', __FILE__))
23
+ directory('template', project_name)
24
+ end
25
+
26
+ private
27
+
28
+ attr_reader :project_name
29
+ end
@@ -0,0 +1,3 @@
1
+ module DevUtils
2
+ VERSION = '0.0.1'
3
+ end
data/template/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --profile
3
+ --order random
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'devutils'
5
+ end
6
+
7
+ group :development do
8
+ <%= "gem 'devutils-docs'" if options[:docs] %>
9
+ <%= "gem 'devutils-metrics'" if options[:metrics] %>
10
+ <%= "gem 'devutils-guard'" if options[:guard] %>
11
+ end
@@ -0,0 +1,2 @@
1
+ class <%= project_name.capitalize %>
2
+ end
@@ -0,0 +1 @@
1
+ require '<%= project_name %>'
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devutils
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Stefan Radomski
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: thor
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: a small tool for handling subtasks of projects
47
+ email: gibheer@gmail.com
48
+ executables:
49
+ - devutils
50
+ extensions: []
51
+ extra_rdoc_files:
52
+ - LICENSE
53
+ - README.md
54
+ files:
55
+ - .gitignore
56
+ - Gemfile
57
+ - LICENSE
58
+ - README.md
59
+ - bin/devutils
60
+ - devutils-docs.gemspec
61
+ - devutils-guard.gemspec
62
+ - devutils-metrics.gemspec
63
+ - devutils.gemspec
64
+ - lib/devutils.rb
65
+ - lib/devutils/version.rb
66
+ - template/.rspec
67
+ - template/Gemfile.tt
68
+ - template/lib/%project_name%.rb.tt
69
+ - template/spec/spec_helper.rb.tt
70
+ homepage: https://github.com/gibheer/devutils
71
+ licenses:
72
+ - 3-clause BSD
73
+ post_install_message:
74
+ rdoc_options: []
75
+ require_paths:
76
+ - lib
77
+ required_ruby_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ requirements: []
90
+ rubyforge_project:
91
+ rubygems_version: 1.8.23
92
+ signing_key:
93
+ specification_version: 3
94
+ summary: a small tool for handling subtasks of projects
95
+ test_files: []