yaji 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -2,5 +2,6 @@
2
2
  *.so
3
3
  .bundle
4
4
  Gemfile.lock
5
+ lib/parser_ext.rb
5
6
  pkg/*
6
7
  tmp/*
@@ -1,3 +1,11 @@
1
+ === 0.2.3 / 2012-04-10
2
+
3
+ * Add build for Windows
4
+
5
+ === 0.2.2 / 2012-03-14
6
+
7
+ * Fix the README file
8
+
1
9
  === 0.2.1 / 2012-03-14
2
10
 
3
11
  * Revert "Close input after work"
@@ -1,4 +1,6 @@
1
1
  # encoding: UTF-8
2
+ ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/
3
+
2
4
  require 'mkmf'
3
5
  require 'rbconfig'
4
6
 
@@ -6,8 +8,12 @@ def define(macro, value = nil)
6
8
  $defs.push("-D #{[macro.upcase, value].compact.join('=')}")
7
9
  end
8
10
 
9
- $CFLAGS << ' -Wall -funroll-loops'
10
- $CFLAGS << ' -Wextra -O0 -ggdb3' if ENV['DEBUG']
11
+ $CFLAGS << " #{ENV["CFLAGS"]}"
12
+ $LDFLAGS << " #{ENV["LDFLAGS"]}"
13
+ $LIBS << " #{ENV["LIBS"]}"
14
+
15
+ $CFLAGS << ' -std=c99 -Wall -funroll-loops -Wextra '
16
+ $CFLAGS << ' -O0 -ggdb3 -pedantic ' if ENV['DEBUG']
11
17
 
12
18
  # have_library('yajl', 'yajl_parse', 'yajl/yajl_parse.h')
13
19
 
@@ -18,5 +18,5 @@
18
18
  #
19
19
 
20
20
  module YAJI
21
- VERSION = "0.2.2"
21
+ VERSION = "0.2.3"
22
22
  end
@@ -8,6 +8,38 @@ end
8
8
  Rake::ExtensionTask.new("parser_ext", gemspec) do |ext|
9
9
  ext.ext_dir = File.join('ext', 'yaji')
10
10
 
11
+ ext.cross_compile = true
12
+ ext.cross_platform = [ENV['HOST'] || "i386-mingw32"]
13
+ if ENV['RUBY_CC_VERSION']
14
+ ext.lib_dir = "lib/couchbase"
15
+ end
16
+ ext.cross_compiling do |spec|
17
+ spec.files.delete("lib/yaji/parser_ext.so")
18
+ spec.files.push("lib/parser_ext.rb", Dir["lib/yaji/1.{8,9}/parser_ext.so"])
19
+ end
20
+
11
21
  # clean compiled extension
12
22
  CLEAN.include "#{ext.lib_dir}/*.#{RbConfig::CONFIG['DLEXT']}"
13
23
  end
24
+
25
+ require 'rubygems/package_task'
26
+ Gem::PackageTask.new(gemspec) do |pkg|
27
+ pkg.need_tar = true
28
+ end
29
+
30
+ file "lib/parser_ext.rb" do
31
+ File.open("lib/parser_ext.rb", 'wb') do |f|
32
+ f.write <<-RUBY
33
+ require "yaji/\#{RUBY_VERSION.sub(/\\.\\d+$/, '')}/parser_ext"
34
+ RUBY
35
+ end
36
+ end
37
+
38
+ task :cross => "lib/parser_ext.rb"
39
+
40
+ desc "Package gem for windows"
41
+ task "package:windows" => :package do
42
+ sh("env RUBY_CC_VERSION=1.8.7 rvm 1.8.7 do bundle exec rake cross compile")
43
+ sh("env RUBY_CC_VERSION=1.9.2 rvm 1.9.2 do bundle exec rake cross compile")
44
+ sh("env RUBY_CC_VERSION=1.8.7:1.9.2 rvm 1.9.2 do bundle exec rake cross native gem")
45
+ end
metadata CHANGED
@@ -1,104 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: yaji
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 3
10
+ version: 0.2.3
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Couchbase
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-03-14 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-04-10 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 0.8.7
22
- type: :development
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ type: :development
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
- requirements:
26
+ requirements:
27
27
  - - ~>
28
- - !ruby/object:Gem::Version
28
+ - !ruby/object:Gem::Version
29
+ hash: 49
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 7
29
34
  version: 0.8.7
30
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
31
37
  name: rake-compiler
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
38
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
39
+ type: :development
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
47
51
  name: minitest
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- type: :development
55
52
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
53
+ type: :development
54
+ requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
63
65
  name: curb
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
66
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: ruby-debug19
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
67
  type: :development
68
+ requirement: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
79
+ name: ruby-debug
87
80
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
81
+ type: :development
82
+ requirement: &id005 !ruby/object:Gem::Requirement
89
83
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- description: YAJI is a ruby wrapper to YAJL providing iterator interface to streaming
95
- JSON parser
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ hash: 3
88
+ segments:
89
+ - 0
90
+ version: "0"
91
+ version_requirements: *id005
92
+ description: YAJI is a ruby wrapper to YAJL providing iterator interface to streaming JSON parser
96
93
  email: info@couchbase.com
97
94
  executables: []
98
- extensions:
95
+
96
+ extensions:
99
97
  - ext/yaji/extconf.rb
100
98
  extra_rdoc_files: []
101
- files:
99
+
100
+ files:
102
101
  - .gitignore
103
102
  - .travis.yml
104
103
  - Gemfile
@@ -136,29 +135,37 @@ files:
136
135
  - test/test_parser.rb
137
136
  - yaji.gemspec
138
137
  homepage: https://github.com/avsej/yaji
139
- licenses:
138
+ licenses:
140
139
  - ASL-2
141
140
  post_install_message:
142
141
  rdoc_options: []
143
- require_paths:
142
+
143
+ require_paths:
144
144
  - lib
145
- required_ruby_version: !ruby/object:Gem::Requirement
145
+ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  none: false
147
- requirements:
148
- - - ! '>='
149
- - !ruby/object:Gem::Version
150
- version: '0'
151
- required_rubygems_version: !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ">="
149
+ - !ruby/object:Gem::Version
150
+ hash: 3
151
+ segments:
152
+ - 0
153
+ version: "0"
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
155
  none: false
153
- requirements:
154
- - - ! '>='
155
- - !ruby/object:Gem::Version
156
- version: '0'
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ hash: 3
160
+ segments:
161
+ - 0
162
+ version: "0"
157
163
  requirements: []
164
+
158
165
  rubyforge_project: yaji
159
166
  rubygems_version: 1.8.18
160
167
  signing_key:
161
168
  specification_version: 3
162
169
  summary: Yet another JSON iterator
163
170
  test_files: []
164
- has_rdoc:
171
+