physique 0.3.8 → 0.3.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd5d01a34a1dc0a0f36d827ac39e6fa2cc367412
4
- data.tar.gz: f7a64795188d5d464c4ed3579cd3d4e5fe63202c
3
+ metadata.gz: 0ebddd1e978be2218f39daeca27d35294a65d4ae
4
+ data.tar.gz: 3c82938587886212d474637142747a468f520426
5
5
  SHA512:
6
- metadata.gz: 775504a6636e2d1c166b6c4d06635e5584707dea7e08fe0d36d6b17c5951dec06b4f4e6780b45e48e4ff55970595b81cd4a341af2cc76ca4f1bf9dea7614e842
7
- data.tar.gz: eef6a82f55f29fc077b9e2c5442bc780881d55cb0e23474fcfcb8a577b372bc99cd05a9c83e1ae96401185b77950f2ea1cf155f549754258f8332f4b01dd35da
6
+ metadata.gz: c7c677c016bc121f71ba0c636692a984ccc52382d6c9903321751a1fa0372854f6a1f640077742563244fabd6aed73c91a566cf84bbc1dbc03935a9b640015f7
7
+ data.tar.gz: c3c0c5a50b01481f01214d6ddf0ab1500f3c4a625853edf6b0def3d33846904362f949578aebd1ce365499034acc593e7eb20b9df335e71440a610a6c55090fc
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Physique - Beautiful builds for .NET
2
2
 
3
- Physique is an opinionated build framework that allows you to create a professional build process for your solution with minimal configuration. You tell physique a little about your solution, and it creates a complete set of rake tasks to build, test and package your apps for deployment.
3
+ Physique is an opinionated build framework that allows you to create a professional build process for your solution with minimal configuration. You tell Physique a little about your solution, and it creates a complete set of rake tasks to build, test and package your apps for deployment.
4
4
 
5
5
  ## Features
6
6
 
@@ -60,7 +60,7 @@ If your project doesn't look anything like this, don't worry, you can customize
60
60
  $ bundle install
61
61
  ```
62
62
 
63
- * Physique uses the [semver2](https://github.com/haf/semver) gem to manage the version your solution. Use the included command line tool to create a `.semver` file for the solution.
63
+ * Physique uses the [semver2](https://github.com/haf/semver) gem to manage the version of your solution. Use the included command line tool to create a `.semver` file for the solution.
64
64
 
65
65
  ```
66
66
  $ bundle exec semver init
@@ -180,7 +180,7 @@ Physique::Solution.new do |s|
180
180
 
181
181
  s.run_tests do |t|
182
182
  # Find all assemblies ending in '.Tests'
183
- t.files = FileList["**/*.Tests/bin/#{configuration}/*.Tests.dll"]
183
+ t.files = FileList["**/*.Tests/bin/Release/*.Tests.dll"]
184
184
 
185
185
  # Default command line args
186
186
  t.parameters = ['/labels', '/trace=Verbose']
@@ -202,7 +202,7 @@ Physique::Solution.new do |s|
202
202
  t.runner = :nspec
203
203
 
204
204
  # The default method for finding NSpec assemblies
205
- t.files = FileList["**/*.Specs/bin/#{configuration}/*.Specs.dll"]
205
+ t.files = FileList["**/*.Specs/bin/Release/*.Specs.dll"]
206
206
 
207
207
  # You can add additional command line args
208
208
  t.parameters = ['--failfast']
@@ -222,7 +222,7 @@ s.run_tests do |t|
222
222
  t.exe = 'root-relative-path/to/the/test-runner.exe'
223
223
 
224
224
  # Specify the test assemblies
225
- t.files = FileList["**/*.Tests/bin/#{configuration}/*.Tests.dll"]
225
+ t.files = FileList["**/*.Tests/bin/Release/*.Tests.dll"]
226
226
 
227
227
  # Specify additional command line args
228
228
  t.parameters = ['/option1', '/option2']
@@ -351,6 +351,10 @@ rake octo:publish:web # Publish MyProject.Website app to ...
351
351
  * Optionally use [Packet](https://github.com/fsprojects/Paket) instead of NuGet during `restore` phase
352
352
  * Mono support is possible but completely untested.
353
353
 
354
+ ## Acknowledgements
355
+
356
+ Special thanks to [Henrik Feldt](https://github.com/haf) and [Amir Rajan](https://github.com/amirrajan) for the inspiration to make this project.
357
+
354
358
  ## Support
355
359
 
356
360
  Feel free to contact me [@scardetto](https://twitter.com/scardetto) if you have any questions.
@@ -86,6 +86,7 @@ module Physique
86
86
 
87
87
  def expand_project_config(db)
88
88
  project = Albacore::Project.new(db.project_file)
89
+ db[:project_namespace] = project.namespace
89
90
  db[:project_dir] = project.proj_path_base
90
91
  db[:scripts_dir] = "#{project.proj_path_base}/#{db.scripts_dir}"
91
92
 
@@ -134,7 +135,10 @@ module Physique
134
135
  def add_migrator_tasks(db)
135
136
  require 'physique/tasks/fluent_migrator'
136
137
 
137
- build :compile_db do |b|
138
+ # Compile just the database project.
139
+ # This task is registered as a dependency of the migration
140
+ # tasks to ensure the latest code is available.
141
+ build :compile_db => [ :restore ] do |b|
138
142
  b.target = [ 'Build' ]
139
143
  b.file = db.project_file
140
144
  b.prop 'Configuration', solution.compile.configuration
@@ -207,7 +211,7 @@ module Physique
207
211
  # Save the new migration file
208
212
  version = migration_version
209
213
  migration_file_name = "#{version}_#{name}.cs"
210
- migration_content = migration_template(version, name, description, db.project)
214
+ migration_content = migration_template(version, name, description, db.project_namespace)
211
215
  save_file migration_content, "#{db.project_dir}/Migrations/#{migration_file_name}"
212
216
 
213
217
  # Add the new migration file to the project
@@ -222,12 +226,12 @@ module Physique
222
226
  Time.now.utc.strftime('%Y%m%d%H%M%S')
223
227
  end
224
228
 
225
- def migration_template(version, name, description, project_name)
229
+ def migration_template(version, name, description, project_namespace)
226
230
  description = ", \"#{description}\"" unless description.nil?
227
231
  return <<TEMPLATE
228
232
  using FluentMigrator;
229
233
 
230
- namespace #{project_name}.Migrations
234
+ namespace #{project_namespace}.Migrations
231
235
  {
232
236
  [Migration(#{version}#{description})]
233
237
  public class #{name} : Migration
@@ -1,3 +1,3 @@
1
1
  module Physique
2
- VERSION = '0.3.8'
2
+ VERSION = '0.3.9'
3
3
  end
@@ -24,6 +24,26 @@ describe 'fluent-migrator' do
24
24
  it 'should rebuild the database' do
25
25
  rake['db:rebuild'].invoke
26
26
  end
27
+
28
+ describe 'when creating migrations' do
29
+ let(:project_folder) { "Basic.Migrations" }
30
+ let(:project_file) { "#{project_folder}/Basic.Migrations.csproj" }
31
+ let!(:project_file_contents) { File.read(project_file) }
32
+
33
+ it 'should create a new migration' do
34
+ rake['db:new_migration'].invoke 'TestMigration', 'Test migration description'
35
+ end
36
+
37
+ after do
38
+ # Delete the created migrations files
39
+ FileUtils.rm_rf Dir.glob("#{project_folder}/Migrations/*")
40
+
41
+ # Restore the project file to it's original state
42
+ open(project_file, 'w') do |f|
43
+ f.puts project_file_contents
44
+ end
45
+ end
46
+ end
27
47
  end
28
48
 
29
49
  describe 'multiple-fluent-migrator' do
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0" DefaultTargets="Build">
3
3
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
4
  <PropertyGroup>
5
5
  <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -53,6 +53,9 @@
53
53
  <ItemGroup>
54
54
  <None Include="packages.config" />
55
55
  </ItemGroup>
56
+ <ItemGroup>
57
+ <Folder Include="Migrations\" />
58
+ </ItemGroup>
56
59
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
57
60
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
58
61
  Other similar extension points exist, see Microsoft.Common.targets.
@@ -61,4 +64,4 @@
61
64
  <Target Name="AfterBuild">
62
65
  </Target>
63
66
  -->
64
- </Project>
67
+ </Project>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: physique
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Scaduto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler