mozrepl_tools 0.0.3 → 0.1.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.
data/README.rdoc CHANGED
@@ -19,7 +19,9 @@ gem install mozrepl_tools
19
19
 
20
20
  #> mozrepl 'my/path/file.js'
21
21
 
22
- It's works with Sencha(ExtJS) Components!!!
22
+ == Use with Sencha|ExtJS.
23
+
24
+ Just ext-reload.js to your project.
23
25
 
24
26
  == Using with Textmate (~/Library/Application Support/TextMate/Bundles/MozRepl.tmbundle)
25
27
 
@@ -6,16 +6,11 @@ s = TCPSocket.open('localhost', 4242)
6
6
 
7
7
  script = DATA.read
8
8
 
9
-
10
- # print "asdad'asdasda"
11
- # print "aa\"aa"
12
- # print "aa\"aa".gsub(/["]/, '\"')
13
-
14
9
  filepath = ENV["TM_FILEPATH"] || ARGV[0]
15
10
  file = File.basename filepath
16
11
  ext = File.extname filepath
17
12
  filename = File.expand_path filepath
18
- # p ext
13
+
19
14
  s.puts(script)
20
15
 
21
16
  if ext == ".css" || ext == ".scss"
@@ -23,19 +18,10 @@ if ext == ".css" || ext == ".scss"
23
18
  s.puts("reload.css('#{file}')")
24
19
  puts "reloaded #{file}"
25
20
  elsif ext == ".js"
26
- # content = (IO.readlines(filename).map do |l|
27
- # "\"" + l.gsub(/[']/, '\\\\\'').gsub(/["]/, '\"').chop() + " \\n \"" + " + \n"
28
- # end).join("")
29
- # content += '""'
30
- # puts contenttoutf8 → string
31
-
32
- # puts content
33
21
  s.puts("reload.js('#{filename}')")
34
22
  puts "reloaded #{filename}"
35
23
  end
36
24
 
37
- # puts script
38
-
39
25
  # workaround
40
26
  sleep 1
41
27
 
@@ -72,8 +58,6 @@ var reload = (function(content, window) {
72
58
  }
73
59
  }
74
60
 
75
-
76
-
77
61
  var document = doc = window.document;
78
62
  var Ext = window.Ext;
79
63
 
@@ -81,31 +65,6 @@ var reload = (function(content, window) {
81
65
  var console = window.console || {debug:function(){}};
82
66
 
83
67
  console.debug("loading...");
84
-
85
- // add development Ext.reg
86
- if ( ! Ext._reg ) {
87
- console.debug('saving original Ext.reg');
88
- Ext._reg = Ext.reg;
89
- }
90
-
91
- Ext.reg = function(xtype) {
92
- console.debug("Ext.reg:", arguments);
93
- // calling old Ext.reg
94
- Ext._reg.apply(Ext, arguments);
95
-
96
- // reinstance all xtypes
97
- var items = Ext.ComponentMgr.all.filterBy(function(e) { return e.getXType() == xtype }).each(function(item) {
98
- repl.print(item)
99
- var ic = item.initialConfig;
100
- var o = item.ownerCt;
101
- o.remove(item);
102
- var it = o.add(ic)
103
- if ( o.getLayout().setActiveItem ) {
104
- o.getLayout().setActiveItem(it);
105
- };
106
- o.doLayout();
107
- });
108
- };
109
68
 
110
69
  var head = document.getElementsByTagName("head")[0];
111
70
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mozrepl_tools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 3
10
- version: 0.0.3
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jorge Falc\xC3\xA3o"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-17 00:00:00 -03:00
18
+ date: 2010-11-01 00:00:00 -02:00
19
19
  default_executable: mozrepl
20
20
  dependencies: []
21
21