dbt 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -13
  3. data/lib/dbt.rb +2 -2
  4. data/lib/dbt/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b0184ee78207b1c1bab0405b741d061480160ec
4
- data.tar.gz: 184709d851ad68ca44ad667848558b051ec88fd5
3
+ metadata.gz: ba0d20d40791a30281a1cce9203f8ef3a71d6b40
4
+ data.tar.gz: c1b08781b94cd138b585eac23249d6931fd4adfa
5
5
  SHA512:
6
- metadata.gz: c7c6d8853ffb4ae849ca8cad52ebeede8095adaea0757dceb6bade4de121b81316dafaf198b5c89c0c2f84ec930de689551bd27292ff6597cac01051d3a3d5fb
7
- data.tar.gz: 138fc508e6636a95760b687b1f3208b6f6f468e2680352bfa4d841933bacaf200df8779f953572b44852a6eafcea6f7ba5b2143e12ab69dc969019b4c0fb8eb3
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
- def scary_method
18
+ # @requires module:Bar
19
+ class Foo
20
+ include Bar
21
+
22
+ def scary_method
20
23
  #-----> break
21
- doing
22
- interesting
23
- stuff
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
- The syntax for a command is:
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
- ```regex
51
- ^#[ \t]*@(provides|requires)
52
- or for break points:
53
- ^#--+> *(break)( *(\w+|[0-9]+))?$
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 *at
57
- that line*, otherwise it will be added to the line below `break`. It's better to
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 Analizarruptor <------#\n"
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 += "break #{File.basename filename}:#{dep}\n"
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"
@@ -1,3 +1,3 @@
1
1
  module DBT
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
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.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-02-28 00:00:00.000000000 Z
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