boiler 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -18
- data/lib/boiler/generator/base.rb +4 -4
- data/lib/boiler/version.rb +1 -1
- metadata +3 -3
data/Gemfile
CHANGED
@@ -1,20 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
else
|
7
|
-
sources = Gem.sources
|
8
|
-
end
|
9
|
-
sources.each do |src|
|
10
|
-
begin
|
11
|
-
Socket.gethostbyname(URI.parse(src).host)
|
12
|
-
rescue SocketError => e
|
13
|
-
Bundler.ui.error("Unable to resolve gem source #{src}")
|
14
|
-
raise e
|
15
|
-
else
|
16
|
-
source src
|
17
|
-
end
|
18
|
-
end
|
1
|
+
# Execute bundler hook if present
|
2
|
+
['~/.', '/etc/'].any? do |file|
|
3
|
+
File.lstat(path = File.expand_path(file + 'bundle-gemfile-hook')) rescue next
|
4
|
+
eval(File.read(path), binding, path); break true
|
5
|
+
end || source('https://rubygems.org/')
|
19
6
|
|
20
7
|
gemspec
|
@@ -17,24 +17,24 @@ module Boiler::Generator
|
|
17
17
|
protected
|
18
18
|
|
19
19
|
def write_file(file, contents)
|
20
|
-
log.
|
20
|
+
log.info('writing file', :bytes => contents.bytesize, :file => file)
|
21
21
|
# TODO: disable O_CREAT
|
22
22
|
File.open(file, 'w') {|f| f.print(contents)}
|
23
23
|
end
|
24
24
|
|
25
25
|
def append_to_file(file, contents)
|
26
|
-
log.
|
26
|
+
log.info('appending to file', :bytes => contents.bytesize, :file => file)
|
27
27
|
# TODO: disable O_CREAT
|
28
28
|
File.open(file, 'a') {|f| f.print(contents)}
|
29
29
|
end
|
30
30
|
|
31
31
|
def chmod(perms, file)
|
32
|
-
log.
|
32
|
+
log.info('chmod', :perms => perms, :file => file)
|
33
33
|
FileUtils.chmod(perms, file)
|
34
34
|
end
|
35
35
|
|
36
36
|
def mkdir(dir)
|
37
|
-
log.
|
37
|
+
log.info('mkdir', :dir => dir)
|
38
38
|
FileUtils.mkdir(dir)
|
39
39
|
end
|
40
40
|
end
|
data/lib/boiler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
segments:
|
145
145
|
- 0
|
146
|
-
hash:
|
146
|
+
hash: 3507774750218493142
|
147
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
148
|
none: false
|
149
149
|
requirements:
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
segments:
|
154
154
|
- 0
|
155
|
-
hash:
|
155
|
+
hash: 3507774750218493142
|
156
156
|
requirements: []
|
157
157
|
rubyforge_project:
|
158
158
|
rubygems_version: 1.8.24
|