construi 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +5 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +4 -0
  7. data/Rakefile +7 -0
  8. data/VERSION +1 -0
  9. data/bin/construi +6 -0
  10. data/construi.gemspec +29 -0
  11. data/lib/construi.rb +36 -0
  12. data/lib/construi/config.rb +36 -0
  13. data/lib/construi/container.rb +69 -0
  14. data/lib/construi/image.rb +74 -0
  15. data/lib/construi/version.rb +3 -0
  16. data/spec/sanity_spec.rb +7 -0
  17. data/spec/spec_helper.rb +78 -0
  18. data/vendor/bundle/ruby/1.9.1/build_info/codeclimate-test-reporter-0.4.6.info +1 -0
  19. data/vendor/bundle/ruby/1.9.1/cache/codeclimate-test-reporter-0.4.6.gem +0 -0
  20. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/.gitignore +18 -0
  21. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/.rspec +2 -0
  22. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/.travis.yml +8 -0
  23. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/Gemfile +12 -0
  24. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/LICENSE.txt +40 -0
  25. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/README.md +131 -0
  26. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/Rakefile +6 -0
  27. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/bin/cc-tddium-post-worker +24 -0
  28. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/codeclimate-test-reporter.gemspec +29 -0
  29. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/config/cacert.pem +3895 -0
  30. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter.rb +56 -0
  31. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/calculate_blob.rb +39 -0
  32. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/ci.rb +89 -0
  33. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/client.rb +99 -0
  34. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/configuration.rb +57 -0
  35. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/exception_message.rb +74 -0
  36. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/formatter.rb +114 -0
  37. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/git.rb +68 -0
  38. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/payload_validator.rb +59 -0
  39. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/code_climate/test_reporter/version.rb +5 -0
  40. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/lib/codeclimate-test-reporter.rb +8 -0
  41. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/fixtures/encoding_test.rb +6 -0
  42. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/fixtures/encoding_test_iso.rb +6 -0
  43. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/calculate_blob_spec.rb +27 -0
  44. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/ci_spec.rb +26 -0
  45. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb +24 -0
  46. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/configuration_spec.rb +75 -0
  47. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/formatter_spec.rb +141 -0
  48. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/git_spec.rb +39 -0
  49. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/payload_validator_spec.rb +89 -0
  50. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/test_reporter_spec.rb +36 -0
  51. data/vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/spec_helper.rb +46 -0
  52. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.2/ext/json/Makefile +174 -0
  53. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.2/ext/json/ext/generator/Makefile +221 -0
  54. data/vendor/bundle/ruby/1.9.1/gems/json-1.8.2/ext/json/ext/parser/Makefile +221 -0
  55. data/vendor/bundle/ruby/1.9.1/specifications/codeclimate-test-reporter-0.4.6.gemspec +50 -0
  56. metadata +199 -0
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ module CodeClimate::TestReporter
4
+ describe Git do
5
+ describe '.info' do
6
+ it 'returns a hash with git information.' do
7
+ expected_git_hash = {
8
+ head: `git log -1 --pretty=format:'%H'`,
9
+ committed_at: `git log -1 --pretty=format:%ct`.to_i,
10
+ branch: Git.send(:branch_from_git)
11
+ }
12
+
13
+ expect(Git.info).to include expected_git_hash
14
+ end
15
+ end
16
+
17
+ describe 'branch_from_git_or_ci' do
18
+ it 'returns the branch from ci' do
19
+ allow(Ci).to receive(:service_data).and_return({branch: 'ci-branch'})
20
+
21
+ expect(Git.branch_from_git_or_ci).to eq 'ci-branch'
22
+ end
23
+
24
+ it 'returns the branch from git if there is no ci branch' do
25
+ allow(Ci).to receive(:service_data).and_return({})
26
+
27
+ expect(Git.branch_from_git_or_ci).to eq Git.clean_git_branch
28
+ end
29
+
30
+ it 'returns master otherwise' do
31
+ allow(Ci).to receive(:service_data).and_return({})
32
+ allow(Git).to receive(:branch_from_git).and_return(nil)
33
+
34
+ expect(Git.branch_from_git_or_ci).to eq 'master'
35
+ end
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,89 @@
1
+ require 'spec_helper'
2
+
3
+ module CodeClimate::TestReporter
4
+ describe PayloadValidator do
5
+ let(:payload) {
6
+ {
7
+ git: {
8
+ committed_at: 1389603672,
9
+ head: "4b968f076d169c3d98089fba27988f0d52ba803d"
10
+ },
11
+ run_at: 1379704336,
12
+ source_files: [
13
+ { coverage: "[0,3,4]", name: "user.rb" }
14
+ ]
15
+ }
16
+ }
17
+
18
+ it "does not raise if there's a minimally valid test report payload" do
19
+ expect {
20
+ PayloadValidator.validate(payload)
21
+ }.to_not raise_error
22
+ end
23
+
24
+ it "raises when there's no commit sha" do
25
+ payload[:git][:head] = nil
26
+ expect {
27
+ PayloadValidator.validate(payload)
28
+ }.to raise_error(InvalidPayload, /A git commit sha was not found/)
29
+ end
30
+
31
+ it "does not raise if there's a commit sha in ci_service data" do
32
+ payload[:git][:head] = nil
33
+ payload[:ci_service] = {}
34
+ payload[:ci_service][:commit_sha] = "4b968f076d169c3d98089fba27988f0d52ba803d"
35
+ expect {
36
+ PayloadValidator.validate(payload)
37
+ }.to_not raise_error
38
+ end
39
+
40
+ it "raises when there is no committed_at" do
41
+ payload[:git][:committed_at] = nil
42
+ expect {
43
+ PayloadValidator.validate(payload)
44
+ }.to raise_error(InvalidPayload, /A git commit timestamp was not found/)
45
+ end
46
+
47
+ it "raises when there's no run_at" do
48
+ payload[:run_at] = nil
49
+ expect {
50
+ PayloadValidator.validate(payload)
51
+ }.to raise_error(InvalidPayload, /A run at timestamp was not found/)
52
+ end
53
+
54
+ it "raises when no source_files parameter is passed" do
55
+ payload[:source_files] = nil
56
+ expect {
57
+ PayloadValidator.validate(payload)
58
+ }.to raise_error(InvalidPayload, /No source files were found/)
59
+ end
60
+
61
+ it "raises when there's no source files" do
62
+ payload[:source_files] = []
63
+ expect {
64
+ PayloadValidator.validate(payload)
65
+ }.to raise_error(InvalidPayload, /No source files were found/)
66
+ end
67
+
68
+ it "raises if source files aren't hashes" do
69
+ payload[:source_files] = [1,2,3]
70
+ expect {
71
+ PayloadValidator.validate(payload)
72
+ }.to raise_error(InvalidPayload, /Invalid source files/)
73
+ end
74
+
75
+ it "raises if source files don't have names" do
76
+ payload[:source_files] = [{ coverage: "[1,1]" }]
77
+ expect {
78
+ PayloadValidator.validate(payload)
79
+ }.to raise_error(InvalidPayload, /Invalid source files/)
80
+ end
81
+
82
+ it "raises if source files don't have coverage" do
83
+ payload[:source_files] = [{ name: "foo.rb" }]
84
+ expect {
85
+ PayloadValidator.validate(payload)
86
+ }.to raise_error(InvalidPayload, /Invalid source files/)
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+
3
+ describe CodeClimate::TestReporter do
4
+ let(:reporter) { CodeClimate::TestReporter.dup }
5
+
6
+ describe '.run_on_current_branch?' do
7
+ it 'returns true if there is no branch configured' do
8
+ allow(reporter).to receive(:configured_branch).and_return(nil)
9
+ expect(reporter).to be_run_on_current_branch
10
+ end
11
+
12
+ it 'returns true if the current branch matches the configured branch' do
13
+ allow(reporter).to receive(:current_branch).and_return("master\n")
14
+ allow(reporter).to receive(:configured_branch).and_return(:master)
15
+
16
+ expect(reporter).to be_run_on_current_branch
17
+ end
18
+
19
+ it 'returns false if the current branch and configured branch dont match' do
20
+ allow(reporter).to receive(:current_branch).and_return("some-branch")
21
+ allow(reporter).to receive(:configured_branch).and_return(:master)
22
+
23
+ expect(reporter).to_not be_run_on_current_branch
24
+ end
25
+
26
+ it 'logs a message if false' do
27
+ expect_any_instance_of(Logger).to receive(:info)
28
+
29
+ allow(reporter).to receive(:current_branch).and_return("another-branch")
30
+ allow(reporter).to receive(:configured_branch).and_return(:master)
31
+
32
+ reporter.run_on_current_branch?
33
+ end
34
+ end
35
+
36
+ end
@@ -0,0 +1,46 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'artifice'
4
+ require 'pry'
5
+ require 'codeclimate-test-reporter'
6
+
7
+ ENV['CODECLIMATE_REPO_TOKEN'] = "172754c1bf9a3c698f7770b9fb648f1ebb214425120022d0b2ffc65b97dff531"
8
+ ENV['CODECLIMATE_API_HOST'] = "http://cc.dev"
9
+
10
+ def inflate(string)
11
+ reader = Zlib::GzipReader.new(StringIO.new(string))
12
+ reader.read
13
+ end
14
+
15
+ class FakeCodeClimateEndpoint
16
+ def call(env)
17
+ @env = env
18
+ [
19
+ 200,
20
+ {"Content-Type" => 'text/plain'},
21
+ ["Received"]
22
+ ]
23
+ end
24
+
25
+ def path_info
26
+ @env["PATH_INFO"]
27
+ end
28
+
29
+ def request_body
30
+ @env["rack.input"].string
31
+ end
32
+
33
+ def content_type
34
+ @env["CONTENT_TYPE"]
35
+ end
36
+
37
+ def http_content_encoding
38
+ @env["HTTP_CONTENT_ENCODING"]
39
+ end
40
+
41
+ def http_user_agent
42
+ @env["HTTP_USER_AGENT"]
43
+ end
44
+ end
45
+
46
+
@@ -0,0 +1,174 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ n=$(NULLCMD)
9
+ ECHO1 = $(V:1=@$n)
10
+ ECHO = $(ECHO1:0=@echo)
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = .
15
+ topdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1
16
+ hdrdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1
17
+ arch_hdrdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1/$(arch)
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+ prefix = $(DESTDIR)/home/runner/.rbenv/versions/1.9.3-p551
20
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
21
+ exec_prefix = $(prefix)
22
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
23
+ sitehdrdir = $(rubyhdrdir)/site_ruby
24
+ rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
25
+ vendordir = $(rubylibprefix)/vendor_ruby
26
+ sitedir = $(rubylibprefix)/site_ruby
27
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
28
+ mandir = $(datarootdir)/man
29
+ localedir = $(datarootdir)/locale
30
+ libdir = $(exec_prefix)/lib
31
+ psdir = $(docdir)
32
+ pdfdir = $(docdir)
33
+ dvidir = $(docdir)
34
+ htmldir = $(docdir)
35
+ infodir = $(datarootdir)/info
36
+ docdir = $(datarootdir)/doc/$(PACKAGE)
37
+ oldincludedir = $(DESTDIR)/usr/include
38
+ includedir = $(prefix)/include
39
+ localstatedir = $(prefix)/var
40
+ sharedstatedir = $(prefix)/com
41
+ sysconfdir = $(prefix)/etc
42
+ datadir = $(datarootdir)
43
+ datarootdir = $(prefix)/share
44
+ libexecdir = $(exec_prefix)/libexec
45
+ sbindir = $(exec_prefix)/sbin
46
+ bindir = $(exec_prefix)/bin
47
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
48
+ archdir = $(rubylibdir)/$(arch)
49
+ sitelibdir = $(DESTDIR)./.gem.20150302-2151-1sxwtuz
50
+ sitearchdir = $(DESTDIR)./.gem.20150302-2151-1sxwtuz
51
+ vendorlibdir = $(vendordir)/$(ruby_version)
52
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
53
+
54
+ NULLCMD = :
55
+
56
+ CC = /usr/bin/gcc
57
+ CXX = g++
58
+ LIBRUBY = $(LIBRUBY_A)
59
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
60
+ LIBRUBYARG_SHARED = -Wl,-R -Wl,$(libdir) -L$(libdir)
61
+ LIBRUBYARG_STATIC = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
62
+ empty =
63
+ OUTFLAG = -o $(empty)
64
+ COUTFLAG = -o $(empty)
65
+
66
+ RUBY_EXTCONF_H =
67
+ cflags = $(optflags) $(debugflags) $(warnflags)
68
+ optflags = -O3
69
+ debugflags = -ggdb
70
+ warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
71
+ CFLAGS = -fPIC $(cflags) $(ARCH_FLAG)
72
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
73
+ DEFS =
74
+ CPPFLAGS = -I/home/runner/.rbenv/versions/1.9.3-p551/include $(DEFS) $(cppflags)
75
+ CXXFLAGS = $(CFLAGS) $(cxxflags)
76
+ ldflags = -L. -L/home/runner/.rbenv/versions/1.9.3-p551/lib -rdynamic -Wl,-export-dynamic
77
+ dldflags =
78
+ ARCH_FLAG =
79
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
80
+ LDSHARED = $(CC) -shared
81
+ LDSHAREDXX = $(CXX) -shared
82
+ AR = ar
83
+ EXEEXT =
84
+
85
+ RUBY_BASE_NAME = ruby
86
+ RUBY_INSTALL_NAME = ruby
87
+ RUBY_SO_NAME = ruby
88
+ arch = x86_64-linux
89
+ sitearch = $(arch)
90
+ ruby_version = 1.9.1
91
+ ruby = /home/runner/.rbenv/versions/1.9.3-p551/bin/ruby
92
+ RUBY = $(ruby)
93
+ RM = rm -f
94
+ RM_RF = $(RUBY) -run -e rm -- -rf
95
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
96
+ MAKEDIRS = /bin/mkdir -p
97
+ INSTALL = /usr/bin/install -c
98
+ INSTALL_PROG = $(INSTALL) -m 0755
99
+ INSTALL_DATA = $(INSTALL) -m 644
100
+ COPY = cp
101
+ TOUCH = exit >
102
+
103
+ #### End of system configuration section. ####
104
+
105
+ preload =
106
+
107
+ libpath = . $(libdir)
108
+ LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
109
+ DEFFILE =
110
+
111
+ CLEANFILES = mkmf.log
112
+ DISTCLEANFILES =
113
+ DISTCLEANDIRS =
114
+
115
+ extout =
116
+ extout_prefix =
117
+ target_prefix =
118
+ LOCAL_LIBS =
119
+ LIBS = -lpthread -lrt -ldl -lcrypt -lm -lc
120
+ SRCS =
121
+ OBJS =
122
+ TARGET =
123
+ TARGET_NAME =
124
+ TARGET_ENTRY = Init_$(TARGET_NAME)
125
+ DLLIB =
126
+ EXTSTATIC =
127
+ STATIC_LIB =
128
+
129
+ BINDIR = $(bindir)
130
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
131
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
132
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
133
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
134
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
135
+
136
+ TARGET_SO = $(DLLIB)
137
+ CLEANLIBS = $(TARGET).so
138
+ CLEANOBJS = *.o *.bak
139
+
140
+ all: Makefile
141
+ static: $(STATIC_LIB)
142
+ .PHONY: all install static install-so install-rb
143
+ .PHONY: clean clean-so clean-rb
144
+
145
+ clean-static::
146
+ clean-rb-default::
147
+ clean-rb::
148
+ clean-so::
149
+ clean: clean-so clean-static clean-rb-default clean-rb
150
+ -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
151
+
152
+ distclean-rb-default::
153
+ distclean-rb::
154
+ distclean-so::
155
+ distclean: clean distclean-so distclean-rb-default distclean-rb
156
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
157
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
158
+ @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
159
+
160
+ realclean: distclean
161
+ install: install-so install-rb
162
+
163
+ install-so: Makefile
164
+ install-rb: pre-install-rb install-rb-default
165
+ install-rb-default: pre-install-rb-default
166
+ pre-install-rb: Makefile
167
+ pre-install-rb-default: Makefile
168
+ pre-install-rb-default:
169
+ $(ECHO) installing default libraries
170
+
171
+ site-install: site-install-so site-install-rb
172
+ site-install-so: install-so
173
+ site-install-rb: install-rb
174
+
@@ -0,0 +1,221 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ n=$(NULLCMD)
9
+ ECHO1 = $(V:1=@$n)
10
+ ECHO = $(ECHO1:0=@echo)
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = .
15
+ topdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1
16
+ hdrdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1
17
+ arch_hdrdir = /home/runner/.rbenv/versions/1.9.3-p551/include/ruby-1.9.1/$(arch)
18
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
19
+ prefix = $(DESTDIR)/home/runner/.rbenv/versions/1.9.3-p551
20
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
21
+ exec_prefix = $(prefix)
22
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
23
+ sitehdrdir = $(rubyhdrdir)/site_ruby
24
+ rubyhdrdir = $(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)
25
+ vendordir = $(rubylibprefix)/vendor_ruby
26
+ sitedir = $(rubylibprefix)/site_ruby
27
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
28
+ mandir = $(datarootdir)/man
29
+ localedir = $(datarootdir)/locale
30
+ libdir = $(exec_prefix)/lib
31
+ psdir = $(docdir)
32
+ pdfdir = $(docdir)
33
+ dvidir = $(docdir)
34
+ htmldir = $(docdir)
35
+ infodir = $(datarootdir)/info
36
+ docdir = $(datarootdir)/doc/$(PACKAGE)
37
+ oldincludedir = $(DESTDIR)/usr/include
38
+ includedir = $(prefix)/include
39
+ localstatedir = $(prefix)/var
40
+ sharedstatedir = $(prefix)/com
41
+ sysconfdir = $(prefix)/etc
42
+ datadir = $(datarootdir)
43
+ datarootdir = $(prefix)/share
44
+ libexecdir = $(exec_prefix)/libexec
45
+ sbindir = $(exec_prefix)/sbin
46
+ bindir = $(exec_prefix)/bin
47
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
48
+ archdir = $(rubylibdir)/$(arch)
49
+ sitelibdir = $(DESTDIR)./.gem.20150302-2151-svtdtq
50
+ sitearchdir = $(DESTDIR)./.gem.20150302-2151-svtdtq
51
+ vendorlibdir = $(vendordir)/$(ruby_version)
52
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
53
+
54
+ NULLCMD = :
55
+
56
+ CC = /usr/bin/gcc
57
+ CXX = g++
58
+ LIBRUBY = $(LIBRUBY_A)
59
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
60
+ LIBRUBYARG_SHARED = -Wl,-R -Wl,$(libdir) -L$(libdir)
61
+ LIBRUBYARG_STATIC = -Wl,-R -Wl,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
62
+ empty =
63
+ OUTFLAG = -o $(empty)
64
+ COUTFLAG = -o $(empty)
65
+
66
+ RUBY_EXTCONF_H =
67
+ cflags = $(optflags) $(debugflags) $(warnflags)
68
+ optflags = -O3
69
+ debugflags = -ggdb
70
+ warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration
71
+ CFLAGS = -fPIC $(cflags) $(ARCH_FLAG)
72
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
73
+ DEFS =
74
+ CPPFLAGS = -DJSON_GENERATOR -I/home/runner/.rbenv/versions/1.9.3-p551/include $(DEFS) $(cppflags)
75
+ CXXFLAGS = $(CFLAGS) $(cxxflags)
76
+ ldflags = -L. -L/home/runner/.rbenv/versions/1.9.3-p551/lib -rdynamic -Wl,-export-dynamic
77
+ dldflags =
78
+ ARCH_FLAG =
79
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
80
+ LDSHARED = $(CC) -shared
81
+ LDSHAREDXX = $(CXX) -shared
82
+ AR = ar
83
+ EXEEXT =
84
+
85
+ RUBY_BASE_NAME = ruby
86
+ RUBY_INSTALL_NAME = ruby
87
+ RUBY_SO_NAME = ruby
88
+ arch = x86_64-linux
89
+ sitearch = $(arch)
90
+ ruby_version = 1.9.1
91
+ ruby = /home/runner/.rbenv/versions/1.9.3-p551/bin/ruby
92
+ RUBY = $(ruby)
93
+ RM = rm -f
94
+ RM_RF = $(RUBY) -run -e rm -- -rf
95
+ RMDIRS = rmdir --ignore-fail-on-non-empty -p
96
+ MAKEDIRS = /bin/mkdir -p
97
+ INSTALL = /usr/bin/install -c
98
+ INSTALL_PROG = $(INSTALL) -m 0755
99
+ INSTALL_DATA = $(INSTALL) -m 644
100
+ COPY = cp
101
+ TOUCH = exit >
102
+
103
+ #### End of system configuration section. ####
104
+
105
+ preload =
106
+
107
+ libpath = . $(libdir)
108
+ LIBPATH = -L. -L$(libdir) -Wl,-R$(libdir)
109
+ DEFFILE =
110
+
111
+ CLEANFILES = mkmf.log
112
+ DISTCLEANFILES =
113
+ DISTCLEANDIRS =
114
+
115
+ extout =
116
+ extout_prefix =
117
+ target_prefix = /json/ext
118
+ LOCAL_LIBS =
119
+ LIBS = -lpthread -lrt -ldl -lcrypt -lm -lc
120
+ SRCS = generator.c
121
+ OBJS = generator.o
122
+ TARGET = generator
123
+ TARGET_NAME = generator
124
+ TARGET_ENTRY = Init_$(TARGET_NAME)
125
+ DLLIB = $(TARGET).so
126
+ EXTSTATIC =
127
+ STATIC_LIB =
128
+
129
+ BINDIR = $(bindir)
130
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
131
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
132
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
133
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
134
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
135
+
136
+ TARGET_SO = $(DLLIB)
137
+ CLEANLIBS = $(TARGET).so
138
+ CLEANOBJS = *.o *.bak
139
+
140
+ all: $(DLLIB)
141
+ static: $(STATIC_LIB)
142
+ .PHONY: all install static install-so install-rb
143
+ .PHONY: clean clean-so clean-rb
144
+
145
+ clean-static::
146
+ clean-rb-default::
147
+ clean-rb::
148
+ clean-so::
149
+ clean: clean-so clean-static clean-rb-default clean-rb
150
+ -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
151
+
152
+ distclean-rb-default::
153
+ distclean-rb::
154
+ distclean-so::
155
+ distclean: clean distclean-so distclean-rb-default distclean-rb
156
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
157
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
158
+ @-$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
159
+
160
+ realclean: distclean
161
+ install: install-so install-rb
162
+
163
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
164
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
165
+ -$(Q)$(MAKEDIRS) $(@D)
166
+ $(INSTALL_PROG) $(DLLIB) $(@D)
167
+ clean-static::
168
+ -$(Q)$(RM) $(STATIC_LIB)
169
+ install-rb: pre-install-rb install-rb-default
170
+ install-rb-default: pre-install-rb-default
171
+ pre-install-rb: Makefile
172
+ pre-install-rb-default: Makefile
173
+ pre-install-rb-default:
174
+ $(ECHO) installing default generator libraries
175
+ ./.RUBYARCHDIR.time:
176
+ $(Q) $(MAKEDIRS) $(RUBYARCHDIR)
177
+ $(Q) $(TOUCH) $@
178
+
179
+ site-install: site-install-so site-install-rb
180
+ site-install-so: install-so
181
+ site-install-rb: install-rb
182
+
183
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .C .o
184
+
185
+ .cc.o:
186
+ $(ECHO) compiling $(<)
187
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
188
+
189
+ .mm.o:
190
+ $(ECHO) compiling $(<)
191
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
192
+
193
+ .cxx.o:
194
+ $(ECHO) compiling $(<)
195
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
196
+
197
+ .cpp.o:
198
+ $(ECHO) compiling $(<)
199
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
200
+
201
+ .C.o:
202
+ $(ECHO) compiling $(<)
203
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<
204
+
205
+ .c.o:
206
+ $(ECHO) compiling $(<)
207
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
208
+
209
+ .m.o:
210
+ $(ECHO) compiling $(<)
211
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<
212
+
213
+ $(DLLIB): $(OBJS) Makefile
214
+ $(ECHO) linking shared-object json/ext/$(DLLIB)
215
+ -$(Q)$(RM) $(@)
216
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
217
+
218
+
219
+
220
+ ###
221
+ generator.o: generator.c generator.h $(srcdir)/../fbuffer/fbuffer.h