analizaruptor 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ analizaruptor-*.gem
data/README.md CHANGED
@@ -1,14 +1,37 @@
1
1
  Analizaruptor
2
2
  -------------
3
3
 
4
- Analizaruptor is a tool that looks 'require', and 'provides' commands (and does
5
- a *teensy* bit of code analyzing (`/(class|module)\s*(\w`)/`) to provide some
6
- defaults) to make your RubyMotion `Rakefile` and `debugger_cmds` files short and
7
- consistent.
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.
8
8
 
9
- To use, include this gem, and add `app.analyze` to your `Rakefile`, after you
10
- have added your libraries and whatnot. In your source code you can add
11
- Analizaruptor commands (`#----> break|provides|requires`) and those will be
12
- translated into directives for `app.files_dependencies` and `debugger_cmds`.
9
+ **CAUTION**: It overwrites the `debugger_cmds` file!
10
+
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
14
+
15
+ ```ruby
16
+ #----> provides Foo
17
+ #----> requires Bar
18
+ def method
19
+ #----> break
20
+ end
21
+ ```
22
+
23
+ And those will be translated into directives for `app.files_dependencies` and
24
+ `debugger_cmds`.
13
25
 
14
26
  Run `rake` or `rake debug=1`, and off you go!
27
+
28
+ The syntax for a command is:
29
+
30
+ ```regex
31
+ ^#--+> *(break|require|provides)( *(\w+|[0-9]+))?$
32
+ ```
33
+
34
+ If a line number is given to the `break` command, a breakpoint will be added at
35
+ that line, otherwise it will be added to the line below `break`. It's better to
36
+ insert the `#--> break` where you NEED it, rather than hardcode line numbers.
37
+ Line numbers are not constant.
@@ -9,10 +9,10 @@ Gem::Specification.new do |gem|
9
9
  gem.authors = ['Colin Thomas-Arnold <colinta@gmail.com>']
10
10
 
11
11
  gem.description = <<-DESC
12
- Analizaruptor is a tool that looks 'require', and 'provides' commands (and does
13
- a *teensy* bit of code analyzing (+/(class|module)\s*(\w+)/+) to provide some
14
- defaults) to make your RubyMotion +Rakefile+ and +debugger_cmds+ files short and
15
- consistent.
12
+ Analizaruptor is a tool that looks for 'break', 'require', and 'provides'
13
+ commands (and does a *teensy* bit of code analyzing (+/(class|module)\s*(\w+)/+)
14
+ to provide some defaults) to make your RubyMotion +Rakefile+ and +debugger_cmds+
15
+ files short and consistent.
16
16
 
17
17
  To use, include this gem, and add +app.analyze+ to your +Rakefile+, after you
18
18
  have added your libraries and whatnot. In your source code you can add
@@ -28,8 +28,4 @@ DESC
28
28
  gem.files = `git ls-files`.split($\)
29
29
  gem.require_paths = ['lib']
30
30
  gem.test_files = gem.files.grep(%r{^spec/})
31
-
32
- gem.add_dependency 'rake'
33
- gem.add_development_dependency 'rspec'
34
-
35
31
  end
data/lib/analizaruptor.rb CHANGED
@@ -45,7 +45,7 @@ Motion::Project::App.setup do |app|
45
45
  dependers.each do |filename, dependencies|
46
46
  if dep = dependencies.find { |dep| ! providers.include? dep }
47
47
  puts "\033[1m¡NO HAY!\033[0m \033[1;31m#{dep}\033[0m"
48
- raise "Could not find a provider for #{dep}"
48
+ raise "#{filename} could not find a provider for #{dep}"
49
49
  else
50
50
  self.files_dependencies filename => dependencies.map{|dep| providers[dep] }
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module Analizaruptor
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
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.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,48 +9,16 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-31 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
38
- type: :development
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- description: ! 'Analizaruptor is a tool that looks ''require'', and ''provides'' commands
47
- (and does
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: ! 'Analizaruptor is a tool that looks for ''break'', ''require'', and
15
+ ''provides''
48
16
 
49
- a *teensy* bit of code analyzing (+/(class|module) *(w+)/+) to provide some
17
+ commands (and does a *teensy* bit of code analyzing (+/(class|module) *(w+)/+)
50
18
 
51
- defaults) to make your RubyMotion +Rakefile+ and +debugger_cmds+ files short and
19
+ to provide some defaults) to make your RubyMotion +Rakefile+ and +debugger_cmds+
52
20
 
53
- consistent.
21
+ files short and consistent.
54
22
 
55
23
 
56
24
  To use, include this gem, and add +app.analyze+ to your +Rakefile+, after you
@@ -70,6 +38,7 @@ executables: []
70
38
  extensions: []
71
39
  extra_rdoc_files: []
72
40
  files:
41
+ - .gitignore
73
42
  - LICENSE
74
43
  - README.md
75
44
  - analizaruptor.gemspec