rest_shifter 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09b639e5f24da14070930930d7019f52d4ce8b62
4
- data.tar.gz: 69d83b9265caa43e0dff2406f4af2bc6b62c62ca
3
+ metadata.gz: 5fba7cc33a3a70d78cdbecc7f5ddcbc3f3b21f96
4
+ data.tar.gz: fa69aee539b835ee673de3a7aff9c82e7a7b2e69
5
5
  SHA512:
6
- metadata.gz: e61926cbbd764d0d35e013e611919eef7455a38c3dc6198bed2784ee07c1c90386a9b4760e7ca7b312d14fb0672cf38b35fe4ecdb152c6778a462b6a87dbca85
7
- data.tar.gz: caa8295233e1c49e7326a56bf8e41624c0ec04f857a272b6e71564aa13f991bc95559aa1a648b94e39bab9e59798a87b0598af9db00940a39d2ec18a02c9f208
6
+ metadata.gz: cf285e2ac62122f91a54bcfc02da07aaabea307e217eddd97102e64460a0122278affaebfb0abdc295ea978e2562892ee4f2dc3edd577ff07716d5d15abcb93d
7
+ data.tar.gz: ffc80dd336031b0592fb12ed32ddc3d6f0eb80d77498162e7a77a18ccded44052d94bc9589628b17600b322bfca58d2662911e0b2417fa38a0b4bdb253959bf0
data/CHANGES CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ ** 0.0.5
3
+ - Bugfix: Missing pry gem
4
+ -- Pry should not be a service dependency.
5
+
2
6
  ** 0.0.4
3
7
  - Command -s / start added
4
8
  -- Now the gem is able to start its rest service by command line
data/README.md CHANGED
@@ -8,8 +8,8 @@
8
8
  /
9
9
  __ // The rest api ShapeShifter!
10
10
  -\= \=\ //
11
- --=_\=---//=-- This is a Sinatra app with no predefined routes.
12
- -_==/ \/ //\/-- This replaces mocks for integration level tests.
11
+ --=_\=---//=-- This is a Sinatra app with no predefined routes.
12
+ -_==/ \/ //\/-- This replaces mocks for integration level tests.
13
13
  ==/ /O O\==-- This can be used also to create tests for new feature
14
14
  _ _ _ _ /_/ \ ] /-- before the dependent services are in place
15
15
  /\ ( (- \ / ] ] ]==- This can also be used for Rest prototipation
@@ -19,7 +19,7 @@
19
19
  / ( \ \_ \./ ) - Easy to define rest paths with custom routes
20
20
  ( \ \ ) \ - Easy to define rest paths with custom responses
21
21
  ( /\_ _ _ _ /---/ /\_ \ - Definition of response times and response codes
22
- \ / \ / ____/ / \ \ - Suitable to any kind of tests that use Rest
22
+ \ / \ / ____/ / \ \ - Suitable to any kind of tests that use Rest
23
23
  ( / ) / / /__ ) ( )
24
24
  ( ) / __/ '---` / /
25
25
  \ / \ \ _/ / This is still under development, so do not use it.
@@ -62,19 +62,22 @@ Using
62
62
  The focus here is in simplicity.
63
63
 
64
64
  Install rest_shifter
65
+
65
66
  $ gem install rest_shifter
66
67
 
67
68
  Create the service (you can choose any name that have only letters and underline. It is required to start with a letter )
69
+
68
70
  $ rest_shifter -c hello_world
69
71
 
70
72
  Start the service
73
+
71
74
  $ rest_shifter -s
72
75
 
73
- Go to a browser and open the url:
74
- $ http://localhost:4567/hello_world
76
+ Go to a browser and open the url: [http://localhost:4567/hello_world](http://localhost:4567/hello_world)
75
77
 
76
78
  You should see the following JSON:
77
- $ { \hello_world\ : \Your service is working fine. :D\ }
79
+
80
+ { \hello_world\ : \Your service is working fine. :D\ }
78
81
 
79
82
  To edit the service you just created, go to ~/.rest_shifter/flavors/hello_world.flavor
80
83
  The name of the file is the name that you used in the command -c (create).
@@ -11,6 +11,8 @@ rest_shifter version #{RestShifter::VERSION}: The ShapeShifter Rest Service
11
11
  help Show this help text
12
12
 
13
13
  --start, -s: Start service on port 4567
14
+
15
+ --create, -c: Create a config file for a service (send a name as argument)
14
16
 
15
17
  --version, -v: Print version and exit
16
18
  --help, -h: Show this message
@@ -1,16 +1,15 @@
1
1
  require 'sinatra/base'
2
2
  require 'sinatra'
3
3
  require 'icecream'
4
- require 'pry'
5
4
 
6
5
  module RestShifter; end
7
6
 
8
7
  class Shifter < Sinatra::Base
9
8
 
10
9
  # test
11
- # shapes = IceCream::IceCream.new File.join(File.dirname(__FILE__), "../../spec/flavors")
10
+ shapes = IceCream::IceCream.new File.join(File.dirname(__FILE__), "../../spec/flavors")
12
11
  # prod
13
- shapes = IceCream::IceCream.new File.dirname("#{Dir.home}/.rest_shifter/flavors/*")
12
+ #shapes = IceCream::IceCream.new File.dirname("#{Dir.home}/.rest_shifter/flavors/*")
14
13
 
15
14
  services = []
16
15
  shapes.all.each do |shape|
@@ -1,3 +1,3 @@
1
1
  module RestShifter
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_shifter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro