putenv 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ # string constants for interactive messages
2
+ module Putenv
3
+ # command descriptions
4
+ DESC_VERSION = 'Display gem version (Can also use -v)'
5
+ end
@@ -0,0 +1,42 @@
1
+ require 'putenv'
2
+
3
+ module Putenv
4
+ # wrapper to assist aruba in single process execution
5
+ class Runner
6
+ # rubocop:disable LineLength
7
+ def initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
8
+ @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
9
+ end
10
+ # rubocop:enable LineLength
11
+
12
+ # rubocop:disable MethodLength
13
+ def execute!
14
+ exit_code = begin
15
+ $stderr = @stderr
16
+ $stdin = @stdin
17
+ $stdout = @stdout
18
+
19
+ Putenv::CLI.start(@argv)
20
+
21
+ # Thor::Base#start does not have a return value
22
+ # assume success if no exception is raised.
23
+ 0
24
+ rescue StandardError => err
25
+ # The ruby interpreter would pipe this to STDERR and
26
+ # exit 1 in the case of an unhandled exception
27
+ b = err.backtrace
28
+ b.unshift("#{b.shift}: #{err.message} (#{err.class})")
29
+ @stderr.puts(b.map { |s| "\tfrom #{s}" }.join("\n"))
30
+ 1
31
+ ensure
32
+ # put them back.
33
+ $stderr = STDERR
34
+ $stdin = STDIN
35
+ $stdout = STDOUT
36
+ end
37
+ # Proxy exit code back to the injected kernel.
38
+ @kernel.exit(exit_code)
39
+ end
40
+ # rubocop:enable MethodLength
41
+ end
42
+ end
@@ -0,0 +1,4 @@
1
+ # simple gem version number tracking
2
+ module Putenv
3
+ VERSION = '0.1.0'
4
+ end
data/putenv.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ # rubocop:disable all
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
4
+ require 'putenv/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'putenv'
8
+ spec.version = Putenv::VERSION
9
+ spec.authors = %w('Nic Cheneweth','Gregory Ruiz-ade')
10
+ spec.email = %w('Nic.Cheneweth@activenetwork.com','gregory.ruiz-ade@activenetwork.com')
11
+ spec.summary = 'Automated provisioning of application environments'
12
+ spec.description = 'Command line tool to automate the provision and bootstrap of virtual machine application environments'
13
+ spec.homepage = ''
14
+ spec.license = 'Apache 2.0'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
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_development_dependency 'bundler', '>= 1.7'
22
+ spec.add_development_dependency 'rake', '>= 10.0'
23
+ spec.add_development_dependency 'rubocop', '>= 0.27.0'
24
+ spec.add_development_dependency 'aruba', '>= 0.6'
25
+ spec.add_development_dependency 'rspec', '>= 3.0'
26
+ spec.add_development_dependency 'coveralls', '>= 0.7.0'
27
+ spec.add_development_dependency 'guard', '>= 2.10.0'
28
+ spec.add_development_dependency 'guard-rubocop', '>= 1.1.0'
29
+ # growl functionality in Guardfile depends on growl-notify
30
+ spec.add_development_dependency 'growl', '>= 1.0'
31
+ spec.add_development_dependency 'yard', '>= 0.8'
32
+ spec.add_dependency 'thor', '>= 0.17.0'
33
+ end
34
+ # rubocop:enable all
35
+
36
+ # spec.add_development_dependency('chef')
37
+ # spec.add_development_dependency('knife-vsphere')
38
+ #
39
+ # spec.add_dependency('open4')
40
+ # spec.add_dependency('english')
metadata ADDED
@@ -0,0 +1,247 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: putenv
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - "'Nic"
8
+ - Cheneweth','Gregory
9
+ - Ruiz-ade'
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2014-12-10 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: bundler
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: '1.7'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: '1.7'
29
+ - !ruby/object:Gem::Dependency
30
+ name: rake
31
+ requirement: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '10.0'
36
+ type: :development
37
+ prerelease: false
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '10.0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: rubocop
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.27.0
50
+ type: :development
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 0.27.0
57
+ - !ruby/object:Gem::Dependency
58
+ name: aruba
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '0.6'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0.6'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '3.0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '3.0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: coveralls
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.7.0
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 0.7.0
99
+ - !ruby/object:Gem::Dependency
100
+ name: guard
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 2.10.0
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 2.10.0
113
+ - !ruby/object:Gem::Dependency
114
+ name: guard-rubocop
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: 1.1.0
120
+ type: :development
121
+ prerelease: false
122
+ version_requirements: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 1.1.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: growl
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '1.0'
134
+ type: :development
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '1.0'
141
+ - !ruby/object:Gem::Dependency
142
+ name: yard
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0.8'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0.8'
155
+ - !ruby/object:Gem::Dependency
156
+ name: thor
157
+ requirement: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: 0.17.0
162
+ type: :runtime
163
+ prerelease: false
164
+ version_requirements: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: 0.17.0
169
+ description: Command line tool to automate the provision and bootstrap of virtual
170
+ machine application environments
171
+ email:
172
+ - "'Nic.Cheneweth@activenetwork.com','gregory.ruiz-ade@activenetwork.com'"
173
+ executables:
174
+ - putenv
175
+ extensions: []
176
+ extra_rdoc_files: []
177
+ files:
178
+ - ".coveralls.yml"
179
+ - ".gitignore"
180
+ - ".rubocop.yml"
181
+ - ".simplecov"
182
+ - ".travis.yml"
183
+ - ".yardoc/checksums"
184
+ - ".yardoc/object_types"
185
+ - ".yardoc/objects/root.dat"
186
+ - ".yardoc/proxy_types"
187
+ - CHANGELOG.md
188
+ - Gemfile
189
+ - Guardfile
190
+ - LICENSE.txt
191
+ - README.md
192
+ - Rakefile
193
+ - bin/putenv
194
+ - doc/Putenv.html
195
+ - doc/Putenv/CLI.html
196
+ - doc/Putenv/Runner.html
197
+ - doc/_index.html
198
+ - doc/class_list.html
199
+ - doc/css/common.css
200
+ - doc/css/full_list.css
201
+ - doc/css/style.css
202
+ - doc/file.README.html
203
+ - doc/file_list.html
204
+ - doc/frames.html
205
+ - doc/index.html
206
+ - doc/js/app.js
207
+ - doc/js/full_list.js
208
+ - doc/js/jquery.js
209
+ - doc/method_list.html
210
+ - doc/top-level-namespace.html
211
+ - features/putenv.feature
212
+ - features/step_definitions/putenv_steps.rb
213
+ - features/support/env.rb
214
+ - lib/putenv.rb
215
+ - lib/putenv/messages.rb
216
+ - lib/putenv/runner.rb
217
+ - lib/putenv/version.rb
218
+ - putenv.gemspec
219
+ homepage: ''
220
+ licenses:
221
+ - Apache 2.0
222
+ metadata: {}
223
+ post_install_message:
224
+ rdoc_options: []
225
+ require_paths:
226
+ - lib
227
+ required_ruby_version: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - ">="
230
+ - !ruby/object:Gem::Version
231
+ version: '0'
232
+ required_rubygems_version: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ requirements: []
238
+ rubyforge_project:
239
+ rubygems_version: 2.2.2
240
+ signing_key:
241
+ specification_version: 4
242
+ summary: Automated provisioning of application environments
243
+ test_files:
244
+ - features/putenv.feature
245
+ - features/step_definitions/putenv_steps.rb
246
+ - features/support/env.rb
247
+ has_rdoc: