allen 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/allen/project.rb CHANGED
@@ -47,8 +47,6 @@ module Allen
47
47
  end
48
48
  end
49
49
 
50
- private
51
-
52
50
  def generate_meta_data!
53
51
  #create a version file with the time and the latest git commit
54
52
  version_file = File.open("#{settings.webroot}/version","w")
@@ -14,7 +14,7 @@ module Allen
14
14
  task :default => :build
15
15
 
16
16
  desc "Build the solution in debug mode and compile all assets"
17
- task :build => ['assets:build', 'solution:msbuild']
17
+ task :build => ['solution:msbuild'] + projects.map { |project| "#{project.name.downcase}:build" }
18
18
 
19
19
  namespace :solution do
20
20
  desc "Build the solution with a chosen configuration"
data/lib/allen/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Allen
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -2,6 +2,34 @@ require 'allen'
2
2
  require 'allen/project'
3
3
 
4
4
  describe Allen::Project do
5
+
6
+ describe "#build!" do
7
+ it "builds the assets and generates the meta data" do
8
+ project = Allen::Project.new
9
+ assets = stub(:assets, :build => stub)
10
+ project.stub(:assets).and_return(assets)
11
+ project.stub(:generate_meta_data!)
12
+ assets.should_receive(:build!)
13
+ project.build!
14
+ end
15
+ end
16
+
17
+ describe "#generate_meta_data!" do
18
+ it "writes the version and hash files" do
19
+ project = Allen::Project.new
20
+
21
+ version_file = stub(:version_file, :puts => stub)
22
+ File.should_receive(:open).with(project.settings.webroot + "/version", "w").and_return(version_file)
23
+ version_file.should_receive(:close)
24
+
25
+ hash_file = stub(:hash_file, :print => stub)
26
+ File.should_receive(:open).with(project.settings.webroot + "/commit-hash", "w").and_return(hash_file)
27
+ hash_file.should_receive(:close)
28
+
29
+ project.generate_meta_data!
30
+ end
31
+ end
32
+
5
33
  describe "settings" do
6
34
  it "has good defaults" do
7
35
  project = Allen::Project.new
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'stringio'
2
+
1
3
  def sh(*args)
2
4
  end
3
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-16 00:00:00.000000000 Z
13
+ date: 2013-04-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor
@@ -251,7 +251,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
251
251
  version: '0'
252
252
  segments:
253
253
  - 0
254
- hash: 2739138692409483158
254
+ hash: 2693480632637319814
255
255
  required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  none: false
257
257
  requirements:
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  version: '0'
261
261
  segments:
262
262
  - 0
263
- hash: 2739138692409483158
263
+ hash: 2693480632637319814
264
264
  requirements: []
265
265
  rubyforge_project:
266
266
  rubygems_version: 1.8.23