vgh 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,56 @@
1
+ # YARD support
2
+ namespace :yard do
3
+
4
+ # so that we can sort them
5
+ class YARD::CodeObjects::MethodObject
6
+ def <=>(other)
7
+ self.path <=> other.path
8
+ end
9
+ end
10
+
11
+ desc 'Force a rebuild of the documentation'
12
+ YARD::Rake::YardocTask.new :doc do |yard|
13
+ yard.options = ['--no-private',
14
+ '--protected',
15
+ '--readme=README.rdoc',
16
+ '--title', 'VGH Scripts'
17
+ ]
18
+ yard.files = ['-', 'LICENSE']
19
+ end
20
+
21
+ desc 'Outputs some information about the documentation'
22
+ YARD::Rake::YardocTask.new :doc_info do |yard|
23
+ yard.options = ['--no-output',
24
+ '--private',
25
+ '--protected',
26
+ '--use-cache'
27
+ ]
28
+ end
29
+
30
+ def docd_method_percent(klass)
31
+ total = klass.meths.size.to_f
32
+ undocd = klass.meths.select {|m| m.docstring.empty? }.size.to_f
33
+
34
+ undocd.zero? ? 0.0 : (undocd / total)
35
+ end
36
+
37
+ desc 'Find undocumented methods'
38
+ task :undocd => [ :doc_info ] do
39
+ methods = YARD::Registry.load!.all(:method)
40
+ meths = methods.select {|m| m.docstring.empty? }
41
+ puts meths.sort
42
+ end
43
+
44
+ desc 'Find the classes with the highest percent on documented methods'
45
+ task :percent_undocd => [ :doc ] do
46
+ klasses = YARD::Registry.load!.all(:class)
47
+
48
+ ks = klasses.map {|k| [k, docd_method_percent(k)] }
49
+ sorted = ks.sort {|(_, percent), (_, percent2)| percent <=> percent2 }
50
+ sorted.each do |(k, p)|
51
+ puts "#{k} => #{p * 100}%" unless p == 0.0
52
+ end
53
+ end
54
+
55
+ end # YARD
56
+
data/vgh.gemspec ADDED
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vgh/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "vgh"
8
+ gem.version = VGH::VERSION
9
+ gem.authors = ["Vlad Ghinea"]
10
+ gem.email = ["vgit@vladgh.com"]
11
+ gem.description = %q{Vlad's custom scripts}
12
+ gem.summary = %q{A collection of custom scripts used on VladGh.com}
13
+ gem.homepage = "https://github.com/vgh/vscripts"
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_runtime_dependency "aws-sdk", [">= 1.6.6"]
21
+ gem.add_runtime_dependency "sinatra", [">= 1.3.3"]
22
+
23
+ gem.add_development_dependency "rspec"
24
+ gem.add_development_dependency "rake"
25
+ gem.add_development_dependency "yard"
26
+ gem.add_development_dependency "bundler"
27
+ end
metadata ADDED
@@ -0,0 +1,185 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vgh
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Vlad Ghinea
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-10-14 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: aws-sdk
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 1
31
+ - 6
32
+ - 6
33
+ version: 1.6.6
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: sinatra
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 29
45
+ segments:
46
+ - 1
47
+ - 3
48
+ - 3
49
+ version: 1.3.3
50
+ type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rspec
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: rake
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :development
79
+ version_requirements: *id004
80
+ - !ruby/object:Gem::Dependency
81
+ name: yard
82
+ prerelease: false
83
+ requirement: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 3
89
+ segments:
90
+ - 0
91
+ version: "0"
92
+ type: :development
93
+ version_requirements: *id005
94
+ - !ruby/object:Gem::Dependency
95
+ name: bundler
96
+ prerelease: false
97
+ requirement: &id006 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
105
+ version: "0"
106
+ type: :development
107
+ version_requirements: *id006
108
+ description: Vlad's custom scripts
109
+ email:
110
+ - vgit@vladgh.com
111
+ executables:
112
+ - vgh
113
+ extensions: []
114
+
115
+ extra_rdoc_files: []
116
+
117
+ files:
118
+ - .gitignore
119
+ - .rspec
120
+ - .travis.yml
121
+ - .yardopts
122
+ - Gemfile
123
+ - LICENSE
124
+ - README.rdoc
125
+ - Rakefile
126
+ - bin/vgh
127
+ - lib/vgh.rb
128
+ - lib/vgh/apps.rb
129
+ - lib/vgh/apps/ec2_backup.rb
130
+ - lib/vgh/cli.rb
131
+ - lib/vgh/configuration.rb
132
+ - lib/vgh/extended_aws.rb
133
+ - lib/vgh/extended_aws/extended_ec2.rb
134
+ - lib/vgh/extended_aws/extended_ec2/metadata.rb
135
+ - lib/vgh/extended_aws/extended_ec2/snapshot.rb
136
+ - lib/vgh/extended_aws/extended_ec2/volume.rb
137
+ - lib/vgh/logging.rb
138
+ - lib/vgh/output.rb
139
+ - lib/vgh/system.rb
140
+ - lib/vgh/system/lvm.rb
141
+ - lib/vgh/system/mysql.rb
142
+ - lib/vgh/version.rb
143
+ - spec/cli_spec.rb
144
+ - spec/misc_spec.rb
145
+ - spec/spec_helper.rb
146
+ - tasks/documentation.rake
147
+ - vgh.gemspec
148
+ homepage: https://github.com/vgh/vscripts
149
+ licenses: []
150
+
151
+ post_install_message:
152
+ rdoc_options: []
153
+
154
+ require_paths:
155
+ - lib
156
+ required_ruby_version: !ruby/object:Gem::Requirement
157
+ none: false
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ hash: 3
162
+ segments:
163
+ - 0
164
+ version: "0"
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
+ none: false
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
173
+ version: "0"
174
+ requirements: []
175
+
176
+ rubyforge_project:
177
+ rubygems_version: 1.8.24
178
+ signing_key:
179
+ specification_version: 3
180
+ summary: A collection of custom scripts used on VladGh.com
181
+ test_files:
182
+ - spec/cli_spec.rb
183
+ - spec/misc_spec.rb
184
+ - spec/spec_helper.rb
185
+ has_rdoc: