ephemeral_response 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/spec/support/time.rb CHANGED
@@ -2,9 +2,10 @@ class Time
2
2
  class << self
3
3
  alias now_without_travel now
4
4
 
5
- def travel(travel_string)
6
- @travel_string = travel_string
5
+ def travel(moment)
6
+ @travel_string = moment.to_s
7
7
  yield
8
+ ensure
8
9
  @travel_string = nil
9
10
  end
10
11
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sandro Turriate
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-23 00:00:00 -04:00
17
+ date: 2010-06-23 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -40,7 +40,9 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  segments:
42
42
  - 0
43
- version: "0"
43
+ - 5
44
+ - 0
45
+ version: 0.5.0
44
46
  type: :development
45
47
  version_requirements: *id002
46
48
  - !ruby/object:Gem::Dependency
@@ -57,6 +59,20 @@ dependencies:
57
59
  version: 0.2.1
58
60
  type: :development
59
61
  version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ name: unicorn
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 1
71
+ - 0
72
+ - 0
73
+ version: 1.0.0
74
+ type: :development
75
+ version_requirements: *id004
60
76
  description: "\n Save HTTP responses to give your tests a hint of reality.\n Responses are saved into your fixtures directory and are used for subsequent web requests until they expire.\n "
61
77
  email: sandro.turriate@gmail.com
62
78
  executables: []
@@ -64,16 +80,17 @@ executables: []
64
80
  extensions: []
65
81
 
66
82
  extra_rdoc_files:
67
- - LICENSE
68
- - README.html
69
83
  - README.markdown
70
84
  files:
71
85
  - .document
72
86
  - .gitignore
73
- - LICENSE
87
+ - History.markdown
88
+ - MIT_LICENSE
74
89
  - README.markdown
75
90
  - Rakefile
76
91
  - VERSION
92
+ - examples/simple_benchmark.rb
93
+ - examples/white_list.rb
77
94
  - lib/ephemeral_response.rb
78
95
  - lib/ephemeral_response/configuration.rb
79
96
  - lib/ephemeral_response/fixture.rb
@@ -82,13 +99,15 @@ files:
82
99
  - spec/ephemeral_response/fixture_spec.rb
83
100
  - spec/ephemeral_response/net_http_spec.rb
84
101
  - spec/ephemeral_response_spec.rb
85
- - spec/integration/net_spec.rb
102
+ - spec/integration/normal_flow_spec.rb
103
+ - spec/integration/unique_fixtures_spec.rb
104
+ - spec/integration/white_list_spec.rb
86
105
  - spec/spec.opts
87
106
  - spec/spec_helper.rb
88
107
  - spec/support/clear_fixtures.rb
89
108
  - spec/support/fakefs_ext.rb
109
+ - spec/support/rack_reflector.rb
90
110
  - spec/support/time.rb
91
- - README.html
92
111
  has_rdoc: true
93
112
  homepage: http://github.com/sandro/ephemeral_response
94
113
  licenses: []
@@ -124,8 +143,13 @@ test_files:
124
143
  - spec/ephemeral_response/fixture_spec.rb
125
144
  - spec/ephemeral_response/net_http_spec.rb
126
145
  - spec/ephemeral_response_spec.rb
127
- - spec/integration/net_spec.rb
146
+ - spec/integration/normal_flow_spec.rb
147
+ - spec/integration/unique_fixtures_spec.rb
148
+ - spec/integration/white_list_spec.rb
128
149
  - spec/spec_helper.rb
129
150
  - spec/support/clear_fixtures.rb
130
151
  - spec/support/fakefs_ext.rb
152
+ - spec/support/rack_reflector.rb
131
153
  - spec/support/time.rb
154
+ - examples/simple_benchmark.rb
155
+ - examples/white_list.rb
data/README.html DELETED
@@ -1,72 +0,0 @@
1
- <h1>Ephemeral Response</h1>
2
-
3
- <p><em>Save HTTP responses to give your tests a hint of reality.</em></p>
4
-
5
- <p>This is pretty much NetRecorder without the fakeweb dependency.</p>
6
-
7
- <h2>Premise</h2>
8
-
9
- <ol>
10
- <li>run tests</li>
11
- <li>all responses are saved to fixtures</li>
12
- <li>run tests</li>
13
- <li><p>Return the cached response if it exists and isn't out of date.</p>
14
-
15
- <p>If a cached response exists but is out of date, update it with the real response</p>
16
-
17
- <p>Cache the response if it doesn't exist</p></li>
18
- </ol>
19
-
20
-
21
- <h2>Usage</h2>
22
-
23
- <p><code>$ vi spec/spec_helper.rb</code></p>
24
-
25
- <pre><code>require 'ephemeral_response'
26
-
27
- Spec::Runner.configure do |config|
28
- config.before(:suite) do
29
- EphemeralResponse.activate
30
- end
31
- config.after(:suite) do
32
- EphemeralResponse.deactivate
33
- end
34
- end
35
- </code></pre>
36
-
37
- <h3>Configuration</h3>
38
-
39
- <p>You can change the fixture directory which defaults to "spec/fixtures/ephemeral_response"</p>
40
-
41
- <pre><code>EphemeralResponse::Configuration.fixture_directory = "test/fixtures/ephemeral_response"
42
- </code></pre>
43
-
44
- <p>You can change the elapsed time for when a fixture will expire; defaults to 24 hours</p>
45
-
46
- <pre><code>EphemeralResponse::Configuration.expiration = 86400 # 24 hours in seconds
47
- </code></pre>
48
-
49
- <p>You can also pass a block when setting expiration which gets instance_eval'd
50
- giving you access to the awesome helper method <code>one_day</code></p>
51
-
52
- <pre><code>EphemeralResponse::Configuration.expiration do
53
- one_day * 30 # 60 * 60 * 24 * 30
54
- end
55
- </code></pre>
56
-
57
- <h2>Note on Patches/Pull Requests</h2>
58
-
59
- <ul>
60
- <li>Fork the project.</li>
61
- <li>Make your feature addition or bug fix.</li>
62
- <li>Add tests for it. This is important so I don't break it in a
63
- future version unintentionally.</li>
64
- <li>Commit, do not mess with rakefile, version, or history.
65
- (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)</li>
66
- <li>Send me a pull request. Bonus points for topic branches.</li>
67
- </ul>
68
-
69
-
70
- <h2>Copyright</h2>
71
-
72
- <p>Copyright (c) 2010 Sandro Turriate. See LICENSE for details.</p>
File without changes