yaml 0.2.0 → 0.3.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
2
  SHA256:
3
- metadata.gz: 6e6a2f22aae247b3218ae649b1deaab313db312f3f97857f79122b2bd9c782d5
4
- data.tar.gz: f1fd242c3e4699f88310faa8b41434d7739e820452c986427fcc6fbf31dec9a5
3
+ metadata.gz: 2dc49195cfce5604fb8c6ff7ff3265afcd1c67ebb9bad912452c6f0564179f36
4
+ data.tar.gz: 880779b8ddc77af8cd27ab60659a52051d0473306e35971c667d37bd8194f5c9
5
5
  SHA512:
6
- metadata.gz: ea7c6c85d8bb976b949f0a96db1c9b3102132ad50333d7df9678eb77e9f78577ec549d9e91ea15a494dca0d2dbfa71f5e4dd24ad75dc15df4d11b34c320c7e00
7
- data.tar.gz: '05298e1632fb1a2cb3b76d31b17fa1af61710f25b28a07334fe97226b50c90a58ea7b3defad75f01bbda0fd97400bf5aab286d9268ec6ec3e72735ea44048ae7'
6
+ metadata.gz: d60f0111093a28c23130dc2c1bfdf9e644a488caa2d10e993fbdad02bedc544c58b8667b1414948755e9c299b50eca1fe4638f69f4fe0a12376bfa486596b597
7
+ data.tar.gz: 96854fbcb9435f9e0bb95d873fed77af878783f984385ca73dde1267d10d38ea29ba43b2fa51f1f9ce37a7dc40194492d2028e9e2c5d31b2bbef2ffe261565be
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'weekly'
@@ -3,20 +3,27 @@ name: ubuntu
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
6
+ ruby-versions:
7
+ uses: ruby/actions/.github/workflows/ruby_versions.yml@master
8
+ with:
9
+ engine: cruby
10
+ min_version: 2.4
11
+
12
+ test:
13
+ needs: ruby-versions
7
14
  name: build (${{ matrix.ruby }} / ${{ matrix.os }})
8
15
  strategy:
9
16
  matrix:
10
- ruby: [ 2.7, 2.6, 2.5, 2.4, head ]
17
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
11
18
  os: [ ubuntu-latest, macos-latest ]
12
19
  runs-on: ${{ matrix.os }}
13
20
  steps:
14
- - uses: actions/checkout@v2
21
+ - uses: actions/checkout@v4.1.1
15
22
  - name: Set up Ruby
16
23
  uses: ruby/setup-ruby@v1
17
24
  with:
18
25
  ruby-version: ${{ matrix.ruby }}
19
26
  - name: Install dependencies
20
- run: bundle install
27
+ run: bundle install --jobs 4 --retry 3
21
28
  - name: Run test
22
- run: rake test
29
+ run: bundle exec rake test
data/Gemfile CHANGED
@@ -1,9 +1,8 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gemspec
4
-
5
3
  group :development do
6
4
  gem "bundler"
7
5
  gem "rake"
8
6
  gem "test-unit"
7
+ gem "test-unit-ruby-core"
9
8
  end
data/README.md CHANGED
@@ -38,7 +38,7 @@ YAML.dump("foo") # => "--- foo\n...\n"
38
38
  ```
39
39
 
40
40
  For detailed documentation, see
41
- [Psych](https://ruby-doc.org/stdlib/libdoc/psych/rdoc/index.html).
41
+ [Psych](https://ruby-doc.org/stdlib/exts/psych/Psych.html).
42
42
 
43
43
  ## Security
44
44
 
data/Rakefile CHANGED
@@ -7,11 +7,4 @@ Rake::TestTask.new(:test) do |t|
7
7
  t.test_files = FileList["test/**/test_*.rb"]
8
8
  end
9
9
 
10
- task :sync_tool do
11
- require 'fileutils'
12
- FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
13
- FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
14
- FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
15
- end
16
-
17
10
  task :default => :test
data/lib/yaml/store.rb CHANGED
@@ -65,7 +65,7 @@ class YAML::Store < PStore
65
65
  end
66
66
 
67
67
  def load(content)
68
- table = YAML.unsafe_load(content)
68
+ table = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(content) : YAML.load(content)
69
69
  if table == false
70
70
  {}
71
71
  else
data/lib/yaml.rb CHANGED
@@ -3,9 +3,17 @@
3
3
  begin
4
4
  require 'psych'
5
5
  rescue LoadError
6
- warn "It seems your ruby installation is missing psych (for YAML output).\n" \
7
- "To eliminate this warning, please install libyaml and reinstall your ruby.\n",
8
- uplevel: 1
6
+ case RUBY_ENGINE
7
+ when 'jruby'
8
+ warn "The Psych YAML extension failed to load.\n" \
9
+ "Check your env for conflicting versions of SnakeYAML\n" \
10
+ "See https://github.com/jruby/jruby/wiki/FAQs#why-does-the-psych-yaml-extension-fail-to-load-in-my-environment",
11
+ uplevel: 1
12
+ else
13
+ warn "It seems your ruby installation is missing psych (for YAML output).\n" \
14
+ "To eliminate this warning, please install libyaml and reinstall your ruby.\n",
15
+ uplevel: 1
16
+ end
9
17
  raise
10
18
  end
11
19
 
@@ -58,4 +66,5 @@ YAML = Psych # :nodoc:
58
66
  #
59
67
  # Syck can also be found on github: https://github.com/ruby/syck
60
68
  module YAML
69
+ LOADER_VERSION = "0.3.0"
61
70
  end
data/yaml.gemspec CHANGED
@@ -1,6 +1,13 @@
1
+ name = File.basename(__FILE__, ".gemspec")
2
+ version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
3
+ break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
4
+ /^\s*LOADER_VERSION\s*=\s*"(.*)"/ =~ line and break $1
5
+ end rescue nil
6
+ end
7
+
1
8
  Gem::Specification.new do |spec|
2
- spec.name = "yaml"
3
- spec.version = "0.2.0"
9
+ spec.name = name
10
+ spec.version = version
4
11
  spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"]
5
12
  spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"]
6
13
 
@@ -15,7 +22,7 @@ Gem::Specification.new do |spec|
15
22
  # Specify which files should be added to the gem when it is released.
16
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
17
24
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
18
- `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
26
  end
20
27
  spec.bindir = "exe"
21
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-10-14 00:00:00.000000000 Z
12
+ date: 2023-11-06 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: YAML Ain't Markup Language
15
15
  email:
@@ -19,6 +19,7 @@ executables: []
19
19
  extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
+ - ".github/dependabot.yml"
22
23
  - ".github/workflows/test.yml"
23
24
  - ".gitignore"
24
25
  - Gemfile
@@ -53,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
54
  - !ruby/object:Gem::Version
54
55
  version: '0'
55
56
  requirements: []
56
- rubygems_version: 3.3.0.dev
57
+ rubygems_version: 3.5.0.dev
57
58
  signing_key:
58
59
  specification_version: 4
59
60
  summary: YAML Ain't Markup Language