minke-generator-netmvc 0.1.0 → 0.8.0

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: 6eb4b5d8385a79c2ea372c961e857341deeec5ac
4
- data.tar.gz: d94cefb86923bce6c741d17d4d5a80d71062fe50
3
+ metadata.gz: c8612be651b05fe26554839dad967b898a291e50
4
+ data.tar.gz: a2ced9f84409b2015923f1aea1220578eb572e4f
5
5
  SHA512:
6
- metadata.gz: d5233f56e627266c613ad66d8c312490a2d1f2375533f305e7e9910d1454fdd69d12b924f8cbc3b7130e489b429382deb4d38ac12ecbd1ac64bd974c0e2e2940
7
- data.tar.gz: 42a493d34840eba6b1449b404f9a8d0811b25af331e938468a68110517f29c48bd4ad95bc615a5afaf3c4707394b0cdc36757f5a020495a57a3d9a8aa8578518
6
+ metadata.gz: c3e7af3aff9b2cd0aab50ac50f8fb257b16d961c65586456daeaf86ba020ab4be94f42a0aecb6b27882b587a3e61177a5a829c56042135f5f8f1adf980b68a42
7
+ data.tar.gz: e5a89aff70cb64121224494aecd52918c74d4c29eadee9202d7bf80fbfba974fec26a8cbd7c90acaeb426336c6b263839fa206932a07c929ae1bab4a3b43bfc1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minke-generator-netmvc (0.1.0)
4
+ minke-generator-netmvc (0.8.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -42,9 +42,9 @@ GEM
42
42
  addressable (~> 2.3.8)
43
43
  jsonpath (0.5.8)
44
44
  multi_json
45
- mime-types (2.99.1)
45
+ mime-types (2.99.2)
46
46
  mini_portile2 (2.0.0)
47
- minke (1.0.1)
47
+ minke (1.0.6)
48
48
  colorize
49
49
  consul_loader (~> 1.0)
50
50
  cucumber
@@ -14,15 +14,15 @@ module Minke
14
14
  config.build_settings = Minke::Generators::BuildSettings.new
15
15
 
16
16
  config.build_settings.build_commands = Minke::Generators::BuildCommands.new.tap do |bc|
17
- bc.fetch = [['/bin/bash', '-c', 'dotnet restore --packages ./.nuget']]
18
- bc.build = [['/bin/bash', '-c', 'NUGET_PACKAGES=./.nuget dotnet build']]
19
- bc.test = [['/bin/bash', '-c', 'NUGET_PACKAGES=./.nuget dotnet test']]
17
+ bc.fetch = [['/bin/bash', '-c', 'dotnet restore --packages .nuget']]
18
+ bc.test = [['/bin/bash', '-c', 'NUGET_PACKAGES=.nuget dotnet test']]
19
+ bc.build = [['/bin/bash', '-c', 'rm -rf bin && rm -rf obj && NUGET_PACKAGES=.nuget dotnet build -c Release']]
20
20
  end
21
21
 
22
22
  config.build_settings.docker_settings = Minke::Generators::DockerSettings.new.tap do |bs|
23
23
  bs.image = 'microsoft/dotnet:latest'
24
- bs.binds = ["<%= src_root %>:/src"]
25
- bs.working_directory = '/src' # working directory is added via a class patch to enable lazy load
24
+ bs.binds = ["<%= src_root %>/src:/<%= application_name %>"]
25
+ bs.working_directory = '/<%= application_name %>' # working directory is added via a class patch to enable lazy load
26
26
  end
27
27
 
28
28
  Minke::Generators.register config
@@ -0,0 +1,45 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": ".NET Core Launch (console)",
6
+ "type": "coreclr",
7
+ "request": "launch",
8
+ "preLaunchTask": "build",
9
+ "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/<%= application_name %>.dll",
10
+ "args": [],
11
+ "cwd": "${workspaceRoot}",
12
+ "stopAtEntry": false
13
+ },
14
+ {
15
+ "name": ".NET Core Launch (web)",
16
+ "type": "coreclr",
17
+ "request": "launch",
18
+ "preLaunchTask": "build",
19
+ "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/<%= application_name %>.dll",
20
+ "args": [],
21
+ "cwd": "${workspaceRoot}",
22
+ "stopAtEntry": false,
23
+ "launchBrowser": {
24
+ "enabled": true,
25
+ "args": "${auto-detect-url}",
26
+ "windows": {
27
+ "command": "cmd.exe",
28
+ "args": "/C start ${auto-detect-url}"
29
+ },
30
+ "osx": {
31
+ "command": "open"
32
+ },
33
+ "linux": {
34
+ "command": "xdg-open"
35
+ }
36
+ }
37
+ },
38
+ {
39
+ "name": ".NET Core Attach",
40
+ "type": "coreclr",
41
+ "request": "attach",
42
+ "processName": "<example>"
43
+ }
44
+ ]
45
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version": "0.1.0",
5
+ "command": "dotnet",
6
+ "isShellCommand": true,
7
+ "args": [],
8
+ "tasks": [
9
+ {
10
+ "taskName": "build",
11
+ "args": [ ],
12
+ "isBuildCommand": true,
13
+ "showOutput": "silent",
14
+ "problemMatcher": "$msCompile"
15
+ }
16
+ ]
17
+ }
@@ -13,7 +13,7 @@ namespace <%= namespace %>.Controllers
13
13
  [HttpGet]
14
14
  public HealthResponse Get()
15
15
  {
16
- return new HealthResponse { Status = "ok" };
16
+ return new HealthResponse { Status = "OK" };
17
17
  }
18
18
  }
19
19
  }
@@ -17,6 +17,7 @@ namespace <%= namespace %>
17
17
  .UseContentRoot(Directory.GetCurrentDirectory())
18
18
  .UseIISIntegration()
19
19
  .UseStartup<Startup>()
20
+ .UseUrls("http://0.0.0.0:5000")
20
21
  .Build();
21
22
 
22
23
  host.Run();
@@ -28,7 +28,10 @@ namespace <%= namespace %>
28
28
  public void ConfigureServices(IServiceCollection services)
29
29
  {
30
30
  // Add framework services.
31
- services.AddMvc();
31
+ services.AddMvc().AddJsonOptions(options =>
32
+ {
33
+ options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
34
+ });
32
35
  }
33
36
 
34
37
  // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -4,8 +4,8 @@ gem "rake"
4
4
  gem 'cucumber-api', '~> 0.3'
5
5
  gem 'nokogiri'
6
6
 
7
- #gem 'minke'
8
- #gem 'minke-generator-go'
7
+ gem 'minke'
8
+ gem 'minke-generator-netmvc'
9
9
 
10
- gem 'minke', :path => '/Users/nicj/Developer/gems/minke'
11
- gem 'minke-generator-netmvc', :path => '/Users/nicj/Developer/gems/minke-generator-netmvc'
10
+ #gem 'minke', :path => '/Users/nicj/Developer/gems/minke'
11
+ #gem 'minke-generator-netmvc', :path => '/Users/nicj/Developer/gems/minke-generator-netmvc'
@@ -18,16 +18,16 @@ build:
18
18
  copy:
19
19
  -
20
20
  from: '../bin'
21
- to: './dockerfile/<%= application_name %>/bin'
21
+ to: './dockerfile/<%= application_name %>'
22
22
  -
23
23
  from: '../.nuget'
24
- to: './dockerfile/<%= application_name %>/.nuget'
24
+ to: './dockerfile/<%= application_name %>'
25
25
  -
26
26
  from: '../project.json'
27
- to: './dockerfile/<%= application_name %>/project.json'
27
+ to: './dockerfile/<%= application_name %>'
28
28
  -
29
29
  from: '../web.config'
30
- to: './dockerfile/<%= application_name %>/web.config'
30
+ to: './dockerfile/<%= application_name %>'
31
31
  -
32
32
  from: './swagger_spec/swagger.yml'
33
33
  to: './dockerfile/<%= application_name %>/swagger_spec'
@@ -32,5 +32,7 @@ ADD .nuget /<%= application_name %>/.nuget
32
32
  ADD web.config /<%= application_name %>/web.config
33
33
  ADD project.json /<%= application_name %>/project.json
34
34
 
35
+ WORKDIR /<%= application_name %>
36
+
35
37
  ENTRYPOINT ["/bin/s6-svscan","/etc/s6"]
36
38
  CMD []
@@ -1,3 +1,5 @@
1
1
  #!/bin/bash
2
2
 
3
+ cd /<%= application_name %>
4
+ export NUGET_PACKAGES=.nuget
3
5
  exec dotnet run
@@ -1,3 +1,3 @@
1
1
  #!/bin/bash
2
2
 
3
- exec /bin/consul-template -consul=$CONSUL -template "/<%= application_name %>/appsettings.ctmpl:/<%= application_name %>/appsettings.json:killall <%= application_name %>"
3
+ exec /bin/consul-template -consul=$CONSUL -template "/<%= application_name %>/appsettings.ctmpl:/<%= application_name %>/appsettings.json:pkill dotnet"
@@ -11,4 +11,4 @@ Scenario: Health check returns ok
11
11
  Given I send and accept JSON
12
12
  When I send a GET request to the api endpoint "/v1/health"
13
13
  Then the response status should be "200"
14
- And the JSON response should have key "status_message"
14
+ And the JSON response should have key "status"
@@ -1,7 +1,7 @@
1
1
  module Minke
2
2
  module Generators
3
3
  module NetMVC
4
- VERSION = "0.1.0"
4
+ VERSION = "0.8.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minke-generator-netmvc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nic Jackson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-21 00:00:00.000000000 Z
11
+ date: 2016-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,8 @@ files:
74
74
  - bin/setup
75
75
  - lib/generators/netmvc.rb
76
76
  - lib/generators/netmvc/scaffold/.gitignore.erb
77
+ - lib/generators/netmvc/scaffold/.vscode/launch.json.erb
78
+ - lib/generators/netmvc/scaffold/.vscode/tasks.json
77
79
  - lib/generators/netmvc/scaffold/Controllers/HealthController.cs.erb
78
80
  - lib/generators/netmvc/scaffold/Program.cs.erb
79
81
  - lib/generators/netmvc/scaffold/Properties/launchSettings.json