minke-generator-swift 0.1.0 → 0.1.4

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: a60fc06b6b6f94efc25a743b8707601e37594457
4
- data.tar.gz: 5d6cbd2d67fa251f0e7d0f2c4cbf554ec328de5e
3
+ metadata.gz: f28b45555f3efb17955be790d077b2506ed2c156
4
+ data.tar.gz: 8c9d5c76604e6e12e6d458c0a3398033ee39d90f
5
5
  SHA512:
6
- metadata.gz: eb9ae97f3dd5435d15051c8f13112478f26c28ab6fc9f4d6c2bc2c182b16004a11582f81d0e946a7d576320e0130142f9f39d90e5d5184d23e3dbc84554cc3a0
7
- data.tar.gz: 18ba97a21a073463cbe7d738c4d723f982af51a69dc570094fe16c49c46edd40af4d289993b7ccc90c4437157f676d856da0a05207d3b8b0b9d4112a7a968ce1
6
+ metadata.gz: 93254b466bedaf2d3d5c62d408f2c7495280cc3eb468b7d4164bcde51e11b32470956c6b93b00d42bdf97e65e9c4bf99c08c006f52c5a03608003fc1f8917f56
7
+ data.tar.gz: c6479d11366775d1c7720b6e1541674311950531cffbe2fea63c3f3d44c8743727520fefce6a32d3a17b84e8752d3a561aaf05c1c30e3350330a7b5e4d51b170
data/README.md CHANGED
@@ -13,51 +13,28 @@ For information on Minke please see the documentation [http://nicholasjackson.gi
13
13
  | <%= namespace %> | Namespace of the application |
14
14
  | <%= src_root %> | Source root of the application |
15
15
 
16
- ## Installation
17
-
18
- Add this line to your application's Gemfile:
19
-
20
- ```ruby
21
- gem 'minke'
22
- gem 'minke-generator-swift'
23
- ```
24
-
25
- And then execute:
26
- ```
27
- $ bundle
28
- ```
29
-
30
- Or install it yourself:
31
-
32
- ```
33
- $ gem install minke
34
- $ gem install minke-generator-swift
35
- ```
36
-
37
16
  ## Usage
38
17
  To scaffold a new service run:
39
18
 
40
19
  ```bash
41
- $ minke -g minke-generator-swift -o ~/nicholasjackson/helloworld
42
- -a helloworld -n HelloWorld
20
+ $ mkdir service
21
+ $ cd service
22
+ $ docker run --rm -v $(pwd):$(pwd) -w $(pwd) nicholasjackson/minke /bin/bash -c 'source /usr/local/rvm/scripts/rvm && minke -g minke-generator-swift -o $(pwd) -n swift.service -a service'
43
23
  ```
44
24
 
45
- You can now open the project in [VisualStudio Code](http://code.visualstudio.com) and run your first build.
46
-
47
25
  ## Build and test with Docker
48
26
  To run a build with a Docker container, to execute the functional and unit tests you can use the following commands. Please see the main Minke documentation for more information [http://nicholasjackson.github.io/minke/](http://nicholasjackson.github.io/minke/).
49
27
 
50
28
  ### Build Application Code and Execute Unit tests
51
29
  ```bash
52
30
  $ cd _build
53
- $ bundle
54
- $ rake app:test
31
+ $ ./minke.sh rake app:test
55
32
  ```
56
33
 
57
34
  ### Build a Docker image and execute functional tests with Cucumber
58
35
  ```bash
59
- $ rake app:build_image
60
- $ rake app:cucumber
36
+ $ ./minke.sh rake app:build_image
37
+ $ ./minke.sh rake app:cucumber
61
38
  ```
62
39
 
63
40
  ## Development
@@ -14,7 +14,7 @@ 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', 'swift build --fetch'], ['/bin/bash', '-c', 'find Packages/ -type d -name Tests | xargs rm -rf']]
17
+ bc.fetch = [['/bin/bash', '-c', 'swift package fetch'], ['/bin/bash', '-c', 'find Packages/ -type d -name Tests | xargs rm -rf'], ['/bin/bash', '-c', 'swift package generate-xcodeproj']]
18
18
  bc.build = [['/bin/bash', '-c', 'swift build -Xcc -fblocks']]
19
19
  bc.test = [['/bin/bash', '-c', 'swift test']]
20
20
  end
@@ -0,0 +1 @@
1
+ vendor
@@ -31,7 +31,7 @@ run:
31
31
  url:
32
32
  address: consul
33
33
  port: 8500
34
- type: private
34
+ type: bridge
35
35
  cucumber:
36
36
  pre:
37
37
  consul_loader:
@@ -39,9 +39,9 @@ cucumber:
39
39
  url:
40
40
  address: consul
41
41
  port: 8500
42
- type: private
42
+ type: bridge
43
43
  health_check:
44
44
  address: <%= application_name %>
45
45
  port: 8090
46
46
  path: /v1/health
47
- type: private
47
+ type: bridge
@@ -3,8 +3,8 @@ require 'rest-client'
3
3
 
4
4
  require 'minke'
5
5
 
6
- discovery = Minke::Docker::ServiceDiscovery.new 'config.yml'
7
- $SERVER_PATH = "http://#{discovery.public_address_for '<%= application_name %>', '8090', :cucumber}"
6
+ discovery = Minke::Docker::ServiceDiscovery.new ENV['DOCKER_PROJECT'], Minke::Docker::DockerRunner.new
7
+ $SERVER_PATH = "http://#{discovery.bridge_address_for ENV['DOCKER_NETWORK'], '<%= application_name %>', '8090'}"
8
8
 
9
9
  Before do |scenario|
10
10
 
@@ -9,7 +9,7 @@ BUILDCOMMAND := "swift build -Xcc -fblocks -Xlinker -rpath -Xlinker .build/debug
9
9
  endif
10
10
 
11
11
  fetch:
12
- swift build --fetch
12
+ swift package fetch
13
13
  find Packages/ -type d -name Tests | xargs rm -rf
14
14
  clean:
15
15
  @echo --- Invoking swift build --clean
@@ -22,4 +22,4 @@ test: build
22
22
  swift test
23
23
  run: build
24
24
  @echo --- Starting server
25
- .build/debug/StockServiceApp ./Sources/<%= application_name %>App/config.json
25
+ .build/debug/<%= application_name %>App ./Sources/<%= application_name %>App/config.json
@@ -10,12 +10,7 @@ let package = Package(
10
10
  name: "<%= application_name %>")
11
11
  ],
12
12
  dependencies: [
13
- .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 0, minor: 16),
13
+ .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 0, minor: 20),
14
14
  .Package(url: "https://github.com/IBM-Swift/HeliumLogger", majorVersion: 0, minor: 9),
15
15
  .Package(url: "https://github.com/notonthehighstreet/swift-statsd", majorVersion: 0, minor: 3)
16
16
  ])
17
-
18
- /*
19
- .Package(url: "https://github.com/notonthehighstreet/swift-mysql", majorVersion: 0, minor: 11),
20
- .Package(url: "https://github.com/notonthehighstreet/swift-statsd", majorVersion: 0, minor: 3)
21
- */
@@ -1,7 +1,7 @@
1
1
  module Minke
2
2
  module Generators
3
3
  module Swift
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.4"
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-swift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.4
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-06-14 00:00:00.000000000 Z
11
+ date: 2016-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,8 +76,6 @@ files:
76
76
  - lib/generators/swift/scaffold/.DS_Store
77
77
  - lib/generators/swift/scaffold/.gitignore
78
78
  - lib/generators/swift/scaffold/_build/.gitignore
79
- - lib/generators/swift/scaffold/_build/.ruby-gemset.erb
80
- - lib/generators/swift/scaffold/_build/.ruby-version
81
79
  - lib/generators/swift/scaffold/_build/Gemfile
82
80
  - lib/generators/swift/scaffold/_build/Rakefile
83
81
  - lib/generators/swift/scaffold/_build/config.yml.erb
@@ -1 +0,0 @@
1
- <%= application_name %>