libyajl2 1.2.0 → 2.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 29b90bdd01eb66658fee66165cb6c6ec171b8238
4
- data.tar.gz: c97658670399d81a46813ba29dbe7cedd3015ead
2
+ SHA256:
3
+ metadata.gz: ddb9c78dfc2cbd1c0407790c2e277d7d6486757a40810536ab7c2af5c4e4f188
4
+ data.tar.gz: b7c6dcfed6dc83b0dd1df72db292310f2c1167ffb2fc9f4d14122fec90aaf1b5
5
5
  SHA512:
6
- metadata.gz: 2d8a44e91e9bc48eedc4b43e6ef3ba91a08426f67a6a93c3e08632d611c566d681c9c920287b448b626292e18de78eea0f151546bb96c1c500c9e643ec520d63
7
- data.tar.gz: b35c206f313b2f84cfa3eb4a00dd7ea172d94773cde7a85487b1cb6c327bd737582d1e1bb05573566d6d376f215e8b3b1a4c80a380b1a2025e92456292674094
6
+ metadata.gz: bd7b7148fbe25958d9679be8defc46132d0b00eb90270f4071e6af2f206967bd386ec9104d73393427a15cd2fa1f7ba9c31e8ce7b67d65c63e21f214eaba9901
7
+ data.tar.gz: 2b984199978f692e3c5401020f7d17dd2f25de212eddc848c178c0ef3a29bad0e4a7f6eb37551af2f7b181a4078b992808f51218fd3f229ca65783574a95fb1a
data/Gemfile CHANGED
@@ -1,18 +1,18 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
5
  group :development_extras do
6
- gem 'rubocop', '= 0.21.0'
7
- gem 'reek', '= 1.3.7'
8
- gem 'test-kitchen', '~> 1.2'
9
- gem 'kitchen-digitalocean'
10
- gem 'kitchen-ec2'
11
- gem 'kitchen-vagrant'
6
+ gem "chefstyle"
7
+ gem "reek"
8
+ gem "test-kitchen", "~> 1.2"
9
+ gem "kitchen-digitalocean"
10
+ gem "kitchen-ec2"
11
+ gem "kitchen-vagrant"
12
12
  end
13
13
 
14
14
  platforms :rbx do
15
- gem 'racc'
16
- gem 'rubysl', '~> 2.0'
17
- gem 'psych'
15
+ gem "racc"
16
+ gem "rubysl", "~> 2.0"
17
+ gem "psych"
18
18
  end
data/Rakefile CHANGED
@@ -1,15 +1,15 @@
1
1
  $: << File.expand_path(File.join(File.dirname( __FILE__ ), "lib"))
2
2
 
3
- require 'rubygems'
4
- require 'rake'
3
+ require "rubygems"
4
+ require "rake"
5
5
 
6
- require 'rubygems/package_task'
7
- require 'rspec/core/rake_task'
8
- require 'rake/extensiontask'
6
+ require "rubygems/package_task"
7
+ require "rspec/core/rake_task"
8
+ require "rake/extensiontask"
9
9
 
10
10
  GEM_NAME = "libyajl2"
11
11
 
12
- gemspec = eval(File.read('libyajl2.gemspec'))
12
+ gemspec = eval(File.read("libyajl2.gemspec")) # rubocop:disable Security/Eval
13
13
 
14
14
  Gem::PackageTask.new(gemspec) do |pkg|
15
15
  pkg.need_tar = true
@@ -41,9 +41,9 @@ task :clean do
41
41
  sh "git clean -fdx"
42
42
  end
43
43
 
44
- Rake::ExtensionTask.new('libyajl', gemspec) do |ext|
45
- ext.lib_dir = 'lib/libyajl2/vendored-libyajl2/lib'
46
- ext.ext_dir = 'ext/libyajl2'
44
+ Rake::ExtensionTask.new("libyajl", gemspec) do |ext|
45
+ ext.lib_dir = "lib/libyajl2/vendored-libyajl2/lib"
46
+ ext.ext_dir = "ext/libyajl2"
47
47
  end
48
48
 
49
49
  # hack to generate yajl_version.h without using cmake
@@ -53,17 +53,17 @@ def generate_yajl_version
53
53
 
54
54
  yajl_major = yajl_minor = yajl_micro = nil
55
55
  File.open("#{vendor_path}/CMakeLists.txt").each do |line|
56
- if m = line.match(/YAJL_MAJOR (\d+)/)
56
+ if (m = line.match(/YAJL_MAJOR (\d+)/))
57
57
  yajl_major = m[1]
58
58
  end
59
- if m = line.match(/YAJL_MINOR (\d+)/)
59
+ if (m = line.match(/YAJL_MINOR (\d+)/))
60
60
  yajl_minor = m[1]
61
61
  end
62
- if m = line.match(/YAJL_MICRO (\d+)/)
62
+ if (m = line.match(/YAJL_MICRO (\d+)/))
63
63
  yajl_micro = m[1]
64
64
  end
65
65
  end
66
- File.open("#{build_path}/api/yajl_version.h", "w+") do |out| # FIXME: relative path
66
+ File.open("#{build_path}/api/yajl_version.h", "w+") do |out| # FIXME: relative path
67
67
  File.open("#{vendor_path}/src/api/yajl_version.h.cmake").each do |line|
68
68
  line.gsub!(/\$\{YAJL_MAJOR\}/, yajl_major)
69
69
  line.gsub!(/\$\{YAJL_MINOR\}/, yajl_minor)
@@ -136,7 +136,7 @@ RSpec::Core::RakeTask.new(:spec)
136
136
  if RUBY_VERSION.to_f >= 1.9
137
137
  namespace :integration do
138
138
  begin
139
- require 'kitchen'
139
+ require "kitchen"
140
140
  rescue LoadError
141
141
  task :vagrant do
142
142
  puts "test-kitchen gem is not installed"
@@ -145,7 +145,7 @@ if RUBY_VERSION.to_f >= 1.9
145
145
  puts "test-kitchen gem is not installed"
146
146
  end
147
147
  else
148
- desc 'Run Test Kitchen with Vagrant'
148
+ desc "Run Test Kitchen with Vagrant"
149
149
  task :vagrant do
150
150
  Kitchen.logger = Kitchen.default_file_logger
151
151
  Kitchen::Config.new.instances.each do |instance|
@@ -153,32 +153,33 @@ if RUBY_VERSION.to_f >= 1.9
153
153
  end
154
154
  end
155
155
 
156
- desc 'Run Test Kitchen with cloud plugins'
156
+ desc "Run Test Kitchen with cloud plugins"
157
157
  task :cloud do
158
- if ENV['TRAVIS_PULL_REQUEST'] != 'true'
159
- ENV['KITCHEN_YAML'] = '.kitchen.cloud.yml'
158
+ if ENV["TRAVIS_PULL_REQUEST"] != "true"
159
+ ENV["KITCHEN_YAML"] = ".kitchen.cloud.yml"
160
160
  sh "kitchen test --concurrency 4"
161
161
  end
162
162
  end
163
163
  end
164
164
  end
165
165
  namespace :style do
166
- desc 'Run Ruby style checks'
166
+ desc "Run Ruby style checks"
167
167
  begin
168
- require 'rubocop/rake_task'
168
+ require "chefstyle"
169
+ require "rubocop/rake_task"
169
170
  rescue LoadError
170
171
  task :rubocop do
171
172
  puts "rubocop gem is not installed"
172
173
  end
173
174
  else
174
- Rubocop::RakeTask.new(:rubocop) do |t|
175
+ RuboCop::RakeTask.new(:rubocop) do |t|
175
176
  t.fail_on_error = false
176
177
  end
177
178
  end
178
179
 
179
- desc 'Run Ruby smell checks'
180
+ desc "Run Ruby smell checks"
180
181
  begin
181
- require 'reek/rake/task'
182
+ require "reek/rake/task"
182
183
  rescue LoadError
183
184
  task :reek do
184
185
  puts "reek gem is not installed"
@@ -186,7 +187,7 @@ if RUBY_VERSION.to_f >= 1.9
186
187
  else
187
188
  Reek::Rake::Task.new(:reek) do |t|
188
189
  t.fail_on_error = false
189
- t.config_files = '.reek.yml'
190
+ t.config_file = ".reek.yml"
190
191
  end
191
192
  end
192
193
  end
@@ -209,14 +210,13 @@ else
209
210
  end
210
211
  end
211
212
 
213
+ desc "Run all style checks"
214
+ task :style => ["style:rubocop", "style:reek"]
212
215
 
213
- desc 'Run all style checks'
214
- task :style => ['style:rubocop', 'style:reek']
216
+ desc "Run style + spec tests by default on travis"
217
+ task :travis => %w{spec style}
215
218
 
216
- desc 'Run style + spec tests by default on travis'
217
- task :travis => ['spec', 'style']
219
+ desc "Run style, spec and test kichen on travis"
220
+ task :travis_all => ["spec", "integration:cloud", "style"]
218
221
 
219
- desc 'Run style, spec and test kichen on travis'
220
- task :travis_all => ['spec', 'integration:cloud', 'style']
221
-
222
- task :default => ['spec', 'integration:vagrant', 'style']
222
+ task :default => ["spec", "integration:vagrant", "style"]
@@ -1,6 +1,7 @@
1
1
 
2
- require 'rbconfig'
3
- require 'fileutils'
2
+ require "rbconfig"
3
+ require "fileutils"
4
+ require "shellwords"
4
5
 
5
6
  if ENV["USE_SYSTEM_LIBYAJL2"]
6
7
  File.open("Makefile", "w+") do |f|
@@ -32,21 +33,21 @@ module Libyajl2Build
32
33
  end
33
34
 
34
35
  def self.prefix
35
- PREFIX
36
+ PREFIX.shellescape
36
37
  end
37
38
 
38
39
  def self.deps
39
- require 'mkmf'
40
+ require "mkmf"
40
41
  end
41
42
 
42
43
  def self.setup_env
43
- RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
44
+ RbConfig::MAKEFILE_CONFIG["CC"] = ENV["CC"] if ENV["CC"]
44
45
 
45
46
  # set some sane defaults
46
- if RbConfig::MAKEFILE_CONFIG['CC'] =~ /gcc|clang/
47
+ if RbConfig::MAKEFILE_CONFIG["CC"] =~ /gcc|clang/
47
48
  # magic flags copied from upstream yajl build system (-std=c99 is necessary for older gcc)
48
49
  $CFLAGS << " -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes"
49
- $CFLAGS << " -O2" # match what the upstream uses for optimization
50
+ $CFLAGS << " -O2" # match what the upstream uses for optimization
50
51
 
51
52
  # create the implib on windows
52
53
  if windows?
@@ -95,8 +96,8 @@ EOF
95
96
  # i could not figure out how to tell mkmf.rb to stop being so helpful, so instead will just patch it here.
96
97
  if windows?
97
98
  makefile = IO.read("Makefile")
98
- makefile.gsub!(/\$\(DEFFILE\)/, '')
99
- File.open("Makefile", 'w+') {|f| f.write(makefile) }
99
+ makefile.gsub!(/\$\(DEFFILE\)/, "")
100
+ File.open("Makefile", "w+") { |f| f.write(makefile) }
100
101
  end
101
102
 
102
103
  system("pwd")
@@ -1,3 +1,3 @@
1
1
  module Libyajl2
2
- VERSION = "1.2.0"
2
+ VERSION = "2.0.0"
3
3
  end
@@ -1,21 +1,20 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ lib = File.expand_path("../lib", __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'libyajl2/version'
4
+ require "libyajl2/version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "libyajl2"
8
8
  spec.version = Libyajl2::VERSION
9
9
  spec.authors = ["lamont-granquist"]
10
- spec.email = ["lamont@getchef.com"]
10
+ spec.email = ["lamont@chef.io"]
11
11
  spec.summary = %q{Installs a vendored copy of libyajl2 for distributions which lack it}
12
12
  spec.description = spec.summary
13
- spec.homepage = "https://github.com/opscode/libyajl2-gem"
14
- spec.licenses = ["Apache 2.0"]
13
+ spec.homepage = "https://github.com/chef/libyajl2-gem"
14
+ spec.licenses = ["Apache-2.0"]
15
15
 
16
16
  spec.files = Dir.glob("{ext,lib,spec}/**/*") +
17
- %w{Gemfile Rakefile CONTRIBUTING.md README.md libyajl2.gemspec bootstrap.sh LICENSE}
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ %w{Gemfile Rakefile libyajl2.gemspec bootstrap.sh LICENSE}
19
18
  spec.test_files = spec.files.grep(%r{^spec/})
20
19
  spec.require_paths = ["lib"]
21
20
 
@@ -25,9 +24,7 @@ Gem::Specification.new do |spec|
25
24
  spec.add_development_dependency "bundler"
26
25
  spec.add_development_dependency "rake"
27
26
  # rake-compiler 0.9.2 is required for rbx compiles, and in turn requires rubygems >= 1.8.25
28
- spec.add_development_dependency "rake-compiler", "~> 0.9"
29
- # pin mime-types in order to work on ruby 1.8.7
30
- spec.add_development_dependency "mime-types", "~> 1.16"
31
- spec.add_development_dependency "rspec", "~> 2.14"
27
+ spec.add_development_dependency "rake-compiler"
28
+ spec.add_development_dependency "rspec"
32
29
  spec.add_development_dependency "ffi", "~> 1.9"
33
30
  end
@@ -1,6 +1,6 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
- require 'ffi'
3
+ require "ffi"
4
4
 
5
5
  module LibyajlTestFFI
6
6
  extend ::FFI::Library
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe "when testing path helpers" do
4
4
  it "should define Libyajl2::VENDORED_LIBYAJL2_DIR" do
@@ -15,7 +15,7 @@ describe "when testing path helpers" do
15
15
 
16
16
  %w{yajl_common.h yajl_gen.h yajl_parse.h yajl_tree.h yajl_version.h}.each do |hdr|
17
17
  it "should copy the #{hdr} header file to the gem path" do
18
- expect(File.exist?(File.join(Libyajl2.include_path, "yajl", hdr))).to be_true
18
+ expect(File.exist?(File.join(Libyajl2.include_path, "yajl", hdr))).to be_truthy
19
19
  end
20
20
  end
21
21
  end
@@ -1,10 +1,10 @@
1
1
  $LOAD_PATH << File.expand_path(File.join(File.dirname( __FILE__ ), "../lib"))
2
2
 
3
- require 'libyajl2'
3
+ require "libyajl2"
4
4
 
5
5
  RSpec.configure do |c|
6
6
 
7
- c.order = 'random'
7
+ c.order = "random"
8
8
 
9
9
  c.expect_with :rspec do |c2|
10
10
  c2.syntax = :expect
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libyajl2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lamont-granquist
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-22 00:00:00.000000000 Z
11
+ date: 2018-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,44 +42,30 @@ dependencies:
42
42
  name: rake-compiler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '0.9'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '0.9'
55
- - !ruby/object:Gem::Dependency
56
- name: mime-types
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: '1.16'
47
+ version: '0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - "~>"
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: '1.16'
54
+ version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rspec
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - "~>"
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
- version: '2.14'
61
+ version: '0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - "~>"
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
- version: '2.14'
68
+ version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: ffi
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -96,16 +82,14 @@ dependencies:
96
82
  version: '1.9'
97
83
  description: Installs a vendored copy of libyajl2 for distributions which lack it
98
84
  email:
99
- - lamont@getchef.com
85
+ - lamont@chef.io
100
86
  executables: []
101
87
  extensions:
102
88
  - ext/libyajl2/extconf.rb
103
89
  extra_rdoc_files: []
104
90
  files:
105
- - CONTRIBUTING.md
106
91
  - Gemfile
107
92
  - LICENSE
108
- - README.md
109
93
  - Rakefile
110
94
  - bootstrap.sh
111
95
  - ext/libyajl2/api/yajl_common.h
@@ -304,14 +288,15 @@ files:
304
288
  - ext/libyajl2/yajl_tree.c
305
289
  - ext/libyajl2/yajl_version.c
306
290
  - lib/libyajl2.rb
291
+ - lib/libyajl2/vendored-libyajl2/lib/libyajl.bundle
307
292
  - lib/libyajl2/version.rb
308
293
  - libyajl2.gemspec
309
294
  - spec/ffi_spec.rb
310
295
  - spec/path_spec.rb
311
296
  - spec/spec_helper.rb
312
- homepage: https://github.com/opscode/libyajl2-gem
297
+ homepage: https://github.com/chef/libyajl2-gem
313
298
  licenses:
314
- - Apache 2.0
299
+ - Apache-2.0
315
300
  metadata: {}
316
301
  post_install_message:
317
302
  rdoc_options: []
@@ -329,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
314
  version: '0'
330
315
  requirements: []
331
316
  rubyforge_project:
332
- rubygems_version: 2.2.2
317
+ rubygems_version: 2.7.7
333
318
  signing_key:
334
319
  specification_version: 4
335
320
  summary: Installs a vendored copy of libyajl2 for distributions which lack it
@@ -1,4 +0,0 @@
1
- # Contributing
2
-
3
- No contributions from outside of Chef Software, Inc. for now.
4
-
data/README.md DELETED
@@ -1,9 +0,0 @@
1
- libyajl2-gem
2
- ============
3
-
4
- [![Build Status](https://secure.travis-ci.org/opscode/libyajl2-gem.svg?branch=master)](http://travis-ci.org/opscode/libyajl2-gem)
5
- [![Dependency Status](https://gemnasium.com/opscode/libyajl2-gem.svg)](https://gemnasium.com/opscode/libyajl2-gem)
6
- [![Code Climate](https://codeclimate.com/github/opscode/libyajl2-gem.png)](https://codeclimate.com/github/opscode/libyajl2-gem)
7
- [![Gem Version](https://badge.fury.io/rb/libyajl2.svg)](http://badge.fury.io/rb/libyajl2)
8
-
9
- gem to install the libyajl2 c-library for distributions which do not have it