firudo 1.1.2 → 1.1.4

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.
Files changed (57) hide show
  1. checksums.yaml +7 -7
  2. data/.rvmrc +1 -0
  3. data/Rakefile +50 -0
  4. data/firudo.gemspec +3 -1
  5. data/lib/firudo/version.rb +1 -1
  6. data/rdoc/Firudo.html +112 -0
  7. data/rdoc/README_md.html +121 -0
  8. data/rdoc/Sinatra.html +98 -0
  9. data/rdoc/Sinatra/Firudo.html +285 -0
  10. data/rdoc/created.rid +4 -0
  11. data/rdoc/fonts.css +167 -0
  12. data/rdoc/fonts/Lato-Light.ttf +0 -0
  13. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  14. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  15. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  16. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  17. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  18. data/rdoc/images/add.png +0 -0
  19. data/rdoc/images/arrow_up.png +0 -0
  20. data/rdoc/images/brick.png +0 -0
  21. data/rdoc/images/brick_link.png +0 -0
  22. data/rdoc/images/bug.png +0 -0
  23. data/rdoc/images/bullet_black.png +0 -0
  24. data/rdoc/images/bullet_toggle_minus.png +0 -0
  25. data/rdoc/images/bullet_toggle_plus.png +0 -0
  26. data/rdoc/images/date.png +0 -0
  27. data/rdoc/images/delete.png +0 -0
  28. data/rdoc/images/find.png +0 -0
  29. data/rdoc/images/loadingAnimation.gif +0 -0
  30. data/rdoc/images/macFFBgHack.png +0 -0
  31. data/rdoc/images/package.png +0 -0
  32. data/rdoc/images/page_green.png +0 -0
  33. data/rdoc/images/page_white_text.png +0 -0
  34. data/rdoc/images/page_white_width.png +0 -0
  35. data/rdoc/images/plugin.png +0 -0
  36. data/rdoc/images/ruby.png +0 -0
  37. data/rdoc/images/tag_blue.png +0 -0
  38. data/rdoc/images/tag_green.png +0 -0
  39. data/rdoc/images/transparent.png +0 -0
  40. data/rdoc/images/wrench.png +0 -0
  41. data/rdoc/images/wrench_orange.png +0 -0
  42. data/rdoc/images/zoom.png +0 -0
  43. data/rdoc/index.html +96 -0
  44. data/rdoc/js/darkfish.js +140 -0
  45. data/rdoc/js/jquery.js +4 -0
  46. data/rdoc/js/navigation.js +142 -0
  47. data/rdoc/js/search.js +109 -0
  48. data/rdoc/js/search_index.js +1 -0
  49. data/rdoc/js/searcher.js +228 -0
  50. data/rdoc/rdoc.css +580 -0
  51. data/rdoc/table_of_contents.html +86 -0
  52. data/spec/fixtures/log/test.log +1 -0
  53. data/spec/sinatra/firudo_spec.rb +45 -0
  54. data/spec/sinatra/test_app.rb +21 -0
  55. data/spec/spec.opts +1 -0
  56. data/spec/spec_helper.rb +24 -0
  57. metadata +144 -53
@@ -0,0 +1,86 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>Table of Contents - firudo </title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" class="table-of-contents">
25
+ <main role="main">
26
+ <h1 class="class">Table of Contents - firudo </h1>
27
+
28
+ <h2 id="pages">Pages</h2>
29
+ <ul>
30
+ <li class="file">
31
+ <a href="README_md.html">README</a>
32
+
33
+ <ul>
34
+ <li><a href="README_md.html#label-Firudo">Firudo</a>
35
+ <li><a href="README_md.html#label-Installation">Installation</a>
36
+ <li><a href="README_md.html#label-Usage">Usage</a>
37
+ </ul>
38
+ </li>
39
+
40
+ </ul>
41
+
42
+ <h2 id="classes">Classes and Modules</h2>
43
+ <ul>
44
+ <li class="module">
45
+ <a href="Firudo.html">Firudo</a>
46
+ </li>
47
+ <li class="module">
48
+ <a href="Sinatra.html">Sinatra</a>
49
+ </li>
50
+ <li class="module">
51
+ <a href="Sinatra/Firudo.html">Sinatra::Firudo</a>
52
+ </li>
53
+ </ul>
54
+
55
+ <h2 id="methods">Methods</h2>
56
+ <ul>
57
+
58
+ <li class="method">
59
+ <a href="Sinatra/Firudo.html#method-c-filter_attributes">::filter_attributes</a>
60
+ &mdash;
61
+ <span class="container">Sinatra::Firudo</span>
62
+
63
+ <li class="method">
64
+ <a href="Sinatra/Firudo.html#method-c-logger">::logger</a>
65
+ &mdash;
66
+ <span class="container">Sinatra::Firudo</span>
67
+
68
+ <li class="method">
69
+ <a href="Sinatra/Firudo.html#method-c-registered">::registered</a>
70
+ &mdash;
71
+ <span class="container">Sinatra::Firudo</span>
72
+
73
+ <li class="method">
74
+ <a href="Sinatra/Firudo.html#method-i-write">#write</a>
75
+ &mdash;
76
+ <span class="container">Sinatra::Firudo</span>
77
+ </ul>
78
+ </main>
79
+
80
+
81
+ <footer id="validator-badges" role="contentinfo">
82
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
83
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
84
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
85
+ </footer>
86
+
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,45 @@
1
+ require File.expand_path(File.dirname(File.dirname(__FILE__)) + '/spec_helper')
2
+ require File.expand_path(File.dirname(File.dirname(__FILE__)) + '/sinatra/test_app')
3
+
4
+ describe "Sinatra" do
5
+ include Rack::Test::Methods
6
+
7
+ describe "Firudo" do
8
+ describe "with Default Settings" do
9
+
10
+ before(:each) do
11
+ FileUtils.mkdir_p "#{fixtures_path}/log"
12
+ @log_file = "#{fixtures_path}/log/#{TestApp.environment}.log"
13
+ `touch #{@log_file}`
14
+ end
15
+
16
+ def app
17
+ TestApp.new
18
+ end
19
+
20
+ after(:each) do
21
+ `echo '' > #{@log_file}`
22
+ end
23
+
24
+ describe "Helpers" do
25
+
26
+ it "should return an instance of Logger" do
27
+ expect(Sinatra::Firudo.logger).to be_a_kind_of(::Logger)
28
+ end
29
+
30
+ describe "#filter_attributes" do
31
+
32
+ it "should create a #{TestApp.environment}.log file when initialized" do
33
+ test(?f, @log_file).should == true
34
+ end
35
+
36
+ it "should filter secure data in log" do
37
+ get('/status?login=abc&password=123&password_confirmation=123')
38
+ expect(IO.read(@log_file)).to match(/password=*{8}/)
39
+ expect(IO.read(@log_file)).to match(/password_confirmation=*{8}/)
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,21 @@
1
+ require 'sinatra'
2
+
3
+ class TestApp < Sinatra::Base
4
+
5
+ set :root, "#{File.dirname(File.expand_path(__FILE__))}/../fixtures"
6
+ set :app_dir, "#{File.dirname(File.expand_path(__FILE__))}/../fixtures/app"
7
+ set :public_dir, "#{File.dirname(File.expand_path(__FILE__))}/../fixtures/public"
8
+
9
+ enable :raise_errors
10
+ Sinatra::Base.set :environment, :test
11
+
12
+ register Sinatra::Firudo
13
+ Sinatra::Firudo.filter_attributes :password, :password_confirmation
14
+
15
+ get '/status' do
16
+ login = params[:login]
17
+ password = params[:password]
18
+ password_confirmation = params[:password_confirmation]
19
+ end
20
+
21
+ end
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,24 @@
1
+ require 'bundler/setup'
2
+ Bundler.setup
3
+
4
+ require 'sinatra'
5
+ require 'firudo'
6
+ require 'rack/test'
7
+
8
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
9
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
10
+ # DEPENDENCIES
11
+ %w( sinatra/base fileutils ).each {|lib| require lib }
12
+
13
+ ## SINATRA EXTENSIONS
14
+ %w( logger ).each {|ext| require ext }
15
+
16
+ ENV['RACK_ENV'] = 'test'
17
+
18
+ RSpec.configure do |config|
19
+ # some (optional) config here
20
+ end
21
+
22
+ def fixtures_path
23
+ "#{File.dirname(File.expand_path(__FILE__))}/fixtures"
24
+ end
metadata CHANGED
@@ -1,57 +1,94 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: firudo
3
- version: !ruby/object:Gem::Version
4
- version: 1.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.1.4
5
5
  platform: ruby
6
- authors:
7
- - Ostap Ivanyshyn
6
+ authors:
7
+ - ostaptan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2015-02-02 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
15
14
  name: sinatra
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
21
19
  version: 1.4.0
22
20
  type: :runtime
23
- version_requirements: *id001
24
- - !ruby/object:Gem::Dependency
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.4.0
27
+ - !ruby/object:Gem::Dependency
25
28
  name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
26
35
  prerelease: false
27
- requirement: &id002 !ruby/object:Gem::Requirement
28
- requirements:
29
- - - ~>
30
- - !ruby/object:Gem::Version
31
- version: "1.7"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.1.0
32
48
  type: :development
33
- version_requirements: *id002
34
- - !ruby/object:Gem::Dependency
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.1.0
55
+ - !ruby/object:Gem::Dependency
35
56
  name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
36
63
  prerelease: false
37
- requirement: &id003 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ~>
40
- - !ruby/object:Gem::Version
41
- version: "10.0"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rack-test
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
42
76
  type: :development
43
- version_requirements: *id003
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
44
83
  description:
45
- email:
84
+ email:
46
85
  - otan256@gmail.com
47
86
  executables: []
48
-
49
87
  extensions: []
50
-
51
88
  extra_rdoc_files: []
52
-
53
- files:
54
- - .gitignore
89
+ files:
90
+ - ".gitignore"
91
+ - ".rvmrc"
55
92
  - Gemfile
56
93
  - LICENSE
57
94
  - LICENSE.txt
@@ -60,31 +97,85 @@ files:
60
97
  - firudo.gemspec
61
98
  - lib/firudo.rb
62
99
  - lib/firudo/version.rb
100
+ - rdoc/Firudo.html
101
+ - rdoc/README_md.html
102
+ - rdoc/Sinatra.html
103
+ - rdoc/Sinatra/Firudo.html
104
+ - rdoc/created.rid
105
+ - rdoc/fonts.css
106
+ - rdoc/fonts/Lato-Light.ttf
107
+ - rdoc/fonts/Lato-LightItalic.ttf
108
+ - rdoc/fonts/Lato-Regular.ttf
109
+ - rdoc/fonts/Lato-RegularItalic.ttf
110
+ - rdoc/fonts/SourceCodePro-Bold.ttf
111
+ - rdoc/fonts/SourceCodePro-Regular.ttf
112
+ - rdoc/images/add.png
113
+ - rdoc/images/arrow_up.png
114
+ - rdoc/images/brick.png
115
+ - rdoc/images/brick_link.png
116
+ - rdoc/images/bug.png
117
+ - rdoc/images/bullet_black.png
118
+ - rdoc/images/bullet_toggle_minus.png
119
+ - rdoc/images/bullet_toggle_plus.png
120
+ - rdoc/images/date.png
121
+ - rdoc/images/delete.png
122
+ - rdoc/images/find.png
123
+ - rdoc/images/loadingAnimation.gif
124
+ - rdoc/images/macFFBgHack.png
125
+ - rdoc/images/package.png
126
+ - rdoc/images/page_green.png
127
+ - rdoc/images/page_white_text.png
128
+ - rdoc/images/page_white_width.png
129
+ - rdoc/images/plugin.png
130
+ - rdoc/images/ruby.png
131
+ - rdoc/images/tag_blue.png
132
+ - rdoc/images/tag_green.png
133
+ - rdoc/images/transparent.png
134
+ - rdoc/images/wrench.png
135
+ - rdoc/images/wrench_orange.png
136
+ - rdoc/images/zoom.png
137
+ - rdoc/index.html
138
+ - rdoc/js/darkfish.js
139
+ - rdoc/js/jquery.js
140
+ - rdoc/js/navigation.js
141
+ - rdoc/js/search.js
142
+ - rdoc/js/search_index.js
143
+ - rdoc/js/searcher.js
144
+ - rdoc/rdoc.css
145
+ - rdoc/table_of_contents.html
146
+ - spec/fixtures/log/test.log
147
+ - spec/sinatra/firudo_spec.rb
148
+ - spec/sinatra/test_app.rb
149
+ - spec/spec.opts
150
+ - spec/spec_helper.rb
63
151
  homepage: https://github.com/ostaptan/firudo
64
- licenses:
152
+ licenses:
65
153
  - MIT
66
154
  metadata: {}
67
-
68
155
  post_install_message:
69
156
  rdoc_options: []
70
-
71
- require_paths:
157
+ require_paths:
72
158
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
74
- requirements:
75
- - &id004
76
- - ">="
77
- - !ruby/object:Gem::Version
78
- version: "0"
79
- required_rubygems_version: !ruby/object:Gem::Requirement
80
- requirements:
81
- - *id004
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
82
169
  requirements: []
83
-
84
170
  rubyforge_project:
85
- rubygems_version: 2.0.14
171
+ rubygems_version: 2.2.2
86
172
  signing_key:
87
173
  specification_version: 4
88
- summary: Provides writing logs into files and filtering secure data for Sinatra based applications.
89
- test_files: []
90
-
174
+ summary: Provides writing logs into files and filtering secure data for Sinatra based
175
+ applications.
176
+ test_files:
177
+ - spec/fixtures/log/test.log
178
+ - spec/sinatra/firudo_spec.rb
179
+ - spec/sinatra/test_app.rb
180
+ - spec/spec.opts
181
+ - spec/spec_helper.rb