dyci-compiler 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/dyci-compiler.gemspec +3 -3
- data/lib/dyci-compiler/clang_runner.rb +18 -0
- data/lib/dyci-compiler/version.rb +1 -1
- metadata +37 -52
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# DyCI::Compiler
|
2
2
|
|
3
|
-
|
3
|
+
Fake proxy compiler for [DyCI](http://dyci.github.com/).
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,7 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
It used from DyCI. You should not use it directly.
|
22
22
|
|
23
23
|
## Contributing
|
24
24
|
|
data/dyci-compiler.gemspec
CHANGED
@@ -4,9 +4,9 @@ require File.expand_path('../lib/dyci-compiler/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Alex Denisov"]
|
6
6
|
gem.email = ["1101.debian@gmail.com"]
|
7
|
-
gem.description = %q{
|
8
|
-
gem.summary = %q{
|
9
|
-
gem.homepage = ""
|
7
|
+
gem.description = %q{DyCI fake compiler}
|
8
|
+
gem.summary = %q{DyCI fake compiler, that used as a proxy.}
|
9
|
+
gem.homepage = "https://github.com/DyCI/dyci-compiler-rb"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -17,6 +17,11 @@ module DyCI
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def recompile class_name
|
20
|
+
if class_name =~ /\.jp?g|\.png/
|
21
|
+
copy_resource class_name, File.expand_path("~/.dyci")
|
22
|
+
exit 0
|
23
|
+
end
|
24
|
+
|
20
25
|
class_name = class_name.gsub /\.h\z/, '.m'
|
21
26
|
# TODO: refactor this shit too
|
22
27
|
storage = ClangStorage.new
|
@@ -81,6 +86,19 @@ module DyCI
|
|
81
86
|
|
82
87
|
FileUtils.rm files, :force => true
|
83
88
|
end
|
89
|
+
|
90
|
+
def copy_resource resource, root
|
91
|
+
bundle_path = nil
|
92
|
+
File.open("#{root}/bundle", 'r') do |file|
|
93
|
+
bundle_path = file.read
|
94
|
+
end
|
95
|
+
FileUtils.cp resource, bundle_path if bundle_path
|
96
|
+
|
97
|
+
File.open("#{root}/resource", 'w') do |file|
|
98
|
+
file.write(resource)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
84
102
|
end
|
85
103
|
end
|
86
104
|
|
metadata
CHANGED
@@ -1,46 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyci-compiler
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 2
|
10
|
-
version: 0.0.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Alex Denisov
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-11-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rspec
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
32
22
|
type: :development
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: DyCI fake compiler
|
31
|
+
email:
|
36
32
|
- 1101.debian@gmail.com
|
37
|
-
executables:
|
33
|
+
executables:
|
38
34
|
- dyci-compiler
|
39
35
|
extensions: []
|
40
|
-
|
41
36
|
extra_rdoc_files: []
|
42
|
-
|
43
|
-
files:
|
37
|
+
files:
|
44
38
|
- .gitignore
|
45
39
|
- .rvmrc
|
46
40
|
- Gemfile
|
@@ -58,40 +52,31 @@ files:
|
|
58
52
|
- spec/factory.rb
|
59
53
|
- spec/fixtures/params.txt
|
60
54
|
- spec/spec_helper.rb
|
61
|
-
homepage:
|
55
|
+
homepage: https://github.com/DyCI/dyci-compiler-rb
|
62
56
|
licenses: []
|
63
|
-
|
64
57
|
post_install_message:
|
65
58
|
rdoc_options: []
|
66
|
-
|
67
|
-
require_paths:
|
59
|
+
require_paths:
|
68
60
|
- lib
|
69
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
62
|
none: false
|
71
|
-
requirements:
|
72
|
-
- -
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
|
76
|
-
- 0
|
77
|
-
version: "0"
|
78
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
68
|
none: false
|
80
|
-
requirements:
|
81
|
-
- -
|
82
|
-
- !ruby/object:Gem::Version
|
83
|
-
|
84
|
-
segments:
|
85
|
-
- 0
|
86
|
-
version: "0"
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
87
73
|
requirements: []
|
88
|
-
|
89
74
|
rubyforge_project:
|
90
75
|
rubygems_version: 1.8.24
|
91
76
|
signing_key:
|
92
77
|
specification_version: 3
|
93
|
-
summary:
|
94
|
-
test_files:
|
78
|
+
summary: DyCI fake compiler, that used as a proxy.
|
79
|
+
test_files:
|
95
80
|
- spec/clang_parser_spec.rb
|
96
81
|
- spec/factory.rb
|
97
82
|
- spec/fixtures/params.txt
|