mocked_website 1.0.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 906a85be6a461426d259206a42c25bc0a7926c29
4
- data.tar.gz: 0d021d49dec3194666b43bab7284ac7b7e9c4de3
2
+ SHA256:
3
+ metadata.gz: c3b1f50dfc5f9e46bd1fc07208b45d51b07126c5350a01946fcc0d71f94e080c
4
+ data.tar.gz: b5c2d2b069df5bb3d0a27449984956f41bce709dc6c0fb7e7c4b4e5021eda09a
5
5
  SHA512:
6
- metadata.gz: 6d043a4a038ed8df231dc543a95bf1cd539b9b9eca29cf8f9811736bff413c4804dfd084889fed3d69af71c21aa8d3b0515cb052d6255d82f8af72502de70530
7
- data.tar.gz: b31846266a56f3928247225dd885f59b18b5c9611e5a2d83f4189afea91405949104f92186b6c511ea5de9b408294301daf4e32a4fa0eadecc9caf4a2a33f0c7
6
+ metadata.gz: 4cdb1bf56aa22f2e6e2424a09e9d677805b41644f85deb9db26afb767b02462911a65ba2ed001c313cae9effb0d2d63872f210fa920cda8a19ece1ac16014b82
7
+ data.tar.gz: 7a9bcf56d2fec3a113fe6c929d5345a389ec327c3013caf0b3d48ad5c7f80d25c629afae00f9558e6523260a0fc62bfb3076f65bdd49b712d733175ae73cd548
@@ -0,0 +1,30 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ name: Ruby ${{ matrix.ruby }}
15
+ strategy:
16
+ matrix:
17
+ ruby: ['3.0', '3.2']
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - name: Set up Ruby
22
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
23
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
24
+ # uses: ruby/setup-ruby@v1
25
+ uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
26
+ with:
27
+ ruby-version: ${{ matrix.ruby }}
28
+ bundler-cache: true
29
+ - name: Run the default task
30
+ run: bundle exec rake
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ Gemfile.lock
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ 2.0.0 - 2024-11-29
2
+ - Support sinatra 4, rack 3, ruby 3
3
+ - Drop support for lower versions
data/Gemfile CHANGED
@@ -1,6 +1,13 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ gem "rake"
6
+
7
+ gem "simplecov", require: false
8
+ gem "minitest"
4
9
 
5
10
  # Specify your gem's dependencies in mocked_website.gemspec
6
11
  gemspec
12
+
13
+ gem "standard", "~> 1.42"
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
- require "rake/testtask"
4
+ require "minitest/test_task"
5
+
6
+ Minitest::TestTask.create
3
7
 
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
8
+ require "standard/rake"
9
9
 
10
- task :default => :test
10
+ task default: %i[test standard]
@@ -1,3 +1,3 @@
1
1
  module MockedWebsite
2
- VERSION = "1.0.1"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "mocked_website/version"
4
- require 'webmock'
5
- require 'sinatra'
4
+ require "webmock"
5
+ require "sinatra"
6
6
 
7
7
  module MockedWebsite
8
8
  def self.create(uri, &block)
@@ -12,12 +12,12 @@ module MockedWebsite
12
12
  rack_app = app = Class.new(Sinatra::Base, &block)
13
13
 
14
14
  # So you don't have to type that e.g. /api/v4 for each path
15
- if !uri.path.empty? && uri.path != '/'
15
+ if !uri.path.empty? && uri.path != "/"
16
16
  rack_app = Rack::URLMap.new(uri.path => app)
17
17
  end
18
18
 
19
- app.instance_variable_set('@pattern', pattern)
20
- app.instance_variable_set('@rack_app', rack_app)
19
+ app.instance_variable_set(:@pattern, pattern)
20
+ app.instance_variable_set(:@rack_app, rack_app)
21
21
 
22
22
  def app.setup
23
23
  WebMock::API.stub_request(:any, @pattern).to_rack(@rack_app)
@@ -30,6 +30,6 @@ module MockedWebsite
30
30
  end
31
31
  end
32
32
 
33
- return app
33
+ app
34
34
  end
35
35
  end
@@ -1,33 +1,27 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "mocked_website/version"
5
4
 
6
5
  Gem::Specification.new do |spec|
7
- spec.name = "mocked_website"
8
- spec.version = MockedWebsite::VERSION
9
- spec.authors = ["Geoffroy Planquart"]
10
- spec.email = ["geoffroy@planquart.fr"]
6
+ spec.name = "mocked_website"
7
+ spec.version = MockedWebsite::VERSION
8
+ spec.authors = ["Geoffroy Planquart"]
9
+ spec.email = ["geoffroy@planquart.fr"]
11
10
 
12
- spec.summary = %q{Mock an entire website using webmock and sinatra}
13
- spec.description = %q{Mock an entire website using webmock and sinatra}
14
- spec.homepage = "https://github.com/Aethelflaed/mocked_website"
15
- spec.license = "MIT"
11
+ spec.summary = "Mock an entire website using webmock and sinatra"
12
+ spec.description = "Mock an entire website using webmock and sinatra"
13
+ spec.homepage = "https://github.com/Aethelflaed/mocked_website"
14
+ spec.license = "MIT"
16
15
 
17
16
  # Specify which files should be added to the gem when it is released.
18
17
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
20
19
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
20
  end
22
- spec.bindir = "exe"
23
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
23
  spec.require_paths = ["lib"]
25
24
 
26
- spec.add_dependency 'sinatra', '~> 2.0'
27
- spec.add_dependency 'webmock', '~> 3.4'
28
-
29
- spec.add_development_dependency "bundler", "~> 1.16"
30
- spec.add_development_dependency "simplecov", "~> 0.15"
31
- spec.add_development_dependency "rake", "~> 10.0"
32
- spec.add_development_dependency "minitest", "~> 5.0"
25
+ spec.add_dependency "sinatra", "~> 4"
26
+ spec.add_dependency "webmock", "~> 3.11"
33
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocked_website
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffroy Planquart
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2024-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -16,84 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '4'
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'
26
+ version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: webmock
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.4'
33
+ version: '3.11'
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: '3.4'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.16'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '1.16'
55
- - !ruby/object:Gem::Dependency
56
- name: simplecov
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '0.15'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '0.15'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '10.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '10.0'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '5.0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '5.0'
40
+ version: '3.11'
97
41
  description: Mock an entire website using webmock and sinatra
98
42
  email:
99
43
  - geoffroy@planquart.fr
@@ -101,10 +45,11 @@ executables: []
101
45
  extensions: []
102
46
  extra_rdoc_files: []
103
47
  files:
48
+ - ".github/workflows/main.yml"
104
49
  - ".gitignore"
105
50
  - ".travis.yml"
51
+ - CHANGELOG.md
106
52
  - Gemfile
107
- - Gemfile.lock
108
53
  - LICENSE.txt
109
54
  - README.md
110
55
  - Rakefile
@@ -117,7 +62,7 @@ homepage: https://github.com/Aethelflaed/mocked_website
117
62
  licenses:
118
63
  - MIT
119
64
  metadata: {}
120
- post_install_message:
65
+ post_install_message:
121
66
  rdoc_options: []
122
67
  require_paths:
123
68
  - lib
@@ -132,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
77
  - !ruby/object:Gem::Version
133
78
  version: '0'
134
79
  requirements: []
135
- rubyforge_project:
136
- rubygems_version: 2.6.14
137
- signing_key:
80
+ rubygems_version: 3.5.23
81
+ signing_key:
138
82
  specification_version: 4
139
83
  summary: Mock an entire website using webmock and sinatra
140
84
  test_files: []
data/Gemfile.lock DELETED
@@ -1,53 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mocked_website (1.0.1)
5
- sinatra (~> 2.0)
6
- webmock (~> 3.4)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- addressable (2.5.2)
12
- public_suffix (>= 2.0.2, < 4.0)
13
- crack (0.4.3)
14
- safe_yaml (~> 1.0.0)
15
- docile (1.3.1)
16
- hashdiff (0.3.7)
17
- json (2.1.0)
18
- minitest (5.11.3)
19
- mustermann (1.0.2)
20
- public_suffix (3.0.2)
21
- rack (2.0.5)
22
- rack-protection (2.0.3)
23
- rack
24
- rake (10.5.0)
25
- safe_yaml (1.0.4)
26
- simplecov (0.16.1)
27
- docile (~> 1.1)
28
- json (>= 1.8, < 3)
29
- simplecov-html (~> 0.10.0)
30
- simplecov-html (0.10.2)
31
- sinatra (2.0.3)
32
- mustermann (~> 1.0)
33
- rack (~> 2.0)
34
- rack-protection (= 2.0.3)
35
- tilt (~> 2.0)
36
- tilt (2.0.8)
37
- webmock (3.4.2)
38
- addressable (>= 2.3.6)
39
- crack (>= 0.3.2)
40
- hashdiff
41
-
42
- PLATFORMS
43
- ruby
44
-
45
- DEPENDENCIES
46
- bundler (~> 1.16)
47
- minitest (~> 5.0)
48
- mocked_website!
49
- rake (~> 10.0)
50
- simplecov (~> 0.15)
51
-
52
- BUNDLED WITH
53
- 1.16.2