giga-max-lib 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a1c6d3f196422180d2620f90cd68b4ddb3f1f33d1572aecb198f691898f6ed05
4
+ data.tar.gz: 274fd8950a41760cf2d360cd59ad5d2bbc457898748a2965bb6c38032f55b1f6
5
+ SHA512:
6
+ metadata.gz: bcd51983466a77bc844f7ef8c7dc080a0d0df6ae908c8b68c877ac40e0ad371cf953e957a133187f9780aabdf580bc921e3e7f6865b3db358a97d88247175f56
7
+ data.tar.gz: ee6276a81da743c71d610f5d82511b74d4ef0f2d5348c5f00fcf5721722597082bb59849500ef1236f810ae655254c8772c0c06e70ada7c32a65c44b274e9ef0
@@ -0,0 +1,11 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "giga-max-lib"
3
+ s.version = "0.0.1"
4
+ s.summary = "Research test"
5
+ s.description = "University research based on padrino"
6
+ s.authors = ["Andrey78"]
7
+ s.email = ["cakoc614@gmail.com"]
8
+ s.files = Dir.glob("**/*").reject { |f| f.end_with?('.gem') }
9
+ s.homepage = "https://rubygems.org/profiles/Andrey78"
10
+ s.license = "MIT"
11
+ end
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2011 Padrino
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.
@@ -0,0 +1,21 @@
1
+ = padrino-framework
2
+
3
+ == Installation
4
+
5
+ To install the padrino framework, simply grab the latest version from gemcutter:
6
+
7
+ $ sudo gem install padrino --source http://gemcutter.org
8
+
9
+ This will install the necessary padrino gems to get you started.
10
+ Now you are ready to use this gem to enhance your existing Sinatra projects or build new Padrino applications.
11
+
12
+ == Usage
13
+
14
+ This gem serves as a container for easily installing and requiring the entire Padrino framework.
15
+
16
+ For the Padrino documentation overview, check out the
17
+ {Padrino Framework README}[http://github.com/padrino/padrino-framework/blob/master/README.rdoc]
18
+
19
+ == Copyright
20
+
21
+ Copyright (c) 2011-2013 Padrino. See LICENSE for details.
@@ -0,0 +1,16 @@
1
+ require_relative '../gem_rake_helper'
2
+
3
+ ########### CUSTOM TASKS ##########
4
+
5
+ task package: 'lib/padrino.rb'
6
+
7
+ desc 'Create padrino.rb'
8
+ task 'lib/padrino.rb' do
9
+ FileUtils.mkdir_p 'lib'
10
+ File.open('lib/padrino.rb', 'w+') do |file|
11
+ file.puts "# Automatically generated from 'padrino.gemspec' by `rake lib/padrino.rb`"
12
+ PADRINO_SUBGEMS.each_key do |name|
13
+ file.puts "require '#{name}'" unless name =~ /padrino-(gen|performance)/
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,7 @@
1
+ # Automatically generated from 'padrino.gemspec' by `rake lib/padrino.rb`
2
+ require 'padrino-support'
3
+ require 'padrino-core'
4
+ require 'padrino-helpers'
5
+ require 'padrino-cache'
6
+ require 'padrino-mailer'
7
+ require 'padrino-admin'
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env gem build
2
+ # encoding: utf-8
3
+
4
+ require File.expand_path('../padrino-core/lib/padrino-core/version.rb', __dir__)
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'padrino'
8
+ s.authors = ['Padrino Team', 'Nathan Esquenazi', "Davide D'Agostino", 'Arthur Chiu']
9
+ s.email = 'padrinorb@gmail.com'
10
+ s.summary = 'The Godfather of Sinatra'
11
+ s.homepage = 'http://www.padrinorb.com'
12
+ s.description = 'The Godfather of Sinatra provides a full-stack agnostic framework on top of Sinatra'
13
+ s.required_ruby_version = '>= 2.7.8'
14
+ s.required_rubygems_version = '>= 1.3.6'
15
+ s.version = Padrino.version
16
+ s.platform = Gem::Platform::RUBY
17
+ s.date = Time.now.strftime('%Y-%m-%d')
18
+ s.license = 'MIT'
19
+
20
+ s.extra_rdoc_files = Dir['*.rdoc']
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
24
+ s.require_paths = ['lib']
25
+ s.rdoc_options = ['--charset=UTF-8']
26
+
27
+ s.add_dependency('padrino-support', Padrino.version)
28
+ s.add_dependency('padrino-core', Padrino.version)
29
+ s.add_dependency('padrino-helpers', Padrino.version)
30
+ s.add_dependency('padrino-cache', Padrino.version)
31
+ s.add_dependency('padrino-mailer', Padrino.version)
32
+ s.add_dependency('padrino-gen', Padrino.version)
33
+ s.add_dependency('padrino-admin', Padrino.version)
34
+
35
+ # add independent padrino gems to 'subgems.rb'
36
+ end
@@ -0,0 +1,9 @@
1
+ padrino_gemspec = ::Gem::Specification.load(File.expand_path("#{__dir__}/padrino.gemspec"))
2
+ performance_gemspec = ::Gem::Specification.load(File.expand_path("#{__dir__}/../padrino-performance/padrino-performance.gemspec"))
3
+
4
+ PADRINO_SUBGEMS ||= Hash[padrino_gemspec.dependencies.map { |gem| [gem.name, gem.requirement.to_s] }]
5
+
6
+ PADRINO_GEMS ||= PADRINO_SUBGEMS.merge(
7
+ 'padrino' => padrino_gemspec.version.to_s,
8
+ 'padrino-performance' => performance_gemspec.version.to_s
9
+ )
@@ -0,0 +1,30 @@
1
+ class Minitest::Spec
2
+ # Assert_file_exists('/tmp/app')
3
+ def assert_file_exists(file_path)
4
+ assert File.file?(file_path), "File at path '#{file_path}' does not exist!"
5
+ end
6
+
7
+ # Assert_no_file_exists('/tmp/app')
8
+ def assert_no_file_exists(file_path)
9
+ refute File.exist?(file_path), "File should not exist at path '#{file_path}' but was found!"
10
+ end
11
+
12
+ # assert_dir_exists('/tmp/app')
13
+ def assert_dir_exists(file_path)
14
+ assert File.directory?(file_path), "Folder at path '#{file_path}' does not exist"
15
+ end
16
+
17
+ # assert_no_dir_exists('/tmp/app')
18
+ def assert_no_dir_exists(file_path)
19
+ refute File.exist?(file_path), "Folder should not exist at path '#{file_path}' but was found"
20
+ end
21
+
22
+ # Asserts that a file matches the pattern
23
+ def assert_match_in_file(pattern, file)
24
+ File.file?(file) ? assert_match(pattern, File.read(file)) : assert_file_exists(file)
25
+ end
26
+
27
+ def assert_no_match_in_file(pattern, file)
28
+ File.file?(file) ? refute_match(pattern, File.read(file)) : assert_file_exists(file)
29
+ end
30
+ end
@@ -0,0 +1,10 @@
1
+ module Rack::Test::Methods
2
+ # Delegate some methods to the last response
3
+ alias response last_response
4
+
5
+ %i[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,52 @@
1
+ require 'oga'
2
+
3
+ module Padrino
4
+ module TestMethods
5
+ def assert_html_has_tag(html, tag, attributes = {})
6
+ assert html.html_safe?, 'output in not #html_safe?'
7
+ assert_has_selector(html, tag, attributes)
8
+ end
9
+
10
+ def assert_html_has_no_tag(html, tag, attributes = {})
11
+ assert html.html_safe?, 'output in not #html_safe?'
12
+ assert_has_no_selector(html, tag, attributes)
13
+ end
14
+
15
+ def assert_response_has_tag(tag, attributes = {})
16
+ assert_has_selector(last_response.body, tag, attributes)
17
+ end
18
+
19
+ def assert_response_has_no_tag(tag, attributes = {})
20
+ assert_has_no_selector(last_response.body, tag, attributes)
21
+ end
22
+
23
+ def assert_has_selector(html, selector, attributes)
24
+ count_requirement = attributes.delete(:count)
25
+ message = "'#{selector}' with attributes #{attributes} in html\n#{html}"
26
+ matched_count = html_matched_tags(html, selector.to_s, attributes)
27
+ if count_requirement
28
+ assert_equal count_requirement, matched_count, "count of tags #{message}"
29
+ else
30
+ assert matched_count.positive?, "expected a tag #{message}"
31
+ end
32
+ end
33
+
34
+ def assert_has_no_selector(html, selector, attributes)
35
+ message = "'#{selector}' with attributes #{attributes} in html\n#{html}"
36
+ matched_count = html_matched_tags(html, selector.to_s, attributes)
37
+ assert matched_count.zero?, "expected no tags #{message}"
38
+ end
39
+
40
+ private
41
+
42
+ def html_matched_tags(html, selector, attributes)
43
+ @dom ||= Oga.parse_html(html)
44
+ content_requirement = attributes.delete(:content)
45
+
46
+ attributes.each { |name, value| selector += %([#{name}="#{value}"]) }
47
+ tags = @dom.css(selector.to_s.gsub(/\[([^"']*?)=([^'"]*?)\]/, '[\1="\2"]'))
48
+ tags = tags.select { |tag| (tag.get('content') || tag.text).index(content_requirement) } if content_requirement
49
+ tags.count
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,12 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/pride'
3
+
4
+ describe 'Padrino' do
5
+ it 'should be a metagem that requires subgems' do
6
+ refute defined?(Padrino::Mailer)
7
+ refute defined?(Padrino::Helpers)
8
+ require File.expand_path('../lib/padrino.rb', __dir__)
9
+ assert defined?(Padrino::Mailer)
10
+ assert defined?(Padrino::Helpers)
11
+ end
12
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: giga-max-lib
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Andrey78
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2026-07-06 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: University research based on padrino
13
+ email:
14
+ - cakoc614@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - giga-max-lib.gemspec
20
+ - padrino-0.16.1/LICENSE.txt
21
+ - padrino-0.16.1/README.rdoc
22
+ - padrino-0.16.1/Rakefile
23
+ - padrino-0.16.1/lib/padrino.rb
24
+ - padrino-0.16.1/padrino.gemspec
25
+ - padrino-0.16.1/subgems.rb
26
+ - padrino-0.16.1/test/ext/minitest-spec.rb
27
+ - padrino-0.16.1/test/ext/rack-test-methods.rb
28
+ - padrino-0.16.1/test/padrino/test-methods.rb
29
+ - padrino-0.16.1/test/test_padrino.rb
30
+ homepage: https://rubygems.org/profiles/Andrey78
31
+ licenses:
32
+ - MIT
33
+ metadata: {}
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubygems_version: 3.6.2
49
+ specification_version: 4
50
+ summary: Research test
51
+ test_files: []