rack-env-notifier 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5c629b250353cefaea0300cfa15606679d9f020
4
- data.tar.gz: cf2c644b616624d23465054a97786214a1e1ff50
3
+ metadata.gz: c711471a2395c34dec0e0866c2d40beb6ee1c9fe
4
+ data.tar.gz: e51db158212b94eab7a2998ed0ee7b0707f01940
5
5
  SHA512:
6
- metadata.gz: 4b67e844a1851df0bca53962b67c24f510a389a21b0aa4fbebcd2638e434242d577aae4843c5dfc01b656426cb323aa5aa99777d9e9d39be6fee8414f2a05ffd
7
- data.tar.gz: 67a15ee0f84cfdec9074568361b074dd7b3c677f55b50a942c107817a8847281de354a21a9e7ca3dc9d95cad95d5c4dbff193ae3bd016b3b17f2ad09f2734d3c
6
+ metadata.gz: 814308e9b7da228f01e7fdc597be71cd0a325d7756db592e1ad794f8106d02e65db9dc378c0e65a4a9381fef0b6b81ee0cc4229efa842556d0a18e8dca320e43
7
+ data.tar.gz: e2ad77d6f418940c8e3b54b84bcf0ce9092702cc68d5a41476887c349cbf10269450bc00e50d576c3a0b8e6cbb044223096b0732b948be74577694425c42dc26
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format nested
2
1
  --color
@@ -1,3 +1,7 @@
1
+ ## v0.0.6
2
+
3
+ * Update RSpec syntax
4
+
1
5
  ## v0.0.5
2
6
 
3
7
  * Update code documentation
data/Gemfile CHANGED
@@ -4,9 +4,6 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  group :test do
7
- gem 'rake'
8
7
  gem 'rack'
9
- gem 'rspec'
10
- gem 'ZenTest'
11
- gem 'autotest'
8
+ gem 'transpec'
12
9
  end
data/README.md CHANGED
@@ -1,22 +1,8 @@
1
- # Rack::EnvNotifier [![Build Status](https://secure.travis-ci.org/ducknorris/rack-env-notifier.png)](http://travis-ci.org/ducknorris/rack-env-notifier)
1
+ # Rack::EnvNotifier [![Build Status](https://secure.travis-ci.org/ducknorris/rack-env-notifier.png)](https://travis-ci.org/ducknorris/rack-env-notifier)
2
2
 
3
3
  [![Code Climate](https://codeclimate.com/github/ducknorris/rack-env-notifier.png)](https://codeclimate.com/github/ducknorris/rack-env-notifier) [![Dependency Status](https://gemnasium.com/ducknorris/rack-env-notifier.png)](https://gemnasium.com/ducknorris/rack-env-notifier) [![Gem Version](https://badge.fury.io/rb/rack-env-notifier.png)](http://badge.fury.io/rb/rack-env-notifier)
4
4
 
5
- Middleware that displays the custom notification for every html page. Designed to work both in production and in development.
6
-
7
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview1.png)
8
-
9
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview2.png)
10
-
11
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview3.png)
12
-
13
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview4.png)
14
-
15
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview5.png)
16
-
17
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview6.png)
18
-
19
- ![alt tag](https://raw.github.com/ducknorris/rack-env-notifier/master/assets/preview7.png)
5
+ Middleware that displays a custom notification for every HTML page. It's designed to work both in production and development.
20
6
 
21
7
  ## Installation
22
8
 
@@ -102,9 +88,25 @@ The default message is configured in the initializer:
102
88
  Rack::EnvNotifier.message = 'Dev'
103
89
  end
104
90
 
91
+ ## Preview
92
+
93
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview1.png)
94
+
95
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview2.png)
96
+
97
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview3.png)
98
+
99
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview4.png)
100
+
101
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview5.png)
102
+
103
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview6.png)
104
+
105
+ ![alt tag](https://rack-env-notifier.s3.amazonaws.com/assets/preview7.png)
106
+
105
107
  ## Contributing
106
108
 
107
- Thanks to our [contributors](https://github.com/ducknorris/env_notifier/graphs/contributors).
109
+ Thanks to our [contributors](https://github.com/ducknorris/rack-env-notifier/graphs/contributors).
108
110
 
109
111
  1. Fork it
110
112
  2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -112,4 +114,8 @@ Thanks to our [contributors](https://github.com/ducknorris/env_notifier/graphs/c
112
114
  4. Push to the branch (`git push origin my-new-feature`)
113
115
  5. Create new Pull Request
114
116
 
115
- #### Inspired by [harleyttd / miniprofiler](https://github.com/harleyttd/miniprofiler/)
117
+ #### Inspired by [harleyttd / miniprofiler](https://github.com/harleyttd/miniprofiler/).
118
+
119
+
120
+ [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ducknorris/rack-env-notifier/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
121
+
@@ -1,5 +1,5 @@
1
1
  require 'rack/env_notifier'
2
2
 
3
3
  class Rack::EnvNotifier
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # encoding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'rack-env-notifier'
@@ -8,13 +8,13 @@ describe Rack::EnvNotifier::BodyInjector do
8
8
  it { should be_kind_of(Regexp) }
9
9
 
10
10
  it 'only picks a valid <body> tag' do
11
- regex.match("<body></body>").to_s.should eq('<body>')
12
- regex.match("<body><h1></h1></body>").to_s.should eq('<body>')
13
- regex.match("<body attribute='something'><h1></h1></body>").to_s.should eq("<body attribute='something'>")
11
+ expect(regex.match("<body></body>").to_s).to eq('<body>')
12
+ expect(regex.match("<body><h1></h1></body>").to_s).to eq('<body>')
13
+ expect(regex.match("<body attribute='something'><h1></h1></body>").to_s).to eq("<body attribute='something'>")
14
14
  end
15
15
 
16
- it 'responds false when no head tag' do
17
- regex.match("<html></html>").should be_false
16
+ it 'responds nil when no head tag' do
17
+ expect(regex.match("<html></html>")).to eq nil
18
18
  end
19
19
  end
20
20
  end
@@ -31,20 +31,20 @@ describe Rack::EnvNotifier do
31
31
  end
32
32
 
33
33
  it 'returns 200' do
34
- last_response.should be_ok
34
+ expect(last_response).to be_ok
35
35
  end
36
36
 
37
37
  it 'has the X-EnvNotifier header' do
38
- last_response.headers.has_key?('X-EnvNotifier').should be_true
38
+ expect(last_response.headers.has_key?('X-EnvNotifier')).to eq true
39
39
  end
40
40
 
41
41
  it 'has only one X-EnvNotifier header' do
42
42
  h = last_response.headers['X-EnvNotifier']
43
- h.should eq('warning!!! hot zone!!!')
43
+ expect(h).to eq('warning!!! hot zone!!!')
44
44
  end
45
45
 
46
46
  it 'has the Notification in the body' do
47
- last_response.body.include?('<div id="env-notifier" class="warning-hot-zone" style="position: fixed; top: 0; right: 0; left: 0; background: rgba(150, 50, 50, .7); color: #fff; text-align: center; font-size: 16px; font-weight: bold; padding: 2px; z-index: 999999">warning!!! hot zone!!!</div>').should be_true
47
+ expect(last_response.body.include?('<div id="env-notifier" class="warning-hot-zone" style="position: fixed; top: 0; right: 0; left: 0; background: rgba(150, 50, 50, .7); color: #fff; text-align: center; font-size: 16px; font-weight: bold; padding: 2px; z-index: 999999">warning!!! hot zone!!!</div>')).to eq true
48
48
  end
49
49
 
50
50
  end
@@ -58,15 +58,15 @@ describe Rack::EnvNotifier do
58
58
  end
59
59
 
60
60
  it 'returns 200' do
61
- last_response.should be_ok
61
+ expect(last_response).to be_ok
62
62
  end
63
63
 
64
64
  it 'has the X-EnvNotifier header' do
65
- last_response.headers.has_key?('X-EnvNotifier').should_not be_true
65
+ expect(last_response.headers.has_key?('X-EnvNotifier')).not_to eq true
66
66
  end
67
67
 
68
68
  it 'has the Notification in the body' do
69
- last_response.body.include?('<div id="env-notifier" class="warning" style="position: fixed; top: 0; right: 0; left: 0; background: rgba(150, 50, 50, .7); color: #fff; text-align: center; font-size: 16px; font-weight: bold; padding: 2px; z-index: 999999">warning</div>').should_not be_true
69
+ expect(last_response.body.include?('<div id="env-notifier" class="warning" style="position: fixed; top: 0; right: 0; left: 0; background: rgba(150, 50, 50, .7); color: #fff; text-align: center; font-size: 16px; font-weight: bold; padding: 2px; z-index: 999999">warning</div>')).not_to eq true
70
70
  end
71
71
 
72
72
  end
@@ -79,7 +79,7 @@ describe Rack::EnvNotifier do
79
79
 
80
80
  describe "with default CSS" do
81
81
  it "does format the Notification" do
82
- Rack::EnvNotifier.notification.should eq(<<-EOF
82
+ expect(Rack::EnvNotifier.notification).to eq(<<-EOF
83
83
  <!-- Notify Start -->
84
84
  <div id="env-notifier" class="notification" style="position: fixed; top: 0; right: 0; left: 0; background: rgba(150, 50, 50, .7); color: #fff; text-align: center; font-size: 16px; font-weight: bold; padding: 2px; z-index: 999999">notification</div>
85
85
  <!-- Notify End -->
@@ -94,7 +94,7 @@ describe Rack::EnvNotifier do
94
94
  end
95
95
 
96
96
  it "does format the Notification" do
97
- Rack::EnvNotifier.notification.should eq(<<-EOF
97
+ expect(Rack::EnvNotifier.notification).to eq(<<-EOF
98
98
  <!-- Notify Start -->
99
99
  <div id="env-notifier" class="notification">notification</div>
100
100
  <!-- Notify End -->
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-env-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Catalin Ilinca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-17 00:00:00.000000000 Z
11
+ date: 2014-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rack-test
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.1.3
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.1.3
83
83
  description: Middleware that displays the custom notification for every html page.
@@ -90,21 +90,14 @@ extra_rdoc_files:
90
90
  - README.md
91
91
  - CHANGELOG.md
92
92
  files:
93
- - .gitignore
94
- - .rspec
95
- - .travis.yml
93
+ - ".gitignore"
94
+ - ".rspec"
95
+ - ".travis.yml"
96
96
  - CHANGELOG.md
97
97
  - Gemfile
98
98
  - LICENSE
99
99
  - README.md
100
100
  - Rakefile
101
- - assets/preview1.png
102
- - assets/preview2.png
103
- - assets/preview3.png
104
- - assets/preview4.png
105
- - assets/preview5.png
106
- - assets/preview6.png
107
- - assets/preview7.png
108
101
  - lib/rack-env-notifier.rb
109
102
  - lib/rack/env_notifier.rb
110
103
  - lib/rack/env_notifier/body_injector.rb
@@ -122,17 +115,17 @@ require_paths:
122
115
  - lib
123
116
  required_ruby_version: !ruby/object:Gem::Requirement
124
117
  requirements:
125
- - - '>='
118
+ - - ">="
126
119
  - !ruby/object:Gem::Version
127
120
  version: '0'
128
121
  required_rubygems_version: !ruby/object:Gem::Requirement
129
122
  requirements:
130
- - - '>='
123
+ - - ">="
131
124
  - !ruby/object:Gem::Version
132
125
  version: '0'
133
126
  requirements: []
134
127
  rubyforge_project:
135
- rubygems_version: 2.0.7
128
+ rubygems_version: 2.4.1
136
129
  signing_key:
137
130
  specification_version: 4
138
131
  summary: Know your ground!
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file