moxy 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5a082fe23db918413f48036e7e8a30dcd5098bda
4
+ data.tar.gz: fb0230978e4cb567c5b0eb829cf5c9148f2b4853
5
+ SHA512:
6
+ metadata.gz: 7102de4de963b05003639e28db765c6ddf27f4251deae5b8ed7b5da96bc1a1e6786ed10c7fa84a5663484fc9eb0b8682582dabb83181d8a5c05bcfaa224eaab8
7
+ data.tar.gz: 3f9ea51af53597020ce4bdab641c6f642f952826663ca46770c6e77005c772456351b6f27d5616358f79efba76fe09343101da1ecf58ff790947186ff634779a
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ .rvmrc
@@ -1,26 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- moxy (0.0.1)
4
+ moxy (0.0.2)
5
5
  fakefs
6
- rack-flash
7
6
  sinatra
7
+ sinatra-flash
8
8
  webmock
9
9
 
10
10
  GEM
11
11
  remote: http://rubygems.org/
12
12
  specs:
13
13
  addressable (2.2.6)
14
- backports (2.3.0)
15
14
  crack (0.3.1)
16
15
  fakefs (0.4.0)
17
- monkey-lib (0.5.4)
18
- backports
19
- multi_json (1.0.3)
20
- rack (1.3.4)
21
- rack-flash (0.1.2)
22
- rack
23
- rack-protection (1.1.4)
16
+ multi_json (1.0.4)
17
+ rack (1.4.1)
18
+ rack-protection (1.2.0)
24
19
  rack
25
20
  rack-test (0.6.1)
26
21
  rack (>= 1.0)
@@ -29,24 +24,16 @@ GEM
29
24
  multi_json (~> 1.0.3)
30
25
  simplecov-html (~> 0.5.3)
31
26
  simplecov-html (0.5.3)
32
- sinatra (1.3.1)
33
- rack (>= 1.3.4, ~> 1.3)
34
- rack-protection (>= 1.1.2, ~> 1.1)
35
- tilt (>= 1.3.3, ~> 1.3)
36
- sinatra-advanced-routes (0.5.1)
37
- monkey-lib (~> 0.5.0)
38
- sinatra (~> 1.0)
39
- sinatra-sugar (~> 0.5.0)
40
- sinatra-reloader (0.5.0)
41
- sinatra (~> 1.0)
42
- sinatra-advanced-routes (~> 0.5.0)
43
- sinatra-sugar (0.5.1)
44
- monkey-lib (~> 0.5.0)
45
- sinatra (~> 1.0)
27
+ sinatra (1.3.2)
28
+ rack (~> 1.3, >= 1.3.6)
29
+ rack-protection (~> 1.2)
30
+ tilt (~> 1.3, >= 1.3.3)
31
+ sinatra-flash (0.3.0)
32
+ sinatra (>= 1.0.0)
46
33
  tilt (1.3.3)
47
34
  watchr (0.7)
48
- webmock (1.7.6)
49
- addressable (> 2.2.5, ~> 2.2)
35
+ webmock (1.7.10)
36
+ addressable (~> 2.2, > 2.2.5)
50
37
  crack (>= 0.1.7)
51
38
 
52
39
  PLATFORMS
@@ -58,5 +45,4 @@ DEPENDENCIES
58
45
  rr
59
46
  simplecov
60
47
  simplecov-html
61
- sinatra-reloader
62
48
  watchr
data/README.md CHANGED
@@ -76,10 +76,20 @@ Below are some examples of `mock_text` (in each, second line describes result).
76
76
  Since currently `moxy` uses [WebMock](https://github.com/bblimke/webmock) under the hood (that may change), this will be WebMock's syntax, and you can go learn about it
77
77
  for more examples.
78
78
 
79
+ ## Moxy Console
80
+ If you access `http://moxy-host:port/__setup__` in your browser, you'll be presented with the moxy console:
81
+ ![](https://github.com/jondot/moxy/raw/master/examples/console1.png)
82
+ ![](https://github.com/jondot/moxy/raw/master/examples/console2.png)
83
+
84
+
79
85
  ## Contributing
80
86
 
81
87
  Fork, implement, add tests, pull request, get my everlasting thanks and a respectable place here :).
82
88
 
89
+ ### Contributions (Thanks!)
90
+
91
+ * github.com/omcnet
92
+
83
93
 
84
94
  ## Copyright
85
95
 
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  require 'sinatra'
2
- require 'rack-flash'
2
+ require 'sinatra/flash'
3
3
  require 'moxy/sandbox_eval'
4
4
 
5
5
 
@@ -9,7 +9,7 @@ module Moxy
9
9
  set :public_folder, File.expand_path("../../public", filedir)
10
10
  set :views, File.expand_path("../../views", filedir)
11
11
  enable :sessions
12
- use Rack::Flash
12
+ register Sinatra::Flash
13
13
 
14
14
 
15
15
  helpers do
@@ -1,3 +1,3 @@
1
1
  module Moxy
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -20,10 +20,10 @@ Gem::Specification.new do |s|
20
20
 
21
21
  # specify any dependencies here; for example:
22
22
  # s.add_development_dependency "rspec"
23
- s.add_dependency "sinatra"
24
- s.add_dependency "rack-flash"
25
- s.add_dependency "fakefs"
26
- s.add_dependency "webmock"
23
+ s.add_dependency "sinatra", '1.3.2'
24
+ s.add_dependency "sinatra-flash", '0.3.0'
25
+ s.add_dependency "fakefs", '0.4.0'
26
+ s.add_dependency "webmock", '1.7.10'
27
27
 
28
28
 
29
29
  s.add_development_dependency "rack-test"
@@ -39,14 +39,14 @@
39
39
  <div class="span16">
40
40
  <h1>moxy <em><%= @page %></em></h1>
41
41
  <br/>
42
- <% if flash.has? :error %>
42
+ <% if flash.has_key? :error %>
43
43
  <div data-alert class="alert-message error">
44
44
  <a class="close" href="#">×</a>
45
45
  <p><%= flash[:error] %></p>
46
46
  </div>
47
47
  <% end %>
48
48
 
49
- <% if flash.has? :notice %>
49
+ <% if flash.has_key? :notice %>
50
50
  <div data-alert class="alert-message success">
51
51
  <a class="close" href="#">×</a>
52
52
  <p><%= flash[:notice] %></p>
metadata CHANGED
@@ -1,115 +1,141 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dotan Nahum
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2011-10-29 00:00:00.000000000Z
11
+ date: 2015-07-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: sinatra
16
- requirement: &83785170 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - '='
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: 1.3.2
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *83785170
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.2
25
27
  - !ruby/object:Gem::Dependency
26
- name: rack-flash
27
- requirement: &83784640 !ruby/object:Gem::Requirement
28
- none: false
28
+ name: sinatra-flash
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - '='
31
32
  - !ruby/object:Gem::Version
32
- version: '0'
33
+ version: 0.3.0
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *83784640
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.0
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: fakefs
38
- requirement: &83784080 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - '='
42
46
  - !ruby/object:Gem::Version
43
- version: '0'
47
+ version: 0.4.0
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *83784080
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.4.0
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: webmock
49
- requirement: &83783630 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - '='
53
60
  - !ruby/object:Gem::Version
54
- version: '0'
61
+ version: 1.7.10
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *83783630
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 1.7.10
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rack-test
60
- requirement: &83783090 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - ! '>='
73
+ - - ">="
64
74
  - !ruby/object:Gem::Version
65
75
  version: '0'
66
76
  type: :development
67
77
  prerelease: false
68
- version_requirements: *83783090
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rr
71
- requirement: &83782650 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
- - - ! '>='
87
+ - - ">="
75
88
  - !ruby/object:Gem::Version
76
89
  version: '0'
77
90
  type: :development
78
91
  prerelease: false
79
- version_requirements: *83782650
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
80
97
  - !ruby/object:Gem::Dependency
81
98
  name: watchr
82
- requirement: &83781850 !ruby/object:Gem::Requirement
83
- none: false
99
+ requirement: !ruby/object:Gem::Requirement
84
100
  requirements:
85
- - - ! '>='
101
+ - - ">="
86
102
  - !ruby/object:Gem::Version
87
103
  version: '0'
88
104
  type: :development
89
105
  prerelease: false
90
- version_requirements: *83781850
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
91
111
  - !ruby/object:Gem::Dependency
92
112
  name: simplecov
93
- requirement: &83781430 !ruby/object:Gem::Requirement
94
- none: false
113
+ requirement: !ruby/object:Gem::Requirement
95
114
  requirements:
96
- - - ! '>='
115
+ - - ">="
97
116
  - !ruby/object:Gem::Version
98
117
  version: '0'
99
118
  type: :development
100
119
  prerelease: false
101
- version_requirements: *83781430
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
102
125
  - !ruby/object:Gem::Dependency
103
126
  name: simplecov-html
104
- requirement: &83780820 !ruby/object:Gem::Requirement
105
- none: false
127
+ requirement: !ruby/object:Gem::Requirement
106
128
  requirements:
107
- - - ! '>='
129
+ - - ">="
108
130
  - !ruby/object:Gem::Version
109
131
  version: '0'
110
132
  type: :development
111
133
  prerelease: false
112
- version_requirements: *83780820
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
113
139
  description: Moxy is a mock (programmable) proxy
114
140
  email:
115
141
  - jondotan@gmail.com
@@ -118,13 +144,15 @@ executables:
118
144
  extensions: []
119
145
  extra_rdoc_files: []
120
146
  files:
121
- - .gitignore
147
+ - ".gitignore"
122
148
  - Gemfile
123
149
  - Gemfile.lock
124
150
  - README.md
125
151
  - Rakefile
126
152
  - bin/moxy
127
153
  - config.ru
154
+ - examples/console1.png
155
+ - examples/console2.png
128
156
  - examples/testing_with_minitest.rb
129
157
  - examples/testing_with_pyunit.py
130
158
  - lib/moxy.rb
@@ -149,26 +177,28 @@ files:
149
177
  - views/layout.erb
150
178
  homepage: https://github.com/jondot/moxy
151
179
  licenses: []
180
+ metadata: {}
152
181
  post_install_message:
153
182
  rdoc_options: []
154
183
  require_paths:
155
184
  - lib
156
185
  required_ruby_version: !ruby/object:Gem::Requirement
157
- none: false
158
186
  requirements:
159
- - - ! '>='
187
+ - - ">="
160
188
  - !ruby/object:Gem::Version
161
189
  version: '0'
162
190
  required_rubygems_version: !ruby/object:Gem::Requirement
163
- none: false
164
191
  requirements:
165
- - - ! '>='
192
+ - - ">="
166
193
  - !ruby/object:Gem::Version
167
194
  version: '0'
168
195
  requirements: []
169
196
  rubyforge_project: moxy
170
- rubygems_version: 1.8.7
197
+ rubygems_version: 2.4.5
171
198
  signing_key:
172
- specification_version: 3
199
+ specification_version: 4
173
200
  summary: Moxy is a mock (programmable) proxy
174
- test_files: []
201
+ test_files:
202
+ - spec/helper.rb
203
+ - spec/integration/app_spec.rb
204
+ - spec/integration/webmock_handler_spec.rb