tennpipes 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 442d72e0f22c5bc68be3d1de00cba1c6e255137a
4
+ data.tar.gz: 22412373e062e86f8148755cad7bfa00ab0a25e3
5
+ SHA512:
6
+ metadata.gz: e752edad9201252456bc91cb793b721f1dbb3bfd4f6b13d2346ed8fb5b6b3454dfe3805bbde7aa4734a62b4705b2d88c9cde8bb7bbbe008cc344b91fa7b4be56
7
+ data.tar.gz: 65f25aec40d842dda3a3c97325a46f71d1a6362c5676d5333c4d2f05606ababb30278734b420846ae3d99467a958b2275de4b4b74335bf0eababff9d7af999cd
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Tennpipes
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,21 @@
1
+ = tennpipes-framework
2
+
3
+ == Installation
4
+
5
+ To install the tennpipes framework, simply grab the latest version from gemcutter:
6
+
7
+ $ gem install tennpipes --source http://rubygems.org
8
+
9
+ This will install the necessary tennpipes gems to get you started.
10
+ Now you are ready to use this gem to enhance your existing Sinatra projects or build new Tennpipes applications.
11
+
12
+ == Usage
13
+
14
+ This gem serves as a container for easily installing and requiring the entire Tennpipes framework.
15
+
16
+ For the Tennpipes documentation overview, check out the
17
+ {Tennpipes Framework README}[http://github.com/ennkeypee/tennpipes-framework/README.rdoc]
18
+
19
+ == Copyright
20
+
21
+ Copyright (c) 2011-2013 Tennpipes. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../gem_rake_helper')
2
+
3
+ ########### CUSTOM TASKS ##########
4
+
5
+ task :package => "lib/tennpipes.rb"
6
+
7
+ desc "Create tennpipes.rb"
8
+ task "lib/tennpipes.rb" do
9
+ FileUtils.mkdir_p "lib"
10
+ File.open("lib/tennpipes.rb","w+") do |file|
11
+ file.puts "# Automatically generated from 'tennpipes.gemspec' by `rake lib/tennpipes.rb`"
12
+ TENNPIPES_SUBGEMS.each_key do |name|
13
+ file.puts "require '#{name}'" unless name =~ /tennpipes-(gen|performance)/
14
+ end
15
+ end
16
+ end
data/lib/tennpipes.rb ADDED
@@ -0,0 +1,7 @@
1
+ # Automatically generated from 'tennpipes.gemspec' by `rake lib/tennpipes.rb`
2
+ require 'tennpipes-assist'
3
+ require 'tennpipes-base'
4
+ require 'tennpipes-helper'
5
+ require 'tennpipes-memory'
6
+ require 'tennpipes-mail'
7
+ require 'tennpipes-su'
data/subgems.rb ADDED
@@ -0,0 +1,9 @@
1
+ tennpipes_gemspec = ::Gem::Specification.load(File.expand_path(File.dirname(__FILE__) + "/tennpipes.gemspec"))
2
+ performance_gemspec = ::Gem::Specification.load(File.expand_path(File.dirname(__FILE__) + "/../tennpipes-debug/tennpipes-debug.gemspec"))
3
+
4
+ TENNPIPES_SUBGEMS ||= Hash[tennpipes_gemspec.dependencies.map{ |gem| [gem.name, gem.requirement.to_s] }]
5
+
6
+ TENNPIPES_GEMS ||= TENNPIPES_SUBGEMS.merge(
7
+ 'tennpipes-debug' => performance_gemspec.version.to_s,
8
+ 'tennpipes' => tennpipes_gemspec.version.to_s,
9
+ )
@@ -0,0 +1,46 @@
1
+ class MiniTest::Spec
2
+ # assert_has_tag(:h1, :content => "yellow") { "<h1>yellow</h1>" }
3
+ # In this case, block is the html to evaluate
4
+ def assert_has_tag(name, attributes = {})
5
+ html = yield if block_given?
6
+ fail "Please specify a block" if html.blank?
7
+ assert html.html_safe?, 'output in not #html_safe?'
8
+ matcher = HaveSelector.new(name, attributes)
9
+ assert matcher.matches?(html), matcher.failure_message
10
+ end
11
+
12
+ # assert_has_no_tag(:h1, :content => "yellow") { "<h1>green</h1>" }
13
+ # In this case, block is the html to evaluate
14
+ def assert_has_no_tag(name, attributes = {}, &block)
15
+ assert_has_tag(name, attributes.merge(:count => 0), &block)
16
+ end
17
+
18
+ # Assert_file_exists('/tmp/app')
19
+ def assert_file_exists(file_path)
20
+ assert File.file?(file_path), "File at path '#{file_path}' does not exist!"
21
+ end
22
+
23
+ # Assert_no_file_exists('/tmp/app')
24
+ def assert_no_file_exists(file_path)
25
+ assert !File.exist?(file_path), "File should not exist at path '#{file_path}' but was found!"
26
+ end
27
+
28
+ # assert_dir_exists('/tmp/app')
29
+ def assert_dir_exists(file_path)
30
+ assert File.directory?(file_path), "Folder at path '#{file_path}' does not exist"
31
+ end
32
+
33
+ # assert_no_dir_exists('/tmp/app')
34
+ def assert_no_dir_exists(file_path)
35
+ assert !File.exist?(file_path), "Folder should not exist at path '#{file_path}' but was found"
36
+ end
37
+
38
+ # Asserts that a file matches the pattern
39
+ def assert_match_in_file(pattern, file)
40
+ File.file?(file) ? assert_match(pattern, File.read(file)) : assert_file_exists(file)
41
+ end
42
+
43
+ def assert_no_match_in_file(pattern, file)
44
+ File.file?(file) ? refute_match(pattern, File.read(file)) : assert_file_exists(file)
45
+ end
46
+ end
@@ -0,0 +1,10 @@
1
+ module Rack::Test::Methods
2
+ # Delegate some methods to the last response
3
+ alias_method :response, :last_response
4
+
5
+ [:status, :headers, :body, :content_type, :ok?, :forbidden?].each do |method_name|
6
+ define_method method_name do
7
+ last_response.send(method_name)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,28 @@
1
+ # This monkey patch is because rack-test gem looks abandoned
2
+ module Rack
3
+ module Test
4
+ module Utils # :nodoc:
5
+ def build_nested_query(value, prefix = nil)
6
+ case value
7
+ when Array
8
+ value.map do |v|
9
+ unless unescape(prefix) =~ /\[\]$/
10
+ prefix = "#{prefix}[]"
11
+ end
12
+ build_nested_query(v, "#{prefix}")
13
+ end.join("&")
14
+ when Hash
15
+ value.map do |k, v|
16
+ build_nested_query(v, prefix ? "#{prefix}[#{escape(k)}]" : escape(k))
17
+ end.join("&")
18
+ when NilClass
19
+ prefix.to_s
20
+ else
21
+ # prefix should be escaped to conform rfc3986
22
+ # was: "#{prefix}=#{escape(value)}"
23
+ "#{escape(prefix)}=#{escape(value)}"
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,12 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+
4
+ describe "Tennpipes" do
5
+ it "should be a metagem that requires subgems" do
6
+ assert_nil defined?(Tennpipes::Mailer)
7
+ assert_nil defined?(Tennpipes::Helpers)
8
+ require File.expand_path('../../lib/tennpipes.rb', __FILE__)
9
+ refute_nil defined?(Tennpipes::Mailer)
10
+ refute_nil defined?(Tennpipes::Helpers)
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,156 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tennpipes
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.6.6
5
+ platform: ruby
6
+ authors:
7
+ - enn Gang
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-04-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: tennpipes-assist
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 3.6.6
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 3.6.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: tennpipes-base
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.6.6
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.6.6
41
+ - !ruby/object:Gem::Dependency
42
+ name: tennpipes-helper
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 3.6.6
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 3.6.6
55
+ - !ruby/object:Gem::Dependency
56
+ name: tennpipes-memory
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '='
60
+ - !ruby/object:Gem::Version
61
+ version: 3.6.6
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: 3.6.6
69
+ - !ruby/object:Gem::Dependency
70
+ name: tennpipes-mail
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 3.6.6
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 3.6.6
83
+ - !ruby/object:Gem::Dependency
84
+ name: tennpipes-init
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 3.6.6
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 3.6.6
97
+ - !ruby/object:Gem::Dependency
98
+ name: tennpipes-su
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '='
102
+ - !ruby/object:Gem::Version
103
+ version: 3.6.6
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '='
109
+ - !ruby/object:Gem::Version
110
+ version: 3.6.6
111
+ description: Contain all the tennpipes framework based gems in a system
112
+ email: tennpipes@ennkeypee.com
113
+ executables: []
114
+ extensions: []
115
+ extra_rdoc_files:
116
+ - README.rdoc
117
+ files:
118
+ - LICENSE.txt
119
+ - README.rdoc
120
+ - Rakefile
121
+ - lib/tennpipes.rb
122
+ - subgems.rb
123
+ - test/ext/minitest-spec.rb
124
+ - test/ext/rack-test-methods.rb
125
+ - test/ext/rack-test-utils.rb
126
+ - test/test_tennpipes.rb
127
+ homepage: http://tennpipes.ennkeypee.com
128
+ licenses:
129
+ - MIT
130
+ metadata: {}
131
+ post_install_message:
132
+ rdoc_options:
133
+ - "--charset=UTF-8"
134
+ require_paths:
135
+ - lib
136
+ required_ruby_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ required_rubygems_version: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 1.9.1
146
+ requirements: []
147
+ rubyforge_project:
148
+ rubygems_version: 2.2.2
149
+ signing_key:
150
+ specification_version: 4
151
+ summary: Main tennpipes gem
152
+ test_files:
153
+ - test/test_tennpipes.rb
154
+ - test/ext/rack-test-methods.rb
155
+ - test/ext/rack-test-utils.rb
156
+ - test/ext/minitest-spec.rb