bridgetown 2.0.0.beta2 → 2.0.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bridgetown/test.rb +56 -0
  3. metadata +11 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 063cf88460f32f0b898468b89c944cd415dab58636e9646b57520262e8d5e3dd
4
- data.tar.gz: d98e5aadadc0fb60b024b1aeff558a889c90fa48ae62bb130ebf7bf2e1ba2b12
3
+ metadata.gz: 4b8fb5aac0bb88322825f3ae4ff83dc0951b396e63f843894ec7d56f5993d97c
4
+ data.tar.gz: 8ab90acf73b4a86ff9f25a62fb34a9e4f62b49f0b61acf8da479ec7f715de117
5
5
  SHA512:
6
- metadata.gz: 22bb8798ed0bb48aa21150be474276789f342a47076d68c46145ff2578dbbecab7044ac05e702bd1621a28094f1cd07b5941b1059f937e2ecbe56e83e71b0531
7
- data.tar.gz: d0d480be99a34c87ccf4c4e65e6a80affef83f67fe7e1e8e476e4eca17706fd03d2339f7ba3be51f97c9e06680ee70e8dce47f6b2e28e25cfc4910daa3a0bdce
6
+ metadata.gz: 405373357d9dcfe6aedfb54d6363da7030440e1c7fc118cca75dededc0880da24078aeaea427ce02732f2c9f8d959908fd43a11c0fd66fdb6dd340bf301c79e6
7
+ data.tar.gz: 67d362d5ffc8589b7176c7822bbf7da208d244fd865e973237a7180090a72bde56276ee912c0b338b966867f6e1978dfe18295acea22c09a600e8fbecda05b2c
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file can be required by project test suites to set up the Minitest environment
4
+
5
+ require "bridgetown"
6
+
7
+ ENV["BRIDGETOWN_NO_BUNDLER_REQUIRE"] = nil
8
+ Bridgetown.begin!
9
+
10
+ Bridgetown::Builders::PluginBuilder.then do
11
+ Bridgetown::Builders::DSL::Inspectors.setup_nokolexbor
12
+ end
13
+
14
+ require "bridgetown-core/rack/boot"
15
+
16
+ Bridgetown::Current.preloaded_configuration = Bridgetown.configuration
17
+ Bridgetown::Rack.boot
18
+
19
+ require "rack/test"
20
+
21
+ require "bridgetown-core/concerns/intuitive_expectations"
22
+ Minitest::Expectation.include Bridgetown::IntuitiveExpectations
23
+ Minitest.backtrace_filter.add_filter %r!bridgetown-core/concerns/intuitive_expectations\.rb!
24
+
25
+ class Bridgetown::Test < Minitest::Test
26
+ extend Minitest::Spec::DSL
27
+ include Rack::Test::Methods
28
+
29
+ attr_reader :document
30
+
31
+ def roda_app_class = RodaApp
32
+
33
+ def roda_log_level = Logger::WARN
34
+
35
+ def app
36
+ return @app if @app
37
+
38
+ # Set the log level to warn so we don't see all the usual HTTP chatter when testing
39
+ roda_app_class.opts[:common_logger].level = roda_log_level
40
+
41
+ @app = roda_app_class.app
42
+ end
43
+
44
+ def site
45
+ roda_app_class.opts[:bridgetown_site]
46
+ end
47
+
48
+ def html(request) = @document = Nokolexbor::Document.parse(request.body)
49
+
50
+ def json(request) = @document = JSON.parse(request.body)
51
+
52
+ def routes = JSON.parse(File.read(
53
+ File.join(Bridgetown::Current.preloaded_configuration.root_dir,
54
+ ".routes.json")
55
+ ))
56
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta2
4
+ version: 2.0.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-18 00:00:00.000000000 Z
11
+ date: 2025-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown-builder
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.beta2
19
+ version: 2.0.0.beta4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0.beta2
26
+ version: 2.0.0.beta4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bridgetown-core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.0.beta2
33
+ version: 2.0.0.beta4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.0.beta2
40
+ version: 2.0.0.beta4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bridgetown-foundation
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 2.0.0.beta2
47
+ version: 2.0.0.beta4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 2.0.0.beta2
54
+ version: 2.0.0.beta4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bridgetown-paginate
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.0.beta2
61
+ version: 2.0.0.beta4
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 2.0.0.beta2
68
+ version: 2.0.0.beta4
69
69
  description: Bridgetown is a next-generation, progressive site generator & fullstack
70
70
  framework, powered by Ruby
71
71
  email: maintainers@bridgetownrb.com
@@ -76,6 +76,7 @@ files:
76
76
  - Rakefile
77
77
  - bridgetown.gemspec
78
78
  - lib/bridgetown.rb
79
+ - lib/bridgetown/test.rb
79
80
  homepage: https://www.bridgetownrb.com
80
81
  licenses:
81
82
  - MIT