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 +4 -4
 - data/Gemfile.lock +3 -3
 - data/lib/generators/netmvc.rb +5 -5
 - data/lib/generators/netmvc/scaffold/.vscode/launch.json.erb +45 -0
 - data/lib/generators/netmvc/scaffold/.vscode/tasks.json +17 -0
 - data/lib/generators/netmvc/scaffold/Controllers/HealthController.cs.erb +1 -1
 - data/lib/generators/netmvc/scaffold/Program.cs.erb +1 -0
 - data/lib/generators/netmvc/scaffold/Startup.cs.erb +4 -1
 - data/lib/generators/netmvc/scaffold/_build/Gemfile +4 -4
 - data/lib/generators/netmvc/scaffold/_build/config.yml.erb +4 -4
 - data/lib/generators/netmvc/scaffold/_build/dockerfile/<%= application_name %>/Dockerfile.erb +2 -0
 - data/lib/generators/netmvc/scaffold/_build/dockerfile/<%= application_name %>/s6-etc/app/run.erb +2 -0
 - data/lib/generators/netmvc/scaffold/_build/dockerfile/<%= application_name %>/s6-etc/consul-template/run.erb +1 -1
 - data/lib/generators/netmvc/scaffold/_build/features/health.feature +1 -1
 - data/lib/generators/netmvc/version.rb +1 -1
 - metadata +4 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c8612be651b05fe26554839dad967b898a291e50
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: a2ced9f84409b2015923f1aea1220578eb572e4f
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 45 
     | 
    
         
            +
                mime-types (2.99.2)
         
     | 
| 
       46 
46 
     | 
    
         
             
                mini_portile2 (2.0.0)
         
     | 
| 
       47 
     | 
    
         
            -
                minke (1.0. 
     | 
| 
      
 47 
     | 
    
         
            +
                minke (1.0.6)
         
     | 
| 
       48 
48 
     | 
    
         
             
                  colorize
         
     | 
| 
       49 
49 
     | 
    
         
             
                  consul_loader (~> 1.0)
         
     | 
| 
       50 
50 
     | 
    
         
             
                  cucumber
         
     | 
    
        data/lib/generators/netmvc.rb
    CHANGED
    
    | 
         @@ -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  
     | 
| 
       18 
     | 
    
         
            -
                    bc. 
     | 
| 
       19 
     | 
    
         
            -
                    bc. 
     | 
| 
      
 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  
     | 
| 
       25 
     | 
    
         
            -
                    bs.working_directory = ' 
     | 
| 
      
 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 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -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 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
      
 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  
     | 
| 
      
 21 
     | 
    
         
            +
                    to: './dockerfile/<%= application_name %>'
         
     | 
| 
       22 
22 
     | 
    
         
             
                  -
         
     | 
| 
       23 
23 
     | 
    
         
             
                    from: '../.nuget'
         
     | 
| 
       24 
     | 
    
         
            -
                    to: './dockerfile/<%= application_name  
     | 
| 
      
 24 
     | 
    
         
            +
                    to: './dockerfile/<%= application_name %>'
         
     | 
| 
       25 
25 
     | 
    
         
             
                  -
         
     | 
| 
       26 
26 
     | 
    
         
             
                    from: '../project.json'
         
     | 
| 
       27 
     | 
    
         
            -
                    to: './dockerfile/<%= application_name  
     | 
| 
      
 27 
     | 
    
         
            +
                    to: './dockerfile/<%= application_name %>'
         
     | 
| 
       28 
28 
     | 
    
         
             
                  -
         
     | 
| 
       29 
29 
     | 
    
         
             
                    from: '../web.config'
         
     | 
| 
       30 
     | 
    
         
            -
                    to: './dockerfile/<%= application_name  
     | 
| 
      
 30 
     | 
    
         
            +
                    to: './dockerfile/<%= application_name %>'
         
     | 
| 
       31 
31 
     | 
    
         
             
                  -
         
     | 
| 
       32 
32 
     | 
    
         
             
                    from: './swagger_spec/swagger.yml'
         
     | 
| 
       33 
33 
     | 
    
         
             
                    to: './dockerfile/<%= application_name %>/swagger_spec'
         
     | 
| 
         @@ -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: 
     | 
| 
      
 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 " 
     | 
| 
      
 14 
     | 
    
         
            +
            	And the JSON response should have key "status"
         
     | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 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
         
     |