gem_hadar 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gem_hadar.gemspec +6 -6
- data/lib/gem_hadar/version.rb +1 -1
- data/lib/gem_hadar.rb +39 -2
- metadata +8 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/gem_hadar.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{gem_hadar}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Florian Frank}]
|
9
|
-
s.date = %q{2011-
|
9
|
+
s.date = %q{2011-08-04}
|
10
10
|
s.description = %q{This library contains some useful functionality to support the development of Ruby Gems}
|
11
11
|
s.email = %q{flori@ping.de}
|
12
12
|
s.extra_rdoc_files = [%q{README.rdoc}, %q{lib/gem_hadar.rb}, %q{lib/gem_hadar/version.rb}]
|
@@ -14,27 +14,27 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.homepage = %q{http://github.com/flori/gem_hadar}
|
15
15
|
s.rdoc_options = [%q{--title}, %q{GemHadar - Library for the development of Ruby Gems}, %q{--main}, %q{README.rdoc}]
|
16
16
|
s.require_paths = [%q{lib}]
|
17
|
-
s.rubygems_version = %q{1.8.
|
17
|
+
s.rubygems_version = %q{1.8.6}
|
18
18
|
s.summary = %q{Library for the development of Ruby Gems}
|
19
19
|
|
20
20
|
if s.respond_to? :specification_version then
|
21
21
|
s.specification_version = 3
|
22
22
|
|
23
23
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
24
|
-
s.add_development_dependency(%q<gem_hadar>, ["~> 0.0.
|
24
|
+
s.add_development_dependency(%q<gem_hadar>, ["~> 0.0.9"])
|
25
25
|
s.add_runtime_dependency(%q<spruz>, ["~> 0.2.10"])
|
26
26
|
s.add_runtime_dependency(%q<dslkit>, ["~> 0.2.7"])
|
27
27
|
s.add_runtime_dependency(%q<sdoc>, ["~> 0.2.20"])
|
28
28
|
s.add_runtime_dependency(%q<rake>, ["~> 0.9.2"])
|
29
29
|
else
|
30
|
-
s.add_dependency(%q<gem_hadar>, ["~> 0.0.
|
30
|
+
s.add_dependency(%q<gem_hadar>, ["~> 0.0.9"])
|
31
31
|
s.add_dependency(%q<spruz>, ["~> 0.2.10"])
|
32
32
|
s.add_dependency(%q<dslkit>, ["~> 0.2.7"])
|
33
33
|
s.add_dependency(%q<sdoc>, ["~> 0.2.20"])
|
34
34
|
s.add_dependency(%q<rake>, ["~> 0.9.2"])
|
35
35
|
end
|
36
36
|
else
|
37
|
-
s.add_dependency(%q<gem_hadar>, ["~> 0.0.
|
37
|
+
s.add_dependency(%q<gem_hadar>, ["~> 0.0.9"])
|
38
38
|
s.add_dependency(%q<spruz>, ["~> 0.2.10"])
|
39
39
|
s.add_dependency(%q<dslkit>, ["~> 0.2.7"])
|
40
40
|
s.add_dependency(%q<sdoc>, ["~> 0.2.20"])
|
data/lib/gem_hadar/version.rb
CHANGED
data/lib/gem_hadar.rb
CHANGED
@@ -128,6 +128,29 @@ class GemHadar
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
class RvmConfig
|
132
|
+
extend DSLKit::DSLAccessor
|
133
|
+
include DSLKit::BlockSelf
|
134
|
+
|
135
|
+
def initialize(&block)
|
136
|
+
@outer_scope = block_self(&block)
|
137
|
+
instance_eval(&block)
|
138
|
+
end
|
139
|
+
|
140
|
+
dsl_accessor :use do `rvm tools strings`.split(/\n/).full?(:last) || 'ruby' end
|
141
|
+
|
142
|
+
dsl_accessor :gemset do @outer_scope.name end
|
143
|
+
end
|
144
|
+
|
145
|
+
def rvm(&block)
|
146
|
+
if block
|
147
|
+
@rvm = RvmConfig.new(&block)
|
148
|
+
elsif !@rvm
|
149
|
+
@rvm = RvmConfig.new { }
|
150
|
+
end
|
151
|
+
@rvm
|
152
|
+
end
|
153
|
+
|
131
154
|
dsl_accessor :default_task_dependencies, [ :gemspec, :test ]
|
132
155
|
|
133
156
|
def default_task
|
@@ -182,7 +205,7 @@ class GemHadar
|
|
182
205
|
end
|
183
206
|
|
184
207
|
def gems_install_task(&block)
|
185
|
-
block ||=
|
208
|
+
block ||= proc { sh 'bundle install' }
|
186
209
|
desc 'Install all gems from the Gemfile'
|
187
210
|
task :'gems:install', &block
|
188
211
|
end
|
@@ -190,7 +213,7 @@ class GemHadar
|
|
190
213
|
def gemspec
|
191
214
|
Gem::Specification.new do |s|
|
192
215
|
s.name = name
|
193
|
-
s.version = version
|
216
|
+
s.version = ::Gem::Version.new(version)
|
194
217
|
s.author = author
|
195
218
|
s.email = email
|
196
219
|
s.homepage = homepage
|
@@ -367,9 +390,23 @@ EOT
|
|
367
390
|
end
|
368
391
|
end
|
369
392
|
|
393
|
+
def rvm_task
|
394
|
+
desc 'Create .rvmrc file'
|
395
|
+
task :rvm do
|
396
|
+
write('.rvmrc') do |output|
|
397
|
+
output.write <<EOT
|
398
|
+
rvm use #{rvm.use}
|
399
|
+
rvm gemset create #{rvm.gemset}
|
400
|
+
rvm gemset use #{rvm.gemset}
|
401
|
+
EOT
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
370
406
|
def create_all_tasks
|
371
407
|
default_task
|
372
408
|
build_task
|
409
|
+
rvm_task
|
373
410
|
version_task
|
374
411
|
gemspec_task
|
375
412
|
gems_install_task
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_hadar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Florian Frank
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-04 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: gem_hadar
|
@@ -25,12 +25,12 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 13
|
29
29
|
segments:
|
30
30
|
- 0
|
31
31
|
- 0
|
32
|
-
-
|
33
|
-
version: 0.0.
|
32
|
+
- 9
|
33
|
+
version: 0.0.9
|
34
34
|
type: :development
|
35
35
|
version_requirements: *id001
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements: []
|
150
150
|
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 1.8.
|
152
|
+
rubygems_version: 1.8.6
|
153
153
|
signing_key:
|
154
154
|
specification_version: 3
|
155
155
|
summary: Library for the development of Ruby Gems
|