pickaxe 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9bb4aff9095b75895c2aad909844db7fe682e229
4
+ data.tar.gz: 606f90c34b95a66d4eff8a23b63eef2127ccea41
5
+ SHA512:
6
+ metadata.gz: 7a086545aa0122e1edab850ace3b00944705b1745829399e053d07b38fae9454c8441d1c0dd7bca248553eeb465b209a0ec278c5c0499b7fdcd8612bd886e962
7
+ data.tar.gz: 8ac96a0cc248e4f9e14af18f202e738195d3a65cce5867119d03e4e9b26a904f97ff2b815300811bda7161566f70f01a362c8c08181c31791259069351ea7876
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'minitest'
7
+ gem 'guard-minitest', github: 'guard/guard-minitest', branch: 'master'
8
+ end
9
+
@@ -0,0 +1,6 @@
1
+ guard 'minitest' do
2
+ watch(%r|^test/(.*)\/?(.*)_test\.rb|)
3
+ watch(%r|^lib/(.*)([^/]+)\.rb|) { "test" }
4
+ watch(%r|^test/test_helper\.rb|) { "test" }
5
+ end
6
+
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Dreamr OKelly
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # Pickaxe
2
+
3
+ Pickaxe is a wrapper for bundler because bundler doesn't set up Minitest. Gems without tests are sad!
4
+
5
+ ## Installation
6
+
7
+ $ gem install pickaxe
8
+
9
+ ## Usage
10
+
11
+ $ pickaxe gem_name
12
+
13
+ This will run bundle gem gem_name and then set that shit up with tests!
14
+
15
+ ## Contributing
16
+
17
+ 1. Fork it
18
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
19
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
20
+ 4. Push to the branch (`git push origin my-new-feature`)
21
+ 5. Create new Pull Request
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "test"
7
+ t.test_files = FileList['test/*_test.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ task default: :test
12
+
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ lib = File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ require 'pickaxe'
6
+
7
+ Pickaxe::Generator.start
@@ -0,0 +1,5 @@
1
+ require "pickaxe/version"
2
+ require "pickaxe/generator"
3
+
4
+ module Pickaxe
5
+ end
@@ -0,0 +1,67 @@
1
+ require 'thor/group'
2
+ require 'active_support/inflector'
3
+
4
+ module Pickaxe
5
+ class Generator < Thor::Group
6
+ include Thor::Actions
7
+
8
+ argument :gem_name
9
+
10
+ def self.source_root
11
+ File.expand_path(File.dirname(__FILE__) +'/templates')
12
+ end
13
+
14
+ def run_bundle
15
+ run "bundle gem #{gem_name}", :verbose => false
16
+ end
17
+
18
+ def setup_project
19
+ remove_file "#{gem_name}/Rakefile"
20
+ remove_file "#{gem_name}/Gemfile"
21
+
22
+ directory "test"
23
+
24
+ template 'test_helper.tt', "#{gem_name}/test/test_helper.rb"
25
+ template 'Guardfile.tt', "#{gem_name}/Guardfile"
26
+ template 'Gemfile.tt', "#{gem_name}/Gemfile"
27
+ template 'Rakefile.tt', "#{gem_name}/Rakefile"
28
+
29
+ inside gem_name do
30
+ create_file "test/#{gem_name}_test.rb" do
31
+ <<-EOS
32
+ require 'test_helper'
33
+
34
+ describe #{gem_name.classify} do
35
+ subject { #{gem_name.classify} }
36
+
37
+ end
38
+ EOS
39
+ end
40
+
41
+ append_to_file "test/test_helper.rb" do
42
+ "require '#{gem_name}'"
43
+ end
44
+ end
45
+
46
+ bundle
47
+
48
+ commit "Initial gem creation with testing!"
49
+ end
50
+
51
+ private
52
+
53
+ def commit(msg)
54
+ inside gem_name do
55
+ run "git add ."
56
+ run "git commit -m '#{msg}'"
57
+ end
58
+ end
59
+
60
+ def bundle
61
+ inside gem_name do
62
+ run "bundle install"
63
+ end
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'minitest'
7
+ gem 'guard-minitest', github: 'guard/guard-minitest', branch: 'master'
8
+ end
9
+
@@ -0,0 +1,6 @@
1
+ guard 'minitest' do
2
+ watch(%r|^test/(.*)\/?(.*)_test\.rb|)
3
+ watch(%r|^lib/(.*)([^/]+)\.rb|) { "test" }
4
+ watch(%r|^test/test_helper\.rb|) { "test" }
5
+ end
6
+
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << "test"
7
+ t.test_files = FileList['test/*_test.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ task default: :test
12
+
@@ -0,0 +1,6 @@
1
+ require 'minitest/autorun'
2
+
3
+ lib = File.expand_path('../../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+
@@ -0,0 +1,3 @@
1
+ module Pickaxe
2
+ VERSION = "0.8.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pickaxe/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pickaxe"
8
+ spec.version = Pickaxe::VERSION
9
+ spec.authors = ["Dreamr OKelly"]
10
+ spec.email = ["dreamr.okelly@gmail.com"]
11
+ spec.description = %q{I got tired of doing this by hand}
12
+ spec.summary = %q{bundle gem + test setup!}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "activesupport", "~> 4"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "minitest", "~> 4.2"
26
+ end
@@ -0,0 +1,6 @@
1
+ require 'test_helper'
2
+
3
+ describe Pickaxe do
4
+ subject { Pickaxe }
5
+
6
+ end
@@ -0,0 +1,7 @@
1
+ require 'minitest/autorun'
2
+
3
+ lib = File.expand_path('../../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+
7
+ require 'pickaxe'
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pickaxe
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.1
5
+ platform: ruby
6
+ authors:
7
+ - Dreamr OKelly
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-07-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '4.2'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '4.2'
69
+ description: I got tired of doing this by hand
70
+ email:
71
+ - dreamr.okelly@gmail.com
72
+ executables:
73
+ - pickaxe
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - .gitignore
78
+ - Gemfile
79
+ - Guardfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - bin/pickaxe
84
+ - lib/pickaxe.rb
85
+ - lib/pickaxe/generator.rb
86
+ - lib/pickaxe/templates/Gemfile.tt
87
+ - lib/pickaxe/templates/Guardfile.tt
88
+ - lib/pickaxe/templates/Rakefile.tt
89
+ - lib/pickaxe/templates/test_helper.tt
90
+ - lib/pickaxe/version.rb
91
+ - pickaxe.gemspec
92
+ - test/pickaxe_test.rb
93
+ - test/test_helper.rb
94
+ homepage: ''
95
+ licenses:
96
+ - MIT
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.0.3
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: bundle gem + test setup!
118
+ test_files:
119
+ - test/pickaxe_test.rb
120
+ - test/test_helper.rb