analizaruptor 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,21 +2,29 @@ Analizaruptor
2
2
  -------------
3
3
 
4
4
  Analizaruptor is a tool that looks for `break`, `require`, and `provides`
5
- commands (and does a *teensy* bit of code analyzing (`/(class|module)\s*(\w`)/`)
6
- to provide some defaults) to make your RubyMotion `Rakefile` and `debugger_cmds`
7
- files short and consistent.
5
+ commands (and does a *teensy* bit of code analyzing - it will detect VERY basic
6
+ class and module declarations) to make your RubyMotion `Rakefile` and
7
+ `debugger_cmds` files short and consistent.
8
8
 
9
9
  **CAUTION**: It overwrites the `debugger_cmds` file!
10
10
 
11
11
  To use, include this gem (`gem 'analizaruptor'`), and add `app.analyze` to your
12
- `Rakefile`, after you have added your libraries and whatnot. In your source
13
- code you can add Analizaruptor commands
12
+ `Rakefile`, after you have added your libraries and whatnot. It looks at
13
+ `app.files` and scans those files, so I mean it when I say "after you have added
14
+ your libraries and whatnot". In your source code you can add Analizaruptor
15
+ commands
14
16
 
15
17
  ```ruby
16
- #----> provides Foo
17
- #----> requires Bar
18
- def method
19
- #----> break
18
+ # @provides Foo
19
+ # @requires Bar
20
+ # older syntax:
21
+ #--> provides Foo
22
+ #--> requires Bar
23
+ def scary_method
24
+ #-----> break
25
+ doing
26
+ interesting
27
+ stuff
20
28
  end
21
29
  ```
22
30
 
@@ -28,6 +36,8 @@ Run `rake` or `rake debug=1`, and off you go!
28
36
  The syntax for a command is:
29
37
 
30
38
  ```regex
39
+ ^#[ \t]*@(provides|requires)
40
+ or
31
41
  ^#--+> *(break|require|provides)( *(\w+|[0-9]+))?$
32
42
  ```
33
43
 
@@ -25,13 +25,13 @@ Motion::Project::App.setup do |app|
25
25
  debugger_cmds_output += "break #{File.basename filename}:#{dep}\n"
26
26
  when 'provides'
27
27
  if providers.key? dep
28
- puts "\033[1m¡HAY DEMASIADOS!\033[0m \033[1;31m#{dep}\033[0m"
28
+ puts "\033[1m!HAY DEMASIADOS!\033[0m \033[1;31m#{dep}\033[0m"
29
29
  end
30
30
  providers[dep] = filename
31
31
  when 'requires'
32
32
  dependers[filename] << dep
33
33
  else
34
- puts "\033[1m¡NO COMPRENDO!\033[0m \"#{command} #{dep}\""
34
+ puts "\033[1m!NO COMPRENDO!\033[0m \"#{command} #{dep}\""
35
35
  puts "\033[1;31m#{filename}:#{file.lineno}\033[0m"
36
36
  end
37
37
  elsif line =~ /^\s*class\s+(\w+)/
@@ -47,7 +47,7 @@ Motion::Project::App.setup do |app|
47
47
 
48
48
  dependers.each do |filename, dependencies|
49
49
  if dep = dependencies.find { |dep| ! providers.include? dep }
50
- puts "\033[1m¡NO HAY!\033[0m \033[1;31m#{dep}\033[0m"
50
+ puts "\033[1m!NO HAY!\033[0m \033[1;31m#{dep}\033[0m"
51
51
  raise "#{filename} could not find a provider for #{dep}"
52
52
  else
53
53
  self.files_dependencies filename => dependencies.map{|dep| providers[dep] }
@@ -1,3 +1,3 @@
1
1
  module Analizaruptor
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: analizaruptor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-07 00:00:00.000000000 Z
12
+ date: 2013-03-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Analizaruptor is a tool that looks for ''break'', ''require'', and
15
15
  ''provides''
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 1.8.24
67
+ rubygems_version: 1.8.25
68
68
  signing_key:
69
69
  specification_version: 3
70
70
  summary: Keep your Rakefile and debugger_cmds files short and consistent