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 +5 -5
- data/Gemfile +10 -10
- data/Rakefile +32 -32
- data/ext/libyajl2/extconf.rb +10 -9
- data/lib/libyajl2/vendored-libyajl2/lib/libyajl.bundle +0 -0
- data/lib/libyajl2/version.rb +1 -1
- data/libyajl2.gemspec +8 -11
- data/spec/ffi_spec.rb +2 -2
- data/spec/path_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +15 -30
- data/CONTRIBUTING.md +0 -4
- data/README.md +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ddb9c78dfc2cbd1c0407790c2e277d7d6486757a40810536ab7c2af5c4e4f188
|
4
|
+
data.tar.gz: b7c6dcfed6dc83b0dd1df72db292310f2c1167ffb2fc9f4d14122fec90aaf1b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd7b7148fbe25958d9679be8defc46132d0b00eb90270f4071e6af2f206967bd386ec9104d73393427a15cd2fa1f7ba9c31e8ce7b67d65c63e21f214eaba9901
|
7
|
+
data.tar.gz: 2b984199978f692e3c5401020f7d17dd2f25de212eddc848c178c0ef3a29bad0e4a7f6eb37551af2f7b181a4078b992808f51218fd3f229ca65783574a95fb1a
|
data/Gemfile
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development_extras do
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
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
|
16
|
-
gem
|
17
|
-
gem
|
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
|
4
|
-
require
|
3
|
+
require "rubygems"
|
4
|
+
require "rake"
|
5
5
|
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
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(
|
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(
|
45
|
-
ext.lib_dir =
|
46
|
-
ext.ext_dir =
|
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|
|
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
|
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
|
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
|
156
|
+
desc "Run Test Kitchen with cloud plugins"
|
157
157
|
task :cloud do
|
158
|
-
if ENV[
|
159
|
-
ENV[
|
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
|
166
|
+
desc "Run Ruby style checks"
|
167
167
|
begin
|
168
|
-
require
|
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
|
-
|
175
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
175
176
|
t.fail_on_error = false
|
176
177
|
end
|
177
178
|
end
|
178
179
|
|
179
|
-
desc
|
180
|
+
desc "Run Ruby smell checks"
|
180
181
|
begin
|
181
|
-
require
|
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.
|
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
|
214
|
-
task :
|
216
|
+
desc "Run style + spec tests by default on travis"
|
217
|
+
task :travis => %w{spec style}
|
215
218
|
|
216
|
-
desc
|
217
|
-
task :
|
219
|
+
desc "Run style, spec and test kichen on travis"
|
220
|
+
task :travis_all => ["spec", "integration:cloud", "style"]
|
218
221
|
|
219
|
-
|
220
|
-
task :travis_all => ['spec', 'integration:cloud', 'style']
|
221
|
-
|
222
|
-
task :default => ['spec', 'integration:vagrant', 'style']
|
222
|
+
task :default => ["spec", "integration:vagrant", "style"]
|
data/ext/libyajl2/extconf.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
|
-
require
|
3
|
-
require
|
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
|
40
|
+
require "mkmf"
|
40
41
|
end
|
41
42
|
|
42
43
|
def self.setup_env
|
43
|
-
RbConfig::MAKEFILE_CONFIG[
|
44
|
+
RbConfig::MAKEFILE_CONFIG["CC"] = ENV["CC"] if ENV["CC"]
|
44
45
|
|
45
46
|
# set some sane defaults
|
46
|
-
if RbConfig::MAKEFILE_CONFIG[
|
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"
|
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",
|
99
|
+
makefile.gsub!(/\$\(DEFFILE\)/, "")
|
100
|
+
File.open("Makefile", "w+") { |f| f.write(makefile) }
|
100
101
|
end
|
101
102
|
|
102
103
|
system("pwd")
|
Binary file
|
data/lib/libyajl2/version.rb
CHANGED
data/libyajl2.gemspec
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
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@
|
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/
|
14
|
-
spec.licenses
|
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
|
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"
|
29
|
-
|
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
|
data/spec/ffi_spec.rb
CHANGED
data/spec/path_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
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
|
18
|
+
expect(File.exist?(File.join(Libyajl2.include_path, "yajl", hdr))).to be_truthy
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/spec/spec_helper.rb
CHANGED
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:
|
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:
|
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: '
|
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: '
|
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: '
|
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: '
|
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@
|
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/
|
297
|
+
homepage: https://github.com/chef/libyajl2-gem
|
313
298
|
licenses:
|
314
|
-
- Apache
|
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.
|
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
|
data/CONTRIBUTING.md
DELETED
data/README.md
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
libyajl2-gem
|
2
|
-
============
|
3
|
-
|
4
|
-
[](http://travis-ci.org/opscode/libyajl2-gem)
|
5
|
-
[](https://gemnasium.com/opscode/libyajl2-gem)
|
6
|
-
[](https://codeclimate.com/github/opscode/libyajl2-gem)
|
7
|
-
[](http://badge.fury.io/rb/libyajl2)
|
8
|
-
|
9
|
-
gem to install the libyajl2 c-library for distributions which do not have it
|