furnace-xray 1.0.0 → 1.1.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -0
- data/bin/furnace-xray +1 -1
- data/furnace-xray.gemspec +8 -8
- data/lib/furnace-xray/app/app.rb +14 -21
- data/lib/furnace-xray/app/assets/javascripts/lib/input.js.coffee +10 -6
- data/lib/furnace-xray/app/assets/javascripts/lib/map.js.coffee +7 -4
- data/lib/furnace-xray/app/views/index.haml +4 -3
- data/lib/furnace-xray/version.rb +1 -1
- metadata +90 -73
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ad3fbcd1c6346fa30c03fa890bd356da8440d602
|
4
|
+
data.tar.gz: ab2c38eee0ee6edaff32064341037e61874bb34f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2b18eba9f93d570ddc9f9c40a4fead4b045c46088354666248b1eb87aa1ef835e3b919a030b5f59248a7b183703284f69b0c13b27a563181eb06b0c0bacb081d
|
7
|
+
data.tar.gz: b9cfcca32473c06a899459259a602028b322ed9db8c30ce43aea2a8d8697c3e63fa3b832d7d64679828dd0f5ba71ed2f329037c7df7d4fb656791853a732d4ed
|
data/README.md
CHANGED
data/bin/furnace-xray
CHANGED
data/furnace-xray.gemspec
CHANGED
@@ -19,15 +19,15 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
20
20
|
gem.require_paths = ['lib']
|
21
21
|
|
22
|
-
gem.add_dependency 'trollop'
|
23
|
-
gem.add_dependency 'sprockets', '~> 2.0.0'
|
24
22
|
gem.add_dependency 'sinatra'
|
25
|
-
gem.add_dependency '
|
23
|
+
gem.add_dependency 'trollop'
|
26
24
|
gem.add_dependency 'activesupport'
|
27
|
-
|
28
|
-
gem.add_dependency 'haml'
|
29
|
-
gem.add_dependency 'sass'
|
30
|
-
gem.add_dependency 'sprockets
|
31
|
-
gem.add_dependency '
|
25
|
+
|
26
|
+
gem.add_dependency 'haml', '3.1.7'
|
27
|
+
gem.add_dependency 'sass', '3.2.5'
|
28
|
+
gem.add_dependency 'sprockets', '2.8.2'
|
29
|
+
gem.add_dependency 'sprockets-sass', '0.9.1'
|
30
|
+
gem.add_dependency 'sprockets-helpers', '0.8.0'
|
32
31
|
gem.add_dependency 'coffee-script'
|
32
|
+
gem.add_dependency 'compass'
|
33
33
|
end
|
data/lib/furnace-xray/app/app.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
require 'sinatra/base'
|
2
2
|
|
3
|
-
require 'sprockets-vendor_gems/extend_all'
|
4
|
-
require 'sinatra/sprockets'
|
5
|
-
|
6
3
|
require 'haml'
|
7
|
-
require 'sprockets-sass'
|
8
4
|
require 'sass'
|
5
|
+
require 'sprockets'
|
6
|
+
require 'sprockets/sass'
|
7
|
+
require 'sprockets/helpers'
|
9
8
|
require 'compass'
|
10
9
|
require 'coffee-script'
|
11
10
|
|
@@ -19,35 +18,29 @@ end
|
|
19
18
|
module Furnace
|
20
19
|
module Xray
|
21
20
|
class App < Sinatra::Base
|
21
|
+
register Sinatra::JstPages
|
22
|
+
|
23
|
+
set :static, true
|
24
|
+
set :public_folder, File.expand_path('../public', __FILE__)
|
25
|
+
set :sprockets, Sprockets::Environment.new(root)
|
26
|
+
set :assets_types, %w(javascripts stylesheets images)
|
27
|
+
|
22
28
|
def self.run!(file, options={})
|
23
29
|
set :json_location, file
|
30
|
+
assets_types.map{|x| sprockets.append_path ("#{root}/assets/#{x}") }
|
24
31
|
super options
|
25
32
|
end
|
26
33
|
|
27
|
-
|
28
|
-
|
29
|
-
#
|
30
|
-
register Sinatra::Sprockets
|
34
|
+
serve_jst '/jst.js'
|
35
|
+
|
31
36
|
use Module.new {
|
32
37
|
def self.new(app)
|
33
38
|
Rack::Builder.new(app) do
|
34
|
-
map('/assets') { run
|
39
|
+
map('/assets') { run App.sprockets }
|
35
40
|
end
|
36
41
|
end
|
37
42
|
}
|
38
43
|
|
39
|
-
#
|
40
|
-
# JST
|
41
|
-
#
|
42
|
-
register Sinatra::JstPages
|
43
|
-
serve_jst '/jst.js'
|
44
|
-
|
45
|
-
#
|
46
|
-
# App
|
47
|
-
#
|
48
|
-
enable :static
|
49
|
-
set :public_folder, File.expand_path('../public', __FILE__)
|
50
|
-
|
51
44
|
get '/' do
|
52
45
|
haml :index
|
53
46
|
end
|
@@ -14,14 +14,14 @@ class @Input
|
|
14
14
|
transforms = Object.extended()
|
15
15
|
|
16
16
|
@source.events.each (x, i) =>
|
17
|
-
switch x.event
|
17
|
+
switch x.event
|
18
18
|
when 'addInstruction'
|
19
19
|
reducer.add x.name
|
20
20
|
@events.add i
|
21
21
|
when 'removeInstruction'
|
22
22
|
reducer.exclude x.name
|
23
23
|
@events.add i
|
24
|
-
when 'updateInstruction'
|
24
|
+
when 'updateInstruction', 'renameInstruction'
|
25
25
|
@events.add i if reducer.any(x.name)
|
26
26
|
when 'type', 'transformStart'
|
27
27
|
else
|
@@ -32,7 +32,7 @@ class @Input
|
|
32
32
|
transforms[id] = {id: id, label: x.name}
|
33
33
|
|
34
34
|
@transforms = transforms.values()
|
35
|
-
@transforms = @transforms.filter (x, i) =>
|
35
|
+
@transforms = @transforms.filter (x, i) =>
|
36
36
|
x.length = (@transforms[i+1]?.id || @events.length) - x.id
|
37
37
|
x.id < @events.length-1
|
38
38
|
|
@@ -60,7 +60,7 @@ class @Input
|
|
60
60
|
else
|
61
61
|
@previousState = new InputState(@)
|
62
62
|
|
63
|
-
@reset()
|
63
|
+
@reset()
|
64
64
|
@increment(to)
|
65
65
|
|
66
66
|
increment: (to) ->
|
@@ -123,7 +123,7 @@ class @Input
|
|
123
123
|
@instructions[id].update event.opcode, event.name, event.parameters, operands, @type(event.type)
|
124
124
|
|
125
125
|
addInstruction: (event) ->
|
126
|
-
@instructionsMap.
|
126
|
+
@instructionsMap.locateOrAdd event.name, (i) =>
|
127
127
|
@blocksMap.locate event.basic_block, (b) =>
|
128
128
|
@instructions[i].link @blocks[b], event.index
|
129
129
|
|
@@ -131,4 +131,8 @@ class @Input
|
|
131
131
|
@instructionsMap.locate event.name, (i) =>
|
132
132
|
@instructions[i].unlink()
|
133
133
|
|
134
|
-
|
134
|
+
renameInstruction: (event) ->
|
135
|
+
@instructionsMap.rename event.name, event.new_name, (i) =>
|
136
|
+
@instructions[i].name = event.new_name
|
137
|
+
|
138
|
+
transformStart: (event) ->
|
@@ -9,9 +9,9 @@ class @Map
|
|
9
9
|
each: (block) -> @map.each block
|
10
10
|
|
11
11
|
add: (name, block) ->
|
12
|
-
id = @
|
12
|
+
id = @map[name]
|
13
13
|
|
14
|
-
|
14
|
+
unless id?
|
15
15
|
@data.add name
|
16
16
|
id = @data.length-1
|
17
17
|
block(id) if block
|
@@ -22,7 +22,7 @@ class @Map
|
|
22
22
|
find: (name) ->
|
23
23
|
id = @map[name]
|
24
24
|
|
25
|
-
|
25
|
+
unless id?
|
26
26
|
error = "Map '#{@title}': '#{name}' element not found"
|
27
27
|
throw error
|
28
28
|
|
@@ -42,4 +42,7 @@ class @Map
|
|
42
42
|
@map[newName] = id
|
43
43
|
|
44
44
|
locate: (name, block) ->
|
45
|
-
block(@find(name))
|
45
|
+
block(@find(name))
|
46
|
+
|
47
|
+
locateOrAdd: (name, block) ->
|
48
|
+
block(@add(name))
|
@@ -5,9 +5,10 @@
|
|
5
5
|
|
6
6
|
%link{:href => "data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQEAYAAABPYyMiAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAAF0lEQVRIx2NgGAWjYBSMglEwCkbBSAcACBAAAeaR9cIAAAAASUVORK5CYII=", :rel => "icon", :type => "image/x-icon"}
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
%link{:href => '/assets/app.css', :rel => 'stylesheet', :type => 'text/css'}
|
9
|
+
|
10
|
+
%script{:src => '/assets/application.js', :type => 'text/javascript'}
|
11
|
+
%script{:src => '/jst.js', :type => 'text/javascript'}
|
11
12
|
|
12
13
|
:javascript
|
13
14
|
window.data = Input.normalize(#{File.read settings.json_location})
|
data/lib/furnace-xray/version.rb
CHANGED
metadata
CHANGED
@@ -1,137 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furnace-xray
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0.pre1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Boris Staal
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-03-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement:
|
17
|
-
none: false
|
14
|
+
name: sinatra
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
27
|
-
requirement:
|
28
|
-
none: false
|
28
|
+
name: trollop
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
+
version: '0'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
38
|
-
requirement:
|
39
|
-
none: false
|
42
|
+
name: activesupport
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - '>='
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :runtime
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: sinatra-sprockets-ext
|
49
|
-
requirement: &70220406736100 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: haml
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.1.7
|
55
62
|
type: :runtime
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.1.7
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
60
|
-
requirement:
|
61
|
-
none: false
|
70
|
+
name: sass
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
|
-
- -
|
73
|
+
- - '='
|
64
74
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
75
|
+
version: 3.2.5
|
66
76
|
type: :runtime
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.2.5
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: sprockets
|
71
|
-
requirement:
|
72
|
-
none: false
|
84
|
+
name: sprockets
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
73
86
|
requirements:
|
74
|
-
- -
|
87
|
+
- - '='
|
75
88
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
89
|
+
version: 2.8.2
|
77
90
|
type: :runtime
|
78
91
|
prerelease: false
|
79
|
-
version_requirements:
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.8.2
|
80
97
|
- !ruby/object:Gem::Dependency
|
81
|
-
name:
|
82
|
-
requirement:
|
83
|
-
none: false
|
98
|
+
name: sprockets-sass
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
84
100
|
requirements:
|
85
|
-
- -
|
101
|
+
- - '='
|
86
102
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
103
|
+
version: 0.9.1
|
88
104
|
type: :runtime
|
89
105
|
prerelease: false
|
90
|
-
version_requirements:
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.9.1
|
91
111
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
93
|
-
requirement:
|
94
|
-
none: false
|
112
|
+
name: sprockets-helpers
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
95
114
|
requirements:
|
96
|
-
- -
|
115
|
+
- - '='
|
97
116
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
117
|
+
version: 0.8.0
|
99
118
|
type: :runtime
|
100
119
|
prerelease: false
|
101
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.8.0
|
102
125
|
- !ruby/object:Gem::Dependency
|
103
|
-
name:
|
104
|
-
requirement:
|
105
|
-
none: false
|
126
|
+
name: coffee-script
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
106
128
|
requirements:
|
107
|
-
- -
|
129
|
+
- - '>='
|
108
130
|
- !ruby/object:Gem::Version
|
109
131
|
version: '0'
|
110
132
|
type: :runtime
|
111
133
|
prerelease: false
|
112
|
-
version_requirements:
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
113
139
|
- !ruby/object:Gem::Dependency
|
114
140
|
name: compass
|
115
|
-
requirement:
|
116
|
-
none: false
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
117
142
|
requirements:
|
118
|
-
- -
|
143
|
+
- - '>='
|
119
144
|
- !ruby/object:Gem::Version
|
120
145
|
version: '0'
|
121
146
|
type: :runtime
|
122
147
|
prerelease: false
|
123
|
-
version_requirements:
|
124
|
-
- !ruby/object:Gem::Dependency
|
125
|
-
name: coffee-script
|
126
|
-
requirement: &70220406752600 !ruby/object:Gem::Requirement
|
127
|
-
none: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
128
149
|
requirements:
|
129
|
-
- -
|
150
|
+
- - '>='
|
130
151
|
- !ruby/object:Gem::Version
|
131
152
|
version: '0'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: *70220406752600
|
135
153
|
description: A visualizer for transformations of code in Static Single Assignment
|
136
154
|
form based on the Furnace library.
|
137
155
|
email:
|
@@ -224,27 +242,26 @@ files:
|
|
224
242
|
- sample.json
|
225
243
|
homepage: https://github.com/evilmartians/furnace-xray
|
226
244
|
licenses: []
|
245
|
+
metadata: {}
|
227
246
|
post_install_message:
|
228
247
|
rdoc_options: []
|
229
248
|
require_paths:
|
230
249
|
- lib
|
231
250
|
required_ruby_version: !ruby/object:Gem::Requirement
|
232
|
-
none: false
|
233
251
|
requirements:
|
234
|
-
- -
|
252
|
+
- - '>='
|
235
253
|
- !ruby/object:Gem::Version
|
236
254
|
version: '0'
|
237
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
|
-
none: false
|
239
256
|
requirements:
|
240
|
-
- -
|
257
|
+
- - '>'
|
241
258
|
- !ruby/object:Gem::Version
|
242
|
-
version:
|
259
|
+
version: 1.3.1
|
243
260
|
requirements: []
|
244
261
|
rubyforge_project:
|
245
|
-
rubygems_version:
|
262
|
+
rubygems_version: 2.0.0
|
246
263
|
signing_key:
|
247
|
-
specification_version:
|
264
|
+
specification_version: 4
|
248
265
|
summary: A visualizer for transformations of code in Static Single Assignment form
|
249
266
|
based on the Furnace library.
|
250
267
|
test_files: []
|