60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/spec/app/public/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skryukov/typelizer/ca67584ae3d903194966b1628a806573402ebec6/spec/app/public/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/spec/app/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skryukov/typelizer/ca67584ae3d903194966b1628a806573402ebec6/spec/app/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/spec/app/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skryukov/typelizer/ca67584ae3d903194966b1628a806573402ebec6/spec/app/public/favicon.ico
--------------------------------------------------------------------------------
/spec/app/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 |
--------------------------------------------------------------------------------
/spec/app/storage/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skryukov/typelizer/ca67584ae3d903194966b1628a806573402ebec6/spec/app/storage/.keep
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ENV["DISABLE_TYPELIZER"] = "false"
4 | ENV["RAILS_ENV"] = "test"
5 | require File.expand_path("app/config/environment", __dir__)
6 |
7 | RSpec.configure do |config|
8 | # Enable flags like --only-failures and --next-failure
9 | config.example_status_persistence_file_path = ".rspec_status"
10 |
11 | # Disable RSpec exposing methods globally on `Module` and `main`
12 | config.disable_monkey_patching!
13 |
14 | config.expect_with :rspec do |c|
15 | c.syntax = :expect
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/spec/typelizer_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | RSpec.describe Typelizer do
4 | let(:config) { Typelizer::Config }
5 |
6 | around(:each) do |example|
7 | FileUtils.rmtree(config.output_dir)
8 | example.run
9 | FileUtils.rmtree(config.output_dir)
10 | end
11 |
12 | it "has a rake task available", aggregate_failures: true do
13 | Rails.application.load_tasks
14 | expect { Rake::Task["typelizer:generate"].invoke }.not_to raise_error
15 |
16 | # check all generated files are equal to the snapshots
17 | config.output_dir.glob("**/*.ts").each do |file|
18 | expect(file.read).to match_snapshot(file.basename)
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/typelizer.gemspec:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative "lib/typelizer/version"
4 |
5 | Gem::Specification.new do |spec|
6 | spec.name = "typelizer"
7 | spec.version = Typelizer::VERSION
8 | spec.authors = ["Svyatoslav Kryukov"]
9 | spec.email = ["me@skryukov.dev"]
10 |
11 | spec.summary = "A TypeScript type generator for Ruby serializers."
12 | spec.description = "A TypeScript type generator for Ruby serializers."
13 | spec.homepage = "https://github.com/skryukov/typelizer"
14 | spec.license = "MIT"
15 | spec.required_ruby_version = ">= 2.7.0"
16 |
17 | spec.metadata = {
18 | "bug_tracker_uri" => "#{spec.homepage}/issues",
19 | "changelog_uri" => "#{spec.homepage}/blob/main/CHANGELOG.md",
20 | "documentation_uri" => "#{spec.homepage}/blob/main/README.md",
21 | "homepage_uri" => spec.homepage,
22 | "source_code_uri" => spec.homepage,
23 | "rubygems_mfa_required" => "true"
24 | }
25 |
26 | spec.files = Dir["{app,lib}/**/*", "CHANGELOG.md", "LICENSE.txt", "README.md"]
27 | spec.require_paths = ["lib"]
28 |
29 | spec.add_dependency "railties", ">= 6.0.0"
30 | end
31 |
--------------------------------------------------------------------------------