dbt 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -13
- data/lib/dbt.rb +2 -2
- data/lib/dbt/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba0d20d40791a30281a1cce9203f8ef3a71d6b40
|
4
|
+
data.tar.gz: c1b08781b94cd138b585eac23249d6931fd4adfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20f2a652a047a8a6f55b3b9c61f80f2179803ab78cae33f6c91cc2676150c6b1dd5d17268097aa342ea9d546c44f181859282fdef944e6a83233dc676932b45b
|
7
|
+
data.tar.gz: 1962914e6fc130400df9a7409cda178173bd40f572836196e601929b2fbf115c7a08745f82e9034e7d161a333accabce3acbe66366be9d32c6666f349c17965d
|
data/README.md
CHANGED
@@ -15,12 +15,17 @@ your libraries and whatnot". In your source code you add DBT commands:
|
|
15
15
|
|
16
16
|
```ruby
|
17
17
|
# @provides Foo
|
18
|
-
# @requires Bar
|
19
|
-
|
18
|
+
# @requires module:Bar
|
19
|
+
class Foo
|
20
|
+
include Bar
|
21
|
+
|
22
|
+
def scary_method
|
20
23
|
#-----> break
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
doing
|
25
|
+
interesting
|
26
|
+
stuff
|
27
|
+
end
|
28
|
+
|
24
29
|
end
|
25
30
|
```
|
26
31
|
|
@@ -32,6 +37,7 @@ Your files will be grep'd for `^\w*(class|module)`, and these will be registered
|
|
32
37
|
automatically as:
|
33
38
|
|
34
39
|
```ruby
|
40
|
+
# you DON'T need to add these 'provides' lines!
|
35
41
|
# @provides class:ClassName
|
36
42
|
class ClassName
|
37
43
|
end
|
@@ -39,21 +45,39 @@ end
|
|
39
45
|
# @provides module:ModuleName
|
40
46
|
class ModuleName
|
41
47
|
end
|
48
|
+
|
49
|
+
|
50
|
+
# ...in another file...
|
51
|
+
# @requires class:ClassName
|
52
|
+
# @requires module:ModuleName
|
53
|
+
class AnotherClass < ClassName
|
54
|
+
include ModuleName
|
55
|
+
end
|
42
56
|
```
|
43
57
|
|
44
58
|
So right out of the box, you can add `# @requires class:Foo` if you're having
|
45
59
|
trouble with dependencies and want a quick fix without having to add
|
46
60
|
`# @provides` declarations all over the place.
|
47
61
|
|
48
|
-
|
62
|
+
Breakpoints are created using the syntax `#--> break`, with two or more dashes
|
63
|
+
before the `>`. There must not be any whitespace before or after the `#`.
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
def method
|
67
|
+
do_something
|
68
|
+
#---> break
|
69
|
+
do_dangerous_thing
|
70
|
+
end
|
49
71
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
72
|
+
# you can also provide a line number
|
73
|
+
#--------> break 102
|
74
|
+
101: def method
|
75
|
+
102: do_something
|
76
|
+
103: do_dangerous_thing
|
77
|
+
104: end
|
54
78
|
```
|
55
79
|
|
56
|
-
If a line number is given to the `break` command, a breakpoint will be added
|
57
|
-
that line
|
58
|
-
insert the `#--> break` where you NEED it, rather than hardcode line numbers,
|
80
|
+
If a line number is given to the `break` command, a breakpoint will be added at
|
81
|
+
*that* line, otherwise it will be added to the line below `break`. It's better
|
82
|
+
to insert the `#--> break` where you NEED it, rather than hardcode line numbers,
|
59
83
|
since line numbers are not constant.
|
data/lib/dbt.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Motion::Project::App.setup do |app|
|
4
4
|
def app.analyze
|
5
|
-
debugger_cmds_output = "#------> Creado por el
|
5
|
+
debugger_cmds_output = "#------> Creado por el DBT <------#\n"
|
6
6
|
dependers = Hash.new { |hash,key| hash[key] = [] }
|
7
7
|
providers = {}
|
8
8
|
|
@@ -22,7 +22,7 @@ Motion::Project::App.setup do |app|
|
|
22
22
|
case command
|
23
23
|
when 'break'
|
24
24
|
dep ||= file.lineno + 1
|
25
|
-
debugger_cmds_output += "
|
25
|
+
debugger_cmds_output += "breakpoint set --file #{File.basename filename} --line #{dep}\n"
|
26
26
|
when 'provides'
|
27
27
|
if providers.key? dep
|
28
28
|
puts "\033[1m!HAY DEMASIADOS!\033[0m \033[1;31m#{dep}\033[0m"
|
data/lib/dbt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dbt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colin Thomas-Arnold <colinta@gmail.com>
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
DBT (Dependencies and deBugging Tool) is a tool that helps declare and declare
|