firebug 0.2.0 → 1.0.0

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: d962e0889d934d02bb7ddd704dc36551f1e93782
4
- data.tar.gz: 6fd8c6ee90d2427015b20d377a138811762ec0a8
3
+ metadata.gz: d545d18663f423f86f0fc36abe0e816dd2a4c3ae
4
+ data.tar.gz: dc8299e1e7b113809a310081455cba07adebf56a
5
5
  SHA512:
6
- metadata.gz: a6335042903d1bfdbf55ad9033151b3650f4d2d88a3e80cd91e267f2d5995de9fd3df006fd822dd2af50b4391e8a4c9c450a63d145ec8a95a0f54119964cc635
7
- data.tar.gz: 3867412bef819d66ab7eee5d523d0a783a5295b2b19b75d40ad4b5fe780c0636af04dff260f78671eecf286d61ddf5de3b774c4fa24df6b907a050179f26bb4f
6
+ metadata.gz: c16a02261c7639885fce6f821cba409a8cf8fcb162004693482998a96a91784ea38a5bf56625b9a0037da8f2a5ad21fce0688c43411346f94dcda4e4299ebe37
7
+ data.tar.gz: cf737fe94d2f8a12a232575990672d3de72ea5505fce1f6fa6311363f187e51409175cc809fde2ab808dba76ecbf760cac1b866fedaf422b1801cc2671552526
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  .DS_Store
12
12
  # rspec failure tracking
13
13
  .rspec_status
14
+ /Gemfile.lock
data/firebug.gemspec CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec| # rubocop:disable BlockLength
29
29
  spec.add_dependency 'ruby-mcrypt', '~> 0.2'
30
30
 
31
31
  spec.add_development_dependency 'bundler', '~> 1.16'
32
+ spec.add_development_dependency 'database_cleaner', '~> 1.6', '>= 1.6.2'
32
33
  spec.add_development_dependency 'pry', '~> 0.11.3'
33
34
  spec.add_development_dependency 'rake', '~> 12.3'
34
35
  spec.add_development_dependency 'rspec', '~> 3.7'
@@ -84,13 +84,14 @@ module ActionDispatch
84
84
  #
85
85
  # @param [ActionDispatch::Request] req
86
86
  # @param [String] sid
87
- # @param [Hash] _options
87
+ # @param [Hash] options
88
88
  # @return [String] the new session id
89
- def delete_session(req, sid, _options)
89
+ def delete_session(req, sid, options)
90
90
  # Get the current database record for this session then delete it.
91
91
  find_session_model(req, sid).delete
92
+ return if options[:drop]
92
93
  # Generate a new one and return it's ID
93
- find_session_model(req).session_id
94
+ find_session_model(req).tap { |s| s.save if options[:renew] }.session_id
94
95
  end
95
96
 
96
97
  # Tries to find the session ID in the requests cookies.
@@ -103,8 +104,8 @@ module ActionDispatch
103
104
  # @return [String, nil]
104
105
  def extract_session_id(req)
105
106
  sid = req.cookies[@key]
106
- # returning `nil` just causes a new ID to be generated.
107
- return if sid.nil?
107
+ # the request didn't have the session cookie so create a new session ID.
108
+ return generate_sid if sid.nil?
108
109
  # sometimes the cookie contains just the session ID.
109
110
  return sid if sid.size <= 32
110
111
  Firebug.decrypt_cookie(sid)[:session_id]
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Firebug
4
4
  # The current version of Firebug
5
- VERSION = '0.2.0'
5
+ VERSION = '1.0.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Frase
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-26 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -66,6 +66,26 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: database_cleaner
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.6'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 1.6.2
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '1.6'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 1.6.2
69
89
  - !ruby/object:Gem::Dependency
70
90
  name: pry
71
91
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +241,6 @@ files:
221
241
  - ".ruby-version"
222
242
  - CODE_OF_CONDUCT.md
223
243
  - Gemfile
224
- - Gemfile.lock
225
244
  - LICENSE.txt
226
245
  - README.md
227
246
  - Rakefile
data/Gemfile.lock DELETED
@@ -1,128 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- firebug (0.2.0)
5
- actionpack (~> 5.0)
6
- activerecord (~> 5.0)
7
- ruby-mcrypt (~> 0.2)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actionpack (5.1.5)
13
- actionview (= 5.1.5)
14
- activesupport (= 5.1.5)
15
- rack (~> 2.0)
16
- rack-test (>= 0.6.3)
17
- rails-dom-testing (~> 2.0)
18
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.1.5)
20
- activesupport (= 5.1.5)
21
- builder (~> 3.1)
22
- erubi (~> 1.4)
23
- rails-dom-testing (~> 2.0)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activemodel (5.1.5)
26
- activesupport (= 5.1.5)
27
- activerecord (5.1.5)
28
- activemodel (= 5.1.5)
29
- activesupport (= 5.1.5)
30
- arel (~> 8.0)
31
- activesupport (5.1.5)
32
- concurrent-ruby (~> 1.0, >= 1.0.2)
33
- i18n (~> 0.7)
34
- minitest (~> 5.1)
35
- tzinfo (~> 1.1)
36
- arel (8.0.0)
37
- ast (2.4.0)
38
- builder (3.2.3)
39
- coderay (1.1.2)
40
- concurrent-ruby (1.0.5)
41
- crass (1.0.3)
42
- diff-lcs (1.3)
43
- docile (1.1.5)
44
- erubi (1.7.0)
45
- i18n (0.9.5)
46
- concurrent-ruby (~> 1.0)
47
- json (2.1.0)
48
- loofah (2.2.0)
49
- crass (~> 1.0.2)
50
- nokogiri (>= 1.5.9)
51
- method_source (0.9.0)
52
- mini_portile2 (2.3.0)
53
- minitest (5.11.3)
54
- nokogiri (1.8.2)
55
- mini_portile2 (~> 2.3.0)
56
- parallel (1.12.1)
57
- parser (2.5.0.1)
58
- ast (~> 2.4.0)
59
- powerpack (0.1.1)
60
- pry (0.11.3)
61
- coderay (~> 1.1.0)
62
- method_source (~> 0.9.0)
63
- rack (2.0.4)
64
- rack-test (0.8.2)
65
- rack (>= 1.0, < 3)
66
- rails-dom-testing (2.0.3)
67
- activesupport (>= 4.2.0)
68
- nokogiri (>= 1.6)
69
- rails-html-sanitizer (1.0.3)
70
- loofah (~> 2.0)
71
- rainbow (3.0.0)
72
- rake (12.3.0)
73
- rspec (3.7.0)
74
- rspec-core (~> 3.7.0)
75
- rspec-expectations (~> 3.7.0)
76
- rspec-mocks (~> 3.7.0)
77
- rspec-core (3.7.0)
78
- rspec-support (~> 3.7.0)
79
- rspec-expectations (3.7.0)
80
- diff-lcs (>= 1.2.0, < 2.0)
81
- rspec-support (~> 3.7.0)
82
- rspec-mocks (3.7.0)
83
- diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.7.0)
85
- rspec-support (3.7.0)
86
- rspec_junit_formatter (0.3.0)
87
- rspec-core (>= 2, < 4, != 2.12.0)
88
- rubocop (0.52.1)
89
- parallel (~> 1.10)
90
- parser (>= 2.4.0.2, < 3.0)
91
- powerpack (~> 0.1)
92
- rainbow (>= 2.2.2, < 4.0)
93
- ruby-progressbar (~> 1.7)
94
- unicode-display_width (~> 1.0, >= 1.0.1)
95
- rubocop-rspec (1.22.2)
96
- rubocop (>= 0.52.1)
97
- ruby-mcrypt (0.2.0)
98
- ruby-progressbar (1.9.0)
99
- simplecov (0.15.1)
100
- docile (~> 1.1.0)
101
- json (>= 1.8, < 3)
102
- simplecov-html (~> 0.10.0)
103
- simplecov-html (0.10.2)
104
- sqlite3 (1.3.13)
105
- thread_safe (0.3.6)
106
- tzinfo (1.2.5)
107
- thread_safe (~> 0.1)
108
- unicode-display_width (1.3.0)
109
- yard (0.9.12)
110
-
111
- PLATFORMS
112
- ruby
113
-
114
- DEPENDENCIES
115
- bundler (~> 1.16)
116
- firebug!
117
- pry (~> 0.11.3)
118
- rake (~> 12.3)
119
- rspec (~> 3.7)
120
- rspec_junit_formatter (~> 0.3.0)
121
- rubocop (~> 0.52.1)
122
- rubocop-rspec (~> 1.22, >= 1.22.2)
123
- simplecov (~> 0.15.1)
124
- sqlite3 (~> 1.3, >= 1.3.13)
125
- yard (~> 0.9.12)
126
-
127
- BUNDLED WITH
128
- 1.16.0