bones 3.4.6 → 3.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,8 @@
1
+ == 3.4.7 / 2010-06-21
2
+
3
+ 1 bug fix
4
+ - FileManager not preserving executable status of template files [Nathan Witmer]
5
+
1
6
  == 3.4.6 / 2010-06-09
2
7
 
3
8
  1 bug fix
@@ -112,7 +112,9 @@ class FileManager
112
112
  next unless test(?f, fn) and '.bns' == File.extname(fn)
113
113
 
114
114
  txt = ERB.new(File.read(fn), nil, '-').result(binding)
115
- File.open(fn.sub(%r/\.bns$/, ''), 'w') {|fd| fd.write(txt)}
115
+ new_fn = fn.sub(%r/\.bns$/, '')
116
+ File.open(new_fn, 'w') {|fd| fd.write(txt)}
117
+ FileUtils.chmod(File.stat(fn).mode, new_fn)
116
118
  FileUtils.rm_f(fn)
117
119
  end
118
120
  self
@@ -38,7 +38,7 @@ describe Bones::App::FileManager do
38
38
  @fm.source = Bones.path %w[spec data default]
39
39
 
40
40
  ary = @fm._files_to_copy
41
- ary.length.should == 6
41
+ ary.length.should == 7
42
42
 
43
43
  ary.should == %w[
44
44
  .bnsignore
@@ -46,6 +46,7 @@ describe Bones::App::FileManager do
46
46
  NAME/NAME.rb.bns
47
47
  README.txt.bns
48
48
  Rakefile.bns
49
+ bin/NAME.bns
49
50
  lib/NAME.rb.bns
50
51
  ]
51
52
  end
@@ -107,6 +108,17 @@ end
107
108
  TXT
108
109
  end
109
110
 
111
+ it "preserves the executable status of .bns files" do
112
+ @fm.source = Bones.path(%w[spec data default])
113
+ @fm.destination = Bones.path(%w[spec data bar])
114
+ @fm.copy
115
+ @fm.finalize('foo_bar')
116
+
117
+ dir = @fm.destination
118
+ test(?e, File.join(dir, 'bin/foo_bar')).should == true
119
+ test(?x, File.join(dir, 'bin/foo_bar')).should == true
120
+ end
121
+
110
122
  # ------------------------------------------------------------------------
111
123
  describe 'when configured with a repository as a source' do
112
124
 
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # <%= name %> executable
@@ -1 +1 @@
1
- 3.4.6
1
+ 3.4.7
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 4
8
- - 6
9
- version: 3.4.6
8
+ - 7
9
+ version: 3.4.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tim Pease
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-09 00:00:00 -06:00
17
+ date: 2010-06-21 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -163,6 +163,7 @@ files:
163
163
  - spec/data/default/NAME/NAME.rb.bns
164
164
  - spec/data/default/README.txt.bns
165
165
  - spec/data/default/Rakefile.bns
166
+ - spec/data/default/bin/NAME.bns
166
167
  - spec/data/default/lib/NAME.rb.bns
167
168
  - spec/data/foo/README.txt
168
169
  - spec/data/foo/Rakefile