raykit 0.0.493 → 0.0.495
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/auto_setup.rb +8 -0
- data/lib/raykit/dotnet.rb +10 -28
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a40e336c83089a0f92ad84e730d6530475300ac71b29f6f77fa73ee2edb77a79
|
4
|
+
data.tar.gz: 22fdff76f546a31f00e9d0406a5da42f7ceb250801dd39ba9708a0accadb829b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 472716f0b6e66a91f5abf1a2e47b992bc7a6bb5e5e6e266c61df49158298e16e8c16fbe971a6fa48adcd1dcc8a65f063e16c41df34ac75f276f100da0647e47b
|
7
|
+
data.tar.gz: 98e51ce4e62beeba7bccf8b5591ed31da987b6500fdb2148a6196d1d5ae9d93cd767a60fc976db4beeba85f039b16c392620bea3fb2f096002a11bf9c71c7cde
|
data/lib/raykit/auto_setup.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Raykit
|
2
2
|
class AutoSetup
|
3
3
|
def self.run
|
4
|
+
PROJECT.set_version(VERSION) if (defined?(VERSION))
|
4
5
|
# Default subdirectories
|
5
6
|
DEFAULT_SUBDIRECTORIES.each do |subdirectory|
|
6
7
|
puts " RAYKIT_AUTO_SETUP: creating #{subdirectory}" unless Dir.exist?(subdirectory)
|
@@ -39,6 +40,13 @@ module Raykit
|
|
39
40
|
end
|
40
41
|
end
|
41
42
|
|
43
|
+
# WPF example apps
|
44
|
+
if (defined?(RAYKIT_WPF_EXAMPLE_APPS))
|
45
|
+
RAYKIT_WPF_EXAMPLE_APPS.each do |app|
|
46
|
+
Raykit::DotNet::initialize_csharp_wpf_example app
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
42
50
|
# count the number of projects in the current directory
|
43
51
|
project_count = Dir.glob("**/*.csproj").length
|
44
52
|
Raykit::DotNet::create_solution(PROJECT.name) if (project_count > 0)
|
data/lib/raykit/dotnet.rb
CHANGED
@@ -81,65 +81,41 @@ module Raykit
|
|
81
81
|
|
82
82
|
# initialize a C# library
|
83
83
|
def self.initialize_csharp_lib(name)
|
84
|
-
# create the solution
|
85
|
-
#puts " creating #{name}.sln" unless File.exist?("#{name}.sln")
|
86
|
-
#PROJECT.run("dotnet new sln --name #{name}") unless File.exist?("#{name}.sln")
|
87
84
|
# create the library
|
88
85
|
puts " creating src/#{name}/#{name}.csproj" unless File.exist?("src/#{name}/#{name}.csproj")
|
89
86
|
PROJECT.run("dotnet new classlib -lang C# --name #{name} --output src/#{name}") unless File.exist?("src/#{name}/#{name}.csproj")
|
90
|
-
#PROJECT.run("dotnet sln #{name}.sln add src/#{name}/#{name}.csproj") unless File.exist?("src/#{name}/#{name}.csproj")
|
91
87
|
# create the test
|
92
88
|
puts " creating test/#{name}.Test/#{name}.Test.csproj" unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
93
89
|
PROJECT.run("dotnet new nunit -lang C# --name #{name}.Test --output test/#{name}.Test") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
94
|
-
#PROJECT.run("dotnet sln #{name}.sln add test/#{name}.Test/#{name}.Test.csproj") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
95
90
|
PROJECT.run("dotnet add test/#{name}.Test/#{name}.Test.csproj reference src/#{name}/#{name}.csproj") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
96
|
-
# create a blazor server example
|
97
|
-
#PROJECT.run("dotnet new blazorserver -lang C# --name #{name}.BlazorServer --output examples/#{name}.BlazorServer") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
98
|
-
#PROJECT.run("dotnet sln #{name}.sln add examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
99
|
-
P #ROJECT.run("dotnet add examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj reference src/#{name}/#{name}.csproj") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
100
91
|
# generate project folders
|
101
92
|
["Interfaces", "Extensions", "Models"].each do |folder|
|
102
93
|
FileUtils.mkdir_p("src/#{name}/#{folder}") unless Dir.exist?("src/#{name}/#{folder}")
|
103
94
|
FileUtils.mkdir_p("test/#{name}.Test/#{folder}") unless Dir.exist?("test/#{name}.Test/#{folder}")
|
104
|
-
#FileUtils.mkdir_p("examples/#{name}.BlazorServer/#{folder}") unless Dir.exist?("examples/#{name}.BlazorServer/#{folder}")
|
105
95
|
end
|
106
96
|
end
|
107
97
|
|
108
98
|
# initialize a C# razor class library
|
109
99
|
def self.initialize_csharp_razorclasslib(name)
|
110
|
-
# create the solution
|
111
|
-
#puts " creating #{name}.sln" unless File.exist?("#{name}.sln")
|
112
|
-
#PROJECT.run("dotnet new sln --name #{name}") unless File.exist?("#{name}.sln")
|
113
100
|
# create the library
|
114
101
|
puts " creating src/#{name}/#{name}.csproj" unless File.exist?("src/#{name}/#{name}.csproj")
|
115
102
|
PROJECT.run("dotnet new razorclasslib -lang C# --name #{name} --output src/#{name}") unless File.exist?("src/#{name}/#{name}.csproj")
|
116
|
-
#PROJECT.run("dotnet sln #{name}.sln add src/#{name}/#{name}.csproj") unless File.exist?("src/#{name}/#{name}.csproj")
|
117
103
|
# create the test
|
118
104
|
puts " creating test/#{name}.Test/#{name}.Test.csproj" unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
119
105
|
PROJECT.run("dotnet new nunit -lang C# --name #{name}.Test --output test/#{name}.Test") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
120
|
-
#PROJECT.run("dotnet sln #{name}.sln add test/#{name}.Test/#{name}.Test.csproj") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
121
106
|
PROJECT.run("dotnet add test/#{name}.Test/#{name}.Test.csproj reference src/#{name}/#{name}.csproj") unless File.exist?("test/#{name}.Test/#{name}.Test.csproj")
|
122
|
-
# create a blazor server example
|
123
|
-
#PROJECT.run("dotnet new blazorserver -lang C# --name #{name}.BlazorServer --output examples/#{name}.BlazorServer") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
124
|
-
#PROJECT.run("dotnet sln #{name}.sln add examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
125
|
-
#PROJECT.run("dotnet add examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj reference src/#{name}/#{name}.csproj") unless File.exist?("examples/#{name}.BlazorServer/#{name}.BlazorServer.csproj")
|
126
107
|
# generate project folders
|
127
108
|
["Interfaces", "Extensions", "Models", "Components", "Controllers"].each do |folder|
|
128
109
|
FileUtils.mkdir_p("src/#{name}/#{folder}") unless Dir.exist?("src/#{name}/#{folder}")
|
129
110
|
FileUtils.mkdir_p("test/#{name}.Test/#{folder}") unless Dir.exist?("test/#{name}.Test/#{folder}")
|
130
|
-
#FileUtils.mkdir_p("examples/#{name}.BlazorServer/#{folder}") unless Dir.exist?("examples/#{name}.BlazorServer/#{folder}")
|
131
111
|
end
|
132
112
|
end
|
133
113
|
|
134
114
|
# initialize a C# blazor server application
|
135
115
|
def self.initialize_csharp_blazorserver(name)
|
136
|
-
# create the solution
|
137
|
-
#puts " creating #{name}.sln" unless File.exist?("#{name}.sln")
|
138
|
-
#PROJECT.run("dotnet new sln --name #{name}") unless File.exist?("#{name}.sln")
|
139
116
|
# create the blazor server application
|
140
117
|
puts " creating src/#{name}/#{name}.csproj" unless File.exist?("src/#{name}/#{name}.csproj")
|
141
118
|
PROJECT.run("dotnet new blazorserver -lang C# --name #{name} --output src/#{name}") unless File.exist?("src/#{name}/#{name}.csproj")
|
142
|
-
#PROJECT.run("dotnet sln #{name}.sln add src/#{name}/#{name}.csproj")
|
143
119
|
# generate project folders
|
144
120
|
["Interfaces", "Extensions", "Models", "Components", "Controllers"].each do |folder|
|
145
121
|
FileUtils.mkdir_p("src/#{name}/#{folder}") unless Dir.exist?("src/#{name}/#{folder}")
|
@@ -148,13 +124,19 @@ module Raykit
|
|
148
124
|
|
149
125
|
# initialize a C# blazor server example application
|
150
126
|
def self.initialize_csharp_blazorserver_example(name)
|
151
|
-
# create the solution
|
152
|
-
#puts " creating #{name}.sln" unless File.exist?("#{name}.sln")
|
153
|
-
#PROJECT.run("dotnet new sln --name #{name}") unless File.exist?("#{name}.sln")
|
154
127
|
# create the blazor server application
|
155
128
|
puts " creating examples/#{name}/#{name}.csproj" unless File.exist?("examples/#{name}/#{name}.csproj")
|
156
129
|
PROJECT.run("dotnet new blazorserver -lang C# --name #{name} --output examples/#{name}") unless File.exist?("examples/#{name}/#{name}.csproj")
|
157
|
-
#
|
130
|
+
# generate project folders
|
131
|
+
["Interfaces", "Extensions", "Models", "Components", "Controllers"].each do |folder|
|
132
|
+
FileUtils.mkdir_p("examples/#{name}/#{folder}") unless Dir.exist?("examples/#{name}/#{folder}")
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.initialize_csharp_wpf_example(name)
|
137
|
+
# create the wpf application
|
138
|
+
puts " creating examples/#{name}/#{name}.csproj" unless File.exist?("examples/#{name}/#{name}.csproj")
|
139
|
+
PROJECT.run("dotnet new wpf -lang C# --name #{name} --output examples/#{name}") unless File.exist?("examples/#{name}/#{name}.csproj")
|
158
140
|
# generate project folders
|
159
141
|
["Interfaces", "Extensions", "Models", "Components", "Controllers"].each do |folder|
|
160
142
|
FileUtils.mkdir_p("examples/#{name}/#{folder}") unless Dir.exist?("examples/#{name}/#{folder}")
|