amp 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MANIFESTO +5 -4
- data/README.md +27 -27
- data/ampfile.rb +14 -0
- data/ext/amp/bz2/bz2.c +107 -96
- data/ext/amp/bz2/extconf.rb +4 -0
- data/ext/amp/bz2/mkmf.log +25 -16
- data/lib/amp.rb +1 -1
- data/lib/amp/commands/commands/help.rb +2 -2
- data/lib/amp/commands/commands/workflows/hg/bundle.rb +12 -8
- data/lib/amp/commands/commands/workflows/hg/clone.rb +3 -1
- data/lib/amp/commands/dispatch.rb +3 -8
- data/lib/amp/dependencies/python_config.rb +5 -0
- data/lib/amp/repository/repositories/local_repository.rb +3 -3
- data/lib/amp/revlogs/revlog.rb +2 -3
- data/lib/amp/server/fancy_http_server.rb +2 -0
- data/lib/amp/server/fancy_views/stylesheet.sass +1 -1
- data/lib/amp/support/ruby_19_compatibility.rb +8 -5
- data/lib/amp/support/support.rb +2 -0
- data/site/Rakefile +15 -1
- data/site/src/about/ampfile.haml +12 -1
- data/site/src/about/commands.haml +12 -1
- data/site/src/about/index.haml +12 -1
- data/site/src/about/performance.haml +13 -2
- data/site/src/about/workflows.haml +12 -1
- data/site/src/contribute/index.haml +14 -3
- data/site/src/contribute/style.haml +12 -1
- data/site/src/get/index.haml +12 -1
- data/site/src/helpers.rb +1 -1
- data/site/src/index.haml +14 -3
- data/site/src/learn/index.haml +12 -1
- metadata +2 -2
data/MANIFESTO
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
We want a piece of software that
|
2
|
-
1) Free of religious devotion to one VCS
|
3
|
-
2)
|
1
|
+
We want a piece of software that:
|
2
|
+
1) Is Free of religious devotion to one VCS
|
3
|
+
2) Lets us customize how we interact with it. If we want git's commands because i used it the longest, let us use them with a fucking mercurial repo.
|
4
4
|
3) We want the extension we wrote for the dartmouth review repo, which is HG, to work on my github project too. because they're both DVCS, damnit.
|
5
5
|
4) We want to be able to directly modify the commands they give us. git's remove command is `git rm`. it should be dead simple to make `git remove` map directly to that, and we mean less than 1 minute of thought/work.
|
6
6
|
5) We want to prove ruby is viable for large-scale applications, not just web frameworks. can you think of any non-trivial actual applications written in ruby?
|
7
|
-
6) We want to discover where the limits are on Ruby for use in large applications. Where is the language slow? Where is it fast? What techniques are effective? Too many people opine about proper Ruby code, then provide 10 lines of code to illustrate their point. We wrote 15,000 and hope to write many more: what can we learn from that?
|
7
|
+
6) We want to discover where the limits are on Ruby for use in large applications. Where is the language slow? Where is it fast? What techniques are effective? Too many people opine about proper Ruby code, then provide 10 lines of code to illustrate their point. We wrote 15,000 and hope to write many more: what can we learn from that?
|
8
|
+
7) We want to be an example of proper documentation.
|
data/README.md
CHANGED
@@ -78,38 +78,38 @@ Nothing really changes from using the hg command. There are a few differences
|
|
78
78
|
here and there (see `amp help [COMMAND]`), but really, it's pretty much the same.
|
79
79
|
|
80
80
|
Using amp as a library:
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
81
|
+
|
82
|
+
require "amp"
|
83
|
+
include Amp
|
84
|
+
|
85
|
+
repo = Repositories::pick "/Users/ari/src/amp.code"
|
86
|
+
remote = Repositories::pick "https://user:password@bitbucket.org/carbonica/amp"
|
87
|
+
|
88
88
|
make a file...
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
|
90
|
+
Dir.chdir "/Users/ari/src/amp.code/"
|
91
|
+
open "test.txt", "w" {|f| f.puts "hello, world!" }
|
92
|
+
|
93
93
|
and add it to the repo!
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
|
95
|
+
repo.add "test.txt"
|
96
|
+
|
97
97
|
commit
|
98
|
-
|
99
|
-
|
100
|
-
|
98
|
+
|
99
|
+
repo.commit :message => 'blah'
|
100
|
+
|
101
101
|
do some more things, pull and update...
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
102
|
+
|
103
|
+
result = repo.pull remote
|
104
|
+
result = repo.update if result.success?
|
105
|
+
|
106
|
+
(puts "You need to fix things!"; new_irb_session binding) unless result.success?
|
107
|
+
# type result[:unresolved] to get a list of conflicts
|
108
|
+
|
109
109
|
and push!
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
|
111
|
+
repo.push remote
|
112
|
+
|
113
113
|
Everything here is really straight forward. Plus, if it's not, we've taken
|
114
114
|
the liberty to document as much as possible.
|
115
115
|
|
data/ampfile.rb
CHANGED
@@ -24,6 +24,20 @@ template :silly, <<-EOF
|
|
24
24
|
<%= change_node.inspect %> <%= revision %>
|
25
25
|
EOF
|
26
26
|
|
27
|
+
command "stats" do |c|
|
28
|
+
c.workflow :hg
|
29
|
+
c.desc "Prints how many commits each user has contributed"
|
30
|
+
c.on_run do |opts, args|
|
31
|
+
repo = opts[:repository]
|
32
|
+
users = Hash.new {|h, k| h[k] = 0}
|
33
|
+
repo.each do |changeset|
|
34
|
+
users[changeset.user.split("@").first] += 1 #
|
35
|
+
end
|
36
|
+
users.to_a.sort {|a,b| b[1] <=> a[1]}.each do |u,c|
|
37
|
+
puts "#{u}: #{c}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
27
41
|
|
28
42
|
namespace :docs do
|
29
43
|
|
data/ext/amp/bz2/bz2.c
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
#include <ruby.h>
|
2
|
-
#
|
2
|
+
#ifdef RUBY_19
|
3
|
+
#include <ruby/io.h>
|
4
|
+
#else
|
5
|
+
#include <rubyio.h>
|
6
|
+
#endif
|
7
|
+
|
3
8
|
#include <bzlib.h>
|
4
|
-
#include <version.h>
|
5
9
|
|
6
10
|
static VALUE bz_cWriter, bz_cReader, bz_cInternal;
|
7
11
|
static VALUE bz_eError, bz_eConfigError, bz_eEOZError;
|
@@ -82,7 +86,7 @@ bz_raise(error)
|
|
82
86
|
msg = "unknown error";
|
83
87
|
exc = bz_eError;
|
84
88
|
}
|
85
|
-
rb_raise(exc, msg);
|
89
|
+
rb_raise(exc, "%s", msg);
|
86
90
|
}
|
87
91
|
|
88
92
|
static void
|
@@ -108,25 +112,26 @@ bz_find_struct(obj, ptr, posp)
|
|
108
112
|
{
|
109
113
|
struct bz_iv *bziv;
|
110
114
|
int i;
|
111
|
-
|
115
|
+
|
112
116
|
for (i = 0; i < RARRAY_LEN(bz_internal_ary); i++) {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
117
|
+
Data_Get_Struct(RARRAY_PTR(bz_internal_ary)[i], struct bz_iv, bziv);
|
118
|
+
if (ptr) {
|
119
|
+
if (TYPE(bziv->io) == T_FILE && RFILE(bziv->io)->fptr == ptr) { // ptr is OpenFile * or rb_io_t*
|
120
|
+
if (posp)
|
121
|
+
*posp = i;
|
122
|
+
return bziv;
|
123
|
+
} else {
|
124
|
+
if (TYPE(bziv->io) == T_DATA && DATA_PTR(bziv->io) == ptr) {
|
125
|
+
if (posp)
|
126
|
+
*posp = i;
|
127
|
+
return bziv;
|
128
|
+
}
|
129
|
+
}
|
130
|
+
} else if (bziv->io == obj) {
|
131
|
+
if (posp)
|
132
|
+
*posp = i;
|
133
|
+
return bziv;
|
124
134
|
}
|
125
|
-
}
|
126
|
-
else if (bziv->io == obj) {
|
127
|
-
if (posp) *posp = i;
|
128
|
-
return bziv;
|
129
|
-
}
|
130
135
|
}
|
131
136
|
if (posp) *posp = -1;
|
132
137
|
return 0;
|
@@ -214,27 +219,26 @@ bz_internal_finalize(ary, obj)
|
|
214
219
|
int closed, i;
|
215
220
|
struct bz_iv *bziv;
|
216
221
|
struct bz_file *bzf;
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
222
|
+
for (i = 0; i < RARRAY_LEN(ary); i++) {
|
223
|
+
elem = RARRAY_PTR(ary)[i];
|
224
|
+
Data_Get_Struct(elem, struct bz_iv, bziv);
|
225
|
+
if (bziv->bz2) {
|
226
|
+
RDATA(bziv->bz2)->dfree = ruby_xfree;
|
227
|
+
if (TYPE(bziv->io) == T_FILE) {
|
228
|
+
RFILE(bziv->io)->fptr->finalize = bziv->finalize;
|
229
|
+
}
|
230
|
+
else if (TYPE(bziv->io) == T_DATA) {
|
231
|
+
RDATA(bziv->io)->dfree = bziv->finalize;
|
232
|
+
}
|
233
|
+
Data_Get_Struct(bziv->bz2, struct bz_file, bzf);
|
234
|
+
closed = bz_writer_internal_flush(bzf);
|
235
|
+
if (bzf->flags & BZ2_RB_CLOSE) {
|
236
|
+
bzf->flags &= ~BZ2_RB_CLOSE;
|
237
|
+
if (!closed && rb_respond_to(bzf->io, id_close)) {
|
238
|
+
rb_funcall2(bzf->io, id_close, 0, 0);
|
239
|
+
}
|
240
|
+
}
|
225
241
|
}
|
226
|
-
else if (TYPE(bziv->io) == T_DATA) {
|
227
|
-
RDATA(bziv->io)->dfree = bziv->finalize;
|
228
|
-
}
|
229
|
-
Data_Get_Struct(bziv->bz2, struct bz_file, bzf);
|
230
|
-
closed = bz_writer_internal_flush(bzf);
|
231
|
-
if (bzf->flags & BZ2_RB_CLOSE) {
|
232
|
-
bzf->flags &= ~BZ2_RB_CLOSE;
|
233
|
-
if (!closed && rb_respond_to(bzf->io, id_close)) {
|
234
|
-
rb_funcall2(bzf->io, id_close, 0, 0);
|
235
|
-
}
|
236
|
-
}
|
237
|
-
}
|
238
242
|
}
|
239
243
|
return Qnil;
|
240
244
|
}
|
@@ -293,24 +297,28 @@ bz_io_data_finalize(ptr)
|
|
293
297
|
|
294
298
|
bziv = bz_find_struct(0, ptr, &pos);
|
295
299
|
if (bziv) {
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
300
|
+
rb_ary_delete_at(bz_internal_ary, pos);
|
301
|
+
Data_Get_Struct(bziv->bz2, struct bz_file, bzf);
|
302
|
+
rb_protect(bz_writer_internal_flush, (VALUE)bzf, 0);
|
303
|
+
RDATA(bziv->bz2)->dfree = ruby_xfree;
|
304
|
+
if (bziv->finalize) {
|
305
|
+
(*bziv->finalize)(ptr);
|
306
|
+
} else if (TYPE(bzf->io) == T_FILE) {
|
307
|
+
// close bzf->io.
|
308
|
+
#ifdef RUBY_19
|
309
|
+
rb_io_close(bzf->io);
|
310
|
+
#else
|
311
|
+
OpenFile *file = (OpenFile *)ptr;
|
312
|
+
if (file->f) {
|
313
|
+
fclose(file->f);
|
314
|
+
file->f = 0;
|
315
|
+
}
|
316
|
+
if (file->f2) {
|
317
|
+
fclose(file->f2);
|
318
|
+
file->f2 = 0;
|
319
|
+
}
|
320
|
+
#endif
|
312
321
|
}
|
313
|
-
}
|
314
322
|
}
|
315
323
|
}
|
316
324
|
|
@@ -436,8 +444,11 @@ bz_writer_init(argc, argv, obj)
|
|
436
444
|
else {
|
437
445
|
VALUE iv;
|
438
446
|
struct bz_iv *bziv;
|
439
|
-
|
440
|
-
|
447
|
+
#ifdef RUBY_19
|
448
|
+
rb_io_t *fptr;
|
449
|
+
#else
|
450
|
+
OpenFile *fptr;
|
451
|
+
#endif
|
441
452
|
rb_io_taint_check(a);
|
442
453
|
if (!rb_respond_to(a, id_write)) {
|
443
454
|
rb_raise(rb_eArgError, "first argument must respond to #write");
|
@@ -606,42 +617,42 @@ bz_reader_init(argc, argv, obj)
|
|
606
617
|
int internal = 0;
|
607
618
|
|
608
619
|
if (rb_scan_args(argc, argv, "11", &a, &b) == 2) {
|
609
|
-
|
620
|
+
small = RTEST(b);
|
610
621
|
}
|
611
622
|
rb_io_taint_check(a);
|
612
623
|
if (OBJ_TAINTED(a)) {
|
613
|
-
|
624
|
+
OBJ_TAINT(obj);
|
614
625
|
}
|
615
626
|
if (rb_respond_to(a, id_read)) {
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
if (
|
625
|
-
|
627
|
+
if (TYPE(a) == T_FILE) {
|
628
|
+
#ifdef RUBY_19
|
629
|
+
rb_io_t *fptr;
|
630
|
+
#else
|
631
|
+
OpenFile *fptr;
|
632
|
+
#endif
|
633
|
+
GetOpenFile(a, fptr);
|
634
|
+
rb_io_check_readable(fptr);
|
635
|
+
} else if (rb_respond_to(a, id_closed)) {
|
636
|
+
VALUE iv = rb_funcall2(a, id_closed, 0, 0);
|
637
|
+
if (RTEST(iv)) {
|
638
|
+
rb_raise(rb_eArgError, "closed object");
|
639
|
+
}
|
626
640
|
}
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
bzs->str = a;
|
643
|
-
a = res;
|
644
|
-
internal = BZ2_RB_INTERNAL;
|
641
|
+
} else {
|
642
|
+
struct bz_str *bzs;
|
643
|
+
VALUE res;
|
644
|
+
|
645
|
+
if (!rb_respond_to(a, id_str)) {
|
646
|
+
rb_raise(rb_eArgError, "first argument must respond to #read");
|
647
|
+
}
|
648
|
+
a = rb_funcall2(a, id_str, 0, 0);
|
649
|
+
if (TYPE(a) != T_STRING) {
|
650
|
+
rb_raise(rb_eArgError, "#to_str must return a String");
|
651
|
+
}
|
652
|
+
res = Data_Make_Struct(bz_cInternal, struct bz_str, bz_str_mark, ruby_xfree, bzs);
|
653
|
+
bzs->str = a;
|
654
|
+
a = res;
|
655
|
+
internal = BZ2_RB_INTERNAL;
|
645
656
|
}
|
646
657
|
Data_Get_Struct(obj, struct bz_file, bzf);
|
647
658
|
bzf->io = a;
|
@@ -1485,14 +1496,14 @@ void Init_bz2()
|
|
1485
1496
|
rb_intern("define_finalizer"), 2, bz_internal_ary,
|
1486
1497
|
bz_proc_new(bz_internal_finalize, 0));
|
1487
1498
|
|
1488
|
-
id_new
|
1489
|
-
id_write
|
1490
|
-
id_open
|
1491
|
-
id_flush
|
1492
|
-
id_read
|
1493
|
-
id_close
|
1499
|
+
id_new = rb_intern("new");
|
1500
|
+
id_write = rb_intern("write");
|
1501
|
+
id_open = rb_intern("open");
|
1502
|
+
id_flush = rb_intern("flush");
|
1503
|
+
id_read = rb_intern("read");
|
1504
|
+
id_close = rb_intern("close");
|
1505
|
+
id_str = rb_intern("to_str");
|
1494
1506
|
id_closed = rb_intern("closed?");
|
1495
|
-
id_str = rb_intern("to_str");
|
1496
1507
|
|
1497
1508
|
bz_mBZ2 = rb_define_module("BZ2");
|
1498
1509
|
bz_eConfigError = rb_define_class_under(bz_mBZ2, "ConfigError", rb_eFatal);
|
data/ext/amp/bz2/extconf.rb
CHANGED
@@ -3,6 +3,10 @@ ARGV.collect! {|x| x.sub(/^--with-bz2-prefix=/, "--with-bz2-dir=") }
|
|
3
3
|
|
4
4
|
require 'mkmf'
|
5
5
|
|
6
|
+
if RUBY_VERSION =~ /1.9/ then
|
7
|
+
$CPPFLAGS += " -DRUBY_19"
|
8
|
+
end
|
9
|
+
|
6
10
|
if unknown = enable_config("unknown")
|
7
11
|
libs = if CONFIG.key?("LIBRUBYARG_STATIC")
|
8
12
|
Config::expand(CONFIG["LIBRUBYARG_STATIC"].dup).sub(/^-l/, '')
|
data/ext/amp/bz2/mkmf.log
CHANGED
@@ -1,28 +1,37 @@
|
|
1
1
|
have_library: checking for BZ2_bzWriteOpen() in -lbz2... -------------------- yes
|
2
2
|
|
3
|
-
"gcc -o conftest -I. -I/
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
"gcc -o conftest -I/usr/local/include/ruby1.9-1.9.1/i386-darwin10.0.0 -I/usr/local/include/ruby1.9-1.9.1/ruby/backward -I/usr/local/include/ruby1.9-1.9.1 -I/Users/michaeledgar/mygems/amp/ext/amp/bz2 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DRUBY_19 -O2 -g -Wall -Wno-parentheses -pipe -fno-common conftest.c -L. -L/usr/local/lib -L. -L/usr/local/lib -lruby1.9-static -lpthread -ldl -lobjc "
|
4
|
+
checked program was:
|
5
|
+
/* begin */
|
6
|
+
1: #include "ruby.h"
|
7
|
+
2:
|
8
|
+
3: int main() {return 0;}
|
9
|
+
/* end */
|
10
|
+
|
11
|
+
"gcc -o conftest -I/usr/local/include/ruby1.9-1.9.1/i386-darwin10.0.0 -I/usr/local/include/ruby1.9-1.9.1/ruby/backward -I/usr/local/include/ruby1.9-1.9.1 -I/Users/michaeledgar/mygems/amp/ext/amp/bz2 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DRUBY_19 -O2 -g -Wall -Wno-parentheses -pipe -fno-common conftest.c -L. -L/usr/local/lib -L. -L/usr/local/lib -lruby1.9-static -lbz2 -lpthread -ldl -lobjc "
|
8
12
|
conftest.c: In function ‘t’:
|
9
|
-
conftest.c:
|
10
|
-
conftest.c:
|
11
|
-
conftest.c:
|
12
|
-
lipo: can't figure out the architecture type of: /var/folders/zy/zyqc-SWsGjeyuLdp+7qPO++++TI/-Tmp-//cc7a8sUN.out
|
13
|
+
conftest.c:5: error: ‘BZ2_bzWriteOpen’ undeclared (first use in this function)
|
14
|
+
conftest.c:5: error: (Each undeclared identifier is reported only once
|
15
|
+
conftest.c:5: error: for each function it appears in.)
|
13
16
|
checked program was:
|
14
17
|
/* begin */
|
15
|
-
1:
|
16
|
-
2:
|
17
|
-
3:
|
18
|
+
1: #include "ruby.h"
|
19
|
+
2:
|
20
|
+
3: /*top*/
|
21
|
+
4: int main() {return 0;}
|
22
|
+
5: int t() { void ((*volatile p)()); p = (void ((*)()))BZ2_bzWriteOpen; return 0; }
|
18
23
|
/* end */
|
19
24
|
|
20
|
-
"gcc -o conftest -I. -I/
|
25
|
+
"gcc -o conftest -I/usr/local/include/ruby1.9-1.9.1/i386-darwin10.0.0 -I/usr/local/include/ruby1.9-1.9.1/ruby/backward -I/usr/local/include/ruby1.9-1.9.1 -I/Users/michaeledgar/mygems/amp/ext/amp/bz2 -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DRUBY_19 -O2 -g -Wall -Wno-parentheses -pipe -fno-common conftest.c -L. -L/usr/local/lib -L. -L/usr/local/lib -lruby1.9-static -lbz2 -lpthread -ldl -lobjc "
|
26
|
+
conftest.c: In function ‘t’:
|
27
|
+
conftest.c:5: warning: implicit declaration of function ‘BZ2_bzWriteOpen’
|
21
28
|
checked program was:
|
22
29
|
/* begin */
|
23
|
-
1:
|
24
|
-
2:
|
25
|
-
3:
|
30
|
+
1: #include "ruby.h"
|
31
|
+
2:
|
32
|
+
3: /*top*/
|
33
|
+
4: int main() {return 0;}
|
34
|
+
5: int t() { BZ2_bzWriteOpen(); return 0; }
|
26
35
|
/* end */
|
27
36
|
|
28
37
|
--------------------
|
data/lib/amp.rb
CHANGED
@@ -8,7 +8,7 @@ command :help do |c|
|
|
8
8
|
if args.empty?
|
9
9
|
output << "These are the following commands available:\n"
|
10
10
|
|
11
|
-
Amp::Command.all_for_workflow(options[:global_config]["amp"
|
11
|
+
Amp::Command.all_for_workflow(options[:global_config]["amp"]["workflow", Symbol, :hg], false).sort {|k1, k2| k1.to_s <=> k2.to_s}.each do |k, v|
|
12
12
|
output << "\t#{k.to_s.ljust(30, " ")}#{v.desc}" + "\n"
|
13
13
|
end
|
14
14
|
|
@@ -17,7 +17,7 @@ command :help do |c|
|
|
17
17
|
Amp::UI.say output
|
18
18
|
else
|
19
19
|
|
20
|
-
unless cmd = Amp::Command.all_for_workflow(options[:global_config]["amp"
|
20
|
+
unless cmd = Amp::Command.all_for_workflow(options[:global_config]["amp"]["workflow", Symbol, :hg])[args.first.to_sym]
|
21
21
|
Amp::UI.say "The command #{args.first} was not found."
|
22
22
|
else
|
23
23
|
cmd.collect_options
|
@@ -27,7 +27,7 @@ EOS
|
|
27
27
|
|
28
28
|
c.opt :force, "Run even when remote repository is unrelated", :short => '-f'
|
29
29
|
c.opt :rev, "A changeset up to which you would like to bundle", :short => '-r', :type => :string
|
30
|
-
c.opt :base, "A base changeset to specify instead of a destination", :type => :string
|
30
|
+
c.opt :base, "A base changeset to specify instead of a destination", :type => :string, :multi => true
|
31
31
|
c.opt :all, "Bundle all changesets in the repository", :short => '-a'
|
32
32
|
c.opt :type, "Bundle compression type to use (default: bzip2)", :short => '-t', :default => 'bzip2'
|
33
33
|
c.opt :ssh, "Specify ssh command to use", :short => '-e', :type => :string
|
@@ -41,14 +41,17 @@ EOS
|
|
41
41
|
|
42
42
|
# Type notation!
|
43
43
|
# rev :: Amp::Changeset
|
44
|
-
rev
|
45
|
-
base
|
44
|
+
rev &&= repo.lookup rev
|
45
|
+
base = opts[:all] ? [nil] : (opts[:base] || []) # --all overrides --base
|
46
46
|
|
47
|
-
|
47
|
+
# we want [nil] and ["1", "23"] to be triggered here.
|
48
|
+
if !base.empty?
|
48
49
|
if dest
|
49
50
|
raise abort("--base is incompatible with specifiying a destination")
|
50
51
|
end
|
51
52
|
|
53
|
+
base = base.map {|b| repo.lookup b }
|
54
|
+
|
52
55
|
o = []
|
53
56
|
has = {Amp::RevlogSupport::Node::NULL_ID => nil}
|
54
57
|
|
@@ -57,7 +60,7 @@ EOS
|
|
57
60
|
has.update repo.changelog.reachable_nodes_for_node(node_id)
|
58
61
|
end
|
59
62
|
|
60
|
-
visit = [rev]
|
63
|
+
visit = rev ? [rev] : repo.changelog.heads
|
61
64
|
seen = {} # {node => Boolean} where node is a string
|
62
65
|
add = proc do |node|
|
63
66
|
seen[node] = true
|
@@ -65,7 +68,7 @@ EOS
|
|
65
68
|
end
|
66
69
|
|
67
70
|
until visit.empty?
|
68
|
-
n = visit.
|
71
|
+
n = visit.shift
|
69
72
|
|
70
73
|
# for those who are lame:
|
71
74
|
# rents = 'rents = parents
|
@@ -84,16 +87,17 @@ EOS
|
|
84
87
|
dest, revs, checkout = *c.parse_url(path, [rev])
|
85
88
|
# alio is Esperanto for "other"; it's conveniently the same length as repo
|
86
89
|
alio = Amp::Repositories.pick nil, dest
|
87
|
-
o
|
90
|
+
o = repo.find_outgoing_roots alio, :force => opts[:force]
|
88
91
|
end # end if
|
89
92
|
|
90
93
|
# Oh no, bitches! If you thought we were done, you'd be wrong.
|
91
94
|
# Nevermind, false alarm. Turns out there's not that much left to do.
|
92
95
|
|
93
96
|
cg = if revs
|
94
|
-
p [o, rev]
|
95
97
|
repo.changegroup_subset o, [rev], 'bundle'
|
96
98
|
else
|
99
|
+
p [">>", o]
|
100
|
+
# !!!!!!!!!!!! The bug is in the following line !!!!!!!!! KILLME
|
97
101
|
repo.changegroup o, 'bundle'
|
98
102
|
end
|
99
103
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
command :clone do |c|
|
2
2
|
c.workflow :hg
|
3
|
+
|
3
4
|
c.desc "Clone a repository"
|
4
5
|
c.opt :pull, "Whether to do a pull from the destination (the alternative is to stream)", :short => '-p'
|
5
6
|
c.opt :stream, "stream raw data uncompressed from repository", :short => '-u'
|
@@ -23,9 +24,10 @@ amp clone [options]+ src dest
|
|
23
24
|
If an exception is raised, the partly cloned/updated destination
|
24
25
|
repository will be deleted.
|
25
26
|
|
26
|
-
|
27
|
+
Where options are:
|
27
28
|
HELP
|
28
29
|
|
30
|
+
c.no_repo
|
29
31
|
c.on_run do |opts, args|
|
30
32
|
require 'uri'
|
31
33
|
|
@@ -52,11 +52,6 @@ module Amp
|
|
52
52
|
global_config["debug", "messages"] = true
|
53
53
|
end
|
54
54
|
|
55
|
-
unless global_config["amp"]["workflow"]
|
56
|
-
global_config["amp"]["workflow"] = :hg
|
57
|
-
global_config.save! rescue Errno::EACCES
|
58
|
-
end
|
59
|
-
|
60
55
|
# the options to send to the command
|
61
56
|
cmd_opts = {}
|
62
57
|
|
@@ -83,7 +78,7 @@ module Amp
|
|
83
78
|
cmd_opts[:repository].config && local_config = cmd_opts[:repository].config
|
84
79
|
end
|
85
80
|
|
86
|
-
workflow = local_config["amp"]["workflow"]
|
81
|
+
workflow = local_config["amp"]["workflow", Symbol, :hg]
|
87
82
|
|
88
83
|
if File.exists?(File.expand_path(File.join(File.dirname(__FILE__), "commands/workflows/#{workflow}/")))
|
89
84
|
require_dir { "amp/commands/commands/workflows/#{workflow}/**/*.rb" }
|
@@ -140,7 +135,7 @@ module Amp
|
|
140
135
|
rock_bottom = false
|
141
136
|
begin
|
142
137
|
rock_bottom = true if dir == "/"
|
143
|
-
["ampfile","Ampfile","ampfile.rb","Ampfile.rb"].each do |pos|
|
138
|
+
["ampfile", "Ampfile", "ampfile.rb", "Ampfile.rb"].each do |pos|
|
144
139
|
file = File.join(dir, pos)
|
145
140
|
return file if File.exist? file
|
146
141
|
end
|
@@ -163,7 +158,7 @@ module Amp
|
|
163
158
|
# @param [String] cmd the command to look up
|
164
159
|
# @return [Amp::Command] the command object that was found, or nil if none was found.
|
165
160
|
def self.pick_command(cmd, config)
|
166
|
-
my_flow = config["amp"]["workflow"]
|
161
|
+
my_flow = config["amp"]["workflow", Symbol, :hg]
|
167
162
|
if c = Amp::Command.all_for_workflow(my_flow).keys.map {|k| k.to_s}.abbrev[cmd]
|
168
163
|
Amp::Command.command_for_workflow(c, my_flow)
|
169
164
|
else
|
@@ -175,6 +175,9 @@ module PythonConfig
|
|
175
175
|
return str if args.size == 1
|
176
176
|
|
177
177
|
type = args[1]
|
178
|
+
|
179
|
+
# really? this needs to be a case-when statement... right after
|
180
|
+
# thanksgiving break
|
178
181
|
if type == Integer || type == Fixnum || type == Bignum
|
179
182
|
result = str.to_i
|
180
183
|
elsif type == Boolean
|
@@ -185,6 +188,8 @@ module PythonConfig
|
|
185
188
|
result = str.split(",").map {|s| s.strip}
|
186
189
|
elsif type == String
|
187
190
|
result = str
|
191
|
+
elsif type == Symbol
|
192
|
+
result = str.to_s
|
188
193
|
end
|
189
194
|
return result if args.size == 2
|
190
195
|
|
@@ -655,9 +655,9 @@ module Amp
|
|
655
655
|
new_heads - old_heads + 1
|
656
656
|
end # end if
|
657
657
|
|
658
|
-
class << ret
|
659
|
-
|
660
|
-
end
|
658
|
+
# class << ret
|
659
|
+
# def success?; self <= 1 || hdz.size == 1; end
|
660
|
+
# end
|
661
661
|
|
662
662
|
ret
|
663
663
|
end # end def
|
data/lib/amp/revlogs/revlog.rb
CHANGED
@@ -81,7 +81,7 @@ module Amp
|
|
81
81
|
# @return [String] the node's ID
|
82
82
|
def node_id_for_index(index)
|
83
83
|
unless @index[index]
|
84
|
-
raise RevlogSupport::LookupError.new("Couldn't find node for id
|
84
|
+
raise RevlogSupport::LookupError.new("Couldn't find node for id #{index.inspect}")
|
85
85
|
end
|
86
86
|
@index[index].node_id
|
87
87
|
end
|
@@ -97,8 +97,7 @@ module Amp
|
|
97
97
|
# the requested node.
|
98
98
|
def revision_index_for_node(id)
|
99
99
|
unless @index.node_map[id]
|
100
|
-
|
101
|
-
raise StandardError.new("Couldn't find node for id '#{id}'")
|
100
|
+
raise StandardError.new("Couldn't find node for id #{id.inspect}")
|
102
101
|
end
|
103
102
|
@index.node_map[id]
|
104
103
|
end
|
@@ -4,12 +4,15 @@ end
|
|
4
4
|
|
5
5
|
if RUBY_VERSION < "1.9"
|
6
6
|
class String
|
7
|
+
require 'enumerator' unless method_defined?(:to_enum)
|
8
|
+
|
7
9
|
# DON'T USE String#each. Use String#each_line
|
8
10
|
def lines
|
9
|
-
|
11
|
+
return to_enum(:lines) if !block_given?
|
12
|
+
self.split(/^/).each do |l|
|
10
13
|
yield l
|
11
14
|
end
|
12
|
-
end
|
15
|
+
end unless method_defined?(:lines)
|
13
16
|
|
14
17
|
##
|
15
18
|
# Returns the numeric, ascii value of the first character
|
@@ -18,13 +21,13 @@ if RUBY_VERSION < "1.9"
|
|
18
21
|
# @return [Fixnum] the ascii value of the first character in the string
|
19
22
|
def ord
|
20
23
|
self[0]
|
21
|
-
end
|
24
|
+
end unless method_defined?(:ord)
|
22
25
|
end
|
23
26
|
class Object
|
24
27
|
def tap
|
25
28
|
yield self
|
26
29
|
self
|
27
|
-
end
|
30
|
+
end unless method_defined?(:tap)
|
28
31
|
end
|
29
32
|
else
|
30
33
|
# 1.9 +
|
@@ -63,4 +66,4 @@ else
|
|
63
66
|
FileUtils.makedirs(*args)
|
64
67
|
end
|
65
68
|
end
|
66
|
-
end
|
69
|
+
end
|
data/lib/amp/support/support.rb
CHANGED
data/site/Rakefile
CHANGED
@@ -3,12 +3,23 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'rake'
|
5
5
|
require 'rake/tasklib'
|
6
|
-
|
6
|
+
|
7
7
|
require 'src/helpers.rb'
|
8
8
|
require 'ftools'
|
9
9
|
|
10
10
|
desc "Compile Site"
|
11
11
|
task :"build-website" do
|
12
|
+
missing_gems = []
|
13
|
+
requirements = ['haml', 'uv']
|
14
|
+
requirements.each do |requirement|
|
15
|
+
begin
|
16
|
+
require requirement
|
17
|
+
rescue LoadError => e
|
18
|
+
puts "The following gems are required to build the amp website: #{requirements.join(", ")}"
|
19
|
+
puts "Install them as follows: gem install #{requirements.join(" ")}"
|
20
|
+
exit
|
21
|
+
end
|
22
|
+
end
|
12
23
|
Dir["src/**/*.haml"].reject {|item| item.split("/").last =~ /^_/}.each do |haml|
|
13
24
|
FileUtils.makedirs(File.dirname("build" + haml[3..-6] + ".html"))
|
14
25
|
File.open("build" + haml[3..-6] + ".html","w") do |out|
|
@@ -22,3 +33,6 @@ task :"build-website" do
|
|
22
33
|
end
|
23
34
|
end
|
24
35
|
end
|
36
|
+
|
37
|
+
task :default => :"build-website" do
|
38
|
+
end
|
data/site/src/about/ampfile.haml
CHANGED
@@ -54,4 +54,15 @@
|
|
54
54
|
%p
|
55
55
|
Well, start hacking away! You might find the #{commands_link} section interesting, as well as our #{link_to "/learn/", "Learn Amp"} pages, where you can find the #{blue_amp} API. We'll be setting up a place for useful snippets to be posted soon.
|
56
56
|
|
57
|
-
= render("include/_footer.haml")
|
57
|
+
= render("include/_footer.haml")
|
58
|
+
:plain
|
59
|
+
<script type="text/javascript">
|
60
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
61
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
62
|
+
</script>
|
63
|
+
<script type="text/javascript">
|
64
|
+
try {
|
65
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
66
|
+
pageTracker._setDomainName(".carboni.ca");
|
67
|
+
pageTracker._trackPageview();
|
68
|
+
} catch(err) {}</script>
|
@@ -103,4 +103,15 @@
|
|
103
103
|
Once we extract our repository, we decide which changesets to print based on the options. To get a given changeset, we simply use #{shellscript "repo[x]"}, where #{shellscript "x"} can be a revision number, a partial node ID, "tip", and so on. See the documentation for #{link_to "http://amp.carboni.ca/docs/Amp/Repositories/LocalRepository.html#%5B%5D-instance_method", "LocalRepository#[]"} for more details.
|
104
104
|
%p
|
105
105
|
This is just a quick once-over of some of the more obvious features of #{blue_amp "Amp's"} command system - there are far more features to discuss. Until those pages are written, take a look at the #{link_to "http://amp.carboni.ca/docs/Amp/Command.html", "Documentation for the Command class"}.
|
106
|
-
= render("include/_footer.haml")
|
106
|
+
= render("include/_footer.haml")
|
107
|
+
:plain
|
108
|
+
<script type="text/javascript">
|
109
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
110
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
111
|
+
</script>
|
112
|
+
<script type="text/javascript">
|
113
|
+
try {
|
114
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
115
|
+
pageTracker._setDomainName(".carboni.ca");
|
116
|
+
pageTracker._trackPageview();
|
117
|
+
} catch(err) {}</script>
|
data/site/src/about/index.haml
CHANGED
@@ -30,4 +30,15 @@
|
|
30
30
|
%li #{ampfile_link "Ampfiles"} - tweak amp's settings for a specific repository with one file
|
31
31
|
%li Want more features? #{link_to "/contribute/", "Help develop"} #{blue_amp "Amp"}! We've got a lot planned!
|
32
32
|
|
33
|
-
= render("include/_footer.haml")
|
33
|
+
= render("include/_footer.haml")
|
34
|
+
:plain
|
35
|
+
<script type="text/javascript">
|
36
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
37
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
38
|
+
</script>
|
39
|
+
<script type="text/javascript">
|
40
|
+
try {
|
41
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
42
|
+
pageTracker._setDomainName(".carboni.ca");
|
43
|
+
pageTracker._trackPageview();
|
44
|
+
} catch(err) {}</script>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
%p
|
16
16
|
We want #{blue_amp} to be fast. Like, as fast as possible. The biggest problem: Ruby isn't very fast. So here's our current goal: <b>we want #{blue_amp} to be as fast as mercurial</b>.
|
17
17
|
%p
|
18
|
-
|
18
|
+
Amp is written in #{ruby_link "Ruby"}, which according to the #{link_to "http://shootout.alioth.debian.org/", "Great Language Shootout"} is #{link_to "http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=python&lang2=ruby&box=1", "3-10 times slower than Python"}. That's for MRI 1.8.6 - here's a link to #{link_to "http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=python&lang2=jruby&box=1", "JRuby"} and #{link_to "http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=yarv&lang2=python&box=1", "Ruby 1.9"}, which are similar though an improvement.
|
19
19
|
%h2 So how's that going?
|
20
20
|
%p
|
21
21
|
We hope to have some direct, auto-generated benchmarks up here soon. But for now - many amp operations are <b>only 1.5-2 times slower than Mercurial</b>. That's within the range that the language barrier is the major factor. Of course, we hope to do better.
|
@@ -28,4 +28,15 @@
|
|
28
28
|
%p
|
29
29
|
Head on over the #{contribute_link} page and join us! There's plenty of places where we can optimize code (or even if you want to help get some auto-generated benchmarks on this page, that'd be awesome too!)
|
30
30
|
|
31
|
-
= render("include/_footer.haml")
|
31
|
+
= render("include/_footer.haml")
|
32
|
+
:plain
|
33
|
+
<script type="text/javascript">
|
34
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
35
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
36
|
+
</script>
|
37
|
+
<script type="text/javascript">
|
38
|
+
try {
|
39
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
40
|
+
pageTracker._setDomainName(".carboni.ca");
|
41
|
+
pageTracker._trackPageview();
|
42
|
+
} catch(err) {}</script>
|
@@ -31,4 +31,15 @@
|
|
31
31
|
%h2 The git workflow sucks.
|
32
32
|
%p
|
33
33
|
We know. We're working on it. But #{commands_link "writing commands"} is actually pretty easy - do you want to #{contribute_link "help us out"}?
|
34
|
-
= render("include/_footer.haml")
|
34
|
+
= render("include/_footer.haml")
|
35
|
+
:plain
|
36
|
+
<script type="text/javascript">
|
37
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
38
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
39
|
+
</script>
|
40
|
+
<script type="text/javascript">
|
41
|
+
try {
|
42
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
43
|
+
pageTracker._setDomainName(".carboni.ca");
|
44
|
+
pageTracker._trackPageview();
|
45
|
+
} catch(err) {}</script>
|
@@ -17,8 +17,8 @@
|
|
17
17
|
%ul.bullets{:style => "margin-left:2em;"}
|
18
18
|
%li The #{link_to "http://bitbucket.org/carbonica/amp/", "BitBucket source"}. We accept pull requests!
|
19
19
|
%li Our #{link_to "http://github.com/michaeledgar/amp", "GitHub mirror"}. We accept GitHub pull requests!
|
20
|
-
%li We use #{link_to "http://
|
21
|
-
%li ... and BitBucket's #{link_to "http://bitbucket.org/carbonica/amp/wiki/Home", "wiki
|
20
|
+
%li We use #{link_to "http://carbonica.lighthouseapp.com/projects/35539-amp/overview", "a LightHouse issue tracker."}...
|
21
|
+
%li ... and BitBucket's #{link_to "http://bitbucket.org/carbonica/amp/wiki/Home", "wiki."}
|
22
22
|
%li Lastly, we've got a #{link_to "http://groups.google.com/group/amp-vcs/", "Google Group"}.
|
23
23
|
%h2 OK, but how do I submit code?
|
24
24
|
%p
|
@@ -62,4 +62,15 @@
|
|
62
62
|
%li
|
63
63
|
%span{:style => "width:80px;"}= commits.to_s
|
64
64
|
%span{:style => "width:400px;"}= user
|
65
|
-
= render("include/_footer.haml")
|
65
|
+
= render("include/_footer.haml")
|
66
|
+
:plain
|
67
|
+
<script type="text/javascript">
|
68
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
69
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
70
|
+
</script>
|
71
|
+
<script type="text/javascript">
|
72
|
+
try {
|
73
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
74
|
+
pageTracker._setDomainName(".carboni.ca");
|
75
|
+
pageTracker._trackPageview();
|
76
|
+
} catch(err) {}</script>
|
@@ -294,4 +294,15 @@
|
|
294
294
|
:date => Time.now,
|
295
295
|
:changeset_base => repo[arg1.to_i],
|
296
296
|
:ancestor => some_other_changeset
|
297
|
-
= render("include/_footer.haml")
|
297
|
+
= render("include/_footer.haml")
|
298
|
+
:plain
|
299
|
+
<script type="text/javascript">
|
300
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
301
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
302
|
+
</script>
|
303
|
+
<script type="text/javascript">
|
304
|
+
try {
|
305
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
306
|
+
pageTracker._setDomainName(".carboni.ca");
|
307
|
+
pageTracker._trackPageview();
|
308
|
+
} catch(err) {}</script>
|
data/site/src/get/index.haml
CHANGED
@@ -29,4 +29,15 @@
|
|
29
29
|
%p
|
30
30
|
Amp's gem is hosted on #{link_to "http://www.rubyforge.org/", "Rubyforge"} and #{link_to "http://www.gemcutter.org/", "Gemcutter"}.
|
31
31
|
|
32
|
-
= render("include/_footer.haml")
|
32
|
+
= render("include/_footer.haml")
|
33
|
+
:plain
|
34
|
+
<script type="text/javascript">
|
35
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
36
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
37
|
+
</script>
|
38
|
+
<script type="text/javascript">
|
39
|
+
try {
|
40
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
41
|
+
pageTracker._setDomainName(".carboni.ca");
|
42
|
+
pageTracker._trackPageview();
|
43
|
+
} catch(err) {}</script>
|
data/site/src/helpers.rb
CHANGED
data/site/src/index.haml
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
%ul.bullets
|
30
30
|
%li== #{hg_link} in #{link_to "http://www.ruby-lang.org/", "Ruby"}. 100% compatible with hg.
|
31
31
|
%li== Uniquely #{link_to "/about/customization.html", "customizable"}
|
32
|
-
%li== Superbly #{link_to "/docs/", "documented"} with #{
|
32
|
+
%li== Superbly #{link_to "/docs/", "documented"} with #{yard_link "YARD"}
|
33
33
|
%li== Free and Open-Source (#{link_to "http://www.gnu.org/licenses/gpl-2.0.html", "GPLv2"})
|
34
34
|
%li== #{link_to "/about/performance.html", "Performance"} Focused
|
35
35
|
%li Dependency-free (you just need Ruby!)
|
@@ -100,5 +100,16 @@
|
|
100
100
|
%span.shellscript hg diff -r rev1 -r rev2 -U 3 > your.patch
|
101
101
|
%li Create ticket on #{lighthouse_link "Lighthouse, attach your patch"}
|
102
102
|
%li Land one patch, you get commit rights
|
103
|
-
%p== Want more details? Check out our #{link_to "/
|
104
|
-
= render("include/_footer.haml")
|
103
|
+
%p== Want more details? Check out our #{link_to "/contribute/", "contributing page." } Or join us at #{link_to "irc://irc.freenode.net/#amp", "#amp on freenode" }.
|
104
|
+
= render("include/_footer.haml")
|
105
|
+
:plain
|
106
|
+
<script type="text/javascript">
|
107
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
108
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
109
|
+
</script>
|
110
|
+
<script type="text/javascript">
|
111
|
+
try {
|
112
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
113
|
+
pageTracker._setDomainName(".carboni.ca");
|
114
|
+
pageTracker._trackPageview();
|
115
|
+
} catch(err) {}</script>
|
data/site/src/learn/index.haml
CHANGED
@@ -43,4 +43,15 @@
|
|
43
43
|
= link_to "/docs/", "API Documentation"
|
44
44
|
%p
|
45
45
|
One of the most important aspects of our code is that it should be highly documented. We're sitting at around 45% comment/LOC ratio, and there's still plenty of places we want more documentation. We use #{yard_link} to document our code. You can find the complete documentation for our code (and the dependencies we've included in the #{blue_amp} source) by clicking "API Documentation" above, or just clicking #{link_to "/docs/", "right here"}.
|
46
|
-
= render("include/_footer.haml")
|
46
|
+
= render("include/_footer.haml")
|
47
|
+
:plain
|
48
|
+
<script type="text/javascript">
|
49
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
50
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
51
|
+
</script>
|
52
|
+
<script type="text/javascript">
|
53
|
+
try {
|
54
|
+
var pageTracker = _gat._getTracker("UA-11746178-1");
|
55
|
+
pageTracker._setDomainName(".carboni.ca");
|
56
|
+
pageTracker._trackPageview();
|
57
|
+
} catch(err) {}</script>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Edgar
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-11-
|
13
|
+
date: 2009-11-27 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|