pressure_cooker 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -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/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --format progress
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pressure_cooker.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 mjorgensen
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.
data/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # PressureCooker
2
+
3
+ Use this for building new gem skeletons. This is basically bundle gem,
4
+ but it also adds rspec (with a smoke test) and yard for
5
+ documentation. Neat!
6
+
7
+ ## Requirements
8
+ It's not really required, but it's prettier if you have `tree` installed.
9
+
10
+ ## Installation
11
+ Well, it's not actually on rubygems, so this won't work:
12
+
13
+ $ gem install pressure_cooker
14
+
15
+ You'll have to clone the repo and `rake install` it yourself.
16
+
17
+ ## Usage
18
+
19
+ go to the directory you keep all your gems and run:
20
+
21
+ $ cook_gem.rb new_gem_name
22
+
23
+ Enjoy the show, then start developing!
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/cook_gem.rb ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ class String
4
+ def camel_case
5
+ return self if self !~ /_/ && self =~ /[A-Z]+.*/
6
+ split('_').map{|e| e.capitalize}.join
7
+ end
8
+ end
9
+
10
+ gem_name = ARGV.first
11
+ gem_module = gem_name.camel_case
12
+
13
+ system 'clear'
14
+
15
+ # initial structure
16
+ system "bundle gem #{gem_name}"
17
+ Dir.chdir gem_name
18
+ system 'pwd'
19
+
20
+ # add bin/
21
+ system "mkdir bin"
22
+
23
+ # set up testing
24
+ puts
25
+ system "rspec --init"
26
+
27
+ smoke_spec = File.new("spec/smoke_spec.rb", 'w')
28
+ smoke_spec.puts '# smoke test'
29
+ smoke_spec.puts "describe #{gem_module} do"
30
+ smoke_spec.puts " it 'has a version' do"
31
+ smoke_spec.puts " expect(#{gem_module}::VERSION).to match(/\\d+\\.\\d+\\.\\d+/)"
32
+ smoke_spec.puts " end"
33
+ smoke_spec.puts "end"
34
+ smoke_spec.close
35
+ system "mkdir spec/#{gem_name}"
36
+
37
+ # update gemspec with dependencies
38
+ system "sed \"22a spec.add_development_dependency 'redcarpet'\" #{gem_name}.gemspec > result.txt"
39
+ system "mv result.txt #{gem_name}.gemspec"
40
+
41
+ system "sed \"23a spec.add_development_dependency 'rspec'\" #{gem_name}.gemspec > result.txt"
42
+ system "mv result.txt #{gem_name}.gemspec"
43
+
44
+ system "sed \"24a spec.add_development_dependency 'yard'\" #{gem_name}.gemspec > result.txt"
45
+ system "mv result.txt #{gem_name}.gemspec"
46
+
47
+ # order up!
48
+ puts
49
+ system "yard"
50
+
51
+ puts
52
+ system "rspec -f d"
53
+
54
+ puts
55
+ system "`command -v tree`"
data/bin/reinstall.sh ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # must be run from gem root directory
4
+
5
+ gem uninstall ${PWD##*/}
6
+ rake install
7
+
8
+
@@ -0,0 +1,3 @@
1
+ module PressureCooker
2
+ VERSION = "0.1.1"
3
+ end
@@ -0,0 +1,5 @@
1
+ require "pressure_cooker/version"
2
+
3
+ module PressureCooker
4
+ # Your code goes here...
5
+ end
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pressure_cooker/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pressure_cooker"
8
+ spec.version = PressureCooker::VERSION
9
+ spec.authors = ["mjorgensen"]
10
+ spec.email = ["Mark.Jorgensen@govdelivery.com"]
11
+ spec.description = %q{This assumes that you want to use bundler
12
+ for gem management, rake for task management, rspec for testing, and
13
+ yard for documentation.}
14
+ spec.summary = %q{cook up new gem skeletons fast!}
15
+ spec.homepage = ""
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = ['cook_gem.rb']
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_dependency 'rspec'
24
+ spec.add_dependency 'rake'
25
+ spec.add_dependency 'redcarpet'
26
+ spec.add_dependency 'yard'
27
+ spec.add_dependency "bundler", "~> 1.3"
28
+ end
@@ -0,0 +1,17 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # Require this file using `require "spec_helper"` to ensure that it is only
4
+ # loaded once.
5
+ #
6
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
7
+ RSpec.configure do |config|
8
+ config.treat_symbols_as_metadata_keys_with_true_values = true
9
+ config.run_all_when_everything_filtered = true
10
+ config.filter_run :focus
11
+
12
+ # Run specs in random order to surface order dependencies. If you find an
13
+ # order dependency and want to debug it, you can fix the order by providing
14
+ # the seed, which is printed after each run.
15
+ # --seed 1234
16
+ config.order = 'random'
17
+ end
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pressure_cooker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - mjorgensen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-08-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
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: rake
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
+ - !ruby/object:Gem::Dependency
47
+ name: redcarpet
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: yard
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: bundler
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: '1.3'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '1.3'
94
+ description: ! "This assumes that you want to use bundler\n for gem management, rake
95
+ for task management, rspec for testing, and\n yard for documentation."
96
+ email:
97
+ - Mark.Jorgensen@govdelivery.com
98
+ executables:
99
+ - cook_gem.rb
100
+ extensions: []
101
+ extra_rdoc_files: []
102
+ files:
103
+ - .gitignore
104
+ - .rspec
105
+ - Gemfile
106
+ - LICENSE.txt
107
+ - README.md
108
+ - Rakefile
109
+ - bin/cook_gem.rb
110
+ - bin/reinstall.sh
111
+ - lib/pressure_cooker.rb
112
+ - lib/pressure_cooker/version.rb
113
+ - pressure_cooker.gemspec
114
+ - spec/spec_helper.rb
115
+ homepage: ''
116
+ licenses:
117
+ - MIT
118
+ post_install_message:
119
+ rdoc_options: []
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ segments:
129
+ - 0
130
+ hash: 1061862355
131
+ required_rubygems_version: !ruby/object:Gem::Requirement
132
+ none: false
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ segments:
138
+ - 0
139
+ hash: 1061862355
140
+ requirements: []
141
+ rubyforge_project:
142
+ rubygems_version: 1.8.25
143
+ signing_key:
144
+ specification_version: 3
145
+ summary: cook up new gem skeletons fast!
146
+ test_files:
147
+ - spec/spec_helper.rb
148
+ has_rdoc: