logirel 0.0.15 → 0.0.17

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.
Files changed (68) hide show
  1. data/.idea/.name +1 -0
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/dictionaries/xyz.xml +3 -0
  4. data/.idea/encodings.xml +5 -0
  5. data/.idea/inspectionProfiles/Project_Default.xml +11 -0
  6. data/.idea/inspectionProfiles/profiles_settings.xml +7 -0
  7. data/.idea/logirel.iml +65 -0
  8. data/.idea/misc.xml +8 -0
  9. data/.idea/modules.xml +9 -0
  10. data/.idea/vcs.xml +7 -0
  11. data/.idea/workspace.xml +666 -0
  12. data/.semver +1 -1
  13. data/README.md +36 -36
  14. data/Rakefile.rb +0 -1
  15. data/lib/logirel/Initer.rb +103 -150
  16. data/lib/logirel/cli.rb +64 -63
  17. data/lib/logirel/cli_helper.rb +86 -0
  18. data/lib/logirel/queries/bool_q.rb +34 -0
  19. data/lib/logirel/queries/query.rb +7 -0
  20. data/lib/logirel/queries/str_q.rb +36 -0
  21. data/lib/logirel/queries.rb +2 -0
  22. data/lib/logirel/tasks/albacore_tasks.rb +15 -0
  23. data/lib/logirel/tasks/aspnet.rb +23 -0
  24. data/lib/logirel/tasks/assembly_info.rb +15 -0
  25. data/lib/logirel/tasks/core.rb +36 -0
  26. data/lib/logirel/tasks/ncover.rb +23 -0
  27. data/lib/logirel/tasks/nuget.rb +17 -0
  28. data/lib/logirel/tasks/nunit.rb +14 -0
  29. data/lib/logirel/tasks/nuspec.rb +4 -0
  30. data/lib/logirel/tasks/output.rb +4 -0
  31. data/lib/logirel/tasks/xunit.rb +15 -0
  32. data/lib/logirel/tasks/zip.rb +4 -0
  33. data/lib/logirel/templates/Gemfile.tt +6 -0
  34. data/lib/logirel/templates/Rakefile.tt +9 -0
  35. data/lib/logirel/templates/environment.tt +114 -0
  36. data/lib/logirel/templates/gitignore.tt +6 -0
  37. data/lib/logirel/templates/paths.tt +40 -0
  38. data/lib/logirel/templates/project_details.tt +5 -0
  39. data/{content/utils.rb → lib/logirel/templates/utils.tt} +1 -1
  40. data/lib/logirel/utils.rb +8 -0
  41. data/lib/logirel/version.rb +2 -10
  42. data/lib/logirel/vs/environment.rb +22 -0
  43. data/lib/logirel/vs/project_types.rb +27 -0
  44. data/lib/logirel/vs/solution.rb +113 -0
  45. data/lib/logirel.rb +2 -9
  46. data/logirel.gemspec +8 -5
  47. data/spec/queries/bool_query_spec.rb +32 -27
  48. data/spec/queries/string_query_spec.rb +57 -53
  49. data/spec/support/with_sample_projects.rb +3 -3
  50. data/spec/version_spec.rb +2 -3
  51. data/vendor/cache/albacore-0.2.6.gem +0 -0
  52. data/vendor/cache/nokogiri-1.4.6-x86-mingw32.gem +0 -0
  53. data/vendor/cache/semver-1.0.6.gem +0 -0
  54. metadata +75 -38
  55. data/content/environment.rb +0 -82
  56. data/lib/logirel/NuGet.rb +0 -8
  57. data/lib/logirel/details_emitter.rb +0 -0
  58. data/lib/logirel/q_model.rb +0 -65
  59. data/lib/logirel/querier.rb +0 -8
  60. data/spec/dependencies/nuget_spec.rb +0 -10
  61. data/spec/filesystem/filestructure_spec.rb +0 -56
  62. data/spec/filesystem/path_init_spec.rb +0 -35
  63. data/spec/filesystem/rakefile_init_spec.rb +0 -32
  64. data/spec/initer_spec.rb +0 -29
  65. data/spec/queries/querier_spec.rb +0 -45
  66. data/vendor/cache/albacore-0.2.5.gem +0 -0
  67. data/vendor/cache/rubyzip-0.9.4.gem +0 -0
  68. data/vendor/cache/semver-1.0.5.gem +0 -0
@@ -1,56 +0,0 @@
1
- require 'logirel/initer'
2
- require 'logirel/version'
3
- require 'logirel/nuget'
4
- require 'logirel/initer'
5
- require 'construct'
6
- require 'FileUtils'
7
- require File.dirname(__FILE__) + '/../support/with_sample_projects'
8
- include Logirel
9
-
10
- describe Initer, "setting up folder structure" do
11
-
12
- before(:each) do
13
- @tmp = "fs-" + rand().to_s
14
- @tmp_bs = "buildscripts"
15
- Dir.mkdir(@tmp)
16
- @r = Initer.new(@tmp, @tmp_bs)
17
- @r.create_structure
18
- @bs = File.join(@r.root_path, @r.buildscripts_path)
19
- end
20
-
21
- subject { @r }
22
-
23
- after(:each) do
24
- FileUtils.rm_rf(@tmp) while Dir.exists?(@tmp)
25
- end
26
-
27
- it { should respond_to :root_path }
28
-
29
- context "when we have an existing project" do
30
- before {
31
- abc_projects(@r.root_path)
32
- }
33
- it "initer should correctly parse the names of existing projects" do
34
- @r.parse_folders.should =~ ['A', 'C']
35
- end
36
- end
37
-
38
- it "should create the correct folder structure" do
39
- @r.create_structure
40
- Dir.exists?(@bs).should be_true
41
- Dir.exists?(File.join(@tmp, "src")).should be_true
42
- end
43
-
44
- it "should create environment.rb" do
45
- @r.init_environement_rb
46
- File.exists?(File.join(@bs, "environment.rb")).should be_true
47
- end
48
-
49
- it "should create project_details.rb" do
50
- @r.init_project_details([{
51
- :ruby_key => "p_ruby",
52
- :dir => "p_dir"
53
- }])
54
- File.exists?(File.join(@bs, "project_details.rb")).should be_true
55
- end
56
- end
@@ -1,35 +0,0 @@
1
- # require 'logirel/initer'
2
- # require 'logirel/version'
3
- # require 'logirel/nuget'
4
- # require 'logirel/initer'
5
- # require 'construct'
6
- # require 'FileUtils'
7
-
8
- # describe Logirel::Initer, "when initilizing paths file" do
9
- # pending "too much of an integration test now"
10
-
11
- # before(:each) do
12
- # @tmp = "fs-" + rand().to_s
13
- # @tmp_bs = "buildscripts"
14
- # Dir.mkdir(@tmp)
15
- # @r = Logirel::Initer.new(@tmp, @tmp_bs)
16
- # @r.create_structure
17
- # @bs = File.join(@r.root_path, @r.buildscripts_path)
18
- # end
19
-
20
- # subject { @r }
21
-
22
- # after(:each) do
23
- # FileUtils.rm_rf(@tmp) while Dir.exists?(@tmp)
24
- # end
25
-
26
- # it "should be created" do
27
- # @r.init_paths_rb({
28
- # :dir => "p_dir",
29
- # :ruby_key => "p_ruby_key",
30
- # :id => "p_id"
31
- # })
32
- # File.exists?(File.join(@bs, "paths.rb")).should be_true
33
- # end
34
-
35
- # end
@@ -1,32 +0,0 @@
1
- require 'logirel/initer'
2
- require 'logirel/version'
3
- require 'logirel/nuget'
4
- require 'logirel/initer'
5
- require 'construct'
6
- require 'FileUtils'
7
-
8
- describe Logirel::Initer, "when initilizing rake file" do
9
-
10
- before(:each) do
11
- @tmp = "fs-" + rand().to_s
12
- @tmp_bs = "buildscripts"
13
- Dir.mkdir(@tmp)
14
- @r = Logirel::Initer.new(@tmp, @tmp_bs)
15
- @r.create_structure
16
- @bs = File.join(@r.root_path, @r.buildscripts_path)
17
- end
18
-
19
- subject { @r }
20
-
21
- after(:each) do
22
- FileUtils.rm_rf(@tmp) while Dir.exists?(@tmp)
23
- end
24
-
25
- it "should be created" do
26
- @r.init_rakefile({
27
- :ruby_key => "p_ruby_key",
28
- :test2 => "p_test2"
29
- })
30
- File.exists?(File.join(@bs, "Rakefile.rb")).should be_true
31
- end
32
- end
data/spec/initer_spec.rb DELETED
@@ -1,29 +0,0 @@
1
- require 'logirel/initer'
2
- require 'logirel/version'
3
- require 'logirel/nuget'
4
- require 'logirel/initer'
5
- require 'construct'
6
- require 'FileUtils'
7
-
8
- describe Logirel::Initer, "when starting a new project" do
9
-
10
- before(:each) do
11
- include Construct::Helpers
12
- @i = Logirel::Initer.new
13
- end
14
-
15
- after(:each) do
16
- Construct.destroy_all!
17
- end
18
-
19
- it "should run the right commands" do
20
- cmds = @i.get_commands
21
- cmds.include?("semver init").should be_true
22
- end
23
-
24
- it "should be able to know when to download from codeplex" do
25
- @i.nuget_from_codeplex([1,3], [1,1]).should == true
26
- @i.nuget_from_codeplex([1,3], [1,4]).should == false
27
- end
28
-
29
- end
@@ -1,45 +0,0 @@
1
- require 'logirel/querier'
2
- require File.dirname(__FILE__) + '/../support/with_sample_projects'
3
-
4
- describe Logirel::Querier, "when getting available directories and having querier return the correct data structures" do
5
-
6
- before(:each) do
7
- @q = Logirel::Querier.new
8
- end
9
-
10
- it "should create a query for every project folder" do
11
- with_sample_projects do |construct|
12
- r = Logirel::Initer.new(construct)
13
- folders = r.parse_folders
14
- qs = @q.include_package_for(folders)
15
- qs.length.should >= 2
16
- qs.each do |q|
17
- folders.any? do |f|
18
- q.question.include? "'#{f}'"
19
- end
20
- end
21
- end
22
- end
23
-
24
- it "should not create a query for those project folders without *proj files" do
25
- with_sample_projects do |construct|
26
- # given
27
- r = Logirel::Initer.new(construct)
28
- folders = r.parse_folders
29
- # then
30
- @q.include_package_for(folders).map{|q| q.question }.
31
- each{ |str| str.include?("'B'").should be_false }
32
- end
33
- end
34
-
35
- it "should return two strings when two questions are asked" do
36
- with_sample_projects do |construct|
37
- # given
38
- r = Logirel::Initer.new(construct)
39
- folders = r.parse_folders
40
- # then
41
- qs = @q.include_package_for(folders)
42
- qs.length.should eq(2)
43
- end
44
- end
45
- end
Binary file
Binary file
Binary file