anmo 0.0.26 → 0.0.27

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.
data/Rakefile CHANGED
@@ -10,6 +10,11 @@ task :test do
10
10
  end
11
11
  end
12
12
 
13
+ task :run do
14
+ require 'anmo'
15
+ Anmo.launch_server 1234
16
+ end
17
+
13
18
  Cucumber::Rake::Task.new(:features) do |t|
14
19
  t.cucumber_opts = "features --format pretty"
15
20
  end
@@ -73,6 +73,18 @@ module Anmo
73
73
  def call env
74
74
  request = Rack::Request.new(env)
75
75
 
76
+ if request.request_method.upcase == "OPTIONS"
77
+ return [
78
+ 200,
79
+ {
80
+ "Access-Control-Allow-Origin" => "*",
81
+ "Access-Control-Allow-Methods" => "*",
82
+ "Access-Control-Allow-Headers" => "*"
83
+ },
84
+ ""
85
+ ]
86
+ end
87
+
76
88
  controller_methods = [
77
89
  :alive,
78
90
  :version,
@@ -1,3 +1,3 @@
1
1
  module Anmo
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.27
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: