peek-host 1.0.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dad92f1a4d140f070fa4709a777ff528204d4e95
4
+ data.tar.gz: 494de0d06682390b1ce314074c4013b4e5eb0027
5
+ SHA512:
6
+ metadata.gz: a5bb9760fd7c9201f679734960ddff3d3498f0abda075b4f57c0123d92f268dba8728f4d4a1505a48ae9493174c5126ba3e4697c77cc147f737496bd727798da
7
+ data.tar.gz: 08d90e1b75a143fd562714e484771be28526401799cecbc77e0e01584657ebf4ebef30f6bfb9d78d07c27e7ce0cf0119ae10e9eb2ab1f6c40dde8e89f99a82e0
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
File without changes
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in peek-git.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Jacob Bednarz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,37 @@
1
+ # Peek::Host
2
+
3
+ Take a peek into the host which serves your reuest.
4
+
5
+ Things this peek view provides:
6
+
7
+ - Hostname of the instance which served your request.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ gem 'peek-host'
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install peek-host
22
+
23
+ ## Usage
24
+
25
+ Add the following to your `config/initializers/peek.rb`:
26
+
27
+ ```ruby
28
+ Peek.into Peek::Views::Host
29
+ ```
30
+
31
+ ## Contributing
32
+
33
+ 1. Fork it
34
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
35
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
36
+ 4. Push to the branch (`git push origin my-new-feature`)
37
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ <span class="current-host">
2
+ <%= view.hostname %>
3
+ </span>
@@ -0,0 +1,3 @@
1
+ require 'peek/views/host'
2
+ require 'peek-host/version'
3
+ require 'peek-host/railtie'
@@ -0,0 +1,6 @@
1
+ module Peek
2
+ module Host
3
+ class Railtie < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module Peek
2
+ module Host
3
+ VERSION = '1.0.0'
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ module Peek
2
+ module Views
3
+ class Host < View
4
+
5
+ # Returns Peek::Views::Host
6
+ def initialize(options = {})
7
+ @hostname = hostname
8
+ end
9
+
10
+ def hostname
11
+ `hostname`
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'peek-host/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'peek-host'
8
+ gem.version = Peek::Host::VERSION
9
+ gem.authors = ['Jacob Bednarz']
10
+ gem.email = ['jacob.bednarz@gmail.com']
11
+ gem.description = %q{Take a peek into the host which served your Rails request.}
12
+ gem.summary = %q{Take a peek into the host which served your Rails request.}
13
+ gem.homepage = 'https://github.com/jacobbednarz/peek-host'
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ['lib']
19
+
20
+ gem.add_dependency 'peek'
21
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: peek-host
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jacob Bednarz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: peek
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Take a peek into the host which served your Rails request.
28
+ email:
29
+ - jacob.bednarz@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - CHANGELOG.md
36
+ - Gemfile
37
+ - LICENSE.txt
38
+ - README.md
39
+ - Rakefile
40
+ - app/views/peek/views/_host.html.erb
41
+ - lib/peek-host.rb
42
+ - lib/peek-host/railtie.rb
43
+ - lib/peek-host/version.rb
44
+ - lib/peek/views/host.rb
45
+ - peek-host.gemspec
46
+ homepage: https://github.com/jacobbednarz/peek-host
47
+ licenses: []
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 2.0.14
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Take a peek into the host which served your Rails request.
69
+ test_files: []