rest_shifter 0.0.13 → 0.0.14

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: 087d1c4826f3050b7a8fc6845425704d2d2d625d
4
- data.tar.gz: e29bc423be8e0925d3086c7d226f274795d65ea1
3
+ metadata.gz: 026dd42075ee41eea558f92a7625c931ac82d262
4
+ data.tar.gz: a49be6358776fe2dba9a88ad0d2fac43b5abf93a
5
5
  SHA512:
6
- metadata.gz: e373a1efda9dcf94839ff68cb5e5d72cfbf869edcc2b0616d9d3ecdb3715a305c0ac0f494060140ad871197167883abe54e4f14176182eb0b02246a6a28f50f7
7
- data.tar.gz: 0f580e7a6c1b89239422235bb9e90cb617458923468e250f3f95b88ecb89630eadbe213135f638778a09876681897d258d7686b1dfa85f20f96b00ad2f4ce5b6
6
+ metadata.gz: d9af5d2a0fa6ce7fcfea2d73d677a7ff8dfae17128eccfef6c1ab5a9e8a256f1566c678b2ec0d92c41ff13bfc4c5a66805865277998ac53f70e6e5ac616598ea
7
+ data.tar.gz: 70068a88094f3aa412aacfc5585ac2b08f01d4a6ec2d2ee3558e4f8b1dfc36c54e55fa906484349dc03c7d766ca525331c919f957344af5c8f55ddcefc61ce85
data/CHANGES CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ ** 0.0.14
3
+ - Feature
4
+ -- Adding support to choose port
5
+
2
6
  ** 0.0.13
3
7
  - Feature
4
8
  -- Adding support to DELETE and PUT http methods
data/README.md CHANGED
@@ -43,21 +43,6 @@ ASCII art: http://www.chris.com/ascii/index.php?art=creatures/unicorns
43
43
  Instructions
44
44
  ==========
45
45
 
46
- Developing
47
- ----------
48
- To develop `RestShifter`, you are going to need [Bundler][1]
49
-
50
- $ git git@github.com:camiloribeiro/RestShifter.git
51
- $ cd RestShifter
52
- $ bundle install
53
- $ rake
54
-
55
- The last step is launching the regression tests and all should be green.
56
-
57
- If you have any problems, please let me know.
58
-
59
- [1]: http://gembundler.com
60
-
61
46
  Using
62
47
  -----
63
48
 
@@ -75,11 +60,15 @@ Start the service
75
60
 
76
61
  $ rest_shifter -s
77
62
 
63
+ Start the service in a different port than 8080
64
+
65
+ $ rest_shifter -s 7777
66
+
78
67
  Optionally, you can start the service over https using captal "S":
79
68
 
80
69
  $ rest_shifter -S /path/to/file.crt /path/to/file.key
81
70
 
82
- Go to a browser and open the url: [http://localhost:4567/hello_world](http://localhost:4567/hello_world)
71
+ Go to a browser and open the url: [http://localhost:4567/hello_world](http://localhost:8080/hello_world)
83
72
 
84
73
  You should see the following JSON:
85
74
 
@@ -106,6 +95,34 @@ Whatever you change in the file will change in the service as soon as you restar
106
95
 
107
96
  Enjoy
108
97
 
98
+ Developing
99
+ ----------
100
+ To develop `RestShifter`, you are going to need [Bundler][1]
101
+
102
+ $ git git@github.com:camiloribeiro/RestShifter.git
103
+ $ cd RestShifter
104
+ $ bundle install
105
+ $ rake
106
+
107
+ To run the tests you must use the environment variable RACK_ENV=test
108
+
109
+ $ RACK_ENV=test rake
110
+
111
+ Optionally, to have some fun you can run the tests with a nyan cat flying!
112
+
113
+ $ RACK_ENV=test rake nyan
114
+ $
115
+ $ --------------------_,------,
116
+ $ --------------------_| /\_/\
117
+ $ --------------------^|__( ^ .^)
118
+ $ --------------------- " " " "
119
+
120
+ The last step is launching the regression tests and all should be green.
121
+
122
+ If you have any problems, please let me know.
123
+
124
+ [1]: http://gembundler.com
125
+
109
126
  LICENSE
110
127
  =======
111
128
 
@@ -7,8 +7,12 @@ class RestShifter::Commands::Main
7
7
 
8
8
  case cmd
9
9
  when "-s", "--start", "start"
10
- RestShifter::Commands::Start.run
11
- exit 0
10
+ cmd = args.shift
11
+ if !cmd.to_s.empty?
12
+ RestShifter::Commands::Start.run cmd
13
+ else
14
+ RestShifter::Commands::Start.run "8080"
15
+ end
12
16
  when "-S", "--start-secure", "start-secure"
13
17
  RestShifter::Commands::Start.run_secure
14
18
  exit 0
@@ -1,8 +1,9 @@
1
1
  class RestShifter::Commands::Start
2
2
  class << self
3
- def run(args=ARGV)
3
+ def run(port=ARGV)
4
4
 
5
5
  prepare_server
6
+ Shifter.set :port, port.to_i
6
7
  Shifter.run!
7
8
  end
8
9
 
@@ -1,3 +1,3 @@
1
1
  module RestShifter
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest_shifter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Ribeiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-22 00:00:00.000000000 Z
11
+ date: 2015-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codeclimate-test-reporter