ing 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +5 -0
  2. data/GENERATORS.md +2 -0
  3. data/LICENSE +18 -0
  4. data/OPTIONS.md +2 -0
  5. data/README.md +251 -0
  6. data/TASKS.md +21 -0
  7. data/bin/ing +5 -0
  8. data/examples/rspec_convert.rb +102 -0
  9. data/ing.gemspec +29 -0
  10. data/ing.rb +102 -0
  11. data/lib/ing.rb +78 -0
  12. data/lib/ing/actions/create_file.rb +105 -0
  13. data/lib/ing/actions/create_link.rb +57 -0
  14. data/lib/ing/actions/directory.rb +98 -0
  15. data/lib/ing/actions/empty_directory.rb +155 -0
  16. data/lib/ing/actions/file_manipulation.rb +308 -0
  17. data/lib/ing/actions/inject_into_file.rb +109 -0
  18. data/lib/ing/commands/boot.rb +76 -0
  19. data/lib/ing/commands/generate.rb +64 -0
  20. data/lib/ing/commands/help.rb +87 -0
  21. data/lib/ing/commands/implicit.rb +59 -0
  22. data/lib/ing/commands/list.rb +108 -0
  23. data/lib/ing/dispatcher.rb +132 -0
  24. data/lib/ing/files.rb +190 -0
  25. data/lib/ing/lib_trollop.rb +782 -0
  26. data/lib/ing/shell.rb +390 -0
  27. data/lib/ing/trollop/parser.rb +17 -0
  28. data/lib/ing/util.rb +61 -0
  29. data/lib/ing/version.rb +3 -0
  30. data/lib/thor/actions/file_manipulation.rb +30 -0
  31. data/lib/thor/shell/basic.rb +44 -0
  32. data/test/acceptance/ing_run_tests.rb +164 -0
  33. data/test/actions/create_file_spec.rb +209 -0
  34. data/test/actions/create_link_spec.rb +90 -0
  35. data/test/actions/directory_spec.rb +167 -0
  36. data/test/actions/empty_directory_spec.rb +146 -0
  37. data/test/actions/file_manipulation_spec.rb +433 -0
  38. data/test/actions/inject_into_file_spec.rb +147 -0
  39. data/test/fixtures/application.rb +2 -0
  40. data/test/fixtures/app{1}/README +3 -0
  41. data/test/fixtures/bundle/execute.rb +6 -0
  42. data/test/fixtures/bundle/main.thor +1 -0
  43. data/test/fixtures/doc/%file_name%.rb.tt +1 -0
  44. data/test/fixtures/doc/COMMENTER +10 -0
  45. data/test/fixtures/doc/README +3 -0
  46. data/test/fixtures/doc/block_helper.rb +3 -0
  47. data/test/fixtures/doc/components/.empty_directory +0 -0
  48. data/test/fixtures/doc/config.rb +1 -0
  49. data/test/fixtures/doc/config.yaml.tt +1 -0
  50. data/test/fixtures/group.ing.rb +76 -0
  51. data/test/fixtures/invok.ing.rb +50 -0
  52. data/test/fixtures/namespace.ing.rb +52 -0
  53. data/test/fixtures/require.ing.rb +7 -0
  54. data/test/fixtures/task.ing.rb +36 -0
  55. data/test/fixtures/task.thor +10 -0
  56. data/test/spec_helper.rb +2 -0
  57. data/test/test_helper.rb +41 -0
  58. data/todo.yml +7 -0
  59. metadata +147 -0
@@ -0,0 +1,41 @@
1
+ gem 'minitest'
2
+ require 'minitest/autorun'
3
+
4
+ require 'fakeweb'
5
+
6
+ require File.expand_path('../lib/ing', File.dirname(__FILE__))
7
+
8
+ ARGV.clear
9
+
10
+ # Load fixtures
11
+ load File.join(File.dirname(__FILE__), "fixtures", "task.ing.rb")
12
+ load File.join(File.dirname(__FILE__), "fixtures", "group.ing.rb")
13
+ load File.join(File.dirname(__FILE__), "fixtures", "invok.ing.rb")
14
+
15
+ module TestHelpers
16
+
17
+ def source_root
18
+ File.join(File.dirname(__FILE__), 'fixtures')
19
+ end
20
+
21
+ def destination_root
22
+ File.join(File.dirname(__FILE__), 'sandbox')
23
+ end
24
+
25
+ def capture(stream)
26
+ begin
27
+ stream = stream.to_s
28
+ eval "$#{stream} = StringIO.new"
29
+ yield
30
+ result = eval("$#{stream}").string
31
+ ensure
32
+ eval("$#{stream} = #{stream.upcase}")
33
+ end
34
+
35
+ result
36
+ end
37
+ alias :silence :capture
38
+
39
+ end
40
+
41
+ SpecHelpers = TestHelpers
data/todo.yml ADDED
@@ -0,0 +1,7 @@
1
+ Ing todo
2
+ ---
3
+ - add Shell::Color
4
+ - remove global Ing.shell_class, specify via color switch
5
+ - incorporate gsub_file patch, patches to Shell
6
+ - refactor common functionality out of built-in commands
7
+ - add a generator base class for the common use-case
metadata ADDED
@@ -0,0 +1,147 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ing
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Eric Gjertsen
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-09-16 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: fakeweb
16
+ requirement: &12266780 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *12266780
25
+ description: ! "\nAn alternative to Rake and Thor, Ing has a command-line syntax similar
26
+ to \nThor's, and it incorporates Thor's (Rails') generator methods and shell \nconventions.
27
+ But unlike Thor or Rake, it does not define its own DSL. Your tasks\ncorrespond
28
+ to plain ruby classes and methods. Ing just handles routing from the \ncommand line
29
+ to them, and setting options. Your classes (or even Procs) do the \nrest.\n "
30
+ email:
31
+ - ericgj72@gmail.com
32
+ executables:
33
+ - ing
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - GENERATORS.md
39
+ - LICENSE
40
+ - OPTIONS.md
41
+ - README.md
42
+ - TASKS.md
43
+ - bin/ing
44
+ - examples/rspec_convert.rb
45
+ - ing.gemspec
46
+ - ing.rb
47
+ - lib/ing.rb
48
+ - lib/ing/actions/create_file.rb
49
+ - lib/ing/actions/create_link.rb
50
+ - lib/ing/actions/directory.rb
51
+ - lib/ing/actions/empty_directory.rb
52
+ - lib/ing/actions/file_manipulation.rb
53
+ - lib/ing/actions/inject_into_file.rb
54
+ - lib/ing/commands/boot.rb
55
+ - lib/ing/commands/generate.rb
56
+ - lib/ing/commands/help.rb
57
+ - lib/ing/commands/implicit.rb
58
+ - lib/ing/commands/list.rb
59
+ - lib/ing/dispatcher.rb
60
+ - lib/ing/files.rb
61
+ - lib/ing/lib_trollop.rb
62
+ - lib/ing/shell.rb
63
+ - lib/ing/trollop/parser.rb
64
+ - lib/ing/util.rb
65
+ - lib/ing/version.rb
66
+ - lib/thor/actions/file_manipulation.rb
67
+ - lib/thor/shell/basic.rb
68
+ - test/acceptance/ing_run_tests.rb
69
+ - test/actions/create_file_spec.rb
70
+ - test/actions/create_link_spec.rb
71
+ - test/actions/directory_spec.rb
72
+ - test/actions/empty_directory_spec.rb
73
+ - test/actions/file_manipulation_spec.rb
74
+ - test/actions/inject_into_file_spec.rb
75
+ - test/fixtures/application.rb
76
+ - test/fixtures/app{1}/README
77
+ - test/fixtures/bundle/execute.rb
78
+ - test/fixtures/bundle/main.thor
79
+ - test/fixtures/doc/%file_name%.rb.tt
80
+ - test/fixtures/doc/COMMENTER
81
+ - test/fixtures/doc/README
82
+ - test/fixtures/doc/block_helper.rb
83
+ - test/fixtures/doc/components/.empty_directory
84
+ - test/fixtures/doc/config.rb
85
+ - test/fixtures/doc/config.yaml.tt
86
+ - test/fixtures/group.ing.rb
87
+ - test/fixtures/invok.ing.rb
88
+ - test/fixtures/namespace.ing.rb
89
+ - test/fixtures/require.ing.rb
90
+ - test/fixtures/task.ing.rb
91
+ - test/fixtures/task.thor
92
+ - test/spec_helper.rb
93
+ - test/test_helper.rb
94
+ - todo.yml
95
+ homepage: https://github.com/ericgj/ing
96
+ licenses: []
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ! '>='
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ requirements:
114
+ - ruby >= 1.9
115
+ rubyforge_project: ''
116
+ rubygems_version: 1.8.10
117
+ signing_key:
118
+ specification_version: 3
119
+ summary: Vanilla ruby command-line scripting
120
+ test_files:
121
+ - test/acceptance/ing_run_tests.rb
122
+ - test/actions/create_file_spec.rb
123
+ - test/actions/create_link_spec.rb
124
+ - test/actions/directory_spec.rb
125
+ - test/actions/empty_directory_spec.rb
126
+ - test/actions/file_manipulation_spec.rb
127
+ - test/actions/inject_into_file_spec.rb
128
+ - test/fixtures/application.rb
129
+ - test/fixtures/app{1}/README
130
+ - test/fixtures/bundle/execute.rb
131
+ - test/fixtures/bundle/main.thor
132
+ - test/fixtures/doc/%file_name%.rb.tt
133
+ - test/fixtures/doc/COMMENTER
134
+ - test/fixtures/doc/README
135
+ - test/fixtures/doc/block_helper.rb
136
+ - test/fixtures/doc/components/.empty_directory
137
+ - test/fixtures/doc/config.rb
138
+ - test/fixtures/doc/config.yaml.tt
139
+ - test/fixtures/group.ing.rb
140
+ - test/fixtures/invok.ing.rb
141
+ - test/fixtures/namespace.ing.rb
142
+ - test/fixtures/require.ing.rb
143
+ - test/fixtures/task.ing.rb
144
+ - test/fixtures/task.thor
145
+ - test/spec_helper.rb
146
+ - test/test_helper.rb
147
+ has_rdoc: