utter 1.0.21 → 1.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/auth_consumer_ext_gem_generator.rb +27 -0
  3. data/lib/{internals/core/auth.rb → generators/auth_provider_service_gem_generator.rb} +53 -0
  4. data/{bin/generators → lib/generators/utils}/tips.rb +1 -3
  5. data/lib/{internals/core/microservice.rb → utter/service.rb} +19 -2
  6. data/lib/utter/utter_helpers/service_spec_helper.rb +17 -0
  7. data/lib/utter.rb +20 -24
  8. data/utter.gemspec +1 -1
  9. metadata +13 -38
  10. data/lib/internals/core/service_discovery.rb +0 -2
  11. data/lib/internals/core/service_registration.rb +0 -2
  12. data/lib/internals/core/store.rb +0 -13
  13. data/lib/internals/testing/model_delete.rb +0 -12
  14. data/lib/internals/testing/spec.rb +0 -14
  15. data/samples/README.md +0 -3
  16. data/samples/gitlapse::v1::lapses/Dockerfile +0 -0
  17. data/samples/gitlapse::v1::lapses/Gemfile +0 -2
  18. data/samples/gitlapse::v1::lapses/Gemfile.lock +0 -53
  19. data/samples/gitlapse::v1::lapses/README.md +0 -1
  20. data/samples/gitlapse::v1::lapses/config.ru +0 -7
  21. data/samples/gitlapse::v1::lapses/domain/echo/README.md +0 -0
  22. data/samples/gitlapse::v1::lapses/domain/echo/lib/main.rb +0 -11
  23. data/samples/gitlapse::v1::lapses/domain/main.rb +0 -19
  24. data/samples/gitlapse::v1::lapses/gitlapse::v1::lapses.gemspec +0 -0
  25. data/samples/gitlapse::v1::lapses/log/README.md +0 -1
  26. data/samples/gitlapse::v1::lapses/microservice/README.md +0 -0
  27. data/samples/gitlapse::v1::lapses/microservice/lib/main.rb +0 -16
  28. data/samples/upjoystream::v1::auth/Gemfile +0 -4
  29. data/samples/upjoystream::v1::auth/Gemfile.lock +0 -34
  30. data/samples/upjoystream::v1::auth/config.ru +0 -16
  31. data/samples/upjoystream::v1::auth/microservice/lib/app.rb +0 -23
  32. data/samples/upjoystream::v1::torrents/Gemfile +0 -5
  33. data/samples/upjoystream::v1::torrents/Gemfile.lock +0 -57
  34. data/samples/upjoystream::v1::torrents/config.ru +0 -26
  35. data/samples/upjoystream::v1::torrents/domain/lib/echo_ext.rb +0 -11
  36. data/samples/upjoystream::v1::torrents/microservice/lib/app.rb +0 -17
  37. /data/{bin → exe}/utter +0 -0
  38. /data/{bin/generators/domain.rb → lib/generators/domain_gem_generator.rb} +0 -0
  39. /data/{bin/generators/extension.rb → lib/generators/ext_gem_generator.rb} +0 -0
  40. /data/{bin/generators/container.rb → lib/generators/project_container_gem_generator.rb} +0 -0
  41. /data/{bin/generators/microservice.rb → lib/generators/service_gem_generator.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e065c1538c96e91691a1a9c6b1190ea2812664f7
4
- data.tar.gz: f9e4b1cd6aa86db876e28690882992aac9315e24
3
+ metadata.gz: 446c4e69a4e1615b41d4907367c45d4221929159
4
+ data.tar.gz: 0c26ca4a5d5ff1fdbace002f638809a79a310bb7
5
5
  SHA512:
6
- metadata.gz: f5b2180410c629440bf9b3029076c5f5498b52483761256157c3ffa1b22150431e704ba816af59740aef48a54923ef6ced7d9d3519bbb55be4375f3a2bc007be
7
- data.tar.gz: 1314eee16157958e3b1c65536a787c4b0929e4a53813e642b819cd8cd2fd716673f27c3d19962b1b66ec0d2a172ccb5a0abeb45c461a6f1d375d533081c6dca7
6
+ metadata.gz: bb58b36aa4f8341af06915bb2c3a87b7fbb88e0c91f2f7adf743beeb1726c4db6cf65977ac1a16710724e44439953fac8c32eb54a358eb29d5563ff6404ed218
7
+ data.tar.gz: 5f395d04600401cf093818ff0ebf1b1214cfa143f89395837c4e401c3c5fa1896fa424b1c879fe673033d197f4b1d136333585945f05b612ede5f47e5825d164
@@ -0,0 +1,27 @@
1
+ # http://johnnunemaker.com/httparty/
2
+ # https://github.com/jnunemaker/httparty
3
+ require 'httparty'
4
+
5
+
6
+ module Utter
7
+ module Auth
8
+ class Consumer
9
+ def initialize(app, opts={}, params={})
10
+ @app = app
11
+ @opts = opts
12
+ @params = params
13
+ end
14
+
15
+ def call(env)
16
+ #TODO use ssd to store the @params, before passing to the stack!
17
+ # extract the id from
18
+ #include SSD
19
+ p @params
20
+ p response = HTTParty.get('')
21
+ @app.call(env)
22
+ p @params
23
+ #TODO use ssd to store the @params, after passing to the stack!
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,56 @@
1
+ # `utter new auth` generates a new microservice and add the gist of this into it.
2
+ require 'ssd'
3
+ require 'sinatra/base'
4
+ require 'json'
5
+
6
+ class Entity
7
+ include SSD
8
+ attr_accessor :id, :token
9
+ def initialize
10
+ end
11
+ end
12
+
13
+
14
+ class Provider < Sinatra::Base
15
+
16
+ #TODO should be post
17
+ get '/signup' do
18
+ p params
19
+ p id = params[:id]
20
+ token = Random.new_seed.to_s
21
+
22
+ entity = Utter::User.new
23
+ p entity.id = id
24
+ p entity.ssd = id
25
+ p entity.token = token
26
+ entity.append!
27
+ {:id=>id, :token=>token}.to_json
28
+ end
29
+
30
+ get '/login' do
31
+ if !params[:id].nil? && !params[:token].nil? then
32
+ p params
33
+ id = params[:id]
34
+ token = params[:token]
35
+ entity = Utter::User.ssd id
36
+ p "entity.id from the stored ssd"
37
+ p entity.id == id
38
+ p "entity.token from the stored ssd"
39
+ p entity.token
40
+ p token
41
+ if entity.id == id && entity.token == token then
42
+ {:message => "access granted"}.to_json
43
+ else
44
+ {:message => "access denied"}.to_json
45
+ end
46
+ else
47
+ {:message => "please supply matching id and token"}.to_json
48
+ end
49
+ end
50
+ run!
51
+ end
52
+
53
+
1
54
  =begin
2
55
  #TODO write RDoc
3
56
  module Utter
@@ -1,12 +1,10 @@
1
1
  module Utter
2
- module Tips
2
+ module Utils
3
3
 
4
4
  def self.included(klass)
5
5
  klass.extend self
6
6
  end
7
7
 
8
-
9
-
10
8
  # Design qoutes
11
9
  @@design_qoutes= [
12
10
  "Good Design Is Innovative ~ Dieter Rams",
@@ -4,12 +4,15 @@ require 'sinatra'
4
4
  require "sinatra/json"
5
5
  require 'securerandom'
6
6
  require 'sinatra/cross_origin'
7
+ require 'json'
7
8
  #require 'net/http' #TODO not needed as calling other services is done in Utter Domain Extensions, Net::HTTP.get('example.com', '/index.html') # => String
8
9
 
9
10
  module Utter
10
11
  module Internals
12
+ class Service < Sinatra::Base
13
+
14
+ run! if app_file == $0
11
15
 
12
- class Microservice < Sinatra::Base
13
16
  # if cross_origin is required\loaded then make register Sinatra::CrossOrigin
14
17
  # And
15
18
  #register Sinatra::CrossOrigin
@@ -23,7 +26,21 @@ module Utter
23
26
  p response.headers.inspect
24
27
  end
25
28
 
26
- configure { set :server, :puma }
29
+ # Makes sure that any response Utter gives back is in JSON format
30
+ #TODO check if streaming needs a different class if this mechanism doesn't work with it
31
+ def route(verb, path, options = {}, &block)
32
+ super
33
+ signature.to_json # regular json
34
+ #json signature #NOTE we can use regular json or sinatra/json'
35
+ end
36
+
37
+ configure do
38
+ set :server, :puma #if development make it shotgun, if production make it puma
39
+
40
+ #NOTE http://www.sinatrarb.com/contrib/json.html
41
+ set :json_encoder, :to_json #uses sinatra/json
42
+ set :json_content_type, :js #uses sinatra/json
43
+ end
27
44
 
28
45
  end
29
46
 
@@ -0,0 +1,17 @@
1
+ # diff between helper and generator is generator stubs code for you but a helper is a code that you inheirt or use directly
2
+ =begin
3
+ # Utter service testing http://www.sinatrarb.com/testing.html
4
+ require 'minitest'
5
+ require 'minitest/spec'
6
+ require "minitest/autorun"
7
+ require "minitest/pride"
8
+ require 'rack/test'
9
+
10
+ module Utter
11
+ module Spec
12
+ # Utter service uses rack/test
13
+ class Service
14
+ end
15
+ end
16
+ end
17
+ =end
data/lib/utter.rb CHANGED
@@ -3,9 +3,7 @@ require 'mushin'
3
3
  require 'ssd'
4
4
  #require 'json' #TODO need to make all responses json based by default if it is a hash and raise an error if it is not a hash!!
5
5
 
6
- #require_relative "internals/core/store"
7
- #require_relative "internals/core/auth"
8
- require_relative "internals/core/microservice"
6
+ require_relative "utter/service"
9
7
 
10
8
 
11
9
  # Utter defines its interfacing points here. Utter communicate seamlessly
@@ -15,10 +13,10 @@ require_relative "internals/core/microservice"
15
13
  #NOTE According to Semantic Versioning 2.0.0 (http://semver.org/); Any changes
16
14
  # to this file would require an upgrade to a new Major version.
17
15
  module Utter
18
- # MAJOR version when you make incompatible API changes,
19
- # MINOR version when you add functionality in a backwards-compatible manner, and
16
+ # MAJOR version when you make incompatible API changes
17
+ # MINOR version when you add functionality in a backwards-compatible manner
20
18
  # PATCH version when you make backwards-compatible bug fixes.
21
- VERSION = "1.0.21"
19
+ VERSION = "1.0.23"
22
20
 
23
21
  $log = Logger.new(STDOUT)
24
22
 
@@ -32,7 +30,7 @@ module Utter
32
30
  # Public::Microservice can be used to provide a microservice that doesn't require authentication.
33
31
  #class Public::Microservice < Utter::Internals::Public::Microservice; end
34
32
  # Private::Microservice can be used to provide a microservice that DOES require authentication.
35
- class Service < Utter::Internals::Microservice; end
33
+ class Service < Utter::Internals::Service; end
36
34
 
37
35
  # BASIC FEATURE
38
36
  # Usage of non domain-specific stack inside a microservice would be like
@@ -62,25 +60,23 @@ module Utter
62
60
  # the right tool for the job. Example SSD for somthing, and Redis for some Caching microservice, etc.
63
61
  end
64
62
 
65
- # Utter SSD extenstion
66
- class SSD
67
- def initialize(app, opts={}, params={})
68
- @app = app
69
- @opts = opts
70
- @params = params
63
+ class Context
64
+ def initialize &block
65
+ instance_eval &block if block_given?
71
66
  end
67
+ end
72
68
 
73
- def call(env)
74
- #TODO use ssd to store the @params, before passing to the stack!
75
- # extract the id from
76
- #include SSD
77
- p "params from ssd before passing the stack"
78
- p @params
79
- @app.call(env)
80
- p "params from ssd before passing the stack"
81
- p @params
82
- #TODO use ssd to store the @params, after passing to the stack!
83
- end
69
+ # Makes sure that any class that inherits form "< Utter::Ext" must implement :initialize and :call
70
+ class Ext
71
+ def initialize
72
+ raise NotImplementedError, "Utter Extenstions implement :initialize"
73
+ end
74
+ def call
75
+ raise NotImplementedError, "Utter Extenstions implement :call"
76
+ end
77
+ end
78
+
79
+ class Auth
84
80
  end
85
81
 
86
82
  # ADVANCED FEATURE
data/utter.gemspec CHANGED
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  #end
24
24
 
25
25
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
26
27
  spec.executables << 'utter'
27
- #spec.bindir = "exe"
28
28
  #spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.21
4
+ version: 1.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - zotherstupidguy
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-09 00:00:00.000000000 Z
11
+ date: 2016-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -362,43 +362,18 @@ files:
362
362
  - README.md
363
363
  - Rakefile
364
364
  - bin/console
365
- - bin/generators/container.rb
366
- - bin/generators/domain.rb
367
- - bin/generators/extension.rb
368
- - bin/generators/microservice.rb
369
- - bin/generators/tips.rb
370
365
  - bin/setup
371
- - bin/utter
372
- - lib/internals/core/auth.rb
373
- - lib/internals/core/microservice.rb
374
- - lib/internals/core/service_discovery.rb
375
- - lib/internals/core/service_registration.rb
376
- - lib/internals/core/store.rb
377
- - lib/internals/testing/model_delete.rb
378
- - lib/internals/testing/spec.rb
366
+ - exe/utter
367
+ - lib/generators/auth_consumer_ext_gem_generator.rb
368
+ - lib/generators/auth_provider_service_gem_generator.rb
369
+ - lib/generators/domain_gem_generator.rb
370
+ - lib/generators/ext_gem_generator.rb
371
+ - lib/generators/project_container_gem_generator.rb
372
+ - lib/generators/service_gem_generator.rb
373
+ - lib/generators/utils/tips.rb
379
374
  - lib/utter.rb
380
- - samples/README.md
381
- - samples/gitlapse::v1::lapses/Dockerfile
382
- - samples/gitlapse::v1::lapses/Gemfile
383
- - samples/gitlapse::v1::lapses/Gemfile.lock
384
- - samples/gitlapse::v1::lapses/README.md
385
- - samples/gitlapse::v1::lapses/config.ru
386
- - samples/gitlapse::v1::lapses/domain/echo/README.md
387
- - samples/gitlapse::v1::lapses/domain/echo/lib/main.rb
388
- - samples/gitlapse::v1::lapses/domain/main.rb
389
- - samples/gitlapse::v1::lapses/gitlapse::v1::lapses.gemspec
390
- - samples/gitlapse::v1::lapses/log/README.md
391
- - samples/gitlapse::v1::lapses/microservice/README.md
392
- - samples/gitlapse::v1::lapses/microservice/lib/main.rb
393
- - samples/upjoystream::v1::auth/Gemfile
394
- - samples/upjoystream::v1::auth/Gemfile.lock
395
- - samples/upjoystream::v1::auth/config.ru
396
- - samples/upjoystream::v1::auth/microservice/lib/app.rb
397
- - samples/upjoystream::v1::torrents/Gemfile
398
- - samples/upjoystream::v1::torrents/Gemfile.lock
399
- - samples/upjoystream::v1::torrents/config.ru
400
- - samples/upjoystream::v1::torrents/domain/lib/echo_ext.rb
401
- - samples/upjoystream::v1::torrents/microservice/lib/app.rb
375
+ - lib/utter/service.rb
376
+ - lib/utter/utter_helpers/service_spec_helper.rb
402
377
  - utter.gemspec
403
378
  homepage: https://utter-rb.github.io
404
379
  licenses:
@@ -1,2 +0,0 @@
1
- # how a client find out which URI::PORT a specific microservice is mounted on
2
- #TODO check docker gems and docker-compose
@@ -1,2 +0,0 @@
1
- # how a client registers a specific microservice and mount it on URI::PORT
2
- #TODO check docker gems and docker-compose
@@ -1,13 +0,0 @@
1
- =begin
2
- #TODO remove this into as Utter Domain Extenstion
3
- #TODO write RDOC
4
- require 'ssd'
5
-
6
- module Utter
7
- module Store
8
- def self.included(base)
9
- base.send :include, SSD
10
- end
11
- end
12
- end
13
- =end
@@ -1,12 +0,0 @@
1
- =begin
2
- #TODO delete as mushin domains wouldn't require utter users to use this model, they should be using a mushin middleware of some kind to store their shit
3
- #TODO write RDoc
4
- module Utter
5
- class Model
6
- include Utter::Store
7
- #def self.inherited(model)
8
- # model.send :include, SSD
9
- #end
10
- end
11
- end
12
- =end
@@ -1,14 +0,0 @@
1
- =begin
2
- require 'minitest'
3
- require 'minitest/spec'
4
- require "minitest/autorun"
5
- require "minitest/pride"
6
-
7
- module Utter
8
- module Spec
9
- # use it to build specs
10
- class Endpoint
11
- end
12
- end
13
- end
14
- =end
data/samples/README.md DELETED
@@ -1,3 +0,0 @@
1
- maybe uploads microservice is a bad choice! as being rule-based any uploads
2
- will be part of the rules {} sent as base64. so there should not be any uplaods endpoints or microservice instead
3
- it should be a plural noun! like lapses
File without changes
@@ -1,2 +0,0 @@
1
- source 'https://rubygems.org'
2
- gem 'utter'
@@ -1,53 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- coderay (1.1.1)
5
- ibsciss-middleware (0.4.1)
6
- method_source (0.8.2)
7
- minitest (5.9.1)
8
- multi_json (1.12.1)
9
- mushin (0.1.0)
10
- ibsciss-middleware (~> 0.3)
11
- pry (0.10.4)
12
- coderay (~> 1.1.0)
13
- method_source (~> 0.8.1)
14
- slop (~> 3.4)
15
- puma (3.6.0)
16
- rack (1.6.4)
17
- rack-protection (1.5.3)
18
- rack
19
- rack-test (0.6.3)
20
- rack (>= 1.0)
21
- rake (11.3.0)
22
- sinatra (1.4.7)
23
- rack (~> 1.5)
24
- rack-protection (~> 1.4)
25
- tilt (>= 1.3, < 3)
26
- sinatra-cross_origin (0.3.2)
27
- sinatra-json (0.1.0)
28
- multi_json (~> 1.0)
29
- sinatra (~> 1.0)
30
- slop (3.6.0)
31
- thor (0.19.1)
32
- tilt (2.0.5)
33
- utter (1.0.14)
34
- bundler
35
- minitest
36
- mushin
37
- pry
38
- puma
39
- rack-test
40
- rake
41
- sinatra
42
- sinatra-cross_origin
43
- sinatra-json
44
- thor
45
-
46
- PLATFORMS
47
- ruby
48
-
49
- DEPENDENCIES
50
- utter
51
-
52
- BUNDLED WITH
53
- 1.12.5
@@ -1 +0,0 @@
1
- #TODO say somthing about the microservice here
@@ -1,7 +0,0 @@
1
- require 'utter'
2
- Dir[File.dirname(__FILE__) + '/microservice/**/*.rb'].each {|file| require_relative file }
3
- Dir[File.dirname(__FILE__) + '/domain/**/*.rb'].each {|file| require_relative file }
4
-
5
- map "/" do
6
- run Gitlapse::V1::Lapses
7
- end
File without changes
@@ -1,11 +0,0 @@
1
- class Echo
2
- def initialize(app, message)
3
- @app = app
4
- @message = message
5
- end
6
-
7
- def call(env)
8
- puts @message
9
- @app.call(env)
10
- end
11
- end
@@ -1,19 +0,0 @@
1
- # this file is named after the domain_name (later a mushin generated framework name)
2
- # this should be a framework of some sort providing its way for inversion of control
3
- # but for now it only acts like require_relative for config.ru
4
-
5
- # How to use this main.rb file
6
- # ------------------------------
7
- # require 'gameon' #thats a mushin domain-specific framework for gamification
8
- # require all the extenstions that you created here, configru
9
- # write your rules (this file acts as your rulebook)
10
- # GameOn.rules do
11
- # #TODO here i write the rules i want for this microservice
12
- # end
13
-
14
- # Usage within the microservice/main.rb will be like
15
- # GamOn::Stack.new(recivied_params_hash) do
16
- # use ....
17
- # use ....
18
- # use ....
19
- # end
@@ -1 +0,0 @@
1
- logs here uses append-only SSD to write timestamped logs
File without changes
@@ -1,16 +0,0 @@
1
- module Gitlapse
2
- module V1
3
- class Lapses < Utter::Microservice
4
- #$log.info("mounting #{self}")
5
- get '/' do
6
- "public info"
7
- "private info (eyes only)"
8
- x = Utter::Stack.new do
9
- use Echo, "this is my message"
10
- end
11
- x.to_s
12
- end
13
- #run! if app_file == $0
14
- end
15
- end
16
- end
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
- ruby '2.3.1'
3
-
4
- gem 'utter'
@@ -1,34 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- multi_json (1.12.1)
5
- rack (1.6.4)
6
- rack-protection (1.5.3)
7
- rack
8
- sinatra (1.4.7)
9
- rack (~> 1.5)
10
- rack-protection (~> 1.4)
11
- tilt (>= 1.3, < 3)
12
- sinatra-cross_origin (0.3.2)
13
- sinatra-json (0.1.0)
14
- multi_json (~> 1.0)
15
- sinatra (~> 1.0)
16
- ssd (0.1.4)
17
- tilt (2.0.5)
18
- utter (1.0.5)
19
- sinatra
20
- sinatra-cross_origin
21
- sinatra-json
22
- ssd
23
-
24
- PLATFORMS
25
- ruby
26
-
27
- DEPENDENCIES
28
- utter
29
-
30
- RUBY VERSION
31
- ruby 2.3.1p112
32
-
33
- BUNDLED WITH
34
- 1.12.5
@@ -1,16 +0,0 @@
1
- # config.ru (run with rackup)
2
- ##begin
3
- # require 'rack/show_exceptions'
4
- #rescue LoadError
5
- # require 'rack/showexceptions'
6
- #end
7
-
8
- require './app'
9
-
10
- map('/public') do
11
- run API::V1::Public::Microservice
12
- end
13
-
14
- map('/private') do
15
- run API::V1::Private::Microservice
16
- end
@@ -1,23 +0,0 @@
1
- require 'utter'
2
- #require 'rack/show_exceptions'
3
-
4
- module API
5
- module V1
6
- class PublicEndpoint < Utter::Public::Endpoint
7
- $log.info("mounting #{self}")
8
- get '/' do
9
- "public info"
10
- end
11
- run! if app_file == $0
12
- end
13
-
14
- class PrivateEndpoint < Utter::Private::Endpoint
15
- $log.info("mounting #{self}")
16
- get '/' do
17
- "private info (eyes only)"
18
- end
19
- end
20
-
21
- end
22
- end
23
-
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
- ruby '2.3.1'
3
-
4
- gem 'rack'
5
- gem 'utter'
@@ -1,57 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- coderay (1.1.1)
5
- ibsciss-middleware (0.4.1)
6
- method_source (0.8.2)
7
- minitest (5.9.1)
8
- multi_json (1.12.1)
9
- mushin (0.1.0)
10
- ibsciss-middleware (~> 0.3)
11
- pry (0.10.4)
12
- coderay (~> 1.1.0)
13
- method_source (~> 0.8.1)
14
- slop (~> 3.4)
15
- puma (3.6.0)
16
- rack (1.6.4)
17
- rack-protection (1.5.3)
18
- rack
19
- rack-test (0.6.3)
20
- rack (>= 1.0)
21
- rake (11.3.0)
22
- sinatra (1.4.7)
23
- rack (~> 1.5)
24
- rack-protection (~> 1.4)
25
- tilt (>= 1.3, < 3)
26
- sinatra-cross_origin (0.3.2)
27
- sinatra-json (0.1.0)
28
- multi_json (~> 1.0)
29
- sinatra (~> 1.0)
30
- slop (3.6.0)
31
- thor (0.19.1)
32
- tilt (2.0.5)
33
- utter (1.0.11)
34
- bundler
35
- minitest
36
- mushin
37
- pry
38
- puma
39
- rack-test
40
- rake
41
- sinatra
42
- sinatra-cross_origin
43
- sinatra-json
44
- thor
45
-
46
- PLATFORMS
47
- ruby
48
-
49
- DEPENDENCIES
50
- rack
51
- utter
52
-
53
- RUBY VERSION
54
- ruby 2.3.1p112
55
-
56
- BUNDLED WITH
57
- 1.12.5
@@ -1,26 +0,0 @@
1
- # config.ru (run with rackup)
2
- #begin
3
- # require 'rack/show_exceptions'
4
- #rescue LoadError
5
- # # require 'rack/showexceptions'
6
- #end
7
- #require 'bundler/setup'
8
- #Bundler.require(:default)
9
-
10
- require 'utter'
11
- #require_relative './../../lib/utter'
12
- #
13
- Dir["domain/lib/**/*.rb"].each do |file|
14
- p file
15
- require_relative file
16
- end
17
-
18
- Dir["microservice/lib/**/*.rb"].each do |file|
19
- p file
20
- require_relative file
21
- end
22
-
23
-
24
- map('/') do
25
- run Upjoystream::V1::Torrents
26
- end
@@ -1,11 +0,0 @@
1
- class Echo
2
- def initialize(app, message)
3
- @app = app
4
- @message = message
5
- end
6
-
7
- def call(env)
8
- puts @message
9
- @app.call(env)
10
- end
11
- end
@@ -1,17 +0,0 @@
1
- #require 'rack/show_exceptions'
2
-
3
- module Upjoystream
4
- module V1
5
- class Torrents < Utter::Microservice
6
- $log.info("mounting #{self}")
7
- get '/' do
8
- "public info"
9
- "private info (eyes only)"
10
- Utter::Stack.new do
11
- use Echo, "this is my message"
12
- end
13
- end
14
- #run! if app_file == $0
15
- end
16
- end
17
- end
/data/{bin → exe}/utter RENAMED
File without changes